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: 

BAPI to update picking quantity in a delivery

allan_kofoed1
Explorer
0 Kudos

Hi,

I am looking for at BAPI where I can update picking quantity in a delivery.

The only candidate I found is:

BAPI_OUTB_DELIVERY_CONFIRM_DEC

But it seems to that this one can't be used for this!

Any suggestion?

11 REPLIES 11

Former Member
0 Kudos

Try using "sd_delivery_update_picking". It is an RFC, can be called from other applications too.

Shashi Reddy

0 Kudos

Many thanks for your answer,

but...

This is not an BAPI, so I am missing all checks and then I can not be sure about my update has been made correct.

(e.g. lock entries etc.)

If I shall use this function, then I have to be 100% sure about filling it out correctly. How can I be sure about

that?

0 Kudos

Torben,

You should be comfortable using function module SD_DELIVERY_UPDATE_PICKING since it is used by the Idoc function module SD_IDOC_INPUT_PICKING.

0 Kudos

Thanks,

But again,

How can I be sure that everything will go right since

SD_IDOC_INPUT_PICKING is not at BAPI, and sd_delivery_update_picking is also not a BAPI.

Well, all function is used by eachother, but that gives

no security of everything will go right in update.

In moment I see two way to make updates in SAP.

1) Batch input, Direct input.

2) BAPI.

0 Kudos

Dear Naplan,

Are you SAP-employed in SAP's developmentcenter in Germany ?

Is it possible to make inconsistent in SAP database if I use SD_DELIVERY_UPDATE_PICKING in a wrong way ?

vkr,

0 Kudos

Hi,

Anyone who have some experience in this?

vkr,

0 Kudos

You should not have any problems using SD_DELIVERY_UPDATE_PICKING, because I think it has got enough validations already built-in.

I think if you pass wrong information it would return back error messages in return table "PROT" without updating anything.

I haven't tried using it but would not be surprised if SAP would be using this very same FM for developing a BAPI in future releases if their is not one already.

Why don't you give it a try....

Shashi Reddy

0 Kudos

Hi Torben,

I am not currently working at SAP development center in Germany. If you search on this function module in OSS, a note dated 1996 has already mention this fm. My current client 6.20 system has this function last update by SAP on 03/29/2001. This fm is also used by Idoc function module for input. So I think it is a stable function. As Shashi said, it has enough validations built in.

0 Kudos

As far as I can see this FM is also used if you update the picking in the SAP screens. So this must be the one to use.

And anyway when it is used by the IDoc then yes it is save to use. Then it must behave like a BAPI.

Otherwise SAP would have had big problems and huge claims already.



  wa_vbkok-VBELN_VL = it-vbeln.

  wa_vbkok-vbtyp_vl = 'A'.

  wa_vbkok-vbeln = it-vbeln.

  wa_vbkok-wabuc = 'X'.

  wa_vbkok-kodat = it-kodat.


wa_vbpok-vbeln_vl = it-vbeln.

wa_vbpok-posnr_vl = it-posnr.

wa_vbpok-vbeln = it-vbeln.

wa_vbpok-posnn = it-posnr.

wa_vbpok-pikmg = it-pikmg.

APPEND wa_vbpok TO it_vbpok.


ENDLOOP.


CALL FUNCTION 'WS_DELIVERY_UPDATE_2'

  EXPORTING

    vbkok_wa                           = wa_vbkok

   SYNCHRON                           = 'X'

   COMMIT                             = 'X'

    delivery                           = it-vbeln

   UPDATE_PICKING                     = 'X'

   NICHT_SPERREN_1                    = 'X'

   IF_CONFIRM_CENTRAL                 = 'X'

   IF_DATABASE_UPDATE_1               = '1'

TABLES

   VBPOK_TAB                          = it_vbpok

   PROT                               = it_return

          .



read table it_return into wa_return where msgty = 'E'.

if sy-subrc is not initial.

COMMIT WORK.

ENDIF.

Former Member
0 Kudos

Experts ,

I am using BAPI_OUTB_DELIVERY_CREATE_STO to create outbound delivery against STO.

But picking request is not created as a result, picking quantity is always zero.

For other material in different plant Picking Qty is updated. Can you please provide the inputs.

Thanks,

Shashi