Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3363

Unable to do PGI using WS_DELIVERY_UPDATE, getting dump.

$
0
0

Hi All,

 

 

I am do following steps.

1. Using WS_DELIVERY_UPDATE to Assign HU to delivery.(Just lyk in VL02N) its working perfect.

2.But when iam using WS_DELIVERY_UPDATE to PGI that assign delivery its throws dump.

below is code for PGI using WS_DELIVERY_UPDATE.

* Delivery Header

  LOOP AT gt_lips INTO gs_lips.

*    gs_vbkok-vbeln    = gs_lips-vbeln.

    gs_vbkok-vbeln_vl = gs_lips-vbeln.

    gs_vbkok-vbtyp_vl = 'J'."gs_likp-vbtyp.

*    gs_vbkok-wadat_ist = sy-datum.

*******

    gs_vbkok-wabuc    = 'X'.            "Post good issue automatically

    gs_vbkok-komue    = 'X'.            "update delivery qty with picking qty

  ENDLOOP.

 

*Only PGI.

  LOOP AT gt_lips INTO gs_lips.

    gs_vbpok-vbeln_vl = gs_lips-vbeln. " Delivery No

    gs_vbpok-posnr_vl = gs_lips-posnr. " Delivery Item

    gs_vbpok-vbeln    = gs_lips-vgbel. " Sales order - Ref Doc

    gs_vbpok-posnn    = gs_lips-vgpos. " SO Line item - Ref doc item

    gs_vbpok-matnr    = gs_lips-matnr. " Material No

    gs_vbpok-werks    = gs_lips-werks. " Plant

    gs_vbpok-pikmg    = gs_lips-lfimg. " Delivery Qty

    gs_vbpok-kzvfdat = 'X' .gs_vbpok-kzhsdat = 'X'.

    APPEND gs_vbpok TO gt_vbpok[].

    CLEAR gs_vbpok.

  ENDLOOP.

 

  CLEAR: gt_verpo , gt_verko.

  CALL FUNCTION 'WS_DELIVERY_UPDATE'

    EXPORTING

      vbkok_wa                    = gs_vbkok

*     synchron                    = ' '

*     no_messages_update          = ' '

*     commit                      = ' '

      delivery                    = gv_delivery

      update_picking              = 'X'

*     nicht_sperren               = ' '

*     IF_CONFIRM_CENTRAL          = ' '

*     IF_WMPP                     = ' '

*     IF_GET_DELIVERY_BUFFERED    = ' '

*     IF_NO_GENERIC_SYSTEM_SERVICE      = ' '

      if_database_update          = '1'

*     IF_NO_INIT                  = ' '

*     IF_NO_READ                  = ' '

      if_error_messages_send_0    = 'X'

*     IF_NO_BUFFER_REFRESH        = ' '

*     IF_NO_MES_UPD_PACK          = ' '

    IMPORTING

      ef_error_any_0              = lv_err_anyerr

      ef_error_in_item_deletion_0 = lv_err_itmdel

      ef_error_in_pod_update_0    = lv_err_podupd

      ef_error_in_interface_0     = lv_err_interf

      ef_error_in_goods_issue_0   = lv_err_goodsi

      ef_error_in_final_check_0   = lv_err_finalc

    TABLES

      vbpok_tab                   = gt_vbpok

      prot                        = gt_prot

*     verko_tab                   = gt_verko

*     verpo_tab                   = gt_verpo

*     VBSUPCON_TAB                =

*     IT_VERPO_SERNR              =

*     IT_PACKING                  =

*     IT_PACKING_SERNR            =

*     IT_REPACK                   =

*     IT_HANDLING_UNITS           =

*     IT_OBJECTS                  =

*     ET_CREATED_HUS              =

*     TVPOD_TAB                   =

*     IT_TMSTMP                   =

*     IT_BAPIADDR1                =

*     IT_TEXTL                    =

*     IT_TEXTH                    =

*     IT_AAC_ITEM_BLOCK           =

*     IT_HU_HEADER_EPC            =

*     IT_HU_ITEMS_EPC             =

    .

  IF sy-subrc = 0.

*    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

**     EXPORTING

**       WAIT          =

**     IMPORTING

**       RETURN        =

*      .

 

    COMMIT WORK.

  ENDIF.

 

The dump is comming while executing COMMIT statement. its is :

AP Programming Error

AB_ILLEGAL_ORDER

PLCSLS

M-BAS

Error: analysis:

Error analysis

    In the ABAP Debugger, the control-switch for the sorting of internal

    tables before statements of the form "READ ... BINARY SEARCH", was

    activated.

 

    In this particular case, the lines 10 and 11 of the table

     "\FUNCTION-POOL=CSLS\FORM=COLLECT_SL_DOC_PARTS\DATA=ST_ATPFIELD[]"

    were not sorted according to the key specified in the READ statement. As

     the statement "READ ... BINARY SEARCH" expects the table to be

    correctly sorted, generally an incorrect entry is located.

 

Kindly suggest,

thanks.

abhijeet.


Viewing all articles
Browse latest Browse all 3363

Trending Articles