How to Automatically Update Target Value in Scheduling Agreement (ME32L) Using SAP ABAP Exit
Automatically Update Target Value in Scheduling Agreement (ME32L) Using SAP ABAP Exit
1. Open SMOD tcode in SAP
- Open your SAP and input SMOD tcode
2. Display Enhancement MM06E005
- Enter
MM06E005 and click Display.- This enhancement contains several exits related to Purchase Orders and Scheduling Agreements.
- Double click on
EXIT_SAPMM06E_012.4. Add Custom ABAP Logic
SAP will redirect you to the include program (
Insert the following logic:
ZXM06U43).Insert the following logic:
CASE sy-tcode.
WHEN 'ME32L'.
DATA: lv_zwert TYPE ekpo-zwert.
FIELD-SYMBOLS: <fs_ekko> TYPE ekko.
ASSIGN ('(SAPMM06E)EKKO') TO <fs_ekko>.
LOOP AT tekpo ASSIGNING FIELD-SYMBOLS (<fs_ekpo>) WHERE loekz = ' '.
lv_zwert = lv_zwert + <fs_ekpo>-zwert.
ENDLOOP.
<fs_ekko>-ktwrt = lv_zwert.
ENDCASE.
Comments
Post a Comment