2023 Feb 10 11:29 AM
Hi Experts,
I have an requirment as below:-
1. When user enter MIGO ( Transfer Posting - 311 , 312 ) from one storage to other storage .
I need to compare with PLANT (SAME) from batch number and dest batch (SAME) .
Here user makes an correction in Dest batch needs to raise an error message.
I checked the MB_MIGO_BADI in line_modify method but i didn't the idea regarding .
Please help me..
.
2023 Feb 10 12:00 PM
Hello divsmart
You can implement such a validation with the MB_MIGO_BADI enhancement, method CHECK_ITEM.
Alternatively you can try do set the receiving batch field to display only or suppressed, so its value can't be changed. I'm not sure if it's going to work, but it's worth trying.
Best regards
Dominik Tylczynski
2023 Feb 10 12:24 PM
Thanks Dominik,
I checked in SPRO with display only or suppressed . But not working . (OM** series t-code)
Need to check in MB_MIGO_BADI.
2023 Feb 10 12:52 PM
2023 Feb 10 2:47 PM
Read the "Before answering" section. You should only use "answer" to propose a solution, otherwise "comment" on the original question or on an answer already published.
2023 Feb 10 2:45 PM
Ask your abaper to implement Enhancement/BAdI MB_MIGO_BADI
2023 Feb 13 12:54 PM
Thanks Raymond,
I done like below.
I need to move the value of CS_goitem-charg (ENTER by user) to UMCHA field
and if User changes the batch number in UMCHA (if CHARG NE UMCHA ).
Need to raise an error message. Please guidance.
EXPORT cs_goitem = cs_goitem TO MEMORY ID 'CS_GOITEM' .
IF cs_goitem-bwart = '311' AND cs_goitem-bwart = '312'.
IF cs_goitem-charg IS NOT INITIAL.
MOVE cs_goitem-charg TO cs_goitem-umcha.
ENDIF.
ENDIF.
2023 Feb 13 4:50 PM
You can force the batch number in the LINE_MODIFY method.
In CHECK_ITEM method
Can you post the code you tried in your implementing class?
2023 Feb 17 12:56 PM
Thanks Raymond,
Thanks for your response.
I raised an error message when batch number NE 'CS_goitem-charg<> cs_goitem-umcha.
But issue here ""After giving error message how to make field ready for input again MIGO for User again ""...
Please guidance.
TYPES: BEGIN OF ty_zmigo_mov,
zuser_name TYPE zmigo_mov-zuser_name,
END OF ty_zmigo_mov.
DATA: ls_zmigo_mov TYPE ty_zmigo_mov,
lt_zmigo_mov TYPE TABLE OF ty_zmigo_mov.
DATA: ls_msg(150) TYPE c.
EXPORT cs_goitem = cs_goitem TO MEMORY ID 'CS_GOITEM' .
IF cs_goitem-bwart = '311' OR cs_goitem-bwart = '312'.
IF cs_goitem-charg IS NOT INITIAL AND cs_goitem-umcha IS INITIAL.
MOVE cs_goitem-charg TO cs_goitem-umcha.
ENDIF.
SELECT SINGLE zuser_name FROM zmigo_mov INTO ls_zmigo_mov WHERE zuser_name EQ sy-uname.
IF ls_zmigo_mov IS INITIAL.
IF cs_goitem-charg <> cs_goitem-umcha.
CONCATENATE 'Please enter the correct batch number as from receiving batch number line item' cs_goitem-zeile INTO ls_msg SEPARATED BY space.
MESSAGE ls_msg TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
'
2023 Feb 17 2:32 PM
Don't use this syntax, add the error in the ET_BAPIRET2 parameter.
2023 Feb 16 12:58 PM
As neither RFC nor HTTP communication seems to be used here, I'm removing the "ABAP Connectivity" tag.