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

Changing PO tax code using BAPI

rajesh_akarte2
Active Participant
0 Likes
531

Hi friends,

I have one requirement to change tax code for multiple Purchase order but the

thing is they should not go for release.So what should I prefer BDC or BAPI.

I am thinking to implement it through BAPI, but I don't know what procedure to follow.

If somebody can provide me a small guiding steps or code then it will be very helpful for me..

Thnaks in advance..

Useful answers will be rewarded with points....

Regards,

Rajesh Akarte

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
376

Hi,

one possible way is using BAPI_PO_CHANGE.

where's an example to change "asset number" in PO. For changing the conditions in your case, you can do the same.

ACCOUNTX-PO_ITEM = ACCOUNT-PO_ITEM = WA_PED-EBELP.

ACCOUNTX-SERIAL_NO = ACCOUNT-SERIAL_NO = WA_PED-ZEKKN.

ACCOUNT-ASSET_NO = ZBENS_IMOB-ANLN1_NEW.

ACCOUNT-SUB_NUMBER = ZBENS_IMOB-ANLN2_NEW.

APPEND ACCOUNT.

ACCOUNTX-ASSET_NO = 'X'.

ACCOUNTX-SUB_NUMBER = 'X'.

ACCOUNTX-PO_ITEMX = 'X'.

ACCOUNTX-SERIAL_NOX = 'X'.

APPEND ACCOUNTX.

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

PURCHASEORDER = WA_PED-EBELN

TABLES

RETURN = RET

POACCOUNT = ACCOUNT

POACCOUNTX = ACCOUNTX.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

Best Regards,

Message was edited by:

Pedro Rosa

1 REPLY 1
Read only

Former Member
0 Likes
377

Hi,

one possible way is using BAPI_PO_CHANGE.

where's an example to change "asset number" in PO. For changing the conditions in your case, you can do the same.

ACCOUNTX-PO_ITEM = ACCOUNT-PO_ITEM = WA_PED-EBELP.

ACCOUNTX-SERIAL_NO = ACCOUNT-SERIAL_NO = WA_PED-ZEKKN.

ACCOUNT-ASSET_NO = ZBENS_IMOB-ANLN1_NEW.

ACCOUNT-SUB_NUMBER = ZBENS_IMOB-ANLN2_NEW.

APPEND ACCOUNT.

ACCOUNTX-ASSET_NO = 'X'.

ACCOUNTX-SUB_NUMBER = 'X'.

ACCOUNTX-PO_ITEMX = 'X'.

ACCOUNTX-SERIAL_NOX = 'X'.

APPEND ACCOUNTX.

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

PURCHASEORDER = WA_PED-EBELN

TABLES

RETURN = RET

POACCOUNT = ACCOUNT

POACCOUNTX = ACCOUNTX.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

Best Regards,

Message was edited by:

Pedro Rosa