cancel
Showing results for 
Search instead for 
Did you mean: 

parameters sintax for BAPIs in PHP?

Former Member
0 Kudos

Hi,

can someone help me with the parameters sintax for these bapis (bapi_salesorder_createfromdat2 and bapi_transaction_commit) in PHP?

More details ...

I wrote a PHP script calling thats bapis, I sent the values in arrays. When I ran the script I got any error, but it shows a list of empty data and at the bottom the follow messages:

No errors detected.

call function 'BAPI_TRANSACTION_COMMIT' successfull.

But there is no sales order created in the database.

I think, the sintax for the parameters are wrong or maybe all my logic

Attach files: My PHP script and a  file with the output of the execution (please change the extensions

I'm using wampserver 2.2 installed locally ( apache 2.2.21 - PHP 5.3.8 ) my SAP QAS is in Oracle.

thanks

-- sorry for my pour english --

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member216744
Discoverer
0 Kudos

No errors detected.

call function 'BAPI_TRANSACTION_COMMIT' successfull.

This is displaying because ur not checking any condition and simply added this code as part of html.,so it is displaying as default one.

Checking condition and displaying status msg is the required thing to do this follow steps may help.

Method:(To Display Error msg from client browser)

1.in php file write some code to check whether record is inserted in database successfully or not.

   ( store success or error message in variable ).

2.by using ajax post method send this message to html file and display status msg.

   ( javasrcipt is used for above step ).

Former Member
0 Kudos

Sorry, the correct extensions for the atacched files are:

1. salesordersPHP_SAP_EXAMPLE.txt it must be salesordersPHP_SAP_EXAMPLE.PHP

2. salesordersPHP_SAP_EXAMPLE.php.txt it must be salesordersPHP_SAP_EXAMPLE.PHP.HTML

Former Member
0 Kudos

Hi Gustavo,

Did you manage to get the script to work?

if yes? can you please share the script as i have similar issues

Regards