Problem in creating Sales Order

Hi All,
We have 3 Document types ZS01,ZS02 and ZS03 for creating <b>Sales Order</b>. We have written one program to create Sales Order for document type 'ZS01'.
Our requirement is ,we should allow to create sales order of doc.type ZS01 <b>thru that 'z' program only</b>,we should not use ZS01 type to create sales order via VA01.So, we have restricted sales order creation using 'ZS01' thr' VA01 by authorisation profile.So in my 'z' program i couldn't call VA01 to create sales order.So I tried using BAPI,it is giving me the error <b>"No maintenance authorization for document type ZS01".</b>
Please guide or suggest me some alternative method to create sales order.
Thanks & Regards,
Sudipto.

Hi Sudipto,
There is no direct method of by passing a role, but u can try creating sales order thru  FM BAPI_SALESORDER_CREATEFROMDAT2 with reference to a SO that is already created with ZSO1, or you might call the Z report program internally from ur program to create the SO. 
Hope that helps
Anirban

Similar Messages

  • A problem about create sales order with reference to contract.

    Hello,everyone,
    when I create sales order va01,there is user exit in MV45AFZB to check the vbkd-bstkd,unique and fixed  length.
    but there is no such in contract  creation va41.
    when I create a contract and copy the data to sales order ,the check code is prevent me from copying
    message error:the vbkd-bstkd check is wrong.
    how to solve the problem, if I have to use the check in sales order.

    The Simple thing may be put a check at contract stage it self, then whatever data is in contract will copy in sales order. So you wont face this problem.
    Thanks,
    Raja

  • Problem in Creating Sales Order PL/SQL API

    Hey,
    I've to create a Sales Order 'n BPEL by using Apps Adapter. In Module Browser, I've chosen the OE_ORDER_PUB.PROCESS_HEADER and given the correct details.
    I passed the new ORDER_NUMBER and HEADER_ID as blank. I'm getting the response RETURN_STATUS as 'S' ( I mean which is success) and it is not throwing any error message.
    But while checking in the OE_ORDER_HEADERS_ALL table, I am not finding any created Sales Order record.
    Please help.
    -- Eric.

    Hi,
    After giving some parameters, I am facing different problem as shown in below.
    FND FND_AS_UNEXPECTED_ERROR N PKG_NAME OE_Delayed_Requests_PVT N PROCEDURE_NAME LOGREQUEST N ERROR_TEXT ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    This error I am getting as Response while executing from BPEL.
    Please help.
    -- Eric.

  • Problem while creating sales order

    Hi
       We are facing a problem while creating a sales order in R/3. The sales order number is getting generated. But we are not able to view the same in the backend meaning it is not there in the database. Any inputs would be of help.
    regs
    Steve

    Hi everybody,
    I've got a problem with this too. I use the BAPI_SALESORDER_CREATEFROMDAT2 with BAPI_TRANSACTION_COMMIT and the webdynpro shows me the document number created in R3 with a Success message. But when I go to R3 and try to display the created sales order, it doesn't exists. So... Maybe I'm doing something wrong with the BAPI_TRANSACTION_COMMIT. ¿Can anybody help me with this?
    The code I use is this:
    When the user pushes the SAVE button in the WebDynpro, this code executes:
        //@@begin onActionSave(ServerEvent)
         wdThis.wdGetSOCreaCustController().executeBapi_Salesorder_Createfromdat2();
         wdThis.wdGetSOCreaCustController().executeBapi_Transaction_Commit();
        //@@end
    In the custom Controller I've got the code for those executions:
      public void executeBapi_Salesorder_Createfromdat2( )
        //@@begin executeBapi_Salesorder_Createfromdat2()
         try {
              wdContext.currentBapi_Salesorder_Createfromdat2Element().modelObject().execute();
         catch (Exception ex) {
              wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);
         wdContext.nodeOutput().invalidate();
        //@@end
      public void executeBapi_Transaction_Commit( )
         try {
              wdContext.currentBapi_Transaction_CommitElement().modelObject().execute();
         catch (Exception ex) {
              wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);
         wdContext.nodeOutput().invalidate();   
        //@@end
    ¿Is something wrong? ¿Is something missing?

  • Problem in Creating Sales Order From One DB to another DB

    Hello All,
    I am trying to create a Sales Order in another database from the current database based on the Purchase Order but while creating the sales order system is throwing an error " In "To Whse" enter valid values [ZAPp 0] "
    My Code for Creating Sales Order in another DB are as follows :-
                 '==== Connect To another SAP Company ====='
                '=====================================
                Dim oCompany_DB As New SAPbobsCOM.Company
                oCompany_DB.Server = "OSL_SERVER"
                oCompany_DB.LicenseServer = "OSL_SERVER"
                oCompany_DB.UseTrusted = False
                oCompany_DB.CompanyDB = Database_Name
                oCompany_DB.UserName = SAPUserName
                oCompany_DB.Password = SAPPassword
                oCompany_DB.DbUserName = DBUserName
                oCompany_DB.DbPassword = DBPassword
                oCompany_DB.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005
                lRetCode = oCompany_DB.Connect()
                If lRetCode <> 0 Then
                    oCompany_DB.GetLastError(lErrCode, sErrMsg)
                    If (lErrCode <> -4006) Then
                        Class_InterCmp_Main.SBO_Application.MessageBox(sErrMsg)
                    End If
                End If
    '===== Creating the Sales Order ====='
    '================================
      Dim oOrder As SAPbobsCOM.Documents = oCompany_DB.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
                Dim DocDueDate As String = oRecord.Fields.Item("DocDueDate").Value
                oOrder.DocDueDate = DocDueDate
                oOrder.CardCode = Customer
      While Not oRecord.EoF
                    Dim ItemCode As String = oRecord.Fields.Item("ItemCode").Value
                    Dim WhsCode As String = oRecord.Fields.Item("WhsCode").Value
                    Dim Quantity As Double = oRecord.Fields.Item("Quantity").Value
                    Dim Price As Double = oRecord.Fields.Item("Price").Value
                    Dim Discnt As Double = oRecord.Fields.Item("DiscPrcnt").Value
                    Dim TaxCode As String = oRecord.Fields.Item("TaxCode").Value
                    oOrder.Lines.ItemCode = ItemCode
                    oOrder.Lines.WarehouseCode = WhsCode
                    oOrder.Lines.Quantity = Quantity
                    oOrder.Lines.Price = Price
                    oOrder.Lines.DiscountPercent = Discnt
                    oOrder.Lines.TaxCode = TaxCode
                    oOrder.Lines.Add()
                    oRecord.MoveNext()
                End While
                lRetCode = oOrder.Add
                '=== Check For Error if any ===='
                If lRetCode <> 0 Then
                    oCompany_DB.GetLastError(lErrCode, sErrMsg)
                    If (lErrCode <> -4006) Then
                        Class_InterCmp_Main.SBO_Application.MessageBox(sErrMsg)
                    End If
                End If
                oCompany_DB.Disconnect()
    When i execute the above code company gets connected but sales order not getting added in another company.
    Thanks,
    Amit

    You can not do it the alternate way Kevin suggests, direct DB inserts are prohibited by SAP and can corrupt your DB, particularly because unlike what most people think, all SAP documents affect more than just their own tables (e.g. the numbering table, the history tables).
    Are you getting any error message, or is it returning 0?
    If it is returning 0, then check is the document actually going to the newly created database or maybe somehow going to old one.
    If it isn't returning 0, what is the error code and message.
    Edit:
    Also I do see an error in your code. As it stands, you are adding an empty line to the end of every order. This can cause problems for SAP.
    Dim counter As Integer = 0
    If counter <> 0 Then 'Not equals 0, forum hides lt & gt symbols.
    oOrder.Lines.Add()
    End If
    counter = counter + 1
    oOrder.Lines.ItemCode = ItemCode
    oOrder.Lines.WarehouseCode = WhsCode
    oOrder.Lines.Quantity = Quantity
    oOrder.Lines.Price = Price
    oOrder.Lines.DiscountPercent = Discnt
    oOrder.Lines.TaxCode = TaxCode
    Edited by: njmog1 on May 9, 2011 10:14 AM

  • Problem while creating sales order using BAPI

    Hi all,
    i am creating a sales order from the purchase order data.
    when my client will send a PO in EDI format, my 3rd party edi tool will convert that edi formatted PO to text format. then i will upload that text formatted PO to my program then i will create a SO from those uploaded PO data using BAPI BAPI_SALESORDER_CREATEFROMDAT2.
      but,no sales order is being created.& also i am not getting any return message.by debugging also, i am not getting the error.plz suggest where i am doing mistake.below is the coding.
    DATA:
      gfilename LIKE rlgrap-filename.
    *--Internal tables
    DATA: BEGIN OF i_item OCCURS 50.    "Create Material Document Item
            INCLUDE STRUCTURE BAPISDITM .
    DATA: END OF i_item .
    DATA: BEGIN OF i_partner OCCURS 20.  "Return parameter
            INCLUDE STRUCTURE BAPIPARNR.
    DATA: END OF i_partner.
    DATA: BEGIN OF i_schedule OCCURS 20.  "Return parameter
            INCLUDE STRUCTURE BAPISCHDL .
    DATA: END OF i_schedule.
    DATA: BEGIN OF i_cond OCCURS 20.  "Return parameter
            INCLUDE STRUCTURE BAPICOND .
    DATA: END OF i_cond.
    DATA: BEGIN OF i_part OCCURS 0,     " Internal table for split data
            part(20),
          END OF i_part.
    DATA: BEGIN OF i_return OCCURS 20.  "Return parameter
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF i_return.
    *-- Work areas
    DATA: BEGIN OF wa_header .       "sales Document Header Data
            INCLUDE STRUCTURE BAPISDHD1.
    DATA: END OF wa_header .
    *DATA: BEGIN OF wa_return .       "Output Structure
           INCLUDE STRUCTURE BAPIRET2.
    *DATA: END OF wa_return .
    DATA: begin of sorder.
         INCLUDE STRUCTURE BAPIVBELN.
    DATA: end of sorder.
    data:begin of t_upload,
         ebeln(10),  "PO no(seagate)
         aedat like sy-datum , "PO date
         bsart(4) , "PO type
         vdatu like sy-datum , "requested delivery date
         kunnr(10) , "customer no-sold-to-party
        kunak like vbak-kunnr, "bill-to-party
         name1_s(20), "name1 of sold-to-party
         name2_s(15), "name2 of sold-to-party
         land1_s(3), "country
         ort01_s(10),  "city
         regio_s(3), "region(state/province)
         pstlz_s(10), "postal code
         adrnr_s(10), "address
         bstkd_e(10), "end customer purchase order
         posex(6),     "end customer PO line no(item no)
         kdmat(18),     "end customer material no(part no)
         kunag(10),     "ship-to-party
         name1_c(20),   "name1 of ship-to-party
         name2_c(15),   "name2 of ship-to-party
         land1_c(3),   "country
         ort01_c(10),    "city
         regio_c(3),   "region(state/province)
         pstlz_c(10),   "postal code
         adrnr_c(10),   "address
         posnr(6), "item no(seagate PO line no)
         pstyv(4), "item category
         matnr(18), "material no(seagate 9 digit part no)
         zmeng(13), "Target quantity in sales unit
        vrkme like vbap-vrkme, "sales unit
         meins(3), "UOM
        posnr_tot like vbap-posnr,"Total no. of line items
         werks(4), "plant
        vstel like vbap-vstel, "shipping point
         empst(10), "receiving point
         shtyp(4), "shipment type
         route(6), "route
         vsbed(2), "shipping conds
        rkfkf like vbap-rkfkf, "method of billing for co/ppc orders
         zterm(4), "terms of payment key
         inco1(3), "F.O.B inco term1
         inco2(3), "F.O.B inco term2
         end of t_upload.
    Data: wa_upload like t_upload,
           i_upload like standard table of t_upload.
    Data:v_kunnr like kna1-kunnr,
          v_posnr like vbap-posnr,
          v_matnr like vbap-matnr,
          v_zmeng like vbap-zmeng,
          v_kunag like kna1-kunnr.
    *---Constants
    CONSTANTS: c_comma TYPE c VALUE ',',   " For splitting data at commas
               c_01(2) TYPE c VALUE '01',  " For movement code in Bapi
               c_b     TYPE c VALUE 'B',   " For mvt. Indicator in Bapi
               c_creat(5) TYPE c VALUE 'CREAT', " For button text
               c_clear(5) TYPE c VALUE 'CLEAR', " For clear button
               c_mvmt(4) TYPE c VALUE 'MVMT',
               c_ok(2)   TYPE c VALUE 'OK',
               c_error(5) TYPE c VALUE 'Error'.
    *--SELECTION SCREEN DESIGN--
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
    PARAMETERS:     
                p_auart LIKE vbak-auart, " order type
                p_vkorg LIKE vbak-vkorg, " sales org
                p_vtweg LIKE vbak-vtweg, " dist channel
                p_spart LIKE vbak-spart, " division
                p_vkgrp LIKE vbak-vkgrp, " sales group
                p_vkbur LIKE vbak-vkbur, "sales office
                p_file(256) default 'c:/saleorder.txt'.         "File name
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN PUSHBUTTON 15(10) v_create USER-COMMAND creat.
    SELECTION-SCREEN PUSHBUTTON 40(10) v_clear USER-COMMAND clear.
      INITIALIZATION -
    INITIALIZATION.
      v_create = c_creat .
      v_clear = c_clear.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    PERFORM selectfile USING p_file.
    *--AT SELECTION_SCREEN--
    AT SELECTION-SCREEN .
      IF sy-ucomm = c_clear.
        PERFORM f_clear.
    ELSE.
       IF sy-ucomm <> c_mvmt.
    **--- Validating the input data.
         PERFORM f_check_inputs.
        ELSEif sy-ucomm = c_creat.
    *--- Validating the input data.
          PERFORM f_check_inputs.
    *-- Uploading the PO data.
          PERFORM f_PO_upload.
    *---checking the PO data
         PERFORM f_check_upload_data.
    *---create sales order from PO data
        PERFORM f_Sales_order_create.
        ENDIF.
    FORM f_PO_upload.
    gfilename = p_file.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                filename                = gfilename
                filetype                = 'DAT'
           TABLES
                data_tab                = i_upload
           EXCEPTIONS
                conversion_error        = 1
                file_open_error         = 2
                file_read_error         = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9
                OTHERS                  = 10.
      IF sy-subrc <> 0.
        MESSAGE i398(00) WITH '(WS_UPLOAD)'
        ' Errors occured with exception '
         sy-subrc.
      ENDIF.
    ENDFORM.                    " f_PO_upload
    *&      Form  selectfile
          text
         -->P_P_FILE  text
    FORM selectfile CHANGING value(filename) TYPE c.
    CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                def_filename     = gfilename
                def_path         = 'C:\'
                mask             = ',*.txt.'
                mode             = 'O'
                title            = 'Select File Name'
           IMPORTING
                filename         = filename
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
    ENDFORM.                    " selectfile
    FORM f_Sales_order_create.
      PERFORM f_fill_header.
      PERFORM f_fill_partner.
      PERFORM f_fill_item.
      PERFORM f_call_BAPI.
    ENDFORM.                    " f_Sales_order_create
    *&      Form  f_fill_header
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_header.
    move p_auart to wa_header-doc_type.
    move p_vkorg to wa_header-sales_org.
    move p_vtweg to wa_header-distr_chan.
    move p_spart to wa_header-division.
    move p_vkgrp to wa_header-sales_grp.
    move p_vkbur to wa_header-sales_off.
    Read table i_upload into wa_upload index 1.
    move wa_upload-ebeln to wa_header-purch_no_c.
    move wa_upload-aedat to wa_header-purch_date.
    move wa_upload-bsart to wa_header-po_method.
    move wa_upload-vdatu to wa_header-req_date_h.
    move wa_upload-bstkd_e to wa_header-purch_no_s.
    *move wa_upload-route to wa_header-route.
    move wa_upload-vsbed to wa_header-ship_cond.
    move wa_upload-empst to wa_header-rec_point.
    move wa_upload-shtyp to wa_header-ship_type.
    move wa_upload-zterm to wa_header-pmnttrms.
    move wa_upload-inco1 to wa_header-incoterms1.
    move wa_upload-inco2 to wa_header-incoterms2.
    ENDFORM.                    " f_fill_header
    *&      Form  f_fill_partner
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_partner.
    if not wa_upload-kunnr is initial.
    select single kunnr from kna1 into v_kunnr
                where kunnr = wa_upload-kunnr.
    if sy-subrc <> 0.
    Message E014 with 'customer does not exist'.
    else.
    move 'AG' to i_partner-partn_role.
    move wa_upload-kunnr to i_partner-partn_numb.
    move wa_upload-land1_s to i_partner-country.
    move wa_upload-name1_s to i_partner-name.
    move wa_upload-name2_s to i_partner-name_2.
    move wa_upload-ort01_s to i_partner-city.
    move wa_upload-regio_s to i_partner-region.
    move wa_upload-pstlz_s to i_partner-postl_code.
    move wa_upload-adrnr_s to i_partner-address.
    append i_partner.
    endif.
    endif.
    if not wa_upload-kunag is initial.
    select single kunnr from kna1 into v_kunag
                where kunnr = wa_upload-kunag.
    if sy-subrc <> 0.
    Message E015 with 'end customer does not exist'.
    else.
    move 'WE' to i_partner-partn_role.
    move wa_upload-kunag to i_partner-partn_numb.
    move wa_upload-land1_c to i_partner-country.
    move wa_upload-name1_c to i_partner-name.
    move wa_upload-name2_c to i_partner-name_2.
    move wa_upload-ort01_c to i_partner-city.
    move wa_upload-regio_c to i_partner-region.
    move wa_upload-pstlz_c to i_partner-postl_code.
    move wa_upload-adrnr_c to i_partner-address.
    append i_partner.
    endif.
    endif.
    ENDFORM.                    " f_fill_partner
    *&      Form  f_fill_item
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_item.
    loop at i_upload into wa_upload.
    if not wa_upload-matnr is initial.
    select single  maramatnr msegmenge into (v_matnr, v_zmeng) from
                       mara inner join mseg on maramatnr = msegmatnr
                       where mara~matnr = wa_upload-matnr.
    if sy-subrc <> 0.
    Message E016 with 'material no does not exist'.
    elseif v_zmeng LT wa_upload-zmeng.
    Message E017 with 'order quantity is greater than the quantity present'.
      endif.
    endif.
    move wa_upload-posnr to i_item-itm_number.
    move wa_upload-pstyv to i_item-item_categ.
    move wa_upload-matnr to i_item-material.
    move wa_upload-zmeng to i_item-target_qty.
    move wa_upload-meins to i_item-target_qu.
    move wa_upload-werks to i_item-plant.
    *move wa_upload-meins to wa_vbap-meins.
    *move wa_upload-posnr_tot to wa_vbap-posnr_tot.
    move wa_upload-posex to i_item-po_itm_no.
    move wa_upload-kdmat to i_item-cust_mat22.
    move wa_upload-inco1 to i_item-incoterms1.
    move wa_upload-inco2 to i_item-incoterms2.
    move wa_upload-zterm to i_item-pmnttrms.
    move wa_upload-empst to i_item-rec_point.
    move wa_upload-shtyp to i_item-ship_type.
    move wa_upload-route to i_item-route.
    append i_item.
    PERFORM f_fill_schedule_line.
    PERFORM f_fill_conditions.
    ENDLOOP.
    ENDFORM.                    " f_fill_item
    *&      Form  f_fill_schedule_line
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_schedule_line.
    move wa_upload-matnr to i_schedule-itm_number.
    move sy-datum to i_schedule-req_date.
    move wa_upload-zmeng to i_schedule-req_qty.
    append i_schedule.
    ENDFORM.                    " f_fill_schedule_line
    *&      Form  f_fill_conditions
          text
    -->  p1        text
    <--  p2        text
    FORM f_fill_conditions.
    move wa_upload-matnr to i_cond-itm_number.
    move sy-datum to i_cond-conpricdat.
    append i_cond.
    ENDFORM.                    " f_fill_conditions
    *&      Form  f_clear
          text
    -->  p1        text
    <--  p2        text
    FORM f_clear.
    clear:p_auart,
          p_vkorg,
          p_vtweg,
          p_spart,
          p_vkgrp,
          p_vkbur.
    ENDFORM.                    " f_clear
    *&      Form  f_call_BAPI
          text
    -->  p1        text
    <--  p2        text
    FORM f_call_BAPI.
    clear:i_item,i_partner,i_schedule.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
      EXPORTING
      SALESDOCUMENTIN               =
        ORDER_HEADER_IN               = wa_header
      ORDER_HEADER_INX              =
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
    IMPORTING
       SALESDOCUMENT                  = sorder
      TABLES
      RETURN                        =
       ORDER_ITEMS_IN                 = i_item
      ORDER_ITEMS_INX               =
        ORDER_PARTNERS                = i_partner
       ORDER_SCHEDULES_IN             = i_schedule
      ORDER_SCHEDULES_INX           =
      ORDER_CONDITIONS_IN            = i_cond.
      ORDER_CFGS_REF                =
      ORDER_CFGS_INST               =
      ORDER_CFGS_PART_OF            =
      ORDER_CFGS_VALUE              =
      ORDER_CFGS_BLOB               =
      ORDER_CFGS_VK                 =
      ORDER_CFGS_REFINST            =
      ORDER_CCARD                   =
      ORDER_TEXT                    =
      ORDER_KEYS                    =
      EXTENSIONIN                   =
      PARTNERADDRESSES              =
    if not ( sorder-vbeln is initial ).
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    write: /'Order number:', sorder.
    else.
    loop at i_return.
    write: / i_return-id, i_return-number, i_return-message(80).
    endloop.
    *write: /'Error'.
    endif.
    *loop at i_return.
    *write: / i_return-id, i_return-number, i_return-message(80).
    *endloop.
    ENDFORM.                    " f_call_BAPI

    HI
      Pricing will be carried basing on the pricing
    procedure.
    Case1: Prices will be carried out automatically if
    necessary condition records are maintained for the
    condition type.
      For this you can go to Sales Order-> Item Conditions
    In the screen you can click on command button Analysis,
    which gives you the list of condition types associated
    to the pricing procedure. By clicking on the condition
    type you can know the action that has taken place.
    Case2: Manually forcing prices for Items.
      To do this, you have to populate ORDER_CONDITIONS_IN &
    ORDER_CONDITIONS_INX. Also note to identify the item
    numbers, you manually pass the item number for each item
    in the sales order, use the same item number for
    populating conditions.
      Parameters required:
    ORDER_CONDITIONS_IN:
      ITM_NUMBER, COND_TYPE, COND_VALUE, CURRENCY
    ORDER_CONDITIONS_INX:
      ITM_NUMBER, COND_TYPE, UPDATEFLAG, COND_VALUE,CURRENCY.
       Hope the above info helps you. Do revert back if you
    need more info.
    Kind Regards
    Eswar

  • Pricing problem while creating sales order doc

    Hi friends,
    My requirement is to create sales order with ref to contract i am using 'BAPI_SALESORDER_CREATEFROMDAT2' , and I am extracting data from konv table to get price through condition record , but i am getting 4 messages
    (S) SALES_HEADER_IN has been processed successfully
    (E) Condition PR00 is not allowed as header condition
    (W) The sales document is not yet complete: Edit data
    (E) Sales document was not changed
    and i am not getting pricing for created sales order document.
    please help.
    regards,
    Sravani.

    solved

  • Problem while creating SALES ORDER (OR)

    Hi All,
    I am unable to create sales order (OR)
    Error : Material is not defined for sales areaI have created MMR and CMR Properly.
    Please help.
    Thanks In Advance
    Regards
    Abhi

    Hi Abhi,
    I face similar issue as faced by you.
    I went to additional data and changed the description and added the description in which I wanted it to be added but does not help. Am I missing the right place where to make the change?
    I am pretty sure that it is a language issue.
    I created a sales order, added a product, it worked fine.
    Now, I copied this product to a new product, changed description and added it in same sales order it does not work.
    Best Regards,
    Neha

  • Problem in creating sales order  - Error ( TAXINN).

    Hi,
    while creating sales order, I got erro message as below.
    "Calculation procedure ZTXINN and tax key E1 not in table T007A "
    I check table T007A using transaction SE16, and input given as ZTINN procedure but i could not found tax key there.
    Kindly inform where to maintain this setting.
    Thanks in Advance
    Amit

    Dear Amit,
    Implementation Guide for R/3 Customizing (IMG)
    -->Financial Accounting
       -->Financial Accounting Global Settings
          -->Tax on Sales/Purchases
             -->Basic Settings
    Implementation Guide for R/3 Customizing (IMG)
    -->Financial Accounting
       -->Accounts Receivable and Accounts Payable
          -->Business Transactions
             -->Outgoing Invoices/Credit Memos
                -->Outgoing Invoices/Credit Memos - Enjoy
                   -->Define Tax Code per Transaction
    You should be able to maintain with one of the following reports:
    RFTAX100
    SAPMF82T
    Hope this will help.
    Regards,
    Naveen.

  • A bapi problem of create sales order

    hello,experts,
    when I want to try the function of bapi 'BAPI_SALESORDER_CREATEFROMDAT1', the return message is the following,
    'Material 4070111 is not defined for sales org.4050,  distr.chan.01,  language ZH',actually,the sales org.4050 is defined for the material.
    pls help me out.appreciated.
    the content of the program:
    REPORT  ZWY_SALESORDER01.
    --Data Declaration--
    Data: st_BAPISDHEAD like BAPISDHEAD, " Sales Order Header Data
    ta_BAPIITEMIN like BAPIITEMIN occurs 0 with header line, " Ln item
    ta_BAPIPARTNR like BAPIPARTNR occurs 0 with header line, " Partner
    d_BAPIRETURN1 like BAPIRETURN1, " Bapi return msg
    d_vbeln like bapivbeln-VBELN. " Sales Order Number
    *Please note in the following program, sold to party (SP) has been
    *entered as 'AG' and ship to party (SH) as 'RG'.
    *SP----
    AG
    *SH----
    RG
    *Order type 'OR' as 'TA'
    *Please use TA instead of OR
    *Also if you set the * CONVERT_PARVW_AUART = 'X' parameter to 'X' you
    *can use sold to party as SP and ship to party as SH.
    Move the data to create sales order in the repective parameters------*
    move: '4OR' to st_BAPISDHEAD-DOC_TYPE, " Sales document type
    '15493' to st_BAPISDHEAD-PURCH_NO_C,
    '4050' to st_BAPISDHEAD-SALES_ORG,
    '01' to st_BAPISDHEAD-DISTR_CHAN,
    '00' to  st_BAPISDHEAD-DIVISION,
    '00010' to ta_BAPIITEMIN-ITM_NUMBER,
    '4070111' to ta_BAPIITEMIN-MATERIAL,
    '4000' to ta_BAPIITEMIN-PLANT,
    '1' to ta_BAPIITEMIN-REQ_QTY,
    'AG' to ta_BAPIPARTNR-PARTN_ROLE, " Sold to Party
    '0000006648' to ta_BAPIPARTNR-PARTN_NUMB.
    Append the internal tables-------------------------------------------*
    append ta_BAPIPARTNR.
    clear ta_BAPIPARTNR.
    append ta_BAPIITEMIN.
    clear ta_BAPIITEMIN.
    Move ship to party---------------------------------------------------*
    move: 'RG' to ta_BAPIPARTNR-PARTN_ROLE, " Ship to party
    '0000006648' to ta_BAPIPARTNR-PARTN_NUMB.
    Append the internal tables-------------------------------------------*
    append ta_BAPIPARTNR.
    clear ta_BAPIPARTNR.
    break-point.
    Call the Bapi to create the sales order
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
    EXPORTING
    ORDER_HEADER_IN = st_BAPISDHEAD
    WITHOUT_COMMIT = ' '
    CONVERT_PARVW_AUART = ' '
    IMPORTING
    SALESDOCUMENT = d_vbeln
    SOLD_TO_PARTY =
    SHIP_TO_PARTY =
    BILLING_PARTY =
    RETURN = d_BAPIRETURN1
    TABLES
    ORDER_ITEMS_IN = ta_BAPIITEMIN
    ORDER_PARTNERS = ta_BAPIPARTNR
    ORDER_ITEMS_OUT =
    ORDER_CFGS_REF =
    ORDER_CFGS_INST =
    ORDER_CFGS_PART_OF =
    ORDER_CFGS_VALUE =
    ORDER_CCARD =
    ORDER_CFGS_BLOB =
    ORDER_SCHEDULE_EX =
    break-point.
    if d_vbeln <> space.
    write: 'Sales order No. ', d_vbeln.
    endif.

    clear iohead.
      ihead-doc_type   = 'ordertype'.
      ihead-sales_org  = 'sales organisation'.
      ihead-distr_chan = 'distribution ch'.
      ihead-division   = 'division'.
      ihead-req_date_h = sy-datum.
      ihead-ship_cond  = 'shipping codition'.
      ihead-incoterms1 = 'incoterms'.
      ihead-pmnttrms   = 'payment terms'.
      ihead-purch_no_c = 'Purchase document'.
      ihead-purch_date = 'purchase doc date.
      ihead-accnt_asgn = 'account assignment'.
      ihead-pymt_meth = 'payment method'.
      clear ipartner.   refresh ipartner.
      ipartner-partn_role = 'AG'.
      ipartner-partn_numb = 'sold to party'.
      append ipartner.
      clear ipartner.
      ipartner-partn_role = 'WE'.
      ipartner-partn_numb = 'ship to party'.
      append ipartner.
      refresh : iitem, ibapischdl, ibapicond.
      clear   : iitem, ibapischdl, ibapicond.
      item-itm_number = '10'.
      item-material   = 'material'.
      item-plant      = 'plant'.
      item-val_type   = 'BLFG'.
      append item.
      ibapischdl-itm_number = '10'.
      ibapischdl-req_date   = sy-datum.
      ibapischdl-req_qty    = 'quantity'.
      append ibapischdl.
      call function 'BAPI_SALESORDER_CREATEFROMDAT2'
           exporting
              SALESDOCUMENT           =
                order_header_in         = ihead
              ORDER_HEADER_INX        =
              SENDER                  =
              BINARY_RELATIONSHIPTYPE =
              INT_NUMBER_ASSIGNMENT   =
              BEHAVE_WHEN_ERROR       =
              LOGIC_SWITCH            =
              TESTRUN                 =
              CONVERT_PARVW_AUART     = ' '
          importing
               salesdocument_ex        = wvbeln
           tables
               return                  = ibapiret2
               order_items_in          = item
              ORDER_ITEMS_INX         = IBAPISDITMX
               order_partners          = ipartner
               order_schedules_in      = ibapischdl
              ORDER_SCHEDULES_INX     =  ibapischdl
              order_conditions_in     = ibapicond
              ORDER_CFGS_REF          =
              ORDER_CFGS_INST         =
              ORDER_CFGS_PART_OF      =
              ORDER_CFGS_VALUE        =
              ORDER_CFGS_BLOB         =
              ORDER_CFGS_VK           =
              ORDER_CFGS_REFINST      =
              ORDER_CCARD             =
              ORDER_TEXT              =
              ORDER_KEYS              =
              EXTENSIONIN             =
              PARTNERADDRESSES        =
      if wvbeln ne space.
        call function 'BAPI_TRANSACTION_COMMIT'
             exporting
                  wait = wwait.
           IMPORTING
                RETURN  =
    sales document will be available in bapi return .
    saravanan

  • Facing the problem while creating sales order

    Hi,
    I am facing the problem while saving the sales order.
    Error in system  xxx/400 while copying the document
    Message no. CRM_ORDER_MISC 020
    Diagnosis
    Errors occurred while transferring the document into another system. To view the error messages, see the enclosed log.
    Transmission log
    u2022Product  cannot be recoded for ERP System xxx/400(Notification E CRM_ORDER_MISC 015)
    u2022Product  cannot be recoded for ERP System xxx/400 (Notification E CRM_ORDER_MISC 015)
    Kindly assist me.
    Madhu

    Hi Madhusadan,
    Can you check whether the product exists in the ERP System or not? You can take the product names and can check the same using the Tcode: MM03 in ECC System. Also, it would be good if you have a look at the product from the CRM System if there are any errors or the product is already archived.
    Is the Sales Order you are creating from a Preceding Transaction ?
    Hope this helps.
    Thanks,
    Samantak.

  • Problem in creating sales order in Make TO Order

    Hi all,
    We are trying to test the strategy 50 (Make to Order strategy) . To begin with we are trying to create the Sales order. However , we are getting the message "NO availibity check can be carried out for Material " we have assigned the checking group and checking rule .
    What can be the possible causes for this problem . Please help me . I will be very grateful . Thanking you.
    Kind Regards
    Ayaz

    Dear ,
    Planning startegy 50 , Requirement Type of Customer KEV , in -OVZG -can you please chek the following : Select the Requirement Class for Planning Startgey 50 based on the Requirement Type : KEV
    1.Did you mark the Indicator Requirement Transfer in Requiremet Tab
    2.Did you mark the Availablity Check marked ?
    Goto SPRO-Define Planning Statgey and Comapre the same because it will be copied from OVZG
    Hope it is clear
    Regards
    JH

  • Problem in creating sales order with BAPI_SALESDOCU_CREATEFROMDATA1.

    Hi everybody
    I am not able create a sales order with BAPI_SALESDOCU_CREATEFROMDATA1.i also did debugging.its not throwing  up any errors in return table. return table is empty. but when i check the  BAPI in se37 with same data its creating the sales order.
    Here i am attaching my program.please kindly can anyone have a look and tell me whether i did anything wrong in  the program.
    thx in advance.
    *& Report  YORDERCREATE
    REPORT  YORDERCREATE.
    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: it_schedules_inx like bapischdlx occurs 0 with header line.
    data: it_schedules_in like bapischdl occurs 0 with header line.
    types: begin of itab,
    auart like vbak-auart,
    vkorg like vbak-vkorg,
    vtweg like vbak-vtweg,
    spart like vbak-spart,
    kunnr like kuagv-kunnr,
    kunnr1 like kuwev-kunnr,
    posnr like  vbup-posnr,
    matnr like mara-matnr,
    Tquan type string,
    end of itab.
    data: it-out type table of itab with header line.
    data: menge(10) type c.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\VA01.TXT'
      FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      TABLES
        DATA_TAB                      = it-out.
    loop at it-out.
    header-doc_type = it-out-auart.
    headerx-doc_type = 'X'.
    header-sales_org = it-out-vkorg.
    headerx-sales_org = 'X'.
    header-distr_chan = it-out-vtweg.
    headerx-distr_chan = 'X'.
    header-division = it-out-spart.
    headerx-division = 'x'.
    headerx-updateflag = 'I'.
    *partner data
    partner-partn_role = 'SP'.
    partner-partn_numb = it-out-kunnr.
    append partner.
    partner-partn_role = 'SH'.
    partner-partn_numb = it-out-kunnr1.
    append partner.
    *item data
    itemx-updateflag = 'I'.
    item-itm_number = it-out-posnr.
    itemx-itm_number = 'X'.
    item-material = it-out-matnr.
    itemx-material = 'X'.
    item-target_qty = it-out-tquan..
    itemx-target_qty = 'X'.
    APPEND item.
    APPEND itemx.
    *loop at it-out.
    *write:/ it-out-auart,it-out-vkorg.
    *endloop.
    CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
      EXPORTING
       SALESDOCUMENT                 = v_vbeln
        SALES_HEADER_IN               = header
        SALES_HEADER_INX              = headerx
      SENDER                        = SENDER
      BINARY_RELATIONSHIPTYPE       = 'VORL'
      INT_NUMBER_ASSIGNMENT         = ' '
    IMPORTING
       SALESDOCUMENT_EX              = v_vbeln
    TABLES
       RETURN                        = return
       SALES_ITEMS_IN                = item
       SALES_ITEMS_INX               = itemx
       SALES_PARTNERS                = partner.
      SALES_SCHEDULES_IN            = SALES_SCHEDULES_IN
      SALES_SCHEDULES_INX           = SALES_SCHEDULES_INX
      SALES_CONDITIONS_IN           = SALES_CONDITIONS_IN
      SALES_CFGS_REF                = SALES_CFGS_REF
      SALES_CFGS_INST               = SALES_CFGS_INST
      SALES_CFGS_PART_OF            = SALES_CFGS_PART_OF
      SALES_CFGS_VALUE              = SALES_CFGS_VALUE
      SALES_CFGS_BLOB               = SALES_CFGS_BLOB
      SALES_CCARD                   = SALES_CCARD
      KEY_TABLE                     = KEY_TABLE
    endloop.
    loop at return where type  = 'E' or type = 'A'.
    exit.
    endloop.
    if sy-subrc = 0.
    write:/ 'error in creating document'.
    else.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    IMPORTING
      RETURN        = RETURN
    commit work and wait.
    write:/ 'document',v_vbeln,'created'.
    endif.

    Hi Patrick,
    Here are a couple of issues/recommendations:
    1) Checkboxes must be populated by capital X (your headerx-division = 'x' is wrong)
    2) Why you are using the COMMIT WORK AND WAIT statement? The CALL BAPI_TRANSACTION_COMMIT does exactly the same! Comment it out or better delete one of them!
    3) Does one of your sales order tables (VBAK, VBAP, ....) have any customer appended fields? In this case you have to populate an additional value table and the related index table as well.
    Check it out,
    Heinz

  • Problem in creating sales order using the FM  BAPI_SALESORDER_CREATEFROMDAT

    Hi Experts,
    I have writen the below codes to create a sales order but it is showing the error message that ' sales order type OR is not defined'. Please help me.
    data:itab_header like bapisdhead occurs 0 with header line,
         itab_item   like bapiitemin  occurs 0 with header line,
         itab_partner like BAPIPARTNR occurs 0 with header line,
         itab_return like bapireturn1,
         soldtoparty like bapisoldto occurs 0 with header line,
         shiptoparty like bapishipto occurs 0 with header line,
         salesdoc like BAPIVBELN-VBELN .
    itab_header-doc_type = 'OR'.
    itab_header-sales_org = '1000'.
    itab_header-distr_chan = '10'.
    itab_header-division = '00'.
    append itab_header.
    itab_item-material = 'M-01'.
    itab_item-req_qty = '1'.
    append itab_item.
    itab_partner-partn_role = 'AG'.
    itab_partner-partn_numb = '1000'.
    append itab_partner.
    clear itab_partner.
    itab_partner-partn_role = 'WE'.
    itab_partner-partn_numb = '1000'.
    append itab_partner.
    clear itab_partner.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
      EXPORTING
        ORDER_HEADER_IN           = itab_header
      WITHOUT_COMMIT            = ' '
      CONVERT_PARVW_AUART       = ' '
    IMPORTING
       SALESDOCUMENT              = salesdoc
       SOLD_TO_PARTY              = soldtoparty
       SHIP_TO_PARTY              = shiptoparty
      BILLING_PARTY             =
       RETURN                     = itab_return
      TABLES
        ORDER_ITEMS_IN            = itab_item
        ORDER_PARTNERS            = itab_partner.
      ORDER_ITEMS_OUT           =
      ORDER_CFGS_REF            =
      ORDER_CFGS_INST           =
      ORDER_CFGS_PART_OF        =
      ORDER_CFGS_VALUE          =
      ORDER_CCARD               =
      ORDER_CFGS_BLOB           =
      ORDER_SCHEDULE_EX         =.
    if itab_return-type ne 'E'.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT = 'X'.
    IMPORTING
       RETURN        =
      write: salesdoc.
    else.
      write: itab_return-message.
    endif.

    Hello Dillip
    The BAPIs BAPI_SALESORDER_CREATE... have certain limitations. In case of BAPI_SALESORDER_CREATEFROMDAT1 you can only create orders for business object 'BUS2032'.
    If you have the RFC-enabled function module <b>SD_SALESORDER_CREATE</b> available in your system (which I doubt) then you should use this fm instead of the BAPIs.
    Regards
      Uwe

  • Problem In Creating Sales Order Through DI API

    Hi
    I am Creating The Sales Order Through DI API.
    the Error Is Coming - " [OACT] , 'No matching records found (ODBC -2028)'"
    anyone  can help me solving it.

    Hi vivek,
    Have you tried adding the same document with the client ?
    OACT is the accounts table and this error message typically indicates that there is an account parameter missing somewhere in the system.
    Possible causes include:
    - you are using a tax group or warehouse which does not have all the required accounts set
    - There is a price rounding and the rounding price account has not been set in the account settings
    - etc.
    The first things I would check include the tax group settings and the G/L Account determination settings.
    Henry

Maybe you are looking for

  • Any way to get Open Type features to work in Pages 5?

    It seems that the Open Type support, which already has been very wonky to say the least and felt more like a hack in Pages 09 has been completely broken now in Pages 5. It used to be possible to use the system wide typography menu (CMD+T > Gear Icon

  • Duplicate records in Cube Level ( BI 7.0 )

    Dear All I am working on BI 7.0 , I have an issue , i am  loading the data from  Flat File to ODS  and from ODS to Cube . In ODS  we are selected Overwrite option, in cube level we have an Summation option. the problem is while loading the data from

  • How do I decompress a string in java?

    The string is compressed with zip and is encoded base64. I decocoded the string, I copied the string to a zip file and I tryed to decompress using the sample script(class UnZip2) from here: http://java.sun.com/developer/technicalArticles/Programming/

  • Badi or enhancement

    Hi Friends,    I want to restrict fields of NET PRICE and GROSS PRICE in tcode ME23N. so i got 1 enhancement like  MM06E005 and   component is  EXIT_SAPMM06E_016. but its not working. so if u have any other enhancement or badi  then please tell me th

  • Make a Powerbook a wireless access point

    Is it possible to make my Powerbook G4 act as if it were a wireless access point? I can see where I can create my own network, which I've done, I have a wireless PC laptop which will connect to my mac as it see's the wireless broadcast. However, the