Application Development and Automation 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: 
Read only

Using BAPI SD_DELIVERY_UPDATE_PICKING 1

Former Member
0 Likes
5,500

Hello everyone, first I apologize for my basic English

I need to update the fields: LGORT, CHARG and PIKMG (Warehouse, Lot and Picking) of a delivery (SD module), for this I am using the BAPI SD_DELIVERY_UPDATE_PICKING_1, but I'm having the following problems:

I can not update the field LGORT

After modifying, an order the transport SGA is automatically generated, and do not want the same think.

I hope I can help ...

Observation: I am trying to see the fields needed to run the BAPI

code:

*********VBKOK*************************

VBKOK_WA-VBELN_VL = DELIVERY.
espacios VBKOK_WA-VBELN_VL.
VBKOK_WA-VBELN = '20111122'. "Orden de Picking
espacios VBKOK_WA-VBELN.
VBKOK_WA-LGNUM = '1200'. "Número de Almacén
espacios VBKOK_WA-LGNUM.
VBKOK_WA-STGE_LOC_CHANGE = 'X'.
VBKOK_WA-KOMUE = 'X'. "Ajuste automático del picking

***********VBPOK************************

VBPOK_TAB-VBELN_VL = DELIVERY. "Nr. entrega  OBLIGATORIO
espacios VBPOK_TAB-VBELN_VL.
VBPOK_TAB-POSNR_VL = '10'.
espacios VBPOK_TAB-POSNR_VL. "Posición OBLIGATORIO
VBPOK_TAB-VBELN = '20111122'. "Orden de Picking OBLIGATORIO
espacios VBPOK_TAB-VBELN.
VBPOK_TAB-POSNN = '10'.
espacios VBPOK_TAB-POSNN. "Posición siguiente
VBPOK_TAB-VBTYP_N = 'J'. "tipo de documento
VBPOK_TAB-MATNR = '121'.
espacios VBPOK_TAB-MATNR. "Material
VBPOK_TAB-CHARG = '35'."Lote
espacios VBPOK_TAB-CHARG.
VBPOK_TAB-WERKS = '1200'. "Centro suministrador
espacios VBPOK_TAB-WERKS.
VBPOK_TAB-TAQUI = 'X'. "Indicador de confirmación de pedidos CAMPO NECESARIO PARA ACTUALIZAR LOTE
VBPOK_TAB-LGPLA = '1200'. "Ubicación
VBPOK_TAB-LGORT = '1200'. "Almacén
espacios VBPOK_TAB-LGORT.
VBPOK_TAB-MDIFF_LGORT = '1200'.
VBPOK_TAB-LFIMG = 2. "Cantidad entregada efectivamente en UMV
VBPOK_TAB-LGMNG = 2.
APPEND VBPOK_TAB.



VBPOK_TAB-VBELN_VL = DELIVERY.
espacios VBPOK_TAB-VBELN_VL. "Nr. entrega
VBPOK_TAB-POSNR_VL = '20'.
espacios VBPOK_TAB-POSNR_VL. "Posición
VBPOK_TAB-VBELN = '20111122'. "Orden de Picking
espacios VBPOK_TAB-VBELN.
VBPOK_TAB-POSNN = '20'.
espacios VBPOK_TAB-POSNN. "Posición siguiente
VBPOK_TAB-VBTYP_N = 'J'. "tipo de documento
VBPOK_TAB-MATNR = '121'.
espacios VBPOK_TAB-MATNR. "Material
VBPOK_TAB-CHARG = '35'."Lote
espacios VBPOK_TAB-CHARG.
VBPOK_TAB-WERKS = '1200'. "Centro suministrador
espacios VBPOK_TAB-WERKS.
VBPOK_TAB-TAQUI = 'X'. "Indicador de confirmación de pedidos CAMPO NECESARIO PARA ACTUALIZAR LOTE
VBPOK_TAB-LGPLA = '1200'. "Ubicación
VBPOK_TAB-LGORT = '1200'. "Almacén
espacios VBPOK_TAB-LGORT.
VBPOK_TAB-MDIFF_LGORT = '1200'.
VBPOK_TAB-LFIMG = 2. "Cantidad entregada efectivamente en UMV
VBPOK_TAB-LGMNG = 2
APPEND VBPOK_TAB.

  CALL FUNCTION 'SD_DELIVERY_UPDATE_PICKING_1'
    EXPORTING
      VBKOK_WA                       = VBKOK_WA
      SYNCHRON                       = ''
*   NO_MESSAGES_UPDATE_1           = 'X'
*      NICHT_SPERREN_1                = 'X'
*   AUFRUFER_T_1                   = ' '
*   IF_ERROR_MESSAGES_SEND_1       = 'X'
*   IF_LATE_DELIVERY_UPD           = ' '
*   IT_SERNR_UPDATE                =
    TABLES
      VBPOK_TAB                      = VBPOK_TAB
      PROT                           = PROT
*   IT_PACKING                     =
            .

IF sy-subrc = 0.
  commit WORK.
ENDIF.

LOOP AT PROT.

ENDLOOP.

Please use code tags.

Edited by: Rob Burbank on Nov 25, 2011 10:35 AM

3 REPLIES 3
Read only

madhu_vadlamani
Active Contributor
0 Likes
2,380

Hi Mant,

In stead of thinking in technical point did you check with your functional people.

Regards,

Madhu

Read only

Former Member
0 Likes
2,380

Hi,

Try using function module WS_DELIVERY_UPDATE.

Regards,

Prasanna

Read only

carlostol
Explorer
0 Likes
2,380

Hello,

Additionally to setting LGORT = 'something' try KZLGO = 'X'.

Hope it's not to late.

Bye.