‎2007 Jan 25 5:33 AM
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
‎2007 Jan 26 11:46 PM
Hi,
Please make sure to reward points for helpful answers..
Thanks,
Naren
‎2007 Jan 25 5:49 AM
Hello,
try this one
MB_MIGO_BADI...... and the method is POST_DOCUMENT.
Hope this helps
Gabriel
‎2007 Jan 26 5:58 PM
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
‎2007 Jan 26 6:04 PM
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
‎2007 Jan 26 7:37 PM
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
‎2007 Jan 26 7:48 PM
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
‎2007 Jan 26 11:27 PM
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
‎2007 Jan 26 11:39 PM
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
‎2007 Jan 26 11:46 PM
Hi,
Please make sure to reward points for helpful answers..
Thanks,
Naren
‎2007 Jan 27 12:17 AM
‎2007 Jan 27 12:18 AM