Quantcast
Channel: SCN : Discussion List - Scripting Languages
Viewing all articles
Browse latest Browse all 325

PHP and BAPI_CUSTOMER_CREATEFROMDATA1 problem

$
0
0

Hi guys,

 

I am having difficulties creating customers via BAPI_CUSTOMER_CREATEFROMDATA1, the function is working without problems in SE37 but not via RFC.

 

I keep getting the following error.

 

Errors found during saprfc-Calls:

 


saprfc::callFunction('BAPI_CUSTOMER_CREATEFROMDATA1')
Import-Parameter=PI_PERSONALDATA could not be set. (Does it exist?)

 

My parameters are.

 

$personal_data['PI_PERSONALDATA'] = array(    'FIRSTNAME'     =>  'ZSOLDOS',    'LASTNAME'      =>  'SZABOLCS TEST',    'DATE_BIRTH'    =>  '26.05.1987',    'CITY'          =>  'WEBSERVICE LAND',    'STREET'        =>  'DECEBAL 20/6',    'COUNTRY'       =>  'RO',    'COUNTRYISO'    =>  'RO',    'REGION'        =>  'MS',    'TEL1_NUMBER'   =>  '0751380275',    'E_MAIL'        =>  'szabi@bysobi.com',    'LANGU_P'       =>  'RO',    'LANGUP_ISO'    =>  'RO',    'CURRENCY'      =>  'RO'
);


$personal_data['PI_COPYREFERENCE'] = array(
    'SALESORG'      =>  'BYSO',    'DISTR_CHAN'    =>  '01',    'DIVISION'      =>  '01',    'REF_CUSTMR'    =>  '600102'
);




$result = $b2c->sapConnection()->callFunction("BAPI_CUSTOMER_CREATEFROMDATA1",    array(        array("IMPORT","PI_PERSONALDATA",$personal_data['PI_PERSONALDATA']),        array("IMPORT","PI_COPYREFERENCE",$personal_data['PI_COPYREFERENCE'])    )
);


$result_commit = $b2c->sapConnection()->callFunction("BAPI_TRANSACTION_COMMIT",         array(            array("IMPORT","WAIT", ""),            array("EXPORT","RETURN", array()),         )); 

if($b2c->sapConnection()->getStatus() == SAPRFC_OK) {    print_r($result);
} else {    echo 'nope';
}

Viewing all articles
Browse latest Browse all 325

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>