Create transfer order via Function Module

Dear SAP guru,
I have the following requirement that the transfer requirements will be created for replenishment into dedicated storage bins from another storage types.
To do this, I use a user exit to calculate what is my replenishment quantity required for all the dedicated bins of this particular material.
Once, the TR is created.  TO should be generated next. And, that is the problem that I faced here.  The quantity to replenish to each of the dedicated storage bin could be different, depends on the quantity in the storage bin at that time.
For example, I have 3 dedicated bins for one material as follows:
A-01             100 pc
A-02               50 pc
A-03               50 pc
Assume that the maximum quantity per bin is 300pc, and once I run the replenishment program earlier, I will have a TR created with 700 pc.
Now, what I want during the TO creation, is to search the dedicated bin and also determine the required quantity for each of the bin.  In this case, my TO will have 3 items, i.e.
A-01             200pc
A-02             250pc
A-03             250pc
Is there any way to do it?
Please advise.
Thanks.
Tom

Hi Tom,
You can use the Transation SMOD find the possible SAP enhancements. All extensions in the the WM-Umfled can select you, if you enter MWMTO* and die F4-help press. You then get a list of extensions which are possible. Hope this helps.

Similar Messages

  • Create Return Order via Fucntional module

    Hi all,
    I am trying to create a return order with refernce to invoice via fucntional module SD_SALESDOCUMENT_CREATE
    In SALES_HEADER_IN, I am giving REF_DOC - Invoice number, REFDOC_CAT - M
    In SALES_HEADER_INX , I am putting X mark for the above fields
    I am Passing necessary details with material.I see the return order is created succesfully, but the invoice number is not updated in Accounting tab - Reference fields - Header.
    Please anyone help me if the values what I have passed is correct or not to create the return order via Functional module
    regard
    Mano

    Hi Mano,
    Could you please upload screenshot of the field you are referring to
    thanks
    santosh

  • Problem with Creation of CRM Order via Function Module Test

    I am trying to check the order creation process from external systems by using the test function in Tcode SE37 with Function Module BAPI_BUSPROCESSND_CREATEMULTI.
    I have created a Test Sequence of the following FMs:
    BAPI_BUSPROCESSND_PROCSETTINGS
    BAPI_BUSPROCESSND_CREATEMULTI
    BAPI_PROCESS_SAVE
    BAPI_TRANSACTION_COMMIT
    All that I have been able to create so far is an order header without a Sold-to or Ship-to and no items. I am able to populate the Organization data, Header text and Appointments. The only partner function that is being populated is the one that is being automatically picked up from my user master.
    For the BAPI_BUSPROCESSND_CREATEMULTI I am populating the following tables:
    HEADER          1 entry
    ITEM               2 entries
    PARTNER          2 entries
    ORGANISATION     1 entry
    APPOINTMENT          2 entries
    INPUT_FIELDS          41 entries     
    SCHEDULELINE     2 entries
    I have created the entries based upon information gained through debugging function module CRM_ORDER_MAINTAIN during the creation of a service order.
    It would be interesting to know if anybody has successfully created an order via the SE37 test function and if so, it would be useful to see the data in the relevant tables.

    HEllo ,
    Write a wrapper to the function module CRM_ORDER_MAINTAIN.
    To populate the Text use below code
      ls_input_field_names-fieldname  = 'REF_GUID'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'REF_KIND'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDID'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDSPRAS'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDSTYLE'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'TDFORM'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'LINES'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      ls_input_field_names-fieldname  = 'MODE'.
      INSERT ls_input_field_names INTO TABLE lt_input_field_names.
      CLEAR ls_input_fields.
      ls_input_fields-ref_guid    = attr_guid.
      ls_input_fields-ref_kind    = 'A'.
      ls_input_fields-objectname  = 'TEXTS'.
      CONCATENATE 'CRM_ORDERH' order_guid INTO ls_input_fields-logical_key.
      ls_input_fields-field_names = lt_input_field_names.
      INSERT ls_input_fields INTO TABLE attr_t_inputfields.
    Call Order maintain FM to create any order
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_text               = lp_order->attr_t_text
          it_partner          = lp_order->attr_t_partner
        IMPORTING
          et_exception     = et_exception
        CHANGING
          ct_orderadm_h     = lp_order->attr_t_orderadm_h
          ct_input_fields      = lp_order->attr_t_inputfields
        EXCEPTIONS
          error_occurred    = 1
          document_locked   = 2
          no_change_allowed = 3
          no_authority      = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regards
    Satish

  • Manula transfer order using function modules

    Hi,
         I am trying to create a transfer order using l_to_create_single.
    very thing works fine. the only problem is vbeln value is not updated in to table ltak.
    here i am creating a TO for single material.
    If i use l_to_create_dn, vbeln value is updated. but TO is created for all the items( materials) in delivery at a time.
    this is not the desired result.Is there any chance that i can create a TO using l_to_create_dn for only a single material.
    Please help me.
    Thanks &
    Kind regards
    Vamsi.

    Hi Avula,
    L_TO_CREATE_SINGLE is a BAPI and the Changes will be updated when you are going to call the FM BAPI_TRANSACTION_COMMIT. So Call the Commit only after the User presses OK.
    OR
    Pass the below parameters to create TO
    CALL FUNCTION 'L_TO_CREATE_DN'
    EXPORTING
    i_lgnum = s1_lgnum
    i_vbeln = p_delv
    it_delit = i_it_delit
    IMPORTING
    e_tanum = l_tanum
    TABLES
    t_ltap_vb = i_ltap_vb
    EXCEPTIONS
    OTHERS = 1.
    Edited by: Raj on Jun 27, 2008 3:31 AM

  • Error while creating Generic Extractor via Function Module

    Hello Guys
    I have created a Generic Extractor through a Function Module. I took the Standard FM: RSAX_BIW_GET_DATA_SIMPLE, gave it a new name and activated it. I made a few changes in it, like giving my structure name for E_T_DATA and giving the list of tables, from where I need to get the data. Then I created the datasource in RSO2 by giving this function module and the extract structure.
    The DS was created properly, but when I check in RSA3 for records, its giving me an error: ---> <b>The extraction program does not support object YCNA_INVY_TRNS</b>
    What do i do now? Can someone please tell me, what changes I need to make in the standard FM to suit my requirements??
    Thanks.

    Hi,
            Just try to reactivate the structure once again. And when you open the function module, if the problem still persists just try to press Return key several times. The message you are getting is just a warning message.
    PS: I am not sure whether this is the correct way, but i personally resolved this by pressing the ENTER key 4 or 5 times. So just give a try.
    Regards
    Sunil

  • Creating Contact Person via Function Module

    Dear ABAP Gurus,
    try to add customer contact person via SD_CUSTOMER_MAINTAIN_ALL.
    KNVK - Kundenstamm Ansprechpartner
      MOVE '0000010010' to itab-kunnr.
      MOVE 'Firstname' TO itab-namev.
      MOVE 'Lastname' TO itab-name1.
      MOVE 'City' TO itab-ort01.
      MOVE 'DE' TO itab-parla.
      MOVE '' to itab-telf1.
      MOVE 'U' to itab-kz.
      APPEND itab to my_knvk.
    BAPI aufrufen
      CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
        EXPORTING
          PI_POSTFLAG = 'X'
        TABLES
          T_XKNVK = my_knvk.
    Runs without error but person record not created. Any ideas ?
    Thanks in advance for your help.
    Thomas

    Check for the sy-subrc value in Debug mode .
    Check do you need to commit COMMIT statement to update the table.
    Also look at this
    Changing Customers using SD_CUSTOMER_MAINTAIN_ALL
    Regards
    Vivek
    <b> please reward points for all the useful answers </b>

  • Adding a new conditon on head via function modul?

    Hi,
    is there a way to add a condition to an order via function module? I mean in customizing we have maintained the calc scheme (and everything else) and assign it to the order. What we want is to add the new condition type to the head of the order via function module. The scenario is as follows:
    We create an order and have on the header a field for a value. If you type a value in the field and press enter the condition should be created and calculatetd. The result is given in the condition tab of the order on header level.
    We try to not do a modifictaion. therefore i am looking for a function module. Is there someone who could help?
      thanks and regards,
           Ming

    Why can't this be done by the pricing configuration?
    There are also pricing user exits available, which are not modifications and exist for this purpose exactly (i.e. when for some reason configuration alone is not enough). See the list here:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erplo/sdUserexits

  • Save EAN11 field while creating POrder creation through Function module

    Hi All,
    I want to update EAN11 field in material master while creating Purchase Order through function module. I am using function module BAPI_PO_CREATE1 for creating purchase order. There are no structures in the PO creation FM in which EAN11 field is there. I have also tried using function module MEPO_DOC_ITEM_PROCESS for updating EAN11 field. It is not working. Please suggest some method to do that.
    Note: I am receiving EAN11 through an external system by proxy.
    Thanks,
    Chinmay

    Hi,
    Use BAPI_MATERIAL_SAVEDATA to updat ean numbers for materials.
    tables INTERNATIONALARTNOS is used to update EAN.
    Regards,
    Shanmugavel Chandrasekaran

  • 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

  • Create transfer order for material document - 4.6C system

    Hi Gurus
    Can any one provide me the function module or BAPI to create transfer for material document in 4.6c system. I have to give input as supply storage type and bin and destination storage type and bin while execting the function module.
    Thank you in advance
    Regards
    Sarath

    Sarath,
    Thanks for responding, I finally found my answere via Thread: create transfer order for material document - 4.6C system
    Thanks again.

  • Creating Transfer Order for a Material document

    Hi,
    I am transferring the Unrestricted stock from one material to another material through Movement type 309.
    I am creating a material document through BAPI_GOODSMVT_CREATE. Once the Material document is created and if the stock is in multiple storage types or storage bins, then I need to perform LT06. Instead of doing BDC recording I am using L_TO_CREATE_MULTIPLE function module for creating the TO. I am passing all the necessary values to this FM. TO is getting created but the Material document is not reflecting in that TO.
    As per the configuration, movement type 309 will create the posting change only not the Transfer Requirement.
    Does anybody have encountered the same problem?. If so please let me know how you have resolved the issue.
    Regards,
    Kishore.

    Hello Kirankumar,
    It is possible to assign external number ranges for Storage unit, so maintain storage unit number range to assign SU number externally.
    Now when you create Transfer order for material document at that time you can assign SU number externally.
    Hope this helps.
    regards,
    Arif Mansuri

  • FM/BAPI to create Transfer Order(TO) with reference to TR or Material Doc.

    Hi,
    I am in need of Function module or BAPI to Create Transfer Order(TO) with reference to Transfer Requirement(TR) or Material Document.

    Hi,
    Please try any of the below,
    1.Look at function group L03B (Transfer order processing)
    2.Use L_TO_CREATE_TR
    3.BAPI_GOODSMVT_CREATE set:
    GOODSMVT_ITEM-STGE_TYPE_PC = destination storage type or GOODSMVT_ITEM-STGE_TYPE_ST = destination storage type
    4.Look at fm L_TB_VERAENDERN. This isn't RFC, but you might copy fm into ZL_TB_VERAENDERN and set RFC on.
    Hope this helps.
    Thanks,
    Harini

  • Create Purchase Order via Upload.

    Hi,
    Our company have lost 4 months data due to some hardware problem. After hardware issue resolved we have to post all lost data. Therefore in MM module can it is possible that I can create PO order via BAPI program? We have four type of PO (Inventory, Assets, Changed off and IO). I got a BAPI function "BAPI_PO_CREATE1" can any body tell me how can I you this BAPI to create PO or Upload it?
    Thanks
    Syed Tayab Shah

    Hi
    [Sample Code|Re: BAPI-PO;
    [Explanation About BAPI|http://abap.wikiprog.com/wiki/BAPI_PO_CREATE1]
    Re: BAPI_PO_CREATE1-Runtime error
    BAPI_PO_CREATE1
    Regards
    Pavan

  • How to create Transfer order from material document   uFF08Move type is 101uFF09

    Hi all,
    is there any function module, BAPI to create transfer order from a material document number?
    I want to use FM L_TO_CREATE_SINGLE,but the result is "Movement type 101 for manual transfer orders does not exist".
    Is the parameters error?
    Thank you in advance
    Regards

    The error message you get is number 196 from message class L3, do a where-used on it from transaction SE91 and then put a break-point on each line result.  Afterwards, re-execute your function call and see which break-point is hit and investigate from there.
    With that said, you really should be using Bapi BAPI_GOODSMVT_CREATE for all goods movement operations.  It shares code with MIGO and executes the same Badi's and user-exits, so data integrity is not broken.  Don't forget Bapi BAPI_TRANSACTION_COMMIT to commit changes in the database after a successful call.
    cheers

  • How to create Transfer order from material document

    Hi gurus,
         is there any function module, BAPI to create transfer order from a material document number.
    waiting for positive reply.
    thanks
    vinod

    Hi,
    The FM L_TO_CREATE_SINGLE or L_TO_CREATE_MULTIPLE could solve your problem.
    Hope it helps.
    Chang

Maybe you are looking for