cancel
Showing results for 
Search instead for 
Did you mean: 

How to reorder SRM PO using Code ?

Former Member
0 Kudos

I am trying to update the SRM PO which is ordered. After the update the change version is created and status goes to Awaiting approval but requirement is not be in Awaiting Approval should be Ordered status.Need this functionality using coding.

In SRM 7.0 .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

1.

CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER'

               EXPORTING

                 I_NO_STATUS = ' '

                 I_NO_WFL    = C_ON.

2.

CALL FUNCTION 'BBP_PD_PO_UPDATE'

               EXPORTING

                 i_header                = ls_upd_head_po

                 i_save                  = 'X'

                 iv_with_change_approval = ' '

               IMPORTING

                 e_changed               = lv_chn_po

                 es_header               = ls_upd_header

               TABLES

                 i_item                  = lt_upd_item_po

                 e_messages              = lt_upd_err_po.

3.

CALL FUNCTION 'BBP_PD_PO_SAVE'

                   EXPORTING

                     iv_header_guid = ls_save_head_po-guid.

4.

CALL FUNCTION 'BBP_PD_PO_TRANSFER_EXEC'

                   EXPORTING

                     I_GUID = ls_save_head_po-guid.

5.

COMMIT WORK AND WAIT.

                   CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER'.


This was the solution applied for the issue.


Answers (2)

Answers (2)

jason_boggans
Active Contributor
0 Kudos
Former Member
0 Kudos

Please check if your workflow is OK, the status should be released and the change will update the PO in ecc automatically.

Regards,

Lin