on 2011 Nov 16 6:12 AM
Hello,
I want to updated payment terms from Vendor details to my PO through Z report,
I'm following below steps
1. BBP_PD_PO_GETDETAIL
2. BBP_PD_PO_UPDATE - I"m getting e_changes = 'X'
3. BBP_PD_PO_SAVE - Passing current GUD which is updated
4. BBP_PROCDOC_RESET_BUFFER
5. COMMIT WORK AND WAIT.
After this I want to transfer this PO to backend system and for this I"m using FM BBP_PD_PO_TRANSFER_EXEC by passing current GUID.
But PO is not getting updated in SRM system because of which then not tranferred to ECC.
I'm getting Warining messages type 'W' in ET_MESSAGES table for FM BBP_PD_PO_UPDATE, but still PO is not getting updated.
Is there any other solution by which I can update PO in SRM and then transfer to backend system?
I searched several threads but dont find exact solution to this.
Regards,
Yogesh Tambe
Request clarification before answering.
Please help me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I fyou want to tranfer the SRM PO changes to the backend better try to order the SRM PO again from SRM system.
i send sample code updated only SRM PO header and tranferred automatically if u order the SRM PO ....this will work for
SRM 7
DATA: lo_pdo_po TYPE REF TO /sapsrm/cl_pdo_bo_po_adv,
lo_msg_handler TYPE REF TO /sapsrm/if_pdo_msg_consumer,
lo_pdo_msg TYPE REF TO /sapsrm/cl_pdo_msg.
DATA: ls_header TYPE bbp_pds_po_header_d,
ls_header_guid TYPE bbp_guid_tab,
ls_header_update TYPE bbp_pds_po_header_u.
TRY.
"Get Instance of PO Change Version
lo_pdo_po ?= /sapsrm/cl_pdo_factory_po_adv=>get_instance(
iv_header_guid = p_guid " Document guid
iv_mode = /sapsrm/if_pdo_constants_gen_c=>gc_mode_edit
iv_process_type = p_prctyp ). " Process type optional
IF lo_pdo_po IS BOUND.
"Get PO Header of Change Version
lo_pdo_po->/sapsrm/if_pdo_bo_po~get_header_details(
IMPORTING
es_header = ls_header
CHANGING
co_message_handler = lo_msg_handler ).
MOVE-CORRESPONDING ls_header TO ls_header_update.
" update any fields in ls_header_update
"Update Header
lo_pdo_po->/sapsrm/if_pdo_bo_po~update_header(
EXPORTING
is_header = ls_header_update
CHANGING
co_message_handler = lo_msg_handler ).
"Submit Update to PDO Layer
lo_pdo_po->/sapsrm/if_pdo_base~submit_update(
CHANGING
co_message_handler = lo_msg_handler ).
"Order PO
lo_pdo_po->/sapsrm/if_pdo_bo_po~order( CHANGING co_message_handler = lo_msg_handler ).
endif.
CATCH /sapsrm/cx_pdo_order_invalid
/sapsrm/cx_pdo_status_change
/sapsrm/cx_pdo_wf_mode_ban
/sapsrm/cx_pdo_wrong_bus_type
/sapsrm/cx_pdo_pd_read_error
/sapsrm/cx_pdo_lock_failed
/sapsrm/cx_pdo_no_authorizatio
/sapsrm/cx_pdo_parameter_error
/sapsrm/cx_pdo_status_error
/sapsrm/cx_pdo_incons_user
/sapsrm/cx_pdo_abort
/sapsrm/cx_pdo_error .
).
endtry.
regards
Devi
Hello Devi Prasad,
I'm facing this new issue after implementing a code provided by you.
For some POs I'm getting "PDO Layer error" and for some POs error as "The document is released and not changeable"
I found an SAP Note 1531709 for PDO layer issue, which might be implemnted.
But for secodn error i'm not able to find error.
This error is appering at the step while calling method /sapsrm/cl_pdo_factory_po_adv=>get_instance
When I debugged it, program is not able to find any buffered instance ( which could be obvious for new PO), and then it is checking for Mode which is (EDIT). And for this EDIT mode it is giving an exception /sapsrm/cx_pdo_no_edit_inst and /sapsrm/cx_pdo_status_error.
When I'm editing same PO on SRM portal. I'm able to update this PO and transfer it to ECC system.
Can you please help in this issue? as in how to resolve this?
Regards,
Yogesh Tambe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
By implementing this code i'm getting exception for all POs to be updated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.