Function module which uses both BAPI's for sales order create and change

Please name the function module which uses both BAPI's for sales order create and change.
BAPI_SALESORDER_CREATEFORMDAT2
BAPI_SALESORDERCHANGE

Yup.
you must write a piece of code for this.
with if else condition.first check if SO is exsist than use second FM to change it else create new SO from first FM.
logic somethig like this.
Amit.

Similar Messages

  • Is there a Business Object for Sales Order Create and Change VA01 and VA02

    Hi experts -
    I am looking for a business object for Sales order create and change VA01 and VA02 respectively?
    Thanks,
    Mark

    Hi Mark,
    I think this question is best answered in [SAP Solutions|/community [original link is broken]; Forums.
    - Subhodeep
    Edited by: Subhodeep on Aug 29, 2009 11:14 AM

  • Any function module or bapi to get sales order number and invoice number?

    hi all,
    with delivery order number provided, do we have any function module or bapi to get sales order number
    and invoice number?
    thanks.

    Hi,
    Check
    BAPI_SALESORDER_CREATEFROMDAT1
    BAPI_REMUREQSLISTA_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Vendor Billing Documents
    BAPI_REMUREQSLISTB_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Payment Documents
    BAPI_REMUREQSLISTC_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Posting Lists
    BAPI_REMUREQSLIST_CHANGEMULT   Agency Business: Change Invoice List Documents BAPI
    BAPI_REMUREQSLIST_GETLIST      Agency Business: BAPI Determine Detailed Data for Invoice List Documents
    BAPI_REMUREQSLIST_RELEASE      Agency Business: BAPI Release Invoice List Documents to FI
    Edited by: Neenu Jose on Nov 26, 2008 8:53 AM

  • Need code for sales order create report using bapi's

    need code for sales order create report using bapi's

    Hi,
    Go through below link
    http://www.saptechies.com/bapi_salesorder_createfromdat2/
    <b>Reward points if it helps,</b>
    Satish

  • BAPI/RFC for Sales Order or Warehouse Order that retrives VBAK,VBAP,VBEP

    Hi,
       Is there any BAPI/RFC for Sales Order or Warehouse Order that retrives VBAK,VBAP,VBEP and VBPA tables for specified inputs.
       The BAPI or RFC should return the Sales Order details with tables VBAK,VBAP,VBEP and VBPA.
       Rewards if useful.
    Thanks,
    Mich

    Try creating an RFC calling FM: SD_SALES_DOCUMENT_PREFETCH with required details for Header, Item, Schedule and Partners.
    Below code can give you idea in handling the FM.
    PARAMETERS: p_vbeln TYPE vbeln_vl OBLIGATORY.
    CONSTANTS: c_x TYPE char01 VALUE 'X'.
    DATA: st_view TYPE order_view,
          i_vbak_key TYPE TABLE OF sales_key,
          i_vbak TYPE TABLE OF vbak,
          i_vbap TYPE TABLE OF vbapvb,
          i_vbep TYPE TABLE OF vbepvb,
          i_vbpa TYPE TABLE OF vbpavb.
    START-OF-SELECTION.
      MOVE c_x TO : st_view-header,
                    st_view-item,
                    st_view-sdschedule,
                    st_view-partner.
      APPEND p_vbeln TO i_vbak_key.
      CALL FUNCTION 'SD_SALES_DOCUMENT_PREFETCH'
        EXPORTING
          i_sales_view  = st_view
          i_memory_read = 'A'
        TABLES
          i_vbak_keytab = i_vbak_key " List of Sales Orders to extract
          fxvbak        = i_vbak     " Header
          fxvbap        = i_vbap     " Item
          fxvbep        = i_vbep     " Schedule Lines
          fxvbpa        = i_vbpa.    " Partners

  • FM/BAPI/Method for Sales Order Costing

    Hi,
    I need the FM/BAPI/Method for Sales Order Costing.
    Which is calculating at run time while process of Sales Order Costing
    Can any one please help me out.
    Thanks
    Chinni
    Edited by: Tirumula Rao Chinni on Mar 10, 2010 3:04 PM
    Edited by: Tirumula Rao Chinni on Mar 10, 2010 3:35 PM

    Vinraaj, thank you very much for your advice and the time you've spent for the ask.
    I am searching for whether there is any SAP offered FM. Therefore, I did not think to check the background (code side) of the process by debugging.
    There is not any documentation about the FM that you have offered, in the system.
    So , I can not be sure about the usage of it, too.
    Thank you very much.

  • IDoc Configuration for Production Order Creation and Change

    Hi All,
    Please Help me out for IDoc Configuration for Production Order Creation and Change
    I have found the IDoc for Production Order
    Messgae Type : LOIPRO and IDoc type : LOIPRO01
    Actually my requirment is to send the (LOIPRO01 )IDoc from SAP R/3 to XI system ,when ever the Production Order Created and Changed,
    I have done following Configurations:
    1. RFC Destination created for XI system
    2. PORT was created for XI
    3. Partner profile created WE20 and LOIPRO01 IDoc is added in OutBound Perameter.
    I need to know how to do the followning.
    1. How do i configure the outbound Production order idocs when Production Order is created or changed.
    2. in NACE (Output control) which is the Application for Production Order.
    3. How can I set IDoc as output Type for Production Order Creation.
    Thanks in advance
    Dhanabal T

    Hi Michal,
    I know that it is the old thread but still want to get clarified from you out of curiosity.
    Unlike other IDOC, i actiavated change pointers for LOIPRO
    1.message and idoc type is linked
    2.function module , message type , idoc type is linked
    function module used is CLOI_MASTERIDOC_CREATE_LOIPRO
    3.BD64, distribution model is created and distributed
    4. port and partner profile is in place.
    5. IDOC is not getting generated after creating the process order.
    do we need to activate the change documents for the message type in BD52,
    if yes can you please provide the object types for the same.
    or i am missing something else. please guide me in this regards.
    Thanks in advance for your time.
    S.Janagar

  • ATP for sales orders created with BAPI_SALESORDER_CREATEFROMDAT2

    We use BAPI_SALESORDER_CREATEFROMDAT2 to create sales orders (from external EDI system).  How can I use this BAPI to perform availability-to-promise checking?  If it can't be done is there another function module I can use where I pass a sales order number and it performs ATP on the entire order or individual lines?  thanks for any help.

    Hi,
    Please check BAPI BAPI_MATERIAL_AVAILABILITY.
    Regards,
    Ferry Lianto

  • Bapi or Function Module to do the availability check for Planned Orders

    Hi all,
    I need a Bapi or a Function Module to do the availability check for a Planned Orders. Anyone knows how?
    I will use it in an Exit.
    Thanks in advance
    Points will be given

    I think I found it.
    If anyone is searching for it too, we will use these one:
    CO_ZA_AVAIL_CHK_ORDER_MULTI

  • Creating GetList Bapi Wrapper for Sales Order

    Hi All,
    I am not at all into CRM, but there is some problem I have which is related to it.
    In the Sales-TeleSales transactions, I create a sales Order.
    Now there is much data that is there which is linked to this Sales Order like
    1)     Telesales
    2)     Item
    3)     Sold-to-party
    4)     Product
    5)     Quantity
    6)     Req-del-date
    7)     Currency
    8)     Region
    9)     Country
    10)     Net Value
    11)     Discount
    12)     Tax amount
    13)     Gross Value
    14)     Partner
    I need to create a BAPI Wrapper to get all the Header and Detail data.
    I am thinking of finding a BAPI or a Function Module which does this job and calling it in my BAPI Wrapper.
    Now I want you people to tell me the Appropriate BAPIs or FMs which will do this job for me.
    I need almost all these fields to be returned by my Bapi Wrapper.
    Please ask for Clarifications...
    Lookin forward to responses...
    Ankur

    Hi Ankur,
           You can Call the FM : CRM_ORDER_MAINTAIN within your BAPI wrapper.
    For testing purpose there is a Standard Report on this FM , Report name : 'CRM_TEST_ORDER_MAINTAIN'.
    Hope this will be helpful to you
    Regards,
    Anand.

  • Regarding bapis for sales order creation and modification

    Hi,
    I am trying to create a syncbo for sales order creation, modification and display. The bapis that I am using are
    1.BAPI_SALESORDER_GETLIST
    2.BAPISDORDER_GETDETAILEDLIST
    3.BAPI_SALESORDER_CREATEFROMDATA1
    4. BAPI_SALESORDER_CHANGE
    Am I using the correct bapis. When I tried to create a syncbo it gave the following errors
    BAPISDORDER_GETDETAILEDLIST does not have RETURN parameter in export or tables parameter
    RETURN parameter in Create BAPI Wrapper should refer to structure BAPIRET2
    RETURN parameter in GetList BAPI Wrapper should refer to structure BAPIRET2
    GetDetail BAPI Wrapper does not have RETURN parameter in export or tables parameter
    No Export parameter referring to header structure exists in GetDetail BAPI Wrapper
    No Import parameter referring to header structure exists in Create BAPI Wrapper
    No Import parameter referring to header structure exists in Modify BAPI Wrapper
    No Import parameter referring to a field of header structure exists in GetDetail BAPI Wrapper
    No Export parameter referring to a field of header structure exists in Create BAPI Wrapper
    No Tables parameter referring to item structure exists in Create BAPI Wrapper
    No Tables parameter referring to item structure exists in Modify BAPI Wrapper
    I am informed that the above bapis are standard bapis.
    I am not sure as to why I am getting the errors.
    Does the syncbo require the  bapi's to be in a specific format.
    What would be the header and item structures for sales order bapis
    Regards
    Raja Sekhar

    Hi Raja,
      ya , for creating Sync BOs ,our BAPI wrappers must satisfy certain conditions..
    just go through this link.
    u can use the standard BAPIs of SALES Order in ur Custom BAPI Wrapper
      http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/appdev/smartsync/what_is_a_bapi_wrapper.html
    the RETURN must be of type BAPIRET2..
                    Regards
                    Kishor Gopinathan

  • Simulation in Bapi/FM for sales order is locking tables

    Hi
    We want to use bapi BAPI_SALESORDER_CHANGE or FM SD_SALESDOCUMENT_CHANGE to simulate the effect on prices of a sales order. We must do this during the printing of the sales order. This bapi/FM is locking the sales order tables during the simulation mode. As we are printing from the sales order, the sales order is already locked so we get the error: V1 042 Sales document xxx is currently being processed. Does anyone have a solution to avoid this lock or an alternative to simulate the price from a sales order?
    We need to use the simulation of the sales order to capture all manual changes in the sales order pricing.
    Kind Regards

    Hi,
    FM BAPI_SALESORDER_SIMULATE gives the same pricing data as  BAPI_SALESORDER_CHANGE. you do not need to change an existing document to get the pricing data. Just simulate the creation of a new order.. th prices should be the same as long as you send the same data.
    Dev.

  • User Exit/BADI for Sales Order Line Partner Change

    I am looking for a user exit or BADI which gets triggered when partner function of a sales order line is changed.
    My detailed requirement is-We have created a new Partner Function - END CUSTOMER(EC). Requirement is to trigger a business logic whenever the End Customer partner function is changed from its default value to anything else.
    If you have any suggestions please let me know.

    Hi
    have a look at function module EXIT_SAPLV09A_004 .
    Cheers

  • Subcontracting for Sales Order Stock and collective Transfer Posting

    Dear Expert,
    We have a scenario in subcontracting wherein the sales order the customer also wants to see the components and as such along with the Header item of subcontracting ,we also mention the components as another line item in the sane Sales Order.
    Now from the sale sorder two Po's are created onr for the subcontractor and one for the compnens to be procured.
    Since the components are procured on sales order stock there is noway we can issue it to the Vendor stock through Movt .Type 541.
    As per SAP AG WE CAN:
    "ubcontracting is also possible in conjunction with sales order stocks and project stocks. The subcontracting orders are account-assigned to a sales order or a WBS element. Thus, the components are not transferred (using a transfer posting) to the u201Cstock of material provided to vendoru201D but are directly withdrawn from the sales order stock or the project stock at the time of the goods receipt. The material manufactured is also posted to the sales order stock or to the project stock. The cost of subcontracting is then debited to the sales order or WBS element.Since the components are not transferred to the u201Cstock of material provided to vendoru201D, we recommend that you use a transfer posting to transfer the provided components to a new storage location (for example, 9999). This enables you to obtain an overview of those stocks that are physically located at the subcontractor.This information is particularly important when you carry out a physical inventory of the sales order stocks and project stocks."
    But my query is that how many such storage locations will be created for the subcontracting vendors.
    Secondly for the stock transfer from sales to storage location , we have lots of sales order, is dera way through which we can do bulk transfer rathar than clicking at new item everytime and then doing the transfer posting.
    your expert advice shallbe helpful in resolving a longtime pending issue , waiting for the response.
    Regards
    Jabeen

    This is a known issue, the system doesnt allow stock to have two special stock statuses at the same time.
    Your concern of having to make multiple storage locations is valid (since this is a configuration).
    I suggest you do the following
    - Configure a warehouse and a single storage type (say 001). Allow mixing of materials in a single bin
    - Assign this warehouse to a new storage location.
    - Create a bin for every sales order number in the warehouse.
    - When goods are moved to subcontractor, perform a transfer posting to the storage location, and perform a putaway to the respective bin. The putaway strategy can be tweaked using a user exit to go to the relevant bin. This way you do not have to enter the WM transaction for putaway.
    - To consume the stocks, you can use 231E movement (MB1A). On the WM side, the picking strategy can be enhanced so that the picking TO is generated with the correct source bin. Make sure the GL account and CO objects are as per FICO requirements.
    This way you can track the stocks binwise (bin level reports are available in WM), perform physical inventory and also consume the stocks from the relevant bin automatically.
    We had faced the same situation, and we ended up not having sales order stock at all.
    Hope this helps.
    Regards,
    Aroop

  • Applying Price list for sales order created from Internal Requisition

    I am using 12.0.5. I have created a price list and applicable discount. I am creating Internal Requisitions and Importing them into Order Management as Sales Order using "Create Internal Order" and "Import Request". But when the sales orders are created, the pricing flag is "Freeze Price" and to apply the price list, I have to change the pricing flag of each line and re-price order/ line. Is this a way around this such that Sales orders created from Internal Requisitions pick up the correct discounted selling pricing automatically after import?

    Hi Ravichandran,
    When the Internal Sales Orders are created via Order Import program, the pricing flag will be "Freeze Price" because the value of CALCULATE_PRICE_FLAG will be set to 'N' in the OE interface line table by the Create Internal Orders program. This is the standard functionality of the Oracle.
    However, if your requirement is to re-price the line (automatic application of discounts at the time of booking) after the SO is created then to avoid the manual repricing steps, you can write a custom program to update the CALCULATE_PRICE_FLAG to 'Y' for the OE Line records present in the interface tables itself. You need to make sure that this update happens before the Order Import program. You can create a Request Set to acheive this, for example...
    XXX Create Internal Orders (Custom Request Set)
    - Create Internal Order (Standard Oracle Program)
    - XXX Update PriceFlag for ISO (Custom Program to update the price flag)
    First run the above request set & then run standard Order Import program. So when SO is being booked, CALCULATE_PRICE_FLAG will be 'Y' i.e., Calculate Price, the required discounts will be pulled & the line will be re-priced automatically.
    I hope this is what you wanted to achieve. Let me know if you have any questions.
    Regards,
    Hemanth

Maybe you are looking for