Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to use a BAPI

Former Member
0 Likes
717

Hi experts,

I am given a condition as follows:

For each of the SO/SO item no, the billing plan no is taken from VBKD table. The billing plan no is validated for the status as "C" , billilng block as "SPACE" , bliing type as "ZFAZ" from FPLT table. If all the conditons are successful, then BAPI_SALESORDER_CHANGE should be called to change the sales order and remove the billing block corresponding to the line item with billing rule as 3(FPLT-FAREG = 3) adn delete the records from the ZBBR table(Customised table created by me) corresponding to the SO/SO item combination if any.

If any one have gone through this condition, can you please give me some sample codes to go through

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
658

chk this BAPI_SALESORDER_PROXY_UPLOAD how the BAPI_SALESORDER_CHANGE was used

chk this BAPI_SALESORDER_PROXY_UPLOAD how the BAPI_SALESORDER_CHANGE was used

4 REPLIES 4
Read only

Former Member
0 Likes
658

loop at i_vbap.

read table vbkd with vbeln = i_vbap - vbeln

posnr = posnr.

check one more table for the contions.

if sy-subrc eq0.

perform bapi.

endif.

endloop.

Regards

Prabhu

Read only

0 Likes
658

Hi Prabhu,

Actually i have done the validations part. I dont know how to do with the BAPI. Can you please guide me in that regard.

Regards,

Buvana

Read only

0 Likes
658

<b>first u have to know what are the fields u have to pass to this BAPI---> for this u have to see the documentation of this BAPI in se37 or search for sample program in SDN ( dont raise one more post )

2.Here in this BAPI u will have 2 tables one for OLD and One for NEW , just check.

in the new table u have to pass all changes which u want to do ?--->I am not sure of this 2 tables , so please check the same in docuementations

3.after this u have to COMMIT the work based on the RETURN tables i.e error log</b>.

Regards

Prabhu

Read only

Former Member
0 Likes
659

chk this BAPI_SALESORDER_PROXY_UPLOAD how the BAPI_SALESORDER_CHANGE was used