cancel
Showing results for 
Search instead for 
Did you mean: 

Enhancing Punchout Catalog data in S4 HANA

chrisgunny
Discoverer

Dear Experts,

After some advice on the best way to implement standard BAdi - MMPUR_OCI_ITEM_TRANSFER_DATA, essentially what I am trying to achieve is:

1) Enrich the fixed vendor based on the the web service that is called.

2) Enrich the material group that is passed back from the external catalog.

The standard BAdi comes with a class CL_EX_MMPUR_OCI_TRANSFER_DATA which contains a changing parameter linked to the structure MMPUR_OCI_CATALOG_ITEM.

This structure contains :

SERVICE_ID

VENDOR

MATGROUP

For objective 1, I planned to create a Z table mapping Service_ID to Vendor (LIFNR) and write some code into the class where it will select the Z table based on the SERVICE_ID and return the LIFNR value into lt_punchout_Items-vendor.

For objective 2, again I need a Z table to map the external punchout return value for MATGROUP ( its normally UNSPSC codes) to my internal Material group. I tested the standard BAdi using fixed value below and the fixed values are passed, the bit I need help with is the code to implement objectives 1 & 2?

Here is the class code.

DATA lt_punchout_items TYPE mmpur_oci_catalog_item.
DATA ls_items TYPE mmpur_oci_catalog_item_t.

LOOP AT ct_punchout_items INTO DATA(ls_oci_items_tmp).
MOVE-CORRESPONDING ls_oci_items_tmp TO lt_punchout_items.
lt_punchout_items-matgroup = '100000'.
lt_punchout_items-vendor = '100000'.
APPEND lt_punchout_items TO ls_items.

ENDLOOP.
ct_punchout_items = ls_items.

View Entire Topic
former_member198566
Active Participant
0 Kudos

Hi, did you get the solution of this? I wanted to understand how the system picks supplier number when we checkout from supplier site to our S/4 procurement. Currently its coming up blank for me, there must be some table to maintain.

Please suggest.

Thank You.

Regards,

Abhishek