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: 

WS_DELIEVRY_UPDATE Stopping Auto GR

0 Kudos

Dear All,

I am having a peculiar scenario where I am posting Goods Receipts from MIGO and bypassing it with my custom program based on a business scenario ( Replenishment Stock Transfer ).

In the custom program, I am checking whether open delivery exists, if yes then Post the Goods Issues using FM WS_DELIVERY_UPDATE. This FM is performing Picking, PGI, and GR. Business wants to restrict this GR inspite of the setting being set as one step posting ( Table T161W, where the Field step is mentioned as One step ) in the System and wants System to act according to the setting maintained in the maintainable custom table ( one-step or two-step posting). I am unable to find what should I pass to FM to stop Automatic GR.

    CALL FUNCTION 'WS_DELIVERY_UPDATE'
      EXPORTING
        vbkok_wa                 = ls_vbkok
        synchron                 = 'X'
        no_messages_update       = ' '
        commit                   = ''
        delivery                 = delv_no
        update_picking           = gv_picking_todo
        nicht_sperren            = 'X'
        if_database_update       = '1'
        if_error_messages_send_0 = 'X'
      TABLES
        vbpok_tab                = lt_vbpok_tab
        prot                     = lt_prott

All help and suggestion are welcome.

Looking forward to hear from you all.

Thanks in advance.

Regards,

Reshu

1 REPLY 1

Jelena
Active Contributor

Sorry, I have only the answer that you probably was afraid to hear: there is no way to override the configuration by using this FM. And it's for a good reason. I believe that instead of "breaking" SAP your team need to take a step back and look at the process that the business is trying to implement. There has to be a different solution but what exactly would depend on many different factors.