‎2008 Nov 17 7:10 AM
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 .
‎2008 Nov 17 12:19 PM
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.
‎2008 Nov 18 7:46 AM
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
‎2008 Nov 17 12:40 PM
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
‎2008 Nov 18 4:42 AM
‎2008 Nov 18 4:47 AM
Check BADI:MB_MIGO_ITEM_BADI,
Method:ITEM_MODIFY,
You may check Mvm type in parameter:IS_GOITEM,field bwart.