To differentiate Master Data from all the ERP(ECC) systems , We have to do prefix specific to system for the following data
Following BADI will be implemented, prefix will be added in the runtime, send the data to Ariba
This Badi has multiple methods
Data :lt_SYSTID_MAP type STANDARD TABLE OF /ARBA/SYSTID_MAP,
ls_SYSTID_MAP type /ARBA/SYSTID_MAP,
ls_vendor_info type /arba/vendor,
ls_vendor_PORG_INFO type /arba/vendor_Po,
lv_lifnr(20) type c,
lv_lifnr1(20) type c,
lv_ekorgx(20) type c,
lv_namex(50) type c,
lv_purcsx(20) type c,
lv_sidx(20) type c,
lv_tbix type sy-tabix,
lv_system(4) type c,
lv_value TYPE tvarv_val,
lv_name TYPE rvari_vnam VALUE 'ERP_ID'.
SELECT SINGLE low " will read value from buffer
INTO lv_value
FROM tvarvc
WHERE name = lv_name.
IF sy-subrc = 0.
lv_system = lv_value.
ENDIF.
CLEAR : lv_lifnr,lv_namex.
LOOP AT vendor_info[] INTO ls_vendor_info.
lv_tbix = sy-tabix.
CONCATENATE lv_system ls_vendor_info-lifnr INTO
lv_lifnr.
CONCATENATE lv_system ls_vendor_info-name1 INTO
lv_namex.
CONCATENATE lv_system ls_vendor_info-systemid INTO
lv_sidx.
ls_vendor_info-lifnrx = lv_lifnr.
ls_vendor_info-namex = lv_namex.
ls_vendor_info-sidx = lv_sidx.
MODIFY vendor_info from ls_vendor_info INDEX lv_tbix.
ENDLOOP.
LOOP AT vendor_PORG_info[] INTO ls_vendor_porg_info.
lv_tbix = sy-tabix.
CONCATENATE lv_system ls_vendor_porg_info-lifnr INTO
lv_lifnr.
CONCATENATE lv_system ls_vendor_porg_info-ekorg INTO
lv_ekorgx.
ls_vendor_porg_info-lifnrx = lv_lifnr.
ls_vendor_porg_info-ekorgx = lv_ekorgx.
MODIFY vendor_porg_info from ls_vendor_porg_info INDEX lv_tbix.
ENDLOOP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.