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: 

fm RV_DELIVERY_CREATE

Former Member
0 Kudos

hi everyone

ive called the fm RV_DELIVERY_CREATE to create a delivery, apparently theres no error, but how do i know if the delivery has been done?

heres my code, i dnt know if im missing something

CLEAR WA_VBSK.

WA_VBSK-MANDT = SY-MANDT.

WA_VBSK-ERNAM = SY-UNAME.

WA_VBSK-ERDAT = SY-DATUM.

WA_VBSK-UZEIT = SY-UZEIT.

WA_VBSK-SMART = 'L'.

SELECT SINGLE VSTEL INTO WA_VBSK-VSTEL FROM VBSK WHERE SMART = 'L' AND

ERNAM = SY-UNAME.

SELECT SINGLE * FROM TVSA WHERE SMART = WA_VBSK-SMART.

IF SY-SUBRC = 0.

CALL FUNCTION 'NUMBER_GET_NEXT'

EXPORTING

NR_RANGE_NR = TVSA-NUMKI

OBJECT = 'RV_SAMMG'

IMPORTING

NUMBER = WA_VBSK-SAMMG

EXCEPTIONS

OTHERS = 01.

IF SY-SUBRC NE 0.

ROLLBACK WORK.

MESSAGE e700(zh) WITH TVSA-NUMKI.

ENDIF.

ELSE.

ROLLBACK WORK.

MESSAGE E700(ZH) WITH SPACE.

ENDIF.

  • Get VBAK

SELECT *

INTO CORRESPONDING FIELDS OF TABLE iVBAK

FROM VBAK

WHERE VBELN = WA_TAB-VBELN.

  • Get VBAP

SELECT *

INTO CORRESPONDING FIELDS OF TABLE iVBAP

FROM VBAP

WHERE VBELN = WA_TAB-VBELN

AND POSNR = WA_TAB-POSNR.

READ TABLE iVBAP INDEX 1.

WA_VBSK-VSTEL = iVBAP-WERKS.

LOOP AT iVBAP.

iVBAP-UPDKZ = 'I'.

MODIFY iVBAP.

ENDLOOP.

  • Get VBEP Data

SELECT *

INTO CORRESPONDING FIELDS OF TABLE iVBEP

FROM VBEP

WHERE VBELN = WA_TAB-VBELN

AND POSNR = WA_TAB-POSNR.

LOOP AT iVBEP.

iVBEP-UPDKZ = 'I'.

MODIFY iVBEP.

ENDLOOP.

  • GET VBFA

SELECT *

INTO CORRESPONDING FIELDS OF TABLE iVBFA

FROM VBFA

WHERE VBELV = WA_TAB-VBELN

AND POSNV = WA_TAB-POSNR.

LOOP AT iVBFA.

iVBFA-UPDKZ = 'I'.

MODIFY iVBFA.

ENDLOOP.

  • GET VBKD

SELECT *

INTO CORRESPONDING FIELDS OF TABLE iVBKD

FROM VBKD

WHERE VBELN = WA_TAB-VBELN

AND POSNR = WA_TAB-POSNR.

LOOP AT iVBKD.

iVBKD-UPDKZ = 'I'.

MODIFY iVBKD.

ENDLOOP.

  • GET VBPA

SELECT *

INTO CORRESPONDING FIELDS OF TABLE iVBPA

FROM VBPA

WHERE VBELN = WA_TAB-VBELN

AND POSNR = WA_TAB-POSNR.

LOOP AT iVBPA.

iVBPA-UPDKZ = 'I'.

MODIFY iVBPA.

ENDLOOP.

  • GET VBUK

SELECT *

INTO CORRESPONDING FIELDS OF TABLE iVBUK

FROM VBUK

WHERE VBELN = WA_TAB-VBELN.

  • GET VBUP

SELECT *

INTO CORRESPONDING FIELDS OF TABLE iVBUP

FROM VBUP

WHERE VBELN = WA_TAB-VBELN

AND POSNR = WA_TAB-POSNR.

LOOP AT iVBUP.

IVBUP-UPDKZ = 'I'.

MODIFY IVBUP.

ENDLOOP.

CALL FUNCTION 'RV_DELIVERY_CREATE'

EXPORTING

  • SELEKTIONSDATUM =

VBSK_I = WA_VBSK

  • I_LIEFERART = ' '

  • IT_VORGABE_DATEN =

  • IF_NUR_VORGABE_POS = ' '

  • IF_VBLS_POS_RUECK =

  • IF_SYNCHRON = 'X'

  • IF_NO_COMMIT =

  • IF_NO_DEQUE = ' '

  • IT_HU_SERNR =

  • IT_HANDLING_UNITS =

  • IS_DELIVERY_EXTEND =

  • IF_CHECK_SPEVI = ' '

  • IMPORTING

  • VBSK_E =

  • ET_SPLITPROT =

TABLES

LVBAK = ivbak

LVBAP = ivbap

LVBEP = ivbep

LVBFA = ivbfa

LVBFS = ivbfs

LVBKD = ivbkd

LVBLS = ivbls

LVBPA = ivbpa

LVBUK = ivbuk

LVBUP = ivbup

  • IT_VERKO =

  • IT_VERPO =

  • ET_VBUK =

  • ET_VBUP =

  • ET_VBFA =

.

3 REPLIES 3

Former Member
0 Kudos

go to vl02n(outbound delivery) or vl32(inbound delivery),put in the delivery number created by your application.If a delivery is created you should be able to see it in the transaction.

Former Member
0 Kudos

Hi ,

CALL FUNCTION 'RV_DELIVERY_CREATE'
EXPORTING
* SELEKTIONSDATUM =
VBSK_I = WA_VBSK
* I_LIEFERART = ' '
* IT_VORGABE_DATEN =
* IF_NUR_VORGABE_POS = ' '
* IF_VBLS_POS_RUECK =
* IF_SYNCHRON = 'X'
* IF_NO_COMMIT =<b>U have to commit the work.</b> 

Regards

Prabhu

0 Kudos

ok,ive modified the fm to allow commit, but still the delivery is not processed

when i go to tcode vl02n,and display the delivery number, nothing is displayed.

plz help