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: 

VL02N - Update Serial No

Former Member
0 Kudos

Hi guys,

I'm having some issues getting 'WS_DELIVERY_UPDATE_2' to work. It's not updating the serial no in my delivery.

The serial no I want to update is in VL02N under Extras->Serial Numbers.

Any help would be greatly appreciated.

Many Thanks,

Philip Johannesen

Code below:

DATA:vbkok LIKE vbkok,
     lt_serno TYPE STANDARD TABLE OF HUM_REP_SERNR,
     wa_serno LIKE LINE OF lt_serno.

 MOVE '0080001456' TO vbkok-VBELN_VL.


 MOVE '1' TO wa_serno-ZEILE.
 MOVE '12345' TO wa_serno-sernr.
 APPEND wa_serno TO lt_serno.

CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
  EXPORTING
    VBKOK_WA                           = vbkok
*   SYNCHRON                           = ' '
*   NO_MESSAGES_UPDATE_1               = ' '
    COMMIT                             = 'X'
    DELIVERY                           = '0080001456'
*   UPDATE_PICKING                     = ' '
*   NICHT_SPERREN_1                    = ' '
*   IF_CONFIRM_CENTRAL                 = ' '
*   IF_WMPP                            = ' '
*   IF_GET_DELIVERY_BUFFERED           = ' '
*   IF_NO_GENERIC_SYSTEM_SERVICE       = ' '
*   IF_DATABASE_UPDATE_1               = '1'
*   IF_NO_INIT_1                       = ' '
*   IF_NO_READ_1                       = ' '
*   IF_ERROR_MESSAGES_SEND             = 'X'
*   IF_NO_BUFFER_REFRESH               = ' '
*   IF_NO_MES_UPD_PACK                 = ' '
* IMPORTING
*   EF_ERROR_ANY                       =
*   EF_ERROR_IN_ITEM_DELETION          =
*   EF_ERROR_IN_POD_UPDATE             =
*   EF_ERROR_IN_INTERFACE              =
*   EF_ERROR_IN_GOODS_ISSUE            =
*   EF_ERROR_IN_FINAL_CHECK            =
* TABLES
*   VBPOK_TAB                          =
*   PROT                               =
*   VERKO_TAB                          =
*   VERPO_TAB                          =
*   VBSUPCON_TAB_1                     =
*   IT_VERPO_SERNR                     =
*   IT_PACKING                         =
    IT_PACKING_SERNR                   = lt_serno
*   IT_REPACK                          =
*   IT_HANDLING_UNITS_1                =
*   ET_CREATED_HUS                     =
*   TVPOD_TAB                          =
          .
   if sy-subrc <> 0.

   endif.

2 REPLIES 2

Former Member
0 Kudos

Hi,

After the FM, if sy-subrc EQ 0, then try giving COMMIT work and check whether updation is happening.

Regards,

JLN

0 Kudos

Hi JLN,

Thanks for the quick reply. I have tried Commit Work to rule it out but it still isn't updating. I removed it again as there is a flag on FM to Commit changes. Also sy-subrc = 0.

Thanks,

Phil