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

PGI using BAPI_OUTB_DELIVERY_CHANGE

Former Member
0 Likes
5,491

Can I use BAPI_OUTB_DELIVERY_CHANGE for PGI?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,388

It is easier to do a BDC, if you are just doing a PGI. All you have to code for is just the initial screen, enter the delivery number and the BDC OKCODE for PGI.

Can I use BAPI_OUTB_DELIVERY_CHANGE for PGI?

4 REPLIES 4
Read only

Former Member
0 Likes
1,388

For PGI you can use SD_DELIVERY_UPDATE_PICKING_1

Cheers,

Satya

Read only

Former Member
0 Likes
1,389

It is easier to do a BDC, if you are just doing a PGI. All you have to code for is just the initial screen, enter the delivery number and the BDC OKCODE for PGI.

Read only

Former Member
0 Likes
1,388

I hope you cannot use that function module for PGI. I suggest you go with BDC for VL02N.

Read only

Former Member
1,388

Yean Nean,

To perform PGI, this code is very simple and works for me:

DATA:    I_VBELN LIKE LIKP-VBELN,    
         I_VBKOK LIKE VBKOK,    
         I_PROTT LIKE PROTT OCCURS 0 WITH HEADER LINE.

L_VBKOK-VBELN_VL = L_VBELN.   <- Delivery number
L_VBKOK-WABUC    = 'X'.       <- Automatic PGI

* Perform Pick and PGI
CALL FUNCTION 'WS_DELIVERY_UPDATE'          
  EXPORTING            
     VBKOK_WA                 = I_VBKOK            
     SYNCHRON                 = 'X'            
     NO_MESSAGES_UPDATE       = ' '            
     UPDATE_PICKING           = 'X'            
     COMMIT                   = ' '               
     DELIVERY                 = I_VBELN                   
     NICHT_SPERREN            = 'X'
     IF_ERROR_MESSAGES_SEND_0 = 'X'       
  TABLES            
     PROT               = I_PROTT       
  EXCEPTIONS
     ERROR_MESSAGE      = 1            
     OTHERS             = 2.  
IF SY-SUBRC <> 0. 
* Or I_PROTT has type E errors in it
  ROLLBACK WORK.
ELSE.
  COMMIT WORK AND WAIT.
ENDIF.