Skip to Content
0
Former Member
Mar 11, 2008 at 08:16 AM

Include ZXMG0U02

772 Views

Hi.

Earlier on I sent an issue regarding a program I created to read mara and marc fields so that a certain value would be copied from mara to marc.

I got help from Matthew Billing (hope you are willing to help again).

The new program looks like this:

&----


*& Include ZXMG0U02

&----


Data: xmmsta like t141-mmsta,

xmstae like mara-mstae,

xmatnr like mara-matnr,

xwerks like marc-werks.

SELECT matnr mstae FROM mara INTO (xmatnr, xmstae) WHERE matnr NE ' ' and mstae EQ '98' or mstae EQ '99'.

IF xmstae EQ '98' OR xmstae EQ '99'.

MOVE xmstae TO xmmsta.

ENDIF.

Write xmmsta to wmarc-mmsta.

CLEAR xmatnr.

CLEAR xmstae.

CLEAR xmmsta.

endselect.

EXIT.

The Include is attached to a standard user exit EXIT_SAPLMGMU_001 which is called upon saving of material (MM01/MM02).

My problem is that the field wmarc which is defined in the user exit is not updated with value from xmmsta. I tried various solutions but no success.

Ideas?

Ryan