Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BADI or User-Exit for MSEG

FredericGirod
Active Contributor
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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

0 Kudos

Thanks Sanjay Sinha,

and thanks for the (SAP..)field , I didn't know that's stuff.

Have a nice day

Frédéric