Application Development and Automation 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: 
Read only

User exit for MD01

Former Member
0 Likes
1,268

Hii

I am doing user exit for MD01 i am finding difficulty in writing the code .

I want materials haveing MRP Type : 'V1'.

I wrote code for it but its not working ..

TABLES: t024d,

mara,

marc .

TABLES : t023t.

DATA: v_dispo TYPE dispo,

v_matkl TYPE matkl.

IF user_key = 'ZME'.

IF user_par = SPACE.

MESSAGE e000(zmessage) WITH 'User Parameter should not be blank'.

ENDIF.

SELECT SINGLE * FROM t024d INTO t024d

WHERE dispo = user_par.

IF sy-subrc ne 0.

MESSAGE e000(zss) WITH 'Please Check the MRP controller number'.

exit.

ENDIF.

SELECT SINGLE * FROM t024d INTO t024d

WHERE werks = mt61d-werks AND

dispo = user_par.

IF sy-subrc = 0.

SELECT SINGLE dispo FROM marc INTO v_dispo

WHERE dismm = 'V1' and

*matnr = mt61d-matnr

*AND

werks = mt61d-werks.

*and DISMM = 'VB'.

IF sy-subrc EQ 0.

*CHECK v_dispo user_par.

no_planning = 'X'.

ENDIF.

ENDIF.

CLEAR v_dispo.

ELSEIF user_key = '002'.

SELECT SINGLE * FROM t023t INTO t023t

WHERE matkl = user_par.

IF sy-subrc eq 0.

MESSAGE e000(zss) WITH 'Invalid material group no.' user_par.

ENDIF.

SELECT SINGLE matkl FROM mara INTO v_matkl

WHERE matnr = mt61d-matnr.

IF v_matkl = user_par.

no_planning = 'X'.

ENDIF.

ENDIF.

Please help me ....

Hii

I am doing user exit for MD01 i am finding difficulty in writing the code .

I want materials haveing MRP Type : 'V1'.

I wrote code for it but its not working ..

TABLES: t024d,

mara,

marc .

TABLES : t023t.

DATA: v_dispo TYPE dispo,

v_matkl TYPE matkl.

IF user_key = 'ZME'.

IF user_par = SPACE.

MESSAGE e000(zmessage) WITH 'User Parameter should not be blank'.

ENDIF.

SELECT SINGLE * FROM t024d INTO t024d

WHERE dispo = user_par.

IF sy-subrc ne 0.

MESSAGE e000(zss) WITH 'Please Check the MRP controller number'.

exit.

ENDIF.

SELECT SINGLE * FROM t024d INTO t024d

WHERE werks = mt61d-werks AND

dispo = user_par.

IF sy-subrc = 0.

SELECT SINGLE dispo FROM marc INTO v_dispo

WHERE dismm = 'V1' and

*matnr = mt61d-matnr

*AND

werks = mt61d-werks.

*and DISMM = 'VB'.

IF sy-subrc EQ 0.

*CHECK v_dispo user_par.

no_planning = 'X'.

ENDIF.

ENDIF.

CLEAR v_dispo.

ELSEIF user_key = '002'.

SELECT SINGLE * FROM t023t INTO t023t

WHERE matkl = user_par.

IF sy-subrc eq 0.

MESSAGE e000(zss) WITH 'Invalid material group no.' user_par.

ENDIF.

SELECT SINGLE matkl FROM mara INTO v_matkl

WHERE matnr = mt61d-matnr.

IF v_matkl = user_par.

no_planning = 'X'.

ENDIF.

ENDIF.

Please help me ....

6 REPLIES 6
Read only

Former Member
0 Likes
1,095

for ur user exit to work u need to have an active project for it. only exits inside active projects are activated for working

Read only

0 Likes
1,095

i have actived exit EXIT_SAPMM61X_001 and writeen my code in include ZXM61U01.But still it didnt work.

Read only

Former Member
0 Likes
1,095

Hi,

Please check if this user exit actually is triggered from MD01.

I could not find it.

Reg,

Raj

Read only

0 Likes
1,095

i created a project with name ZME and written that code in it..

i actually runs.

in my case if you give ZME as user exit key and 001 as User exit parameter the user exit triggers.

Read only

0 Likes
1,095

solved

Read only

0 Likes
1,095

How to solved it ?