on 05-16-2007 7:01 PM
Hi All,
I'm using SRM 5.0 with the PO versioning ON. I need to do a mass PO change from a Z program.
I tried to use the FM BBP_PD_PO_UPDATE but it gives me an interface error. It is not updating the PO. I doubt that the GUIDs (Header/Item) i pass to the FM is causing the issue.
Can anyone tell me how to handle the FM. Or is there anyother way that i could use to update the PO?
Thanks in advance.
Suresh
Thanks a lot. It worked
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First get a list of all the POs you want to change.
Loop at that list and get the details of that po using FM BBP_PD_PO_GETDETAIL.
MOVE-CORRESPONDING header to update_header (different structure), so guids stay the same there as it is that exact guid you want to update.
Only update those things you want to update (except longtext as that will be wiped and if you want to update some text, include all of it).
It's quite easy to add additional items: copy an existing item, create a new guid using GUID_CREATE (or CREATE_GUID no systems here atm), replace the original guid with the new one. Append this to the item_update structure.
Call FM BBP_PD_PO_UPDATE with the update_header and all changed other things.
This will return a new header with a new guid (a change version).
Call FM BBP_PD_PO_SAVE with the returned header from the update.
Commit changes.
That's it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Robin,
Thanks for the reply. This is exactly what i did....
I mapped the header structure, which i get from the Getdetail FM, to the update_structure of the FM BBP_PD_PO_UPDATE. Also the item_data with change in the gross_price.
But the FM returns a message of type 'A' with 'Interface Data error' and it did not return a header(change version).
Is there anything else i need to pass to the update FM?
Thanks,
Suresh
Hi
<b>Please refer to the following sample code below.</b>
DATA: ls_header_u TYPE bbp_pds_po_header_u,
lt_item_c LIKE bbp_pds_po_item_icu OCCURS 0 WITH HEADER LINE,
lt_account_c LIKE bbp_pds_acc OCCURS 0 WITH HEADER LINE,
lt_partner_c LIKE bbp_pds_partner OCCURS 0 WITH HEADER LINE,
lt_orgdata_c LIKE bbp_pds_org OCCURS 0 WITH HEADER LINE,
lt_messages LIKE bbp_pds_messages OCCURS 0.
CALL FUNCTION 'BBP_PD_PO_UPDATE'
EXPORTING
i_park = 'X'
i_header = ls_header_u
TABLES
i_item = lt_item_c
i_account = lt_account_c
i_partner = lt_partner_c
i_longtext = lt_longtext_c
i_orgdata = lt_orgdata_c
e_messages = lt_messages.
CALL FUNCTION 'BBP_PD_PO_SAVE'.
CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER'.
COMMIT WORK AND WAIT.
<u>For more details, refer to the standard program code - MBT_PO_MASS_CREATE</u>
Hope this will help.
Regards
- Atul
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.