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 BY TCODE MIGO

Former Member
0 Likes
1,177

Hi to all

I need do it, a enhancement by the transaction MIGO, just when the document is saved.

Somebody knows, an enhacement in particular ??

Thank by their aid.

regards

Dario

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,121

Hi,

Please make sure to reward points for helpful answers..

Thanks,

Naren

10 REPLIES 10
Read only

Former Member
0 Likes
1,121

Hello,

try this one

MB_MIGO_BADI...... and the method is POST_DOCUMENT.

Hope this helps

Gabriel

Read only

0 Likes
1,121

Hi, thank you by their aid, but,.. I need a method to recover the number material document and make other things with this number.,...

THat is, execute inmediately AFTER that document is saved in SAP

Please, somebody knows what is this method ??

Thank you very much

Regards

Dario

Read only

Former Member
0 Likes
1,121

Hi,

Try using the BADI MB_DOCUMENT_BADI

call method MB_DOCUMENT_BADI->MB_DOCUMENT_UPDATE

OR the user exit.EXIT_SAPLMBMB_001..

Both are called in the FM MB_POST_DOCUMENT..You will have the material document number available ...

Note: The FM MB_POST_DOCUMENT is called in UPDATE TASK..So to check..use the update debugging...

Thanks,

Naren

Read only

0 Likes
1,121

Naren: Thanks by the information.

In this Badi MB_DOCUMENT_BADI, I view the material number, But, in addition, I need that this material number is posted in SAP, and it is reflected in the stock.

The problem is, that, I view the document number but, in the transaction code MB03 this document doesn't exists.

I need a Badi, that, once posted the document number, make a task, that is inmediately the document is saved in the data base.

Thank you by their aid

regards

Dario

Read only

Former Member
0 Likes
1,121

Hi,

Assuming this is your requirement..

Store the MKPF & MSEG details in a Z table...when the material document is created..

Solution

-


1)

Create a function module Z_ADD_ZTABLE..Which should be remote enabled..

Give the parameter..

You can select on MKPF and MSEG with the material document number that has been just posted...The values are available in XMKPF-MBLNR..

Example.

-


SELECT SINGLE * FROM MKPF WHERE MBLNR = XMKPF-MBLNR.

****The return code will be zero..Means the record is available in the database.

2)

IN the BADI MB_DOCUMENT_BADI or in the USER EXIT...

CALL the function module in BACKGROUND TASK..

Example

-


CALL FUNCTION 'Z_ADD_ZTABLE' IN BACKGROUND TASK

Exporting

-


Hope this is clear..

Thanks,

Naren

Read only

0 Likes
1,121

Naren: Thanks again,...

I have the following:

I make the FM ZDOC_MAT

This FM, is called in the method MB_DOCUMENT_UPDATE of the badi MB_DOCUMENT_BADI.

The form, that I call the FM is the following:

LOOP AT XMSEG INTO MSEG_AUX.

CALL FUNCTION 'ZDOC_MAT' IN BACKGROUND TASK

EXPORTING

PMBLNR = MSEG_AUX-MBLNR.

ENDLOOP.

In the FM, I make a statement SELECT, by seek if the document number have seen created.

If sy-subrc eq 0, insert the document number in a Z table

SELECT SINGLE *

FROM MKPF

INTO CORRESPONDING FIELDS OF MKPF

WHERE MBLNR = PMBLNR.

IF SY-SUBRC EQ 0.

zborrar-mblnr = pmblnr.

insert zborrar.

But, in the Z table dont appear the document number,... isn´t inserted,..

PLease, help me in know what occurs.

Thank you a lot of !!

regards

dario

Read only

Former Member
0 Likes
1,121

Hi,

Did you make that FM as remote enabled..

Go to SE37..

Give the FM ZDOC_MAT

Press change button..

In the attributes tab..

Select the radio button "Remote-enabled module"

Activate the FM.

Thanks,

Naren

Read only

Former Member
0 Likes
1,122

Hi,

Please make sure to reward points for helpful answers..

Thanks,

Naren

Read only

0 Likes
1,121

YOU ARE THE BEST !!!!

thaak you Naren !!!

Read only

Former Member
0 Likes
1,121

Glad to help..:-))

THanks,

Naren