cancel
Showing results for 
Search instead for 
Did you mean: 

Functional Module for Delivery picking and PGI acitvities in VL02N mode

Former Member
0 Kudos

Hello,

Could anybody please let me know the FM for Delviery picking and PGI in VL02N mode for outbound delivery..

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Lakshmipathi
Active Contributor
0 Kudos

Not sure, for what purpose you are asking.

You can try with BADI definition name LE_SHP_DELIVERY_PROC method name is CHANGE_DELIVERY_HEADER

thanks

G. Lakshmipathi

Answers (4)

Answers (4)

Former Member
0 Kudos

resloved

andrea_olivieri
Contributor
0 Kudos

Hello,

you could use the Function Module WS_DELIVERY_UPDATE.

Here an extract of an old abap that implemented few years ago.


  (...)
  DATA: ls_ret TYPE bapiret2,
            ct_return TYPE TABLE OF bapiret2.

  DATA lt_prot  LIKE prott  OCCURS 10 WITH HEADER LINE.
  DATA lt_verko  LIKE verko      OCCURS 100  WITH HEADER LINE.
  DATA lt_verpo  LIKE verpo      OCCURS 500  WITH HEADER LINE.
  DATA lt_vbpok  LIKE vbpok      OCCURS 500  WITH HEADER LINE.
  DATA ls_vbkok  LIKE vbkok.

  CLEAR ct_return.
  REFRESH ct_return.
  CLEAR ef_error_occurred.




  CLEAR: ef_error_in_item_deletion_0 ,
          ef_error_in_pod_update_0 ,
          ef_error_in_interface_0 ,
          ef_error_in_goods_issue_0 ,
          ef_error_in_final_check_0 .


*  carry out goods issue
  l_vbeln = lf_vbeln.
  ls_vbkok-vbeln_vl = l_vbeln.
  ls_vbkok-wabuc = 'X'.                      "Post Good Issue
  ls_vbkok-wadat_ist = wadatist.


  if not pickgi is initial.
*   in order to perform picking
    DATA: gs_lips TYPE lipsvb.
    DATA: gt_lips TYPE TABLE OF lipsvb .

    SELECT * FROM lips INTO CORRESPONDING FIELDS OF TABLE gt_lips
             WHERE vbeln = lf_vbeln.
    CHECK sy-subrc = 0.
* Feed the picking interface table
    LOOP AT gt_lips INTO gs_lips.
      CLEAR lt_vbpok.
      MOVE-CORRESPONDING gs_lips TO lt_vbpok.
      lt_vbpok-vbeln_vl = gs_lips-vbeln.
      lt_vbpok-posnr_vl = gs_lips-posnr.
      lt_vbpok-posnn = gs_lips-posnr.
      lt_vbpok-pikmg = lt_vbpok-lgmng.            "Picking Qty
*        lt_vbpok-matnr = gs_lips-matnr.
*        lt_vbpok-charg = gs_lips-charg.
*        lt_vbpok-lfimg = gs_lips-lfimg.
*        lt_vbpok-vrkme = gs_lips-vrkme.
*        lt_vbpok-brgew = gs_lips-brgew.
*        lt_vbpok-ntgew = gs_lips-ntgew.
*        lt_vbpok-gewei = gs_lips-gewei.
*        lt_vbpok-volum = gs_lips-volum.
*        lt_vbpok-gewei = gs_lips-gewei.
*        lt_vbpok-voleh = gs_lips-voleh.
*        lt_vbpok-lianp = 'X'.
*        lt_vbpok-kzbrg = 'X'.
*        lt_vbpok-kzntg = 'X'.
*        lt_vbpok-kzvol = 'X'.
      APPEND lt_vbpok.
    ENDLOOP.
  endif.

  SET UPDATE TASK LOCAL.
  CALL FUNCTION 'WS_DELIVERY_UPDATE'
    EXPORTING
      vbkok_wa                    = ls_vbkok
      synchron                    = 'X'
      no_messages_update          = ' '
      update_picking              = 'X'
      commit                      = 'X'
      delivery                    = l_vbeln
      nicht_sperren               = 'X'
      if_error_messages_send_0    = space
    IMPORTING
      ef_error_any_0              = ef_error_any_0
      ef_error_in_item_deletion_0 = ef_error_in_item_deletion_0
      ef_error_in_pod_update_0    = ef_error_in_pod_update_0
      ef_error_in_interface_0     = ef_error_in_interface_0
      ef_error_in_goods_issue_0   = ef_error_in_goods_issue_0
      ef_error_in_final_check_0   = ef_error_in_final_check_0
    TABLES
      vbpok_tab                   = lt_vbpok
      prot                        = lt_prot.


  LOOP AT lt_prot.
    CLEAR ct_return.
    IF lt_prot-msgty = 'E' OR
       lt_prot-msgty = 'A' .
*      error occured
      ef_error_occurred = 'X'.
    ENDIF.
    ls_ret-type       = lt_prot-msgty.
    ls_ret-id         = lt_prot-msgid.
    ls_ret-number     = lt_prot-msgno.
    ls_ret-message_v1 = lt_prot-msgv1.
    ls_ret-message_v2 = lt_prot-msgv2.
    ls_ret-message_v3 = lt_prot-msgv3.
    ls_ret-message_v4 = lt_prot-msgv4.
    APPEND ls_ret TO ct_return.
  ENDLOOP.

  IF ef_error_occurred IS INITIAL.
    COMMIT WORK .
  ELSE.
    ROLLBACK WORK.
  ENDIF.
(...)

Hope this help.

Kind regards.

Andrea

Former Member
0 Kudos

Is there any functional module which can do both Picking & PGI update for delviery..

Thanks

Former Member
0 Kudos

Sankar,

If that were to be the case then why don't you create a POPup "Displaying Picking and PGI Completed" or program it i such a way as taking you to Print out of Delivery note or goes to VF01 Screen for invoice creation.

Regards

Sathya

Former Member
0 Kudos

Thanks for your reply.

I just wanted to update delivery saying that picking & PGI status has been completed for delviery in Change mode. that means we are not doing any physical activties in SAP but updating the delviery as picking & PGI completed through BAPI.

Regards

Former Member
0 Kudos

Hi,

Though you are not physically updating.. but system wise you are supposed to do the Picking and PGI right.. (if you areusing item category TAN or TAB)

If you are using IDOC's an inbound 856 can help in this case. (the FM is IDOC_INPUT_DELIVERY)

if you are not using idocs, then may be the following FM's can help ( In addtion to the suggested by other friend)

again for picking it depends on whether you are using Warehouse Mgmt or not..

Function Modules :

WS_DELIVERY_UPDATE_2 ( Picking and Packing)

MB_CREATE_GOODS_MOVEMENT( For PGI)

RV_DELIVERY_PICK_UPDATE

SD_DELIVERY_UPDATE_PICKING

SD_DELIVERY_UPDATE_PICKING_1