‎2007 Aug 31 10:07 AM
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
‎2007 Aug 31 4:28 PM
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
‎2007 Aug 31 4:28 PM
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