Creating contract reference with Quotation - using bapi or fm

Hi Friends
Currently I am creating contract using function module sd_saleorder_create function module.But as per new requirement we have to create contract referenced with quotation number.
Please suggest the suitable bapi or function module.if you suggest some thing ..kindly let me know?
how to create contract referenced with particular line item in the quotation.
where I need to pass the referenced line items...if you need any inputs..will reply by tomorrow...
thanks
Gowrishankar

gowrishankar p wrote:
Hi Friends
>
> Currently I am creating contract using function module sd_saleorder_create function module.But as per new requirement we have to create contract referenced with quotation number.
>
> Please suggest the suitable bapi or function module.if you suggest some thing ..kindly let me know?
>
> how to create contract referenced with particular line item in the quotation.
>
> where I need to pass the referenced line items...if you need any inputs..will reply by tomorrow...
>
> thanks
> Gowrishankar
is it really SD_SALEORDER_CREATE? if yes, which version are you in?
Have you thought about 'BAPI_CONTRACT_CREATEFROMDATA'. Documentation available for this bapi.
If not, just an FYI, REF_DOC field in (BAPISDHD1) -Contract_header_in structure can be used to pass the ref document and check for the type. You will also need to pass the type for this ref_doc.
Assuming you have the configuration in place already.
Search forum for this BAPI to get the sample code.

Similar Messages

  • Creation of sales order with reference to Quotation using BAPI

    Hi All,
    I am using BAPI "BAPI_SALESORDER_CREATEFROMDAT2" for creating sales order. Can you please tell how can I create a sales order with reference to a Quotation.

    Vinit,
    In your header structure, set like this:
      hdr-REF_DOC = i_order-vbeln.  "assign quotation # to sales order
      hdr-REFDOC_CAT = 'B'.         "assign Quotation to VBTYP_N.
    For each line item, set as follows:
    Assigning ref doc to create line item entries in VBFA.
        itm-REF_DOC    = i_order-vbeln.  "quote number
        itm-REF_DOC_IT = i_vbap-posnr.   "quote line item #
        itm-REF_DOC_CA = 'B'.
      data: ret_text type BAPIRET2.
      CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
        EXPORTING
          ORDER_HEADER_IN           = hdr
          convert                   = 'X'
        IMPORTING
          SALESDOCUMENT             = salesdoc
        TABLES
          return                    = ret_tbl
          ORDER_ITEMS_IN            = itm
          ORDER_PARTNERS            = prtnr
          ORDER_ITEMS_inx           = itmx
          ORDER_CONDITIONS_IN       = conds
          ORDER_CONDITIONS_INX      = condsx
          order_schedules_in        = schd_lin.
    Don't forget those points.

  • Sales order creation with reference to quote using BAPI

    Hi All,
    I am trying to create a sales order with reference to quote using BAPI BAPI_SALESORDER_CREATEFROMDAT2.
    I am passing the Quote number and preceding doc.category (B) at the header level and
    at item level I am passing the quote number and the line item number in the quote for REF_DOC and REF_DOC_IT.
    The order is created but there seems to be some issue with the document flow.
    I do not see the Reference Doc number at the header level from the Sales order document flow whereas I can see the Reference Doc for each line item.
    In VBFA I can see the Ref.Doc number at the header level along with the Ref.Doc at the line item level.
    Why do you think it is not showing at the header level from Sales Document Document Flow?
    Is there any bug in the standard BAPI or is there any OSS note?
    Any answer would be greatly appreciated.
    Thanks
    Sandeep

    hi,
    Are you giving different quotation numbers in the different line items, if that is the case you will not get that in the header document flow, as it cann't point to all the quotations.
    Thanks,
    Mahesh.

  • Quotation using BAPI

    Hi,
    I am working on program to create quotation using bapi function module
    BAPI_QUOTATION_CREATEFROMDATA.
    I am getting following error:
    Requirements are not fulfilled for condition EDI1
    I have filled up this three structure with following flelds
    header data
      t_order_header-doc_type =
      t_order_header-sales_org =
      t_order_header-distr_chan =
      t_order_header-division =
      t_order_header-sales_off =
      t_order_header-sales_grp =
      t_order_header-qt_valid_f =
      t_order_header-qt_valid_t =
      t_order_header-ord_reason =
      t_order_header-zz_sdcat_id =
      t_order_header-zz_sdflyer_id =
      append t_order_header.
    Fill up Order partner structure
      t_order_partner-partn_role =
      t_order_partner-partn_numb =
      if not p_i_rep is initial.
        t_order_partner-partn_role =
        t_order_partner-partn_numb =
      endif.
      if not p_e_rep is initial.
        t_order_partner-partn_role =
        t_order_partner-partn_numb =
    endif.
    item data
        t_order_item-zzmatwa = t_record-matwa.
    t_order_item-req_qty = t_record-kwmeng.
      t_order_item-cd_type3 = 'EDI1'.
      t_order_item-cd_value3 = t_record-price.
      t_order_item-cd_p_unt3 = 1.
      t_order_item-cd_curr3 = 'USD'.
        CALL FUNCTION 'BAPI_QUOTATION_CREATEFROMDATA'
          EXPORTING
            ORDER_HEADER_IN           = t_order_header
         WITHOUT_COMMIT            = ' '
           CONVERT_PARVW_AUART       = 'X'
         IMPORTING
          SALESDOCUMENT             = g_salesdocument
          SOLD_TO_PARTY             = g_sold_to_party
          SHIP_TO_PARTY             = g_ship_to_party
           BILLING_PARTY             = g_billing_party
          RETURN                    = g_return
          TABLES
            ORDER_ITEMS_IN            = t_order_item
            ORDER_PARTNERS            = t_order_partner
            ORDER_ITEMS_OUT           = t_order_items_out
            ORDER_CFGS_REF            = t_order_cfgs_ref
            ORDER_CFGS_INST           = t_order_cfginst
            ORDER_CFGS_PART_OF        = t_order_cfgspart
            ORDER_CFGS_VALUE          = t_order_cfgsvalue.
    I have just defind  t_order_items_out,t_order_cfgs_ref,t_order_cfginst,t_order_cfgspart
    t_order_cfgsvalue .
    but i don't have any data to fill up this following table  t_order_items_out,t_order_cfgs_ref,t_order_cfginst,t_order_cfgspart
    t_order_cfgsvalue .

    You incorrectly filling item information with condition value. All quotation related pricing need to pass QUOTATION_CONDITIONS_IN table paramete of BAPI.
    Try it and the problem get solved.
    Cheers
    Nilesh Shete

  • Delivery cost not created during GRN of PO using BAPI

    I have a customized program which use BAPI - BAPI_PO_CREATE1 to create PO, PO was created successully.
    then program will use BAPI - BAPI_PO_CHANGE to update condition pricing, which is also executed succesfully. all condition pricing (KONV) updated correctly.
    Lastly, the program will use BAPI - BAPI_GOODSMVT_CREATE to create GRN and update delivery cost. However in my case, the delivery cost is not update, EKBZ table record is not created, as well as GRN item line table MSEG table is not updated with delivery cost.
    Anyone face this type of problem before?What is the possible causes?
    Any help and suggestion is greatly appreciated.

    Lai,
    you should try asking this on ABAP forum thread. You will get a response. May be there is another BAPI u should use or may be you the usage of BAPI is incomplete. Pl confirm with ABAP forum.
    Rgds

  • Quotation Using BAPI .. Status is open in Document flow

    Hi..
    I created Inquiry .. quotation using BAPI (inquiry/quotation)Create_from_Data2 .... ie
    BAPI_QUOTATION_CREATEFROMDATA2 & BAPI_INQUIRY_CREATEFROMDATA2
    ..  But in Document flow created  inquiry and quotation status is open... Why this is happening?
    Thanks..
    ..Ashish

    yes... Actually if we go to change inquiry/quotation ... if i check whether document is complete .... then it shows document is complete ....
    ..Ashish

  • I am creating a slideshow with elements using photos and videos but the video sound doesnt play?

    I am creating a slideshow with elements using photos and videos but the video sound doesnt play?

     Hello jive
         I am playing it back in the slideshow editor/setting up part of
    programme where you determine photos/video to be included gaps between
    slides, music to play etc This goes through each phot and when comes
    to a video the background sound doesnt play, I am using windows 7 and
    elements 10.
         regards gins51

  • Is it possible to retrieve data using RFC alone with out using BAPI ?

    Hi ,
    Is it possible to connect SAP to Non-SAP systems to retrieve data using RFC alone with out using BAPI ?
    thanks
    Rama

    Hello Nelson,
    Could you please explain how this can be done. Because my understanding is that only BAPI can be used to connect Non SAP and SAP system not RFC function module.
    Regards
    Farzan

  • Create a line with arcs using new SdoApi (not liniear)

    Hi
    How we create a line with arcs using sdoapi (not liniear line)?
    Philipp

    Philipp,
    You have to use the default constructor for JGeometry
    to build lines with arcs:
    public JGeometry(int gtype,
    int srid, double x, double y, double z,
    int[] elemInfo, double[] ordinates)
    Currently, this is the only way to create lines with arcs.
    siva

  • Sales Order Creation with reference to Quotation using FM IDOC_INPUT_ORDERS

    HI Guru's,
    I've a requirement to create the sale order from the quotation.
    For this we are using the FM "IDOC_INPUT_ORDERS".
    Here my problem is i'm able to create the sales order with the custom program, but if i made any changes to the quotation Header
    (Ship-to party address) before creating the sales order, it is not reflecting into the sales order header level (ship-to party address).
    What  i was thinking is we are not using the Quotation as reference to create the sales order while filling the segments.
    Could you please tell me which segment do i need to use fill the reference document number (quotation) at header level.
    one more problem, if i change ship-to party of one line item, it is affecting the other line items also.
    Please guide me what to do???
    Thanks,
    Adi.

    HI Ramesh,
    Question:
    Could you please tell me which segment do i need to use fill the reference document number (quotation) at header level.
    Sol: use segment E1EDK02
    Segment type E1EDK02 IDoc: Document header reference data
    QUALF 011 : Referenced Document Number
    BELNR XXXXX IDOC document number
    DATUM 20100121 IDOC: Date'
    what i've used in my program
    I'm using the E1EDK02 segment as you mentioned above.
    le1edk02-qualf = '011'.
    e1edk02-belnr = Quotes-vbeln.
    Question:
    Here my problem is i'm able to create the sales order with the custom program, but if i made any changes to the quotation Header
    (Ship-to party address) before creating the sales order, it is not reflecting into the sales order header level (ship-to party address).
    Sol: Check you custom code .. whether you are bringing write address to segement or not
    (if you change any address in Quotation then Address master is added with new entry with new address no )
    In my program..
    I'm passing the partner numbers and partner types (WE & AG) to the segment "E1EDKA1". (Ship-to & Sold-to).
    What i was thinking is the above segment is causing the problems, because if we reference the Quotation, we should not pass the Ship-to and sold-to numbers, it should take all those from quotation.
    I've tried to comment the code which we have written for that segment "E1EDKA1", it is giving me the error saying that
    Customer numbers can't be determined for the document number..
    Please guide me how to solve this problem..
    Thanks,
    Adi.

  • Create GR with with RG23D using BAPI or FM

    Hi,
      We are using the 'BAPI_GOODSMVT_CREATE' to create the GR with this, the GR is created properly, I want to know along with creating the GR can we capture the excise inovice with BAPI, for depot plant. there si one BAPI 'BAPI_EXCINV_CREATE_FROMDATA'  can you give the link how this can be use to create the excise inovice some field ECESS and AT1 not there in this BAPI.
    regards,
    zafar

    Hi,
        Thanks for your reply.
        My requirement is we want to upload the initial stock in depot plant. as the plant is depot we want to upload the excise invoice of the material along with material as the qunaity of invoces are more around 3000 with 30 to 40 ietms in each invoice for making a GR with movement type 561 I have made the BDC now for each GR i want to capture the excise inovice with J1IG as there is no BAPI or FM for J1IG  so which method can be use for this wihout BDC, BDC is one method but it will be difficult as some invoice have the AED, some inovices doest not have also it required to press the tab button.
    regards,
    zafar

  • Error while creating sales order with ref using SD_SALESDOCUMENT_CREATE

    Hi
    I am creating sales order with reference using function module SD_SALESDOCUMENT_CREATE , while creating i am getting error
    Document doesn't have document category even thougth i am passing document category in header as well as item lavel.
    In VBUK table there is no value for VGTYP.
    Can you please help me how to resolve it.
    Thanks & regards
    kiran

    Problem resolved by passing   REFDOC_CAT in the FM along with  SD_DOC_CAT.
    Thanks

  • To Create a Classification View by using  Bapi

    Dear All,
    I want to create Classification view in Material Master using Bapi. I am using the bapi called  BAPI_OBJCL_CREATE.
    In that I am getting the valid output. But the problem is, the view is not created in the material master for the particular material.
    Is it any authorization object is required to create the classification view in material master using this bapi.Please help me on that.  
    Let me know any other bapi is creating Classification view for the given material.

    After the calling of BAPI BAPI_OBJCL_CREATE, read the RETURN table field TYPE = 'S'
    Then call the BAPI_TRANSACTION_COMMIT.
    This BAPI will update the records in Tables
    Syntax
    READ TABLE it_return INTO wa_return WITH KEY type = 'S'.
    IF sy-subrc = 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
        LOOP AT it_return INTO wa_return WHERE type <> 'S'.
          WRITE :/ wa_return-message_id,wa_return-type,wa_return-message.
        ENDLOOP.
    ENDIF.
    Regards
    Bala Krishna
    Edited by: Bala Krishna on Oct 4, 2008 11:56 AM
    Edited by: Bala Krishna on Oct 4, 2008 11:57 AM

  • How to create a report with data using the Crystal Reports for Java SDK

    Hi,
    How do I create a report with data that can be displayed via the Crystal Report for Java SDK and the Viewers API?
    I am writing my own report designer, and would like to use the Crystal Runtime Engine to display my report in DHTML, PDF, and Excel formats.  I can create my own report through the following code snippet:
    ReportClientDocument boReportClientDocument = new ReportClientDocument();
    boReportClientDocument.newDocument();
    However, I cannot find a way to add data elements to the report without specifying an RPT file.  Is this possible?  I seems like it is since the Eclipse Plug In allows you to specify your database parameters when creating an RPT file.
    is there a way to do this through these packages?
    com.crystaldecisions.sdk.occa.report.data
    com.crystaldecisions.sdk.occa.report.definition
    Am I forced to create a RPT file for the different table and column structures I have? 
    Thank you in advance for any insights.
    Ted Jenney

    Hi Rameez,
    After working through the example code some more, and doing some more research, I remain unable to populate a report with my own data and view the report in a browser.  I realize this is a long post, but there are multiple errors I am receiving, and these are the seemingly essential ones that I am hitting.
    Modeling the Sample code from Create_Report_From_Scratch.zip to add a database table, using the following code:
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.definition.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
    <%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
    <%
    try { 
                ReportClientDocument rcd = new ReportClientDocument();
                rcd.newDocument();
    // Setup the DB connection
                String database_dll = "Sqlsrv32.dll";
                String db = "qa_start_2012";
                String dsn = "SQL Server";
                String userName = "sa";
                String pwd = "sa";
                // Create the DB connection
                ConnectionInfo oConnectionInfo = new ConnectionInfo();
                PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();
                // Set new table logon properties
                PropertyBag oPropertyBag2 = new PropertyBag();
                oPropertyBag2.put("DSN", dsn);
                oPropertyBag2.put("Data Source", db);
                // Set the connection info objects members
                // 1. Pass the Logon Properties to the main PropertyBag
                // 2. Set the Server Description to the new **System DSN**
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, oPropertyBag2);
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, dsn);
                oPropertyBag1.put("Database DLL", database_dll);
                oConnectionInfo.setAttributes(oPropertyBag1);
                oConnectionInfo.setUserName(userName);
                oConnectionInfo.setPassword(pwd);
                // The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).
                oConnectionInfo.setKind(ConnectionInfoKind.CRQE);
    // Add a Database table
              String tableName = "Building";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
        catch(ReportSDKException RsdkEx) {
                out.println(RsdkEx);  
        catch (Exception ex) {
              out.println(ex);  
    %>
    Throws the exception
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
    There was other sample code on SDN which suggested the following - adding the table after calling table.setDataFields() as in:
              String tableName = "Building";
                String fieldname = "Building_Name";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setAlias(tableName);
                oTable.setQualifiedName(tableName);
                oTable.setDescription(tableName) ;
                Fields fields = new Fields();
                DBField field = new DBField();
                field.setDescription(fieldname);
                field.setHeadingText(fieldname);
                field.setName(fieldname);
                field.setType(FieldValueType.stringField);
                field.setLength(40);
                fields.add(field);
                oTable.setDataFields(fields);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
    This code succeeds, but it is not clear how to add that database field to a section.  If I attempt to call the following:
    FieldObject oFieldObject = new FieldObject();
                oFieldObject.setDataSourceName(field.getFormulaForm());
                oFieldObject.setFieldValueType(field.getType());
                // Now add it to the section
                oFieldObject.setLeft(3120);
                oFieldObject.setTop(120);
                oFieldObject.setWidth(1911);
                oFieldObject.setHeight(226);
                rcd.getReportDefController().getReportObjectController().add(oFieldObject, rcd.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0), -1);
    Then I get an error (which is not unexpected)
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The field was not found.---- Error code:-2147213283 Error code name:invalidFieldObject
    How do I add one of the table.SetDataFields()  to my report to be displayed?
    Are there any other pointers or suggestions you may have?
    Thank you

  • How can I create a video with effects using my ipad?

    How can I create a video with effects (sepia, B&W, Negative, oval or any other shape borders) using my ipad?  I would Like to keep a higher res and also be able to shrink it down to email or send in a MMS. Or should I just upload it to my PC and mess with it there? Some of the apps I have are very easy to use compared to the learning curve needed for video editing software.
    Thanks

    Thats the Problem . . . how many apps do I have to try until I find the one I want? I noticed a few will render the video thus losing its original size. When I went to edit it more in iMovie the video was smaller--not good. And what software do you suggest, Templeton, for the PC? I love the apps because they are easy. I dont have hours to mess around on a software to figure out if its something I want. Im looking for simplicity. Maybe Ill get more into it later. I just want to record simple video of my playing the guitar for self analysis and create a short video for family and friends.
    Apps:
    iMovie
    CinemaFXV
    VideoFix
    Cartoonatic
    Video illusion
    VidEditor
    Software:
    Windows Movie maker (wont accept .mov files)
    After Effects (Too little time, so much to learn)
    Wondershare (Very easy but little choices)
    VideoPad (Again. Few choices)

Maybe you are looking for

  • Query is allocating too large memory Error ( 4GB) in Essbase 11.1.2

    Hi All, Currently we are preparing dashboards in OBIEE from the Hyperion Essbase ASO (11.1.2) Cubes.When are trying to retrieve data with more attributes we are facing the below error "Odbc driver returned an error (SQLExecDirectW). Error Details Err

  • Error while Running "Tax Credit Upload" Request Set in Payroll

    Hi Friends, Firstly, wishing you all a happy New year. I am having an issue with a process, we have received a file from Irish Revenue which is a file with .tfa extension having the Tax details. While uploading the file using the "Tax Credit Upload"

  • Purchase order for KIT item

    Hi, my requirement is to raise Purchase order for KIT item.For Example-- For 1 Kit item A, including 1 table and 4 chairs. Define components (table and chair) for item A by using Bills of Material screen. In Order Management, when user orders 100 ite

  • Adding custom text to a notification having Embedded Region

    Hi All, Could you please help us in the following situation. We have a requirement to add a custom message (pulled from Database) to a notification which was build on &HR_NTF_EMBEDDED_REGION. When I tried the HTML body of the notification as below: <

  • Strange Behavior of af:inputListOfValues

    Hi, I've tried the demo for How-to build Oracle Forms style List-of-Values in ADF Faces RC at [http://www.oracle.com/technology/products/jdev/tips/fnimphius/lov/listOfValues.html|http://www.oracle.com/technology/products/jdev/tips/fnimphius/lov/listO