2008 Jul 16 8:36 AM
Gyz,
I have a strange problem. I need to do some modifcation to the PO. The PO gets the net price from the Agreement line no. This value will be error for some material category. I need to place a 0 in the net price value field after the user clicks on the save button for these mat. category.. Currently the error is displayed only after the user clicks the save. I tried the exits MM06E004 and MM06E005. The control does not go to any of the functions in these exist after i click on save. The BADI's ME_PROCESS_PO_CUST and ME_GUI_PO_CUST does not exist in SAP 4.6C.
Please let me know your suggestions or other alternatives.
Points assured to all replies.
Madan..
2008 Jul 16 10:41 AM
Hi ,
In the exit after save is clicked may be exit_sapmm06e_012 .
just use this code .
field-symbols : <f1> type bekpo .
loop at ('SAPLMEPO(POT)') assigning <f1>.
if <f1>-material category eq ur logic .
<f1>-netpr = 0.
endif.
modify ('SAPLMEPO(POT)') from <f1> transporting netpr .
endloop.
SAPLMEPO - if using ME21N
SAPMM06E - IF using ME21.
Please reward if useful.
2008 Jul 16 10:41 AM
Hi ,
In the exit after save is clicked may be exit_sapmm06e_012 .
just use this code .
field-symbols : <f1> type bekpo .
loop at ('SAPLMEPO(POT)') assigning <f1>.
if <f1>-material category eq ur logic .
<f1>-netpr = 0.
endif.
modify ('SAPLMEPO(POT)') from <f1> transporting netpr .
endloop.
SAPLMEPO - if using ME21N
SAPMM06E - IF using ME21.
Please reward if useful.
2008 Jul 16 10:47 AM
Hi ,
Use this code in exit_sapmm06e_012.
DATA: WA_TABLE(100) TYPE C,
T_EKPO TYPE STANDARD TABLE OF BEKPO,
WA_EKPO TYPE BEKPO.
FIELD-SYMBOLS: <FS_EKPO> TYPE ANY TABLE.
IF SY-TCODE = 'ME21N' OR
SY-TCODE = 'ME22N'.
WA_TABLE = '(SAPLMEPO)EKPO[]'.
ELSEIF SY-TCODE = 'ME21' OR
SY-TCODE = 'ME22'.
WA_TABLE = '(SAPMM06E)EKPO[]'.
ELSE.
EXIT.
ENDIF.
ASSIGN (WA_TABLE) TO <FS_EKPO>.
T_EKPO] = <FS_EKPO>[.
LOOP AT T_EKPO INTO WA_EKPO.
IF SY-TCODE(4) = 'ME21'.
WA_EKPO-AEDAT = SY-DATUM.
ELSEIF SY-TCODE(4) = 'ME22'.
WA_EKPO-AEDAT = SY-DATUM.
WA_ETT-UPDKZ = 'U'.
ENDIF.
MODIFY T_EKPO FROM WA_EKPO.
ENDLOOP.
<FS_EKPO>] = T_EKPO[.
UNASSIGN <FS_EKPO>.
Please reward if useful.
2008 Jul 17 2:59 AM
Hi,
Please note that the entry will be an error entry.. So before the control goes to the mentioned exit, a error dialog will be displayed... And this is where i would want to make the changes..
Madan..
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |