‎2008 Dec 30 6:44 AM
Hi Experts,
I am using a bapi, BAPI_GOODSMVT_CREATE to create new serial numbers in the system. Following are the inputs that i am passing to the bapi.
wa_header-PSTNG_DATE = sy-datum.
wa_code-GM_CODE = '05'.
wa_item_create-material = matnr (The concerned material number).
wa_item_create-PLANT = plant
wa_item_create-MOVE_TYPE = '501'.
wa_item__create-ENTRY_QNT = '1'.
wa_item_create-ENTRY_UOM_ISO = 'EA'.
append wa_item_create to gt_item_create.
wa_serialnum-MATDOC_ITM = '0001'.
wa_serialnum-SERIALNO = 'ABCD-00044' (The required serial number to be created)
append wa_serialnum to gt_serialnum.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_header
goodsmvt_code = gm_code
TESTRUN = ' '
GOODSMVT_REF_EWM =
IMPORTING
GOODSMVT_HEADRET =
MATERIALDOCUMENT =
MATDOCUMENTYEAR =
tables
goodsmvt_item = gt_item_create
GOODSMVT_SERIALNUMBER = gt_serialnum
return = gt_return
GOODSMVT_SERV_PART_DATA =
EXTENSIONIN =
.
After executing this FM, I get a screen which unfortunately i cant paste it here. This screen is same as the screen that appears in MIGO while creating serial numbers. To give you idea about the screen, it has following fields - Division, Device category, Serial Number,
manufacturer, Model number, Construct year,
Cert Year, Cert No. and many more.
As this screen appears, I tried to enter the relevant fields but the control does not move to next screen.Every time info message is displayed as "Function code cannot be selected.
Can anyone please help? Or can anyone suggest a FM to create serial numbers in the system through
program?
‎2008 Dec 30 6:47 AM
Hi Akshay,
Try this function module
NUMBER_GET_NEXT.(Used for Number range: Assigns next free number)
Regards,
Lakshman
Edited by: Lakshman N on Dec 30, 2008 7:48 AM
‎2008 Dec 30 6:47 AM
Hi Akshay,
Try this function module
NUMBER_GET_NEXT.(Used for Number range: Assigns next free number)
Regards,
Lakshman
Edited by: Lakshman N on Dec 30, 2008 7:48 AM
‎2008 Dec 30 6:50 AM
Thanks, but in our end I have to create a particular serial number, not the next available number. So can you please provide the necessary inputs?
‎2008 Dec 30 6:51 AM
hI,
Here is the simple way can you try this,,
Execute the transaction SNRO and define the number ranges,, call this in your program using f.m. get_number_next and pass the object if as '1' and object name as what you have used while creating number ranges. it will gives u the serial number.....
Thanks and Regards,
Thirukumaran. R
‎2008 Dec 30 7:05 AM
Thanks a lot for your concern!! But at our end the requirement is that we have particular serial number values and we have to create those particular serial numbers in the system in particular plant and storage location. Can you please provide the inputs?
‎2008 Dec 30 8:48 AM
‎2008 Dec 30 9:00 AM
Thanka Joan. But at our end the requirement is that we have spacific serial numbers with us and we want to create only those serial numbers in the system with a particular plant and storage location. So can you please provide inupts for the same?
‎2011 Aug 17 12:16 PM
Hi, try leave field GM_CODE of structure goodsmvt_code blank.
Hope it helps.
Regards,
Pablo.