Skip to Content
avatar image
Former Member

Creating Inbound delivery with reference to Sales order (RV_DELIVERY_CREAT)

Hi Experts,

I have a buisness requirement to create a inbound delivery against a sales order number (RMA). I am trying to use the function module RV_DELIVERY_CREATE to do the same.

Program gets executed but i find no delivery created as entry in the exporting parameter

Please give your valuable suggestions. If any one has used this function module please do provide me with the sample code.

Helpful answers would be rewarded.

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 21, 2007 at 11:49 AM

    Hi Dilip,

    I am not aware of what the problem in your case exactly is, I can only suggest that it would be better if you could use a BAPI for your job to get done.

    Try out this BAPI - BAPI_INB_DELIVERY_SAVEREPLICA.

    <b>

    Reward points if this helps,</b>

    Kiran

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Kiran,

      My requirement is to create an returns delivery against a returns order number (RMA)

      I was trying to use the function module RV_DELIVERY_CREATE but i get the exporting parameters blank.

      Below is the code i am using

      TYPE-POOLS: VLIKP.

      TABLES: TVSA.

      DATA: V_VBELN TYPE VBAK-VBELN VALUE '0000012503'.

      DATA: VBSK_T LIKE VBSK,

      LVBAK_T TYPE STANDARD TABLE OF VBAK,

      LVBAP_T TYPE STANDARD TABLE OF VBAPVB,

      LVBEP_T TYPE STANDARD TABLE OF VBEPVB,

      LVBFA_T TYPE STANDARD TABLE OF VBFAVB,

      LVBFS_T TYPE STANDARD TABLE OF VBFS,

      LVBKD_T TYPE STANDARD TABLE OF VBKDVB,

      LVBLS_T TYPE STANDARD TABLE OF VBLS,

      LVBPA_T TYPE STANDARD TABLE OF VBPAVB,

      LVBUK_T TYPE STANDARD TABLE OF VBUK,

      LVBUP_T TYPE STANDARD TABLE OF VBUPVB.

      DATA: ET_SPLITPROT TYPE VLIKP_T_SPLITPROT.

      DATA: VBSK_E_T TYPE VBSK.

      DATA LF_NUMKI LIKE INRI-NRRANGENR.

      DATA: E_VBSK type VBSK .

      SELECT SINGLE * FROM TVSA WHERE SMART = 'L'.

      LF_NUMKI = TVSA-NUMKI.

      CALL FUNCTION 'NUMBER_GET_NEXT'

      EXPORTING NR_RANGE_NR = LF_NUMKI

      OBJECT = 'RV_SAMMG'

      IMPORTING NUMBER = E_VBSK-SAMMG.

      E_VBSK-MANDT = SY-MANDT.

      E_VBSK-PROGRAMM = SY-REPID.

      E_VBSK-SELSET = SY-SLSET.

      E_VBSK-BATCH = SY-BATCH.

      E_VBSK-ERNAM = SY-UNAME.

      E_VBSK-ERDAT = SY-DATLO.

      E_VBSK-UZEIT = SY-TIMLO.

      E_VBSK-PROGRAMM = SY-REPID.

      E_VBSK-SMART = 'L'.

      SELECT * FROM VBAK INTO TABLE LVBAK_T WHERE VBELN = V_VBELN.

      SELECT * FROM VBAP INTO TABLE LVBAP_T WHERE VBELN = V_VBELN.

      SELECT * FROM VBEP INTO TABLE LVBEP_T WHERE VBELN = V_VBELN.

      SELECT * FROM VBFA INTO TABLE LVBFA_T WHERE VBELV = V_VBELN.

      SELECT * FROM VBFS INTO TABLE LVBFS_T WHERE VBELN = V_VBELN.

      SELECT * FROM VBKD INTO TABLE LVBKD_T WHERE VBELN = V_VBELN.

      SELECT * FROM VBUK INTO TABLE LVBUK_T WHERE VBELN = V_VBELN.

      SELECT * FROM VBUP INTO TABLE LVBUP_T WHERE VBELN = V_VBELN.

      SELECT * FROM VBPA INTO TABLE LVBPA_T WHERE VBELN = V_VBELN.

      CALL FUNCTION 'RV_DELIVERY_CREATE'

      EXPORTING

      SELEKTIONSDATUM = SY-DATUM

      VBSK_I = E_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 =

      • IS_CONTROL =

      • IF_CHECK_SPEVI =

      • IT_SERNR =

      IMPORTING

      VBSK_E = E_VBSK

      ET_SPLITPROT = ET_SPLITPROT

      TABLES

      LVBAK = LVBAK_T

      LVBAP = LVBAP_T

      LVBEP = LVBEP_T

      LVBFA = LVBFA_T

      LVBFS = LVBFS_T

      LVBKD = LVBKD_T

      LVBLS = LVBLS_T

      LVBPA = LVBPA_T

      LVBUK = LVBUK_T

      LVBUP = LVBUP_T

      • IT_VERKO =

      • IT_VERPO =

      • ET_VBUK =

      • ET_VBUP =

      • ET_VBFA =

      .

      IF NOT SY-SUBRC <> 0.

      COMMIT WORK.

      ENDIF.

      Please point out if i am going wrong at any point.

      Thanks