Application Development 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: 

assign serialnumbers to production order

Former Member
0 Kudos

Hi all,

I have to assign serialnumbers (equipments) to production orders. Manually I can do this via CO02, but I have to do this in ABAP.

I tried function module SERNR_ADD_TO_PP but I was not able to assign serialnumbers with it. Actually nothing happened; no error messages or any other hints.

Does anybody have an idea, how to use this function module or how to add serialnumber to production orders?

Thanks in advance

Holger

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please check FM SERIAL_POST_UPDATE_PP perhaps it may help.

Regards,

Ferry Lianto

8 REPLIES 8

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please check FM SERIAL_POST_UPDATE_PP perhaps it may help.

Regards,

Ferry Lianto

Former Member
0 Kudos

As Ferry said use FM 'SERIAL_POST_UPDATE_PP'

define structure RSERXX and update

CALL FUNCTION 'SERIAL_POST_UPDATE_PP' IN UPDATE TASK

TABLES

XSER05 = US_XSERXX.

Best regards,

Pradeep.

0 Kudos

Where do I put the serialnumbers? Structure RSERXX only links to object lists. As far as I understand this, I somehow have to get my equipment (with the serialnumber) into the object list (table OBJK?), which is linked to my process order via table SER05.

The function module only seems to create or edit a link from an object list to a process order.

But how can I edit or create this object list? I assume, that an answer to this question leads me to my solution...

Thanks for your help

Holger

0 Kudos

So, now I found the solution.

I call FM 'SERNR_ADD_TO_PP' and afterwards I call FM 'SERIAL_LISTE_POST_PP'. That's it...

Regards

Holger

0 Kudos

Hi,

I need to implement the same, please provide the details...

Regards,

Ravi

0 Kudos

Does anyone have example code of how these function modules work together and need to be called? The export import paramters dont appear to be the same, and the documentation is missing.

SERNR_ADD_TO_PP

SERIAL_LISTE_POST_PP

Any help would be greatly appreciated.

Thanks

Mike

DATA: GS_AFVGD_SS LIKE AFVGD.

DATA: GS_AFVGD LIKE AFVGD,

GS_CAUFVD_PO LIKE CAUFVD,

GS_AFPOD_PO LIKE AFPOD,

GS_CAUFVD_CO LIKE CAUFVD.

DATA: L_NUM_SERNO LIKE SY-TABIX.

CONSTANTS: L_PPORD LIKE CAUFVD-AUTYP VALUE '10'.

DATA: GT_SERNOS LIKE E1RMSNO OCCURS 0 WITH HEADER LINE.

GS_AFPOD_PO-SERNP = 'ZLS'.

GS_CAUFVD_CO-MATNR = '00000000000AB24C24'.

L_NUM_SERNO = '1'.

GS_AFPOD_PO-POSNR = '0001'.

gs_caufvd_co-auart = 'ZP01'.

GS_AFPOD_PO-DWERK = 'NTC'.

GS_CAUFVD_CO-AUFNR = '000001006421'.

gt_sernos-sernr = '25000211'.

append gt_sernos.

CALL FUNCTION 'SERNR_ADD_TO_PP'

EXPORTING

PROFILE = GS_AFPOD_PO-SERNP

MATERIAL = GS_CAUFVD_CO-MATNR

QUANTITY = L_NUM_SERNO

PPAUFNR = GS_CAUFVD_CO-AUFNR

PPPOSNR = GS_AFPOD_PO-POSNR

PPAUTYP = L_PPORD

PPAUFART = GS_CAUFVD_CO-AUART

PMRSORD = SPACE

PPWERK = GS_AFPOD_PO-DWERK

  • M_CHARGE =

  • KMATNR =

  • CUOBJ =

J_VORGANG = 'PMP1'

IMPORTING

ANZSN = L_NUM_SERNO

  • ZEILEN_ID =

  • SERIAL_COMMIT =

TABLES

SERNOS = GT_SERNOS

EXCEPTIONS

KONFIGURATIONS_ERROR = 1

SERIALNUMBER_ERRORS = 2

SERIALNUMBER_WARNINGS = 3

NO_PROFILE_OPERATION = 4

OTHERS = 5.

CALL FUNCTION 'SERIAL_LISTE_POST_PP'

EXPORTING

MEMORY_ID_STATUS = ' '.

  • TABLES

  • TAB_CUOBJ = P_TAB_CUOBJ.

if sy-subrc = 0.

commit work and wait.

endif.

former_member661040
Discoverer
0 Kudos

FUNCTION 'SERIAL_LISTE_POST_PP' worked for me