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

Badi help needed

Former Member
0 Likes
724

we need to put the validation in migo for delivery note field for mvt type 122.

Presently the users can enter any number in that field for example 72348912 and after entering goods receipt for vendor will be done,but after the goods receipt when time comes that they need to goods receipt again they can still use 72348912 as the delivery note number.

Now the requirement is to have a validation rule on the delivery note numberie if we input a delivery note before we cannt use it anymore,delivey note should be unique. so tell me how to do this.i think MB_MIGO_BADI will help .

5 REPLIES 5
Read only

Former Member
0 Likes
689

I have done the coding like below , please tell how to correct the errors.

method IF_EX_MB_MIGO_BADI~POST_DOCUMENT .

data : itab_table type table of mkpf.

select xblnr from mkpf

where xblnr = is_mkpf-xblnr into TABLE itab_table.

here i will check according to my requirement .

endmethod.

Now i am getting the errors like

Field list without INTO clause is not allowed. itab" OR "INTO.

please tell me what to do.

2)i have a material aoo1 and a002. now in the slect query i want to select the records if either of a001 or a002 matches . i think the code should be like matnr in ( 'a001' , 'a002').

ie i want ot use the or conditon .tell me if i am wrong and also tell me how to include the and condition and neither condition ie aoo1 and a002 , next is both should not be there.

Read only

0 Likes
689

data : itab_table type table of mkpf.

select xblnr from mkpf

where xblnr = is_mkpf-xblnr into TABLE itab_table.

here i will check according to my requirement .

endmethod.

Now i am getting the errors like

Field list without INTO clause is not allowed. itab" OR "INTO.

please tell me what to do.

2)i have a material aoo1 and a002. now in the slect query i want to select the records if either of a001 or a002 matches . i think the code should be like matnr in ( 'a001' , 'a002').

ie i want ot use the or conditon .tell me if i am wrong and also tell me how to include the and condition and neither condition ie aoo1 and a002 , next is both should not be there.

Please tell me

Read only

Former Member
0 Likes
689

Hi madan

I think there is a functionality of auto no. when we do GR or invoiceing , so u can go by this way

if ur requirement is some other then can't say.

Regards

Sachin

Read only

0 Likes
689

please kinldy post the answers.

Read only

Former Member
0 Likes
689

Check BADI:MB_MIGO_ITEM_BADI,

Method:ITEM_MODIFY,

You may check Mvm type in parameter:IS_GOITEM,field bwart.