Allocation simulation by function module/BAPI

Hello experts,
I would like to simulate an allocation (distribute quantities to plants) (SAP component LO-MDS-AL). For this Iu2019m looking for an appropriated function module which I set the article
number, plants, the allocation rule and the quantity to be distributed to the plants,
The result should only be simulated; no document should be created.
Which function module can I use for this?
Thank you for your information.
Best regards,
Kurt.

* Get plants for distribution:
  call function 'WAUF_READ_DISPATCHERRULE'
    exporting
      im_key                    = ls_key
      im_pincr                  = 1
      im_sbeln                  = iv_sbeln
      im_prefetch_kna1          = 'X'
      im_prefetch_wrf1          = 'X'
      im_prefetch_material_data = 'X'
      im_material               = iv_material
      im_prefetch_wlk1          = space
    importing
      ex_svko                   = ls_svko
    tables
      ex_figr                   = lt_figr
      ex_filn                   = lt_filn
    exceptions
      ar_nicht_vorhanden        = 1
      ar_pos_nicht_selektierbar = 2
      clint_convert_error       = 3
      figr_existiert_nicht      = 4
      others                    = 5.
The table lt_figr contains the plants assigned in the allocation; this table can be changed (remove some plants which are not necessary).
* Simulate allocation:
  call function 'WAUF_DETERMINE_QUANTITIES'
    exporting
      im_quantity_to_split           = lv_to_split
      im_alloc_tbl                   = lv_alloc_tbl        " Dummy
      im_alloc_tbl_item              = lv_alloc_tbl_item   " Dummy
      im_material                    = iv_material
      im_base_unit                   = 'CU'
      im_item_category               = 'ZB'
      im_quantity_simulation         = lv_quantity_simulation
      im_rounding                    = ls_svko-rundg
      im_split_remainder             = ls_svko-restv
      im_min_max_qty                 = lv_min_max_qty
    importing
      ex_quantity_splitted           = lv_quantity_splitted
    tables
      im_ex_stores                   = lt_filn
      im_ex_store_groups             = lt_figr
    exceptions
      quantity_simulation_invalid    = 1
      rounding_invalid               = 2
      split_remainder_invalid        = 3
      min_max_qty_invalid            = 4
      stores_storegroup_inconsistent = 5
      sum_quotas_initial             = 6
      call_functionmodul_round       = 7
      planned_qty_less_min_qty       = 8
      planned_qty_greater_max_qty    = 9
      arithmetic_errors              = 10
      others                         = 11.

Similar Messages

  • Function module/BAPI to release a Business partner in GTS

    Dear experts,
    I have a requirement where in I need to release business partners programmatically. I request you to let me know if any function modules/BAPIs or any other method is available (except BDC).
    I know the manual process of releasing them, and we were restricted to use BDC.
    Thanks in advance.
    Best Regards,
    Vishal

    Hello Vishal,
    Currently the release logic is inside subroutine instead of FM or BAPI.
    You could refer to:
    Report : /SAPSLL/LCON_BLOCKED_BPF01
    Form   :  deblock_partner_masters
    Best regards,
    Vincent

  • How to create Billing Plan in sales order using Function module /BAPI

    hi,
    How to create Billing Plan in sales order using Function module /BAPI
    i hv check few FM such
    BILLING_SCHEDULE_READ
    BILLING_SCHEDULE_GET_NUMBER
    BILLING_SCHEDULE_SAVE
    But unable to create billing plan for a sales order.....any other method to create???

    Hi,
    Use this link.
    Create sales order with billing plan via LSMW and BAPI BUS2032
    BAPI or Function to update Billing Plan in Sales Order Items
    Hope this will help you.
    Regards,
    Vijay

  • Third party system call function module/BAPI through RFC to update Z table

    Dear Friends,
    We have a third party system which directly inserts a Z table in SAP through its programming, which is an auditing issue.
    We want the third party system should call function module/BAPI through RFC so that the Z table gets updated.
    waiting for inputs..
    Thanks,
    Kumar

    if third party system is capable of making Remote Function call, then writing a Function module & making it remote enable is not difficult task in ABAP.
    You may have to prepare specifications first to decide if third party system is going to Read, insert, update, delete records from Zee table.

  • Function Module/BAPI for Posting with Residual Clearing

    Hello All,
    I want to know whether any Function Module/BAPI avaialble for posting with residual clearing (FB05). Can we do residual clearing using the FM "Posting_Interface_Clearing"?
    Please let me know how this can be handled.
    Thanks in advance.
    With Regards,
    Senthil.

    Hi senthil ,
    Look at these threads
    POSTING_INTERFACE_CLEARING
    bapi for Transfer posting with clearing
    BAPI_ACC_GL_POSTING_POST for FB05
    Question about POSTING_INTERFACE_CLEARING and POSTING_INTERFACE_START
    Regards,
    Gaurav

  • Function Module/BAPI for updating Document Status.

    Hi Experts,
    Is there any Function Module/BAPI available for updating the document status ?
    Thank You,
    Radhika.

    unresolved!

  • Function Module/BAPI For Material Document

    Dear All,
    I am looking for a function Module/BAPI to get details relevant for a Material Document.
    I can get those details using table MSEG & MKPF, but still looking for a Function Module.
    Kindly help.

    Hi
    Try with these BAPI's
    BAPI_GOODSMVT_GETITEMS
    BAPI_GOODSMVT_GETDETAIL
    Regards
    Brahmaji

  • Function module/BAPI for executing VD51/VD52 transactions

    Hi
    Warm greetings to all,
    I require a function module/BAPI for executing VD51/VD52 transactions. Can anyone help on this
    Sreekanth

    Hi Sreekanth,
    Use this.
    There is an FM which is used by standard transaction
    'RV_CUSTOMER_MATERIAL_UPDATE' .
    Ex Code -
    CALL FUNCTION 'RV_CUSTOMER_MATERIAL_UPDATE'
    IN UPDATE TASK
    TABLES
    XKNMT_TAB = XKNMT
    YKNMT_TAB = YKNMT
    TCATALOG_TAB = LT_CATALOG.
    commit work.
    Regards,
    Vijay

  • Function Module / BAPI for Creating Material freight Group

    Hi All,
    Can anyone tell me the Function Module / Bapi for creating material freight group.
    Regards,
    Raj.

    Bapi for creating material freight group. :: You actually use mm01 or mm02 to change data for material flight.
    So you can use BAPI for mm02 and mm01
    For Ex:
    BAPI_MATERIAL_SAVEDATA
    Hope this helps

  • Function module / BAPI for FBRA IN 3.1 VERSION?

    Hello all,
    Could you please suggest Function module / BAPI for FBRA (Reverse and cancel) transaction in 3.1 version.
    Thanks,
    Subba

    Please check this FM perhaps it may help.
    CALL_FB08
    REVERSE_CLEARING
    RESET_CLEARED_ITEMS_BDC_WRITE.
    Regards
    Kiran Sure

  • Function Module/BAPI for posting of Parked Invoice/Documnet

    Dear all,
    Please provide me.
    Function Module/BAPI for posting of Parked Invoice/Documnet
    Regards
    Ricky

    Hi Ricky,
    What about MR_POST_PP_INVOICE?
    In my current project, though, we had to develop a function module for this.
    Regards,
    Eli

  • Function module/BAPI for ATP Material

    Hi All,
    Is there any function module/BAPI for ATP(Available-to-Promise check) for Material.
    1) Production order from one plant
    2) Scheduling agreement from another plant.
    Regards,
    Srinivas.

    Hi,
    you can use either of one below for ATP.
    BAPI_MATERIAL_AVAILABILITY
    RV_AVAILABILITY_CHECK
    /SAPNEA/SMAPI_ATP_CHECK
    regards,
    ram

  • Function module/BAPI for Pgi creation

    hi all,
    any standard function module/ BAPI for create PGI.
    i know BAPI_OUTB_DELIVERY_CONFIRM_DEC, suppose if we are using PGI reverse not possibul.
    regards

    This is not answered

  • Function module/BAPI or standerd program to define Transport route

    Hi All,
    I am configuring the TMS configuration through ABAP program .
    I am able to configure Domain controller, and able add system to it.
    Now I am not able to define Transport route, Can anybody tell me how can I achive this? 
    Is there any function module/BAPI or standerd program for it?
    Thanks,
    Swarup

    Hello
    To check the BAPIS to related module go to swo1 tcode.
    Thank u,
    santhosh

  • Standard Function Modules, BAPIs, BADIs and User Exits  in OM

    How do I check what are the Standard Function Modules / BAPIs in OM or any HR sub modules like PA, Comp, TEM etc..

    use Tcode <b>BAPI</b> and navigate to relevant module.
    for FM go to se37 and search with HR* or RH*

Maybe you are looking for

  • IPhoto doesn't recognize Photoshop CS5.1

    How do I get iPhoto (version 9.4.2 running under Mountain Lion on 24" iMac), to recognize Photoshop CS5.1 as a choice for editing photos in iPhoto preferences?  After upgrading my Mac to Mountain Lion and upgrading to the latest iPhoto (from Snow Leo

  • Can i turn on my iphone remotely?

    Last week i had my iphone stolen, but i never felt the need to make it trackable... NOW i have a new iphone, but i wont make the same mistake again... i have the icloud and mobile my and find my iphone all set up, but there is one thing i am trying t

  • Flash Noob Need Help - Destination File locked??

    Ok so I got CS3 and I'm new at this, and I've made a movie, but if I save it, when I try to export it or preview it, it says "Be sure the destination file is not locked or on a locked drive. also check the file name is not too long." well the file na

  • InD suddenly won't export to pdf

    I've been exporting files to pdf all day to send to my printer, and suddenly InDesign won't export anymore. Pop ups open as usual, but nothing happens.Grrrrrrr!!

  • E52 synchronize contacts with Exchange too late

    If I add a new contact in Outlook, than it only appears about 24 ours later on my E52 phone. I would like it to be synchronized in 15 minutes. What should I do? The Outlook is connected to the Exchange server. On my phone the synchronization of conta