on 01-08-2013 1:42 PM
Hello All,
I am using a z-program to update PO uisng the class /SAPSRM/CL_PDO_BO_PO_ADV.
I need to update the account assignment details of each line item of an existing PO.
Is my approach for this is correct.
Can you please suggest the way for it.
Thank you in advance.
With regards,
Sandeep Akella
Hi Sandeep,
Your approach is correct if you are updating buffered PO, for example, in a PO CHANGE BADI, if this is correct try this:
DATA LO_PDO_PO TYPE REF TO /SAPSRM/IF_PDO_BO_PO_ADV.
DATA LOC_PDO_PO TYPE REF TO /SAPSRM/CL_PDO_BO_PO_ADV.
CALL METHOD /SAPSRM/CL_PDO_FACTORY_PO_ADV=>GET_BUFFERED_INSTANCE
EXPORTING
IV_HEADER_GUID = 'PO_GUID'
RECEIVING
RO_INSTANCE = LO_PDO_PO.
LOC_PDO_PO ?= LO_PDO_PO.
TRY.
LOC_PDO_PO->/SAPSRM/IF_PDO_DO_ORGDATA~UPDATE_ORGDATA(
EXPORTING
IS_ORGDATA = LS_PORG_C " Organizational Data
CHANGING
CO_MESSAGE_HANDLER = LCL_MSG_HAND " Methods for message handling
).
CATCH /SAPSRM/CX_PDO_ABORT. " Fatal error caught by PDO Layer
ENDTRY.
Let's Keep in touch.
Regards
Emanuel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Emanuel,
I am trying to change PO's using a z-program after certain point of time.
Not while creating the PO.
I have tried using the function module BBP_PD_PO_UPDATE.
I am able to update the cost center using this, but unable to update the GL account details.
So I was searching for other method.
Can you please help me in this regards.
With regards,
Sandeep Akella
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.