Kishore Thutaram
"SAP solution architect with a strong problem-solving mindset, sharing practical SAP S/4HANA and ABAP insights from real-world projects."
https://fiowelt.comBusiness Scenario:
“To determine the condition records for Material exclusion/Listing at sales order creation or change, we need the custom fields mapping in sales order user exit”
Steps : User Exit Include : MV45AFZA
Form routine : FORM USEREXIT_MOVE_FIELD_TO_KOMPG.
DATA: ls_vbap_cust TYPE mara.
CLEAR ls_vbap_cust.
SELECT SINGLE matnr,
zz1_mchl1,
zz1_mchl2,
zz1_prods,
INTO CORRESPONDING FIELDS OF ls_vbap_cust
FROM mara
WHERE matnr = vbap-matnr.
IF sy-subrc EQ 0.
kompg-zz1_mchl1 = ls_vbap_cust-zz1_mchl1.
kompg-zz1_mchl2 = ls_vbap_cust-zz1_mchl2.
kompg-zz1_prods = ls_vbap_cust-zz1_prods.
ENDIF.
"SAP solution architect with a strong problem-solving mindset, sharing practical SAP S/4HANA and ABAP insights from real-world projects."
https://fiowelt.com