Working with batch Classification Change Function Module
Here I want to change the batch classification details through FUNCTION MODULE. Function Module Name : VB_CHANGE_BATCH. Example Code: DATA : YMCHA TYPE MCHA , CHAR_OF_BATCH TYPE TABLE OF CLBATCH , WA_OF_BATCH TYPE CLBATCH , CHANGED_BATCH TYPE TABLE OF MCHA , ZIMSEG TYPE TABLE OF IMSEG , RETURN TYPE TABLE OF BAPIRET2 . SELECT SINGLE MATNR , WERKS , CHARG FROM MSEG INTO @DATA ( WA_MSEG ) WHERE MBLNR = '2020024858' . "give any other material document "number in MSEG table which contain Batch IF WA_MSEG IS NOT INITIAL . YMCHA - MATNR = WA_MSEG - MATNR . "here i am passing material YMCHA - WERKS = WA_MSEG - WERKS . "plant YMCHA - CHARG = WA_MSEG - CHARG . "batch CLEAR WA_MSEG . WA_OF_BATCH - ATNAM = 'FB' .