2005 Sep 29 8:56 AM
Hi,
I'm looking for a BADI or User-Exit to modify a field in MSEG. This field is an IS-Oil component, but, I must modify this field when I make an outbound delivery.
I have tried the BADI MB_DOCUMENT_BADI but the system short-dumb when I modify the field. "The program tried to assign a new value to a field even though it is protected against changes.".
If you have any user-exit or BADI or any solution for this BADI please tell me.
Regards
Frédéric
2005 Sep 29 9:09 AM
Hi
You can use exit ZXMBCU02 ( Function EXIT_SAPMM07M_001
in SAP enhancement MBCF0002 ). Here also whtever changes you make to I_MSEG will be lost as MSEG is an importing parameter. You can do something like this.
FIELD-SYMBOLS <F1> TYPE MSEG.
DATA NAME(50) VALUE '(SAPMM07M)MSEG'.
ASSIGN (NAME) TO <F1>.
<F1>-KOSTL = 'XXXX'.
( In above example MSEG-KOSTL will be set as XXXX, you can change any of MSEG fields in above way. ).
Cheers
2005 Sep 29 9:09 AM
Hi
You can use exit ZXMBCU02 ( Function EXIT_SAPMM07M_001
in SAP enhancement MBCF0002 ). Here also whtever changes you make to I_MSEG will be lost as MSEG is an importing parameter. You can do something like this.
FIELD-SYMBOLS <F1> TYPE MSEG.
DATA NAME(50) VALUE '(SAPMM07M)MSEG'.
ASSIGN (NAME) TO <F1>.
<F1>-KOSTL = 'XXXX'.
( In above example MSEG-KOSTL will be set as XXXX, you can change any of MSEG fields in above way. ).
Cheers
2005 Sep 29 9:55 AM
Thanks Sanjay Sinha,
and thanks for the (SAP..)field , I didn't know that's stuff.
Have a nice day
Frédéric