06-30-2008 2:09 PM
Hi Experts,
The requirement is to update the Qty & Status during POSTing in MIGO if the material is Kanban managed.
Requirement :
Scrapping using 551/ 552 should accordingly increase/ decrease the Kanban Qty and modify the status (visible in PK31 and PKPS table)
Approach:
1. Implemented BADI "MB_MIGO_BADI" & called the FM to update Kanban status & Qty. But got the error of COMMIT_IN_POSTING.
2. Used EXIT_SAPMM07M_001 to call FM "BAPI_KANBANCC_WITHDRAWQUANTITY" but still the same error
3. Implemented BADI "MB_DOCUMENT_BADI" but faced the same error.
Any pointers to user-exit/badi which would help to fulfill the above requirement.
Also let me know, if the approach should be changed.
Thanks,
Best regards,
Prashant
06-30-2008 2:20 PM
Prashant,
am not sure this BADi or BApiwould work for you or not but you can look at this also:
MB_MIGO_ITEM_BADi.
BAPI_INCOMINGINVOICE_CHANGE
Amit.
06-30-2008 2:20 PM
Prashant,
am not sure this BADi or BApiwould work for you or not but you can look at this also:
MB_MIGO_ITEM_BADi.
BAPI_INCOMINGINVOICE_CHANGE
Amit.
07-01-2008 4:24 AM
Hi Amit,
This doesnt work. It gives the same error.
Has anyone worked on a similar requirement to update Kanban status in MIGO. Please let me know the approach for the same.
If a BADI is called in UPDATE TASK, then how to call other Function Modules (FM which has commit work inside it) in the BADI ?
Thanks,
Best regards,
Prashant
07-01-2008 4:34 AM
instead of calling fm, can u update da fields direclty? i mean directly write code in badi methods rather than calling ny fm?
07-01-2008 4:35 AM
Hi ,
1.Dont do any COMMIT work in BADI , just check for any errors in RETURN table, any how its on Update Task , commit work will take place later on.
2.If above logic wont then , create a Implicit Enhancement after processing the BADI , and put ur logic over there.
Regards
Prabhu
07-01-2008 6:21 AM
Hi Prabhu,
1. Since the Commit Work is inside the FM, there is no way to comment it.
2. Could you please elaborate on this.
Thanks,
Best regards,
Prashant
07-01-2008 6:48 AM
Hi Prasanth ,
i mean to say is
Method BADI.
call 'BAPI'.
as per standard procee , we need to wtite COMMIT WORK after the BAPI , but in this case dont commit the work , BAPI also wont COMMIT the changes on it own.
Endmethod.
normal BAPI call.
call 'BAPI'.
if return[] is initial.
commit work. ---> but in BADI dont give this one, that it, lets try and let me know in case of any errors , so that we can go for another option.
endif.
07-01-2008 7:27 AM
Hi Prabhu,
This didnt work either
Since COMMIT WORK inside MIGO is standard SAP code, i couldnt comment it.
Any other alternative solution ?
Thanks a ton,
Best regards,
Prashant
07-01-2008 7:51 AM
Hi ,
Can u check this include LMIGOKG1 , put a break point here , as per codiing , it says here its going to commit the work.
i think u can make use of it .
regards
Prabhu
Edited by: Prabhu Peram on Jul 2, 2008 3:09 PM
08-13-2008 7:28 AM
Inserted the record in Z Table in the BADI & created another program to call the BAPI to process the records from Z table.