cancel
Showing results for 
Search instead for 
Did you mean: 

Passing the tracking number from SRM Local PO to SAP backend PO

Former Member
0 Kudos

Hello Forum members,

I am posting this on behalf of our ABAP developer in the hope that someone in this forum may have experienced a simalar issue.....

Basically, we are attempting to implement METHOD if_ex_bbp_ecs_po_out_badi~bbp_b46b_po_outbound, so that we can pass the Tracking Number from SRM 5.0 to SAP ECC5. We have followed OSS Note 676016, so that the tracking number is available on the Cart and PO line items.

Our ABAP developer has coded the ABAP below but this is failing to pass the tracking number between SRM PO and the SAP PO via backend processing. The below code is trying to update the corresponding entry in table CT_BAPI_POITEM but fails with sy-subrc of 4.

Any help would be highly appreciated!

Thanks, Gordon

data: ls_item type bbp_pds_po_item_d,

ls_bapi_poitem type bbps_if_bapimepoitem_pi,

lv_be_value type bbp_value,

lv_row type sytabix.

lv_row = 0.

loop at ct_bapi_poitem into ls_bapi_poitem.

if ls_bapi_poitem-po_item is not initial.

read table it_item into ls_item

with key number_int = ls_bapi_poitem-po_item

del_ind = ' '.

if sy-subrc eq 0.

ls_bapi_poitem-trackingno = ls_item-be_tracking_no.

modify table ct_bapi_poitem from ls_bapi_poitem transporting trackingno.

*******************************************

          • *****

          • Here we get a sy-subrc of 4 *****

          • Table update fails *****

          • *****

*******************************************

endif.

endif.

endloop.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Gordon

I would be intersted in finding out how you actually got the tracking number on the PO line items by using note 676016. We have managed to get it on the SC by following the note.

Thanks in advance.

Neil

Former Member
0 Kudos

Hi,

Use the BBP_DOC_CHANGE_BADI for this, method BBP_SC_CHANGE.

Then something like this, replace {work area} with a variable of your own choice.

DATA: {work area} TYPE bbp_pds_sc_item_icu.

LOOP AT it_item INTO {work area}.

Selecr single object_id INTO

{work area}-be_tracking_no FROM

crmd_orderadm_h WHERE

guid = is_header-guid.

MODIFY it_item FROM {work area} TRANSPORTING be_tracking_no.

ENDLOOP.

et_item = it_item.

at the end of your code to transfer the import parameters to the export.

another way..

To transfer sc no to Traking number in PR use the BADI BBP_CREATE_BE_RQ_NEW

method FILL_RQ_INTERFACE

Thanks,

prasad .s