Application Development 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: 

MIGO for updating Kanban Status & quantity

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

former_member181995
Active Contributor
0 Kudos

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.

9 REPLIES 9

former_member181995
Active Contributor
0 Kudos

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.

former_member223537
Active Contributor
0 Kudos

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

0 Kudos

instead of calling fm, can u update da fields direclty? i mean directly write code in badi methods rather than calling ny fm?

0 Kudos

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

former_member223537
Active Contributor
0 Kudos

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

0 Kudos

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.

former_member223537
Active Contributor
0 Kudos

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

0 Kudos

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

former_member223537
Active Contributor
0 Kudos

Inserted the record in Z Table in the BADI & created another program to call the BAPI to process the records from Z table.