Need a BAPI to modify sales document (Inquiry) header conditions

I need a bapi to modify header conditions on an Inquiry sales document.  BAPI_CUSTOMERINQUIRY_CHANGE has the appropriate condition and conditionx tables. However, according to the documentation: "Although the BAPI interface is supplied for the condition to be changed, the system does not return the required result and/or the pricing result is inconsistent. Currently, the change of condition lines in existing documents via the BAPIs provided by SAP is not implemented."
Thanks
Leo

Vinod
Thanks. I tried that bapi yesterday but, as you say, it's difficult to implement. I haven't been able to get it to work yet.
Leo

Similar Messages

  • Disable modify for documents under certain conditions

    Hello gurus,
    I'm working on an SRM 7 system, extended classic scenario. My task is to disable the EDIT button to prevent unauthorized users to modify a PO or contract.
    An user is defined 'unauthorized' if it doesn't belong to the same block of the doc's creator in org. structure; the logic is quite clear and it shouldn't be a problem coding it in the CHECK badi. Also I could use the same logic to disable the EDIT button for the document.
    There's just a doubt for the task, I hope you can provide me info or suggestions: how to provide an error message explaining the user WHY the EDIT button is disabled?
    When a user searches for a document and simply click over it, the document is loaded and shown to the user. In this sequence, CHECK badi isn't triggered yet. For what I'm going to code, the EDIT button will be then disabled but the user will have no messages explaining WHY the button is disabled.
    So I'd kindly ask you:
    how can I raise an error message when the document is simply loaded? CHECK badi, as described above, seems not to be a correct solution because it is not triggered in the loading phase ( the user should then press a CHECK button to retrieve the error message). Is there a specific BADI in which I can raise a message when the document is loaded? Please note that for my check I need to retrieve the document's data.
    Thanks in advance for your help
    Matteo

    Solved. I checked for the condition in WDDOINIT (or WDDOMODIFYVIEW when FIRST_TIME = 'X') and raised there a persistent message for the specific case described in the post... It works.. with a single exception. I'm going to start a new thread since the argument seems quite different.

  • Create one order sales document with reference to multiple quotations bapi

    Hi,
    I use SD_SALESDOCUMENT_CREATE for create sales document, but now i need create one sales document with multiples quotations , but i dont know which fields i fill or if another bapi can do this.
    i appreciate your helps.

    In va01 , i can add more than one quotation in one sales document , but one to one. Maybe can i add more than one, modify sales document n times quotation need to insert.
    is Posible?

  • BAPI - Problem in Sales order creation

    Hi Friends,
    I have problem in Sales order creation using BAPI ,I am getting a messsage - Error in creating document ,I have sent the code along with this mail ,can you help it out.
    Code:
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Sales organization
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Distribution channel
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Division.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
    PARAMETERS: p_spart TYPE spart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Sold-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
    PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Ship-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
    PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Material
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
    PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Quantity.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
    PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Plant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
    PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Data declarations.
    DATA: v_vbeln            LIKE vbak-vbeln.
    DATA: header             LIKE bapisdhead1.
    DATA: headerx            LIKE bapisdhead1x.
    DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                             WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                             WITH HEADER LINE.
    Initialization.
    INITIALIZATION.
    v_text   = 'Order type'.
    v_text1  = 'Sales Org'.
    v_text2  = 'Distribution channel'.
    v_text3  = 'Division'.
    v_text4  = 'Sold-to'.
    v_text5  = 'Ship-to'.
    v_text6  = 'Material'.
    v_text7  = 'Quantity'.
    v_text9  = 'Plant'.
    Start-of-selection.
    START-OF-SELECTION.
    Header data
    Sales document type
      header-doc_type = p_auart.
      headerx-doc_type = 'X'.
    Sales organization
      header-sales_org = p_vkorg.
      headerx-sales_org = 'X'.
    Distribution channel
      header-distr_chan  = p_vtweg.
      headerx-distr_chan = 'X'.
    Division
      header-division = p_spart.
      headerx-division = 'X'.
      headerx-updateflag = 'I'.
    Partner data
    Sold to
      partner-partn_role = 'AG'.
      partner-partn_numb = p_sold.
      APPEND partner.
    Ship to
      partner-partn_role = 'WE'.
      partner-partn_numb = p_ship.
      APPEND partner.
    ITEM DATA
      itemx-updateflag = 'I'.
    Line item number.
      item-itm_number = '000010'.
      itemx-itm_number = 'X'.
    Material
      item-material = p_matnr.
      itemx-material = 'X'.
    Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    Quantity
      item-target_qty = p_menge.
      itemx-target_qty = 'X'.
      APPEND item.
      APPEND itemx.
      Fill schedule lines
      lt_schedules_in-itm_number = '000010'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = p_menge.
      APPEND lt_schedules_in.
      Fill schedule line flags
      lt_schedules_inx-itm_number  = '000010'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
    Call the BAPI to create the sales order.
      CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
           EXPORTING
                sales_header_in     = header
                sales_header_inx    = headerx
           IMPORTING
                salesdocument_ex    = v_vbeln
           TABLES
                return              = return
                sales_items_in      = item
                sales_items_inx     = itemx
                sales_schedules_in  = lt_schedules_in
                sales_schedules_inx = lt_schedules_inx
                sales_partners      = partner.
    Check the return table.
      LOOP AT return WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE: / 'Error in creating document'.
      ELSE.
    Commit the work.
        COMMIT WORK AND WAIT.
        WRITE: / 'Document ', v_vbeln, ' created'.
      ENDIF.
    Regards,
    Dinesh

    what messages u are gettting in RETURN ? Please check the RETURN tables data.
    [code]CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
    EXPORTING
    sales_header_in = header
    sales_header_inx = headerx
    IMPORTING
    salesdocument_ex = v_vbeln
    TABLES
    return = return
    sales_items_in = item
    sales_items_inx = itemx
    sales_schedules_in = lt_schedules_in
    sales_schedules_inx = lt_schedules_inx
    sales_partners = partner.
    Regards
    Prabhu

  • Problem when dispalying Sales document header text.

    Hi All,
             I am facing problem when displaying header text of Sales document. my problem is that
    when we got to VA02 -> give sales document number  press enter
    once afer going inside that sales document -> Goto Header text  . In text tab, on left hand side we can find many text for whch corresponding text has written on Right hand side Text area.
    i want that text to be print on script.
    i tried even by pressing F1 but i could not find where that text stores in database.
    can any one please explain it how to dispaly the text that is written manually in  text area on Script.
    regards
    Prasadh.

    Hi,
    You must call function module 'READ_TEXT' with the following parameters:
    ID = The technical text id number (see table TTXID for OBJECT = 'VBBK' for a list of valid values)
    LANGUAGE = your local language
    NAME = sales document number (all 10 digits with any leading zeros)
    OBJECT = 'VBBK'
    You will need to call the function module once per text type id (the list on the left hand side in VA02, header texts screen).  The text from the right hand side will be in an internal table LINES after you call the 'READ_TEXT' function module.
    If you just want to print directly from VA02, then choose the details button which takes you to another screen with Print functionality.
    Regards,
    Jamie

  • Sales docu and purchse docu

    wat r thge madatory fields we need to pass while creating sales document and purchase document by using BDC's or LSMW's..

    thnx subramanian...thnx for ur advice,,,,but...wat d thing is
    i dont have SAP ma system now....
    i want to know d mandatory fields as m preparin for an interview now...
    help me if u can...
    regards,
    ziden.

  • Reg: Sales document creation

    Hi Abapers,
    As i am new to SD Module, would like to get some ideas from your end. My requirement is to create a sales order using Programming. After creation of sales order it should post to finance. Could anyone help me how this can be done.

    REPORT  ZSALESORDER.
    * Parameters
    * Sales document type
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    * Sales organization
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    * Distribution channel
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    * Division.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
    PARAMETERS: p_spart TYPE spart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    * Sold-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
    PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    * Ship-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
    PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    * Material
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
    PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    * Quantity.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
    PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    * Plant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
    PARAMETERS: p_plant TYPE werks_d .
    SELECTION-SCREEN END OF LINE.
    * Complete Deliver
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text10 FOR FIELD p_autlf.
    PARAMETERS: p_autlf TYPE autlf DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    * Data declarations.
    DATA: v_vbeln            LIKE vbak-vbeln.
    DATA: header             LIKE bapisdhead1.
    DATA: headerx            LIKE bapisdhead1x.
    DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                             WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                             WITH HEADER LINE.
    DATA: lt_schedules_ink    TYPE STANDARD TABLE OF bapisdhead1
                             WITH HEADER LINE.
    * Initialization.
    INITIALIZATION.
    v_text   = 'Order type'.
    v_text1  = 'Sales Org'.
    v_text2  = 'Distribution channel'.
    v_text3  = 'Division'.
    v_text4  = 'Sold-to'.
    v_text5  = 'Ship-to'.
    v_text6  = 'Material'.
    v_text7  = 'Quantity'.
    v_text9  = 'Plant'.
    v_text10 = 'Complete delivery'.
    * Start-of-selection.
    START-OF-SELECTION.
    * Header data
    * Sales document type
      header-doc_type = p_auart.
      headerx-doc_type = 'X'.
    * Sales organization
      header-sales_org = p_vkorg.
      headerx-sales_org = 'X'.
    * Distribution channel
      header-distr_chan  = p_vtweg.
      headerx-distr_chan = 'X'.
    * Division
      header-division = p_spart.
      headerx-division = 'X'.
      headerx-updateflag = 'I'.
    *Complete delivery
        header-COMPL_DLV = p_autlf.
        header-COMPL_DLV = 'X'.
    * Partner data
    * Sold to
      partner-partn_role = 'AG'.
      partner-partn_numb = p_sold.
      APPEND partner.
    * Ship to
      partner-partn_role = 'WE'.
      partner-partn_numb = p_ship.
      APPEND partner.
    * ITEM DATA
      itemx-updateflag = 'I'.
    * Line item number.
      item-itm_number = '000010'.
      itemx-itm_number = 'X'.
    * Material
      item-material = p_matnr.
      itemx-material = 'X'.
    * Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    * Quantity
      item-target_qty = p_menge.
      itemx-target_qty = 'X'.
    * item category
      itemx-ITEM_CATEG = 'X'.
      APPEND item.
      APPEND itemx.
    *   ITEM DATA
      itemx-updateflag = 'I'.
    * Line item number.
      item-itm_number = '000020'.
      itemx-itm_number = 'X'.
    * Material
      item-material = p_matnr.
      itemx-material = 'X'.
    * Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    * Quantity
      item-target_qty = p_menge.
      itemx-target_qty = 'X'.
      APPEND item.
      APPEND itemx.
    *   Fill schedule lines
      lt_schedules_in-itm_number = '000010'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = p_menge.
      APPEND lt_schedules_in.
    *   Fill schedule line flags
      lt_schedules_inx-itm_number  = '000010'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
    *   Fill schedule lines
      lt_schedules_in-itm_number = '000020'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = p_menge.
      APPEND lt_schedules_in.
    *   Fill schedule line flags
      lt_schedules_inx-itm_number  = '000020'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
    * Call the BAPI to create the sales order.
      CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
           EXPORTING
                sales_header_in     = header
                sales_header_inx    = headerx
           IMPORTING
                salesdocument_ex    = v_vbeln
           TABLES
                return              = return
                sales_items_in      = item
                sales_items_inx     = itemx
                sales_schedules_in  = lt_schedules_in
                sales_schedules_inx = lt_schedules_inx
                sales_partners      = partner.
    * Check the return table.
      LOOP AT return WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE: / 'Error in creating document'.
      ELSE.
    * Commit the work.
        COMMIT WORK AND WAIT.
        WRITE: / 'Document ', v_vbeln, ' created'.
      ENDIF.
    Code Formatted by: Alvaro Tejada Galindo on Dec 26, 2008 10:58 AM

  • Link for sales document type and PO/delivery number

    Hi guys,
    I have a PO number(EKPO-EBELN) and the delivery number for STO(LIKP-VBELN), how am i going to link this 2 to get the SALES document type(AUART)?
    thanks a lot!

    mark,
    So this is really not possible to get the pricing condition using the BAPI_SALESORDER_SIMULATE since this bapi requires the sales document type?
    it depends if your delivery wrt to Sales document which is VBAK-VBELN than you can use above FM.here your deliver is created from STO so now you have to use select quesy as i already suggested as vijay also.
    you may want to do same.
    Amit.

  • Header condition type value not displayed in sales order output

    Hi gurus,
    I have observed a strange issue regarding a header condition in a sales order.
    we have a set up like following:
    1. If the Header condition XXXX is used in sales Order then this value should be printed on sales order output.
    2. If the Header condition mentioned in above point is not maintained in sales order it should print the total price of all line items.
    Though i have maintained the header condition value in Sales Order Header its not displayed in SO output.
    That is , I have a sales order and it has one HEADER condition type entered with 3500 USD.
    In fact this value is used for some business purpose and is being printed on the sales order output for a specific output type.
    But where as in a sales order this header condition value is not getting printed on the output though I am using same data as of the sales order which is having the header condition value printed on its output.
    According to business,we must have the header condition value printed on  sales Order output.
    Please suggest how to proceed.
    Thanks in advance.

    Not sure if you are using costom smartform to print invoice, if yes then ask developer to debug and find the root cause and fix it.
    You might need to give him condition when it shuld be printed and when not.
    You can take reference of another output type for which it is printing

  • Signature Workflow to look inside document contents for conditional rules

    We are developing a signature workflow in SharePoint 2010, and need to look inside the .docx document to apply conditions for where the .docx document is routed for signature.
    For example:
    if the document says "XYZ" for a certain field in the .docx file, we'd route to Mr. "W"
    if the document says "ABC" for a certain field in the .docx file, we'd route to Mr. "D"
    I'm assuming we're breaking into the full Visual Studio development (and out of the SharePoint Designer realm) since we'll have to look inside the contents of the document for the workflow to work from.
    Any examples would be appreciated!

    Hi,     
    You can consider to use "Quick Parts" in this Word document and make it link to columns in SharePoint library, then you can refer to these columns in your workflow.
    Please take a look at this similar thread for more details:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/6e287491-f36c-4d2f-93bb-783e08e88f1d/sharepoint-custom-workflow-reading-information-from-doc-file?forum=sharepointcustomizationlegacy
    Best regards
    Patrick Liang
    TechNet Community Support

  • Error saving multiple Sales document modified by the BAPI (with cnfg)

    Dear Sir/Madam,
    I have a requirement for which i am modifying a Sales Quotation and
    then Sales Contract created w.r.t. Sales Quotation. I am using the
    following function modules in sequence specified to modify the
    documents:
    1. BAPI_CUSTOMERQUOTATION_CHANGE - to change Sales Quotation
    2. SD_SALESDOCUMENT_CHANGE - to change the Sales Contract with the
    parameter CALL_FROM_BAPI marked as 'X' if the quotation was processed
    successfully but not saved to the database
    The BAPI transaction commit is called only after both the Sales
    documents have been processed successfully. In case there is an error
    in updation in any one of the Sales documents then the
    BAPI_TRANSACTION_ROLLBACK is called.
    After successful processing both the documents are getting commited
    with the correct reference of the Quotation item in the contract items.
    Now when i view the Sales Contract all updations have happened
    successfully and i can view the data properly, also the items
    configuration data.
    When i go to view the Sales Quotation i can see that the new item which
    needed to be added to this document has been added successfully however
    when i go to view the configuration data for the newly added item i get
    an error V1854 , 'Internal error in communication between configuration
    and sales document in the form GET_CONFIG_MODE'.
    If i do a commit individually after the each function module call then
    all documents are saved properly and can be viewed without any errors.
    Please advise why this error is happening.
    warm regards,
    Nitesh

    I think I found a way to get it to do what I want,,,
    1) Use the first signature collection lock to lock only the fields that that person is signing-off on.
    2) The next manager then signs off and locks only his comments and text boxes, as well as the signature of the preceeding manager. This way text fields are only locked by one signature collection and thus to edit anything you have to clear that manager's signature to edit the related text boxes, then to re-sign that section you must clear the other (higher level) signatures to open up the signature field for resigning,,, I think this is providing the protection I want,,, Yea,,, let's get this form back into our stupid ISO system ;)

  • Sales Order Inquiry bapi uplaod Error

    Hi All..
    when iam trying to upload SO inquiry sample data through bapi iam getting these Errors :
    Material 1423 is not defined for sales org.1000, distr.chan.12,          language DE
    Error in SALES_ITEM_IN 000000
    Sales document was not changed.
    but i defined 1423 material in sales org.1000, distr.chan.12.
    after givivng Conversion-exit for material also it is not executing.
    here is my abap code.
    *& Report ZSAMPLE
    REPORT zsample.
    DATA:lt_header LIKE bapisdhd1 OCCURS 0 WITH HEADER LINE,
    lt_inquiry_items_in LIKE bapisditm OCCURS 0 WITH HEADER LINE,
    lt_inquiry_items_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE,
    lt_header_x LIKE bapisdhd1x OCCURS 0 WITH HEADER LINE,
    lt_partners LIKE bapiparnr OCCURS 0 WITH HEADER LINE,
    lt_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    lt_header-doc_type = 'ZSJ1'.
    lt_header-sales_org = '1000'.
    lt_header-distr_chan = '12'.
    lt_header-division = '00'.
    lt_header-purch_date = '20081121'.
    lt_header-purch_no_c = '7654321'.
    APPEND lt_header.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = lt_header-doc_type
    IMPORTING
    output = lt_header-doc_type.
    APPEND lt_header.
    lt_header_x-updateflag = 'U'.
    lt_header_x-doc_type = 'X'.
    lt_header_x-sales_org = 'X'.
    lt_header_x-distr_chan = 'X'.
    lt_header_x-division = 'X'.
    lt_header_x-purch_date = 'X'.
    lt_header_x-purch_no_c = 'X'.
    APPEND lt_header_x.
    *lt_inquiry_items_in-currency = 'USD'.
    *lt_inquiry_items_in-ITM_NUMBER = '0010'.
    *lt_inquiry_items_in-plant = '0001'.
    lt_inquiry_items_in-material = '000000000000001423'.
    lt_inquiry_items_in-itm_number = '000010'.
    *lt_inquiry_items_in-exchg_rate = '1000000'.
    APPEND lt_inquiry_items_in.
    lt_inquiry_items_inx-updateflag = 'U'.
    lt_inquiry_items_inx-ITM_NUMBER = 'X'.
    lt_inquiry_items_inx-PLANT = 'X'.
    lt_inquiry_items_inx-material = 'X'.
    lt_inquiry_items_inx-itm_number = 'X'.
    APPEND lt_inquiry_items_inx.
    lt_partners-partn_role = 'SH'.
    lt_partners-partn_numb = '0000000149'.
    APPEND lt_partners.
    CALL FUNCTION 'BAPI_INQUIRY_CREATEFROMDATA2'
    EXPORTING
    SALESDOCUMENTIN = ' '
    inquiry_header_in = lt_header
    inquiry_header_inx = lt_header_x
    SENDER =
    BINARY_RELATIONSHIPTYPE =
    INT_NUMBER_ASSIGNMENT =
    BEHAVE_WHEN_ERROR =
    LOGIC_SWITCH =
    TESTRUN =
    CONVERT = ' '
    IMPORTING
    SALESDOCUMENT =
    TABLES
    return = lt_return
    inquiry_items_in = lt_inquiry_items_in
    inquiry_items_inx = lt_inquiry_items_inx
    inquiry_partners = lt_partners
    INQUIRY_SCHEDULES_IN =
    INQUIRY_SCHEDULES_INX =
    INQUIRY_CONDITIONS_IN =
    INQUIRY_CONDITIONS_INX =
    INQUIRY_CFGS_REF =
    INQUIRY_CFGS_INST =
    INQUIRY_CFGS_PART_OF =
    INQUIRY_CFGS_VALUE =
    INQUIRY_CFGS_BLOB =
    INQUIRY_CFGS_VK =
    INQUIRY_CFGS_REFINST =
    INQUIRY_TEXT =
    INQUIRY_KEYS =
    EXTENSIONIN =
    PARTNERADDRESSES =
    READ TABLE lt_return WITH KEY type = 'E'.
    WRITE : /5 lt_return-type, 20 lt_return-id , 30 lt_return-number , 50 lt_return-message.
    IF sy-subrc NE 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT =
    IMPORTING
    RETURN =
    ENDIF.

    Hi Madhubabu,
    Specify an explicit commit after you had created the material.. And check in the Database tables whether
    the entries are there are not.
    Good luck
    Narin

  • Sales Order Inquiry bapi upload problem

    Hi All..
    when iam trying to upload SO inquiry sample data through bapi iam getting these Errors :
    Material 1423 is not defined for sales org.1000,  distr.chan.12,  language DE
    Error in SALES_ITEM_IN 000000
    Sales document  was not changed.
    but i defined 1423 material in sales org.1000,  distr.chan.12.
    here is my abap code.
    *& Report  ZSAMPLE
    REPORT  zsample.
    DATA:lt_header LIKE bapisdhd1 OCCURS 0 WITH HEADER LINE,
         lt_inquiry_items_in LIKE bapisditm OCCURS 0 WITH HEADER LINE,
         lt_inquiry_items_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE,
         lt_header_x LIKE bapisdhd1x OCCURS 0 WITH HEADER LINE,
         lt_partners LIKE bapiparnr OCCURS 0 WITH HEADER LINE,
         lt_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    lt_header-doc_type = 'ZSJ1'.
    lt_header-sales_org = '1000'.
    lt_header-distr_chan = '12'.
    lt_header-division = '00'.
    lt_header-purch_date = '20081121'.
    lt_header-purch_no_c = '7654321'.
    APPEND lt_header.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = lt_header-doc_type
      IMPORTING
        output = lt_header-doc_type.
    APPEND lt_header.
    lt_header_x-updateflag = 'U'.
    lt_header_x-doc_type = 'X'.
    lt_header_x-sales_org = 'X'.
    lt_header_x-distr_chan = 'X'.
    lt_header_x-division = 'X'.
    lt_header_x-purch_date = 'X'.
    lt_header_x-purch_no_c = 'X'.
    APPEND lt_header_x.
    *lt_inquiry_items_in-currency = 'USD'.
    *lt_inquiry_items_in-ITM_NUMBER = '0010'.
    *lt_inquiry_items_in-plant = '0001'.
    lt_inquiry_items_in-material = '000000000000001423'.
    lt_inquiry_items_in-itm_number = '000010'.
    *lt_inquiry_items_in-exchg_rate = '1000000'.
    APPEND lt_inquiry_items_in.
    lt_inquiry_items_inx-updateflag = 'U'.
    lt_inquiry_items_inx-ITM_NUMBER = 'X'.
    lt_inquiry_items_inx-PLANT = 'X'.
    lt_inquiry_items_inx-material = 'X'.
    lt_inquiry_items_inx-itm_number = 'X'.
    APPEND lt_inquiry_items_inx.
    lt_partners-partn_role = 'SH'.
    lt_partners-partn_numb = '0000000149'.
    APPEND lt_partners.
    CALL FUNCTION 'BAPI_INQUIRY_CREATEFROMDATA2'
      EXPORTING
    SALESDOCUMENTIN               = ' '
        inquiry_header_in             = lt_header
        inquiry_header_inx            = lt_header_x
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
    IMPORTING
      SALESDOCUMENT                 =
      TABLES
       return                        = lt_return
       inquiry_items_in              = lt_inquiry_items_in
       inquiry_items_inx             = lt_inquiry_items_inx
        inquiry_partners              = lt_partners
      INQUIRY_SCHEDULES_IN          =
      INQUIRY_SCHEDULES_INX         =
      INQUIRY_CONDITIONS_IN         =
      INQUIRY_CONDITIONS_INX        =
      INQUIRY_CFGS_REF              =
      INQUIRY_CFGS_INST             =
      INQUIRY_CFGS_PART_OF          =
      INQUIRY_CFGS_VALUE            =
      INQUIRY_CFGS_BLOB             =
      INQUIRY_CFGS_VK               =
      INQUIRY_CFGS_REFINST          =
      INQUIRY_TEXT                  =
      INQUIRY_KEYS                  =
      EXTENSIONIN                   =
      PARTNERADDRESSES              =
    READ TABLE lt_return WITH KEY type = 'E'.
    WRITE : /5 lt_return-type, 20 lt_return-id , 30 lt_return-number , 50 lt_return-message.
    IF sy-subrc NE 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        WAIT          =
      IMPORTING
        RETURN        =
    ENDIF.
    Thank you,
    Madhu Rao.

    hi
    Use FM conversion_exit_alpha_input... and give the number exactly as the size of the field.. if there are any prefix 0's which are not given in the field.. the BAPI wont execute..
    if it is in the database as 00001423 and ur giving it as 1423...it wont take it...
    Check the master table of material to see how it is stored in database.
    and pass exact value.
    Regards,
    Vishwa.

  • What is the need of creating partner functions for sales document type.

    Hi SAP (SD-GURUS),
    Actually we create partner functions  before creating customer ex: sold to party, ship to party, bill to party, and payer.
    These partner functions are going to be copied into sales order while processing sales order.
    Again what is the need of creating partner functions for sales document type.
    Thanks&Regards
    sreenivas peruru

    There are some Partners you could enter at Sales ORder Level. E.g. Sales Person, Employee Responsible, Forwarding Agent, Broker, etc.
    Thus these partner Determination need to be carried out at Sales Order Level & not at Customer Master level.
    So we have to configure partner Determination for various levels e.g. Customer Master, Sales Order, Delivery level etc...
    Hope this helps...
    THanks,
    Jignesh Mehta

  • Need to modify Sales order Item additional tab B

    Hello all,
    I need to modify Sales order item additional tab B ...by removing the exisitng fields and should add some new fields ....does it have any impact on this screen could be used in any of the other transaction .......i  just wanted if we remove the fields and some new details will have some impact
    Regards,
    KK

    Additional data B is used to add your own fields also known as custom fields in sales order.
    Custom fields can be added to tables VBAK & VBAP (depending on header or item). Similarly you can remove fields if you don't require it anymore.
    In short, your requirement can be met but you have to take help of ABAP consultant since it requires maintenance of user exits and modification of screens.

Maybe you are looking for

  • HP 1012 PRINTER - ONLY FEEDING ONE PAGE AT A TIME

    Have a 1012.  Been working fine until yesterday.  Now it will only feed paper manually.   Have to hit green button with each page of document.   Settings seem to be fine.   Auto Feed setting for paper.  Any ideas?

  • Songs on my computer & my ipod are not showing up in itunes

    Today, my sister and I both updated our itunes to 11.0.1 (12), the most current version of Itunes available. We have home shared for years, and tonight after my sister imported all of the songs she wanted from my library she was unable to view them i

  • Problem handling error messages in Axis

    I am consuming a web service, and all calls work fine. However, when the web service raises an error (for example I pass the wrong login), my Java application returns the following: java.lang.ClassCastException: org.apache.axis.message.Text The error

  • Daily Financials Intelligence Report not loaded with Data

    Dear All, I have an Issue with the Daily Business Intelligence. The Financials Intelligence Reports are coming with no data. What shall I do to populate this report with latest data. Please update... many thanks in advance..

  • How to create OMPplus script with parameters

    Hi all. I am trying to parameterize my OMB scripts. For now I am only able to pass one type of parameter, For example in the script below I can parameterize the mapping name. So even If I pass 3 mapping names I will import MDX files and deploy for al