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: 

Updating batch LICHA field with material document number during IM activity

Former Member
0 Kudos
571

Hi,

I have a requirement to populate material document number created to the LICHA field of the batch during inventory movement activity, be it be either MB1C 561 movment type or during normal IM Activity(like MIGO).

I could find some BADI (like MB_DOCUMENT_BADI) and exit (like EXIT_SAPLMBMB_001)which get triggered during document posting but i am not able to change the batch details as the table associated with the batch(VM07M-LICHA) is not editable in BADI and in exit changing that is not having any effect(VM07M-LICHA).

any clue is appreciated,

thanks in advance.

1 ACCEPTED SOLUTION

former_member262988
Active Contributor
0 Kudos
180

Hi,

Use the badi MB_MIGO_BADI.....and method LINE_MODIFY....in which the structure CS_GOITEM contains LICHA field....modify in this method.....

Thanks,

Shailaja Ainala.

14 REPLIES 14

former_member262988
Active Contributor
0 Kudos
181

Hi,

Use the badi MB_MIGO_BADI.....and method LINE_MODIFY....in which the structure CS_GOITEM contains LICHA field....modify in this method.....

Thanks,

Shailaja Ainala.

0 Kudos
180

Hi Shailaja,

Thanks for the reply, my requirement is to populate the newly created material document to LICHA field, that means the enhancement should trigger after we enter the SAVE/POST button, where as the one said by u is geting triggerd before that, please do let me know if you have come across any.

0 Kudos
180

Hi,

Yeah u use the same method........u wil see the result in display mode...

Thanks,

Shailaja Ainala.

0 Kudos
180

Hi Shailaja,

Yes you are right in dispplay mode it may show as the field mblnr will have a value, but during creation is the problem, i am not woried about the display mode, i more intersted to populate the LICHA field with th mat. doc which is to be created .

Former Member
0 Kudos
180

Hi,

Venkat the Exit 'EXIT_SAPLMBMB_001' is triggered in the update task which means that you would not be able to debug the code that you have written but surely you should be able to change the value that you are trying to as it is avaliable as tables parameter the only thing you ahve to make sure is that you are modifing the right line number. If you want to see the data that is there try to use open data set and transafer to write the data to application server.

Regards,

Himanshu

0 Kudos
180

Hi Himanshu,

you are right the exit is called in update task, but i have debuggd that using update debugging and could see that the value in vm07m-licha geting changed with the document number, but those changes are not geting reflected in the batch(MSC3n), and in some of the documents i read that this is only to tranfer the meterial document details and any changes here will not reflect, please let me know if you have any other enhancement or any one who has done this requirement.

former_member262988
Active Contributor
0 Kudos
180

Hi,

I f i am not wrong...how it is possible the document number wil be generated in svae mode which you cant get till it is saved........so you need to use the same method...for updation......

Thanks,

Shalaja Ainala.

0 Kudos
180

Hi Shalaja,

that is where i am also stuck with, i have to capture the material document number generated after presing the save button and pass that to LICHA field of the batch before the document is saved. so i am able to capture the generated document number in the above said enhancement but not able to pass that value to LICHA field.

0 Kudos
180

Hi,

I think you are not clear with the requirement...

Thanks,

Shailaja Ainala.

0 Kudos
180

Hi,

I think you can achieve the same using BADI : MB_DOCUMENT_BADI. check the same code and documentation for more details.

Regards,

Himanshu

0 Kudos
180

Hi Himanshu,

The parameters for both the methods in the BADI : MB_DOCUMENT_BADI are only importing hence they will not allow us to change any thing there.

any other idea?

0 Kudos
180

Hi Shalaja,

the requirement looks strange, but the bussiness wants to update the document number during initial upload to track the batch associated with the document(like the document through which the batch got created or changed)..

0 Kudos
180

Hi,

Any clue to this issue is apprecited,

Regards,

Dipak

dipak_kumar3
Active Contributor
0 Kudos
180

Hi,

Any clue to this query is apprecited,

Regards,

Dipak