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

Create Serial Numbers

Former Member
0 Likes
2,029

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?

1 ACCEPTED SOLUTION
Read only

former_member209217
Active Contributor
0 Likes
1,611

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

7 REPLIES 7
Read only

former_member209217
Active Contributor
0 Likes
1,612

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

Read only

0 Likes
1,611

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?

Read only

Former Member
0 Likes
1,611

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

Read only

0 Likes
1,611

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?

Read only

Former Member
0 Likes
1,611

You use this FM,

NUMBER_GET_NEXT

Regards,

Joan

Read only

0 Likes
1,611

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?

Read only

Former Member
0 Likes
1,611

Hi, try leave field GM_CODE of structure goodsmvt_code blank.

Hope it helps.

Regards,

Pablo.