Prevent SO create in BAPI_SALESORDER_CREATEFROMDAT2 if pricing incomplete

Am using BAPI_SALESORDER_CREATEFROMDAT2 to create sale order. I need to prevent the sales order
from being created, if PR00 or like condition does not exist for any material. I have set the required parameters for incompletion procedure (PRSOK etc).
I am unable to save the order when I manually try to create through VA01. But when I use the
above BAPI, the order is saved even when the net value for the material is zero.
Any pointers appreciated.
Thanks,
vinoth.

Technically, why don't you check the condition "I need to prevent the sales order
from being created, if PR00 or like condition does not exist for any material." before calling the BAPI.
If the condition fails, do not call BAPI and display message else execute.
If it is related something functional then you may have to handle it in function module.
Regards,
Sharath

Similar Messages

  • How to Create MM Quotaion with Pricing Conditions against RFQ through ME47?

    Hi,
    I got a requirement to Create MM Quotation against Request for Quotation with Pricing.
    I got a Function Module BS01_MM_QUOTATION_CREATE to Create Quotaion but there is no Parameter to Pass Pricing Conditions.
    Can anyone suggest me to Create MM Quotaion with Pricing Conditions.
    Thanks & Regards,
    SBLSV Ramana.

    Hi,
    There is no standard T Code in SAP which allows you to automatically convert RFQs to PO. Using ME59n you can only create POs from PR. Even Document type would not suffice the purpose because although it will show you the list of all document types but the basic criteria of open PR still remains.
    So I think we will not be able to do it by standard functionality.
    IV

  • Unable to create billing due to pricing error

    Hi Gurus,
    I have created sales order with two line items.For line item 10 I have maintained Price.For 2nd line item I haven't maintained the price and I saved the sales order with incomplete details for line item 20.Next I have created the delivery and PGI for line item 10 with reference to previous order.While I am trying to do Invoice for this delivery system has throwing the error message that Pricing error in sales order,but my doubt is here the line item 10 is complete status  and delivery has done with respect to line item 10 only and Invoice is F2 which is delivery related, then why its showing the error message.Please let me know why its not allowing to do the billing for line item 10.
    Regards,
    Hari Challa.

    Hi,
    Since you are referencing delivery document number during creation of billling document, system is checking the status of whole document.
    If you would have done partial delivery by selecting only one item during delivery document creation...probably while creating billing document ..you would not have received this error.
    And more over if the sales order is incomplete...how did the delivery document is created and subsequently the PGI.
    Maintain price for other material and try to do billing.
    Regards,
    Praveen.

  • Order schedule lines not created using BAPI_SALESORDER_CREATEFROMDAT2

    Hi experts,
      I am creating sales order using BAPI_SALESORDER_CREATEFROMDAT2. I want to update the Order quantity in VBAP-KWMENG.I got the information from SDN when including the Schedule line in BAPI 'BAPI_SALESORDER_CREATEFROMDAT2  '.
      I tried by using Update flag = 'I'.I am not able to update, what are the values to be passed and how to update the field.
    Is there any other way..Please suggest me..
    Thanks&Regards,
    Karthik.

    Hi, In the BAPI if you look at the tables parameter you will find ORDER_ITEMS_IN and ORDER_ITEMS_INX as well as ORDER_SCHEDULES_IN and ORDER_SCHEDULES_INX. To update KWMENG you will have to pass that value to ORDER_ITEMS_IN-TARGET_QTY and update the same in the table ORDER_ITEMS_INX (ORDER_ITEMS_INX-TARGET_QTY) with 'X'.
    For updating schedule line go for ORDER_SCHEDULES_IN-SCHED_LINE and update X for the same in ORDER_SCHEDULES_INX.
    Try looking into the following code, I am filling in both the Item data as well as the Schedule line data.
      loop at t_mdata into fs_mdata.
        fs_item-itm_number  = fs_mdata-posnr.
        fs_itemx-itm_number = c_flag.
        fs_item-material    = fs_mdata-matnr.
        fs_itemx-material   = c_flag.
        fs_item-target_qty  = fs_mdata-kwmeng.
        fs_itemx-target_qty = c_flag.
        fs_item-item_categ  = fs_mdata-pstyv.
        fs_itemx-item_categ = c_flag.
        fs_itemx-updateflag = c_flag.
          APPEND fs_item TO t_item.
          APPEND fs_itemx TO t_itemx.
        fs_sline-ITM_NUMBER  = fs_mdata-posnr.
        fs_slinex-ITM_NUMBER = c_flag.
        fs_sline-SCHED_LINE  = c_sline.
        fs_slinex-SCHED_LINE = c_flag.
        fs_sline-REQ_QTY     = fs_mdata-kwmeng.
        fs_slinex-REQ_QTY    = c_flag.
          APPEND fs_sline TO t_sline.
          APPEND fs_slinex TO t_slinex.
      endloop.                             " Loop t_mdata
    c_flag contains 'X'.
    fs_item is of structure ORDER_ITEMS_IN.
    fs_sline is of structure ORDER_SCHEDULES_IN.

  • How to create a sales order having incomplete non-sap data as input start

    We have facing the following problem in our company. We have a non-SAP system where we pull data from. We built a webservice that enables a user to pull data from the non-sap sustem by entering a key value (e.g. project number). Pulling the non-sap data is not a problem. However, once the user have pulled the data via the webservice, this data (e.g. material number, qty and sales unit) needs to be transfered to the va01 screen directly. The user will have to complete the missing master data like sold to party, ship to party, customer PO number etc. Then by hitting enter standard SAP will run and if everything is OK, the user has to save the order and a sales order number will be created. We know there a lot of techniques that can be used like Idoc, BAPI, XML, RFC. We have XI, Adobe and Portal available. Does somebody have an idea for a solid solution to get this to work?
    kind regards
    Angelique Heutinck

    You want to Create Sales Order thru VA01 after puling the data from NonSAP system. Moreover you want that the Incomplete Sales Order will be saved.
    if thats the requirement - I ll suggest
    While doing VA01 - start from Create with reference Sales order. in that case default Sales Orders will be automatically created and using the BDC you can change the items  or Customers you want to change. Once the Order number is created properly  - u r free to change eveything of that Order.
    Otherwise calling BAPI / RFC for creating the sales orders is the most safest way of achieving it. But again if you dont have the complete data - calling RFC  or BAPI does not make much sense. because they will fail to create the Sales Order in case u dont fill up the mandatory fields.

  • Salesorder created using BAPI_SALESORDER_CREATEFROMDAT2 not visible in VBAK

    Hi Experts,
    I created sales order using BAPI_SALESORDER_CREATEFROMDAT2, further salesorder ID was also indicated after creation.
    But the same order ID is not visible in SD standard table VBAK.
    Pls guide me to a valid standard CREATE BAPI for Sales order.
    Regards,
    Romi Malik

    Hi Romi,
    If you created a document through BAPI and it does not appear in the database afterwards, the logical conclusion is that ...
    No it wasn't really created
    With BAPIs for sales order data loading, there is no automatic COMMIT! (check SAP notes).
    You need to add the call to BAPI BAPI_TRANSACTION_COMMIT to save to DB.
    Regards,
    Franck

  • Sales order not created using BAPI_SALESORDER_CREATEFROMDAT2

    HI,
    I have used the bapi BAPI_SALESORDER_CREATEFROMDAT2 to create sales order. I have passed the parameters, doc_type, sales_org, distr_chan, division, partn_role, part_numb and material.
    It displays back the message as
    sales_header_in createds,
    sales_item_in created,
    sales document not yet complete : Edit data.
    Standard Order 135428 has been saved.
    But when i check the same standard order in VA03 ( or vbak ), its not present.
    I have also run BAPI_TRANSACTION_COMMIT, to commit work. But still cant figure out.
    Any suggestions plzz...
    regards,
    Taj

    I am able to create the sales order when i am entering these details in VA01. I mean the sales document type and othr details.
    But when i pass the same parameters in bapi. This doesnt happen. Is there any thing more that needs to be passed.

  • SD-ABAP:Create SO:BAPI_SALESORDER_CREATEFROMDAT2: Line Item Structure Tab

    Hi SD-ABAP,
    I'm currently creating SO using BAPI_SALESORDER_CREATEFROMDAT2.
    I'm populating the following:
    IMPORT:   SALESDOCUMENTIN, ORDER_HEADER_IN, ORDER_HEADER_INX
    TABLES:  ORDER_ITEMS_IN, ORDER_ITEMS_INX,
                    ORDER_PARTNERS,
                    ORDER_SCHEDULES_IN, ORDER_SCHEDULES_INX,
                    ORDER_CONDITIONS_IN, ORDER_CONDITIONS_INX,
                    ORDER_TEXT
    I have a BOM material A, with subMaterial A1, A2, A3.  By creating manually (VA01), this will automatically appear on the the Line Item of the BOM Material > Structure tab.  The structure tab will contain the subMaterial A1, A2, A3.
    What I need is to automatically populate the SubMaterial in the Structure Tab of the Line Item having a BOM material.
    Has anyone encountered this scenario?  I'm not sure if I need to populate: ORDER_CFGS_PART_OF?
    Thanks.
    FYI, already checked some SD-BOM related OSS notes.

    Hi Jamie,
                  It will not automatically populated in BAPi, but i think an user exit (Standard SAP code) is doing it for you. I will say not to change the program in the BAPI instead of that use MOVE FIELD TO VBAP userexit to solve this issue. This is quite common scenario and lot of posts are available over the net.
    Best Regards,
    Tapodipta Khan.

  • Prevent to create billing document in a closed period

    hello
    i want to know what is the best way to use transaction VF01 in SD for a billing date which is in an open period in Finance
    today i have many users which are creating billing documents for closed periods and this is stuck in VFX3
    is there any way to prevent users to do it and create billing documents in a previous period?
    thanks
    Stephane

    Hi
    Welcome to SDN! I Hope your 1st experience here is good
    The intention of not posting the document and throwing it into VFX3 is exactly what you are looking for.. You need to cancel your document from VF02 and re-create it again...
    If you want to put an ABAP check, to that saving in VF01 should not be allowed, use exit RV60AFZZ or RV60AFZB... But, I would say discipline is the apt solution to such issues
    you can write logic in this exit with the help of ABAP consultant...
    Regards
    Ajay M

  • Purchase requisition not to be created if sales order is incomplete.

    Hi ALL,
    I have a requirement from the business wherin they want purchase requisition not to be created for the incomplete sales order
    in case of third party / invidiual P.O sales orders.
    We have defined some fields in the item category incompletion status and if this fields are empty then the P req shld not generate.
    Can anybody guide me what settings to be made to acheive this.
    Please help me in this.

    In t.code OVA2, try to assign an incompletion procedure at schedule line level. This procedure can be assigned with relevant status like checking goods movement, and general checked. Then test the scenario.
    There is an OSS note out there, but it is NOT exactly represents your scenario. However you can have a look at it.
    Note 623267 - Purchase requisition in spite of missing configuration II
    Regards,

  • 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

  • How to prevent to create the transfer order

    Dear all,
    We have a storage bin in which it is having 2 Storage unit types E2 and U2 (SUTs).The storage bin will allow only 2 U2s or 3 E2s .Already the storage bin is having a quant with U2  SUT .But while creating the TO(quant/stock with E2 SUT)    in back ground system  should not select this storage bin as it is having a quant of U2 SUT but for some reasons system is trying to put away(Put away strategy Bulk ) the stock in this storage bin which is having already U2 SUT .How can i prevent this so that the system will skip this storage bin while doing put away and creating TO and should move the stock into the storage bin which is having SUT E2
    Regards
    susmita

    see the docu about Strategy P: Storage Unit Type (SAP Library - Warehouse Management System (WMS))
    this can fulfill your requirement directly.
    Do I understand correctly that you want it like this but with bulk strategy?:
    Material A with E2  + Material B with E2 = allowed
    Material A with E2 + Material A with U2 =  not allowed

  • Profarma invoice should not be created if the delivery is incomplete

    Hi,
    Can any one tell me how to stop profarma invoice creation if the delivery is incomplete...
    Actually I have created status group with Billing check box and assinged to incompletion procedure and that procedure to delivery document type.. Now I created delivery with some incompletion later try to create profarma it accepted and created profarma invoice... but I don't want  profarma for deliveries if the delivery is incomplete..
    Thanks and Regards
    Raju Singhi Reddy

    There is one Copying Routine 310 or 311 in TCODE VTFL. This will check whether PGI is done or not. If PGI is not done it wont allow to create Invoice.
    Please Check.
    Sam

  • How to prevent from creating multiple deliveries per sales order

    Hi,
    Appreciate your help on the below.,
    I do not want the users to create multiple deliveries for a single sales order. They should only be allowed to create one delivery and it can either be a full delivery or a partial delivery.
    Is there any possibility in configuration to do this? I checked the customer master configuration, but it is only for sales order line item.. I only need one delivery for the entire order, regardless of whether it included all line items or not.
    If the user tries to create a second delivery for the same order, it should ideally give an error message and stop the system from creating the second delivery
    Appreciate your help.
    Thank you.
    Keshini

    Thanks Marian for your feedback.
    I tried this again, however it still works only at item level.
    Say i have a sales order, with 2 line items with 50 each.
    Say i create an delivery for only the first line item for 20, delivery gets created.. It doesnt allow to create the delivery for rest of the 30 on that line item,
    However if i try to create a delivery for the second line item, it allows and the delivery gets created.
    I only want one single delivery for the entire order.
    Thanks,
    Keshini

  • While Creating Sales order Item pricing error is coming........

    HI Friends,
    I  have just given all values in VA01  not saved at tht time and before saving i go the Extras -->Output ---> Header -> Print Preview----> i got the form then i  back to the screen ... now i save sales order but it giving error " Item Pricing error" if  i click on item pricing error button it goes to the  sap first screen.
    could you please help me in this......
    Regards
    Venkat boddu

    May be fault items where there is no pricing or so.
    Check all items and reprice them before save. if they are ok then go to MV45AFZZ and check save document prepare and save document user exits for the message. Also check form and print program.
    Last but not least, get the message number and class for the message then go where used list for that message.
    Mostly, this message is populated in user exits.

Maybe you are looking for

  • Creative Cloud Desktop application installer stalls at downloading

    Hi When I download and run CC installer (CreativeCloudSetup.exe) on Win8 It stalls at about 8% and will not download the files needed.  To clarify I can download the CreativeCloudSetup.exe just fine, but when I run it it stalls when trying to downloa

  • Ms office multiple triggers

    Anybody have step by step on how to get Ms office 2010 to work so you can launch the individual apps, word,excel,pwrpoint????? I understand you need to use multiple trigger points but not sure how you would launch them and have icons like the non vir

  • How to Install Hitachi SATA Deskstar Internal Hard Drive?

    I just purchased HITACHI SATA Deskstar 3/5" 500GB/16MB Cache/72RPM Internal Hard Drive, which said it was compatible with my Mac. I have a iMac mid 2007 2.4 GHz Intel Core Duo2 running OSx10.6.4. Is this a simple install or do you recommend I take it

  • Using ORDER BY for column that's not in SELECT statement of select list?

    Hi all. I have a select list on an APEX page at apex.oracle.com, and I would like to order this by the value of column UnitOrder. The SQL is as follows: SELECT DISTINCT foodunit.name AS display_value, foodunit.foodunitid AS return_value FROM foodunit

  • Php post name & age to MySql database

    Back to the basics. I have a simple form to post in my database. Can anybody suggest how I make a variable to catch the list selection and text field? Your name: A value is required. Your age: 22 23 24 25 then below is the action.php file that posts