cancel
Showing results for 
Search instead for 
Did you mean: 

add serial no in delivery document

Former Member
0 Kudos

hi all

my requirement is to add serial no in delivery document for this i found fm SERNR_ADD_TO_LS and SERIAL_LISTE_POST_LS however this are not working can any one help me do perform this task any fm name or code which can add serial no to delivery document answer will be highly appriciable..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Bhokal,

please go to -header details-administarion tab in delivery.

You can find input filed for serial numbers in Ext.Delivery..

Regards,

Answers (1)

Answers (1)

Former Member
0 Kudos

It is easy, go to vl02n, the go to extra/serial number, then you can add serial number here and save.

Former Member
0 Kudos

hi

thanks for your reply sorry i have not explained my query correctly

i dont have to add the serial no manually i have to do it by writing a report, for certain materials i have to add serial no in delivery document please help me out with this requirement

Former Member
0 Kudos

Go to se16 and table ser01 then input the delivery number in delivery column, record object list, then go to se16 again and find table objk to enter object list in object list column, then execute, you will be able to see the serial number, I would suggest you join these two table by creating a query, hope it helps.

Former Member
0 Kudos

hi

thanks for ur reply but i dont have data in the table i have to add the serial no from outside for each delivery document.

Former Member
0 Kudos

Hi if you want to create serial number , you need to go to iq01 to create then assign it to outbound delivery.

Former Member
0 Kudos

done through bdc here is the code

report ZBDC_SERNR1

no standard page heading line-size 255.

start-of-selection.

TABLES: T100.

DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.

DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.

data: lt_ser01 type STANDARD TABLE OF ser01,

ls_ser01 type ser01.

data: lt_objk type STANDARD TABLE OF objk ,

ls_objk type objk.

parameter: delv_no type VBELN,

sernr_no type GERNR.

select LIEF_NR OBKNR from ser01 into CORRESPONDING FIELDS OF TABLE lt_ser01

where LIEF_NR = delv_no.

read table lt_ser01 into ls_ser01 index 1.

select SERNR OBKNR from OBJK into CORRESPONDING FIELDS OF TABLE lt_objk

where OBKNR = ls_ser01-OBKNR.

loop at lt_objk into ls_objk.

perform bdc_dynpro using 'SAPMV50A' '4004'.

perform bdc_field using 'BDC_CURSOR'

'LIKP-VBELN'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'LIKP-VBELN'

delv_no.

perform bdc_dynpro using 'SAPMV50A' '1000'.

perform bdc_field using 'BDC_OKCODE'

'=PSER_T'.

perform bdc_dynpro using 'SAPLIPW1' '0200'.

perform bdc_field using 'BDC_CURSOR'

'RIPW0-SERNR(01)'.

perform bdc_field using 'BDC_OKCODE'

'=RWS'.

perform bdc_field using 'RIPW0-SERNR(01)'

sernr_no.

perform bdc_dynpro using 'SAPMV50A' '1000'.

perform bdc_field using 'BDC_OKCODE'

'=SICH_T'.

perform bdc_transaction using 'VL02N'.

endloop.

&----


*& Form BDC_DYNPRO

&----


  • text

----


  • -->PROGRAM text

  • -->DYNPRO text

----


FORM BDC_DYNPRO USING PROGRAM DYNPRO.

CLEAR BDCDATA.

BDCDATA-PROGRAM = PROGRAM.

BDCDATA-DYNPRO = DYNPRO.

BDCDATA-DYNBEGIN = 'X'.

APPEND BDCDATA.

ENDFORM. "BDC_DYNPRO

&----


*& Form BDC_FIELD

&----


  • text

----


  • -->FNAM text

  • -->FVAL text

----


FORM BDC_FIELD USING FNAM FVAL.

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

ENDFORM. "BDC_FIELD

&----


*& Form BDC_TRANSACTION

&----


  • text

----


  • -->TCODE text

----


FORM BDC_TRANSACTION USING TCODE.

DATA: L_MSTRING(480).

DATA: L_SUBRC LIKE SY-SUBRC.

REFRESH MESSTAB.

CALL TRANSACTION TCODE USING BDCDATA

MODE 'N'

UPDATE 'L'

MESSAGES INTO MESSTAB.

L_SUBRC = SY-SUBRC.

read table messtab with key msgtyp = 'E'.

if sy-subrc = 0.

SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR.

IF SY-SUBRC = 0.

L_MSTRING = T100-TEXT.

IF L_MSTRING CS '&1'.

REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.

REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.

REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.

REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.

ELSE.

REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.

REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.

REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.

REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.

ENDIF.

CONDENSE L_MSTRING.

WRITE: / MESSTAB-MSGTYP, L_MSTRING(250).

ELSE.

WRITE: / MESSTAB.

ENDIF.

endif.

REFRESH BDCDATA.

ENDFORM. "BDC_TRANSACTION