Problem creating CR doc type for sales order

Hello Gurus:
   I have been trying to use a bapi to create a sales order. So far I have tested
BAPI_SALESORDER_CREATEFROMDATA
BAPI_SALESORDER_CREATEFROMDAT1
BAPI_SALESORDER_CREATEFROMDAT2
All of them works fine with SO type, But I am trying to create credit request. And they all return with error message saying the doc_type is invalid or not allowed. So far I have only found a function module SD_Salesdocument_create. But is there any standard BAPI that currently calling this? To make my life a little easier!
Cheers _

Hi
Check these BAPI's
BAPI_SALESDOCU_CREATEFROMDATA1
BAPI_SALESDOCU_CREATEWITHDIA  
Regards
Anji

Similar Messages

  • What is the IDOC Basic Type for sales order creation

    Hi Experts,
    Can anyone tell me Idoc Basic type for sales order creation.
    Thanks
    Prashant

    Hi,
    The basic types for creating the order are:
    1.Orders01
    2.Orders02
    3.Orders03
    4.Orders04
    5.Orders05.
    The basic type for SIS order is:
    SISCSO01.
    Regards,
    Krishna.

  • Default document currency as per document type for sales order

    Dear All,
    We are facing problem in Default document currency as per document type for sales order,
    Our requirement is not to give currency in customer master & set it as default document currency as per document type,
    for example: Document type 'OR' default currency 'INR',
                         Document type 'ZEU' default currency 'EUR',
                         Document type 'ZUS' default currency 'USD',
                         Document type 'ZNP' default currency 'NRP,'
                         Document type 'ZAF' default currency 'RAND,'
    Is it any how possible in standard setting ?,
    Regards,
    Sai

    Hi,
    The system proposes the sales document currency from the customer master record of the sold-to party. You can change the currency manually in the document or change in currency in customer master. If you change the currency, the system recalculates prices for the entire document.
    to determine different currrency in sales docuement you need to write an user exit and then overwrite the docuement currency copied from customer master. Try user exit 'USEREXIT_MOVE_FIELD_TO_VBAK' under include MV45AFZZ for this change.
    with regards
    vivek.

  • How to create a daily report for sales order

    hi
    how to create a daily report for sales order. what fields it must consists of. what are the tables it need?

    Hi
    You have to use the sales order tables VBAK,VBAP and VBEP
    So keep date field on selection screen
    and treat this date as Order creation data audat field in VBAK.
    based on this fetch the data from VBAK and VBAP  with the following fields like
    VBELN, KUNNR,NETWR,POSNR, MATNR,ARKTX,KWMENG,WAERS  etc and display in the report
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to create a sap script for sales order header items?

    Hi friends i am totally new to scripts i have got a task where i have to create a sap script for sales order header items details, the clue that i have got is to create using MEDRUCK but i have got no idea please can any body help me with this task with any sample sap script?
    Points will be rwwared with out fail Thks in advance.

    Hi,
    The Standard Form NAme is RVORDER01
    Regards
    Sandipan

  • Default Output Type for Sales Order Header

    Hi Guru
    I created 2 output types for hardcopy printout and for mail.
    I want both should be selected as default when a sales order is created. (using NACE)
    Output will be manually from VA02 -> issue output to. Here I must get 2 output types.
    As of now, this is manual process. 
    Please help.
    sunil Kolambkar.

    Hi Sunil,
    For this you need to maintain condition record for output type. for the sales order type, [V V11].
    Do the output determination in the same way as Pricing procedure determination.
    OUTPUT DETERMINATION:
    SPRO- IMG- Basic Functions- Output Control- Output Determination- Output Det using Cond Tech- Output Det for Sales Documents & output det for billing documents.
    Create Condition Table: select the field Sales Doc Type from field catalog & Save
    Maintain Access Sequence: 4-digits code & description.
    Assign condition table to access sequence. Select Accesses line item and Go To Fields. Fields will display the fields we have selected in the condition table i.e. sales doc type.
    Maintain Output Types:
    AF00: Inquiry
    AN00: Quotation
    BA00: Order Confirmation
    LD00: Delivery
    Select BA00 & Copy & Rename. Give the same 4-digit code as given to acc seq.
    You Can Maintain:
    Languages of Output
    Partners (to whom we want to send output)
    Print Program- print specification
    Sap Script- layout
    Assign Output Types to Partner Functions: go to new entries & assign your output type to partner functions.
    Maintain Output Determination Procedure: V10000 (Standard Procedure). Go to new entries & create your own 6-digit code with descp. Select the procedure & go to Control Data. Here mention the output type i.e. cond type & leave requirement and manual only columns as blank.
    Determination Rule: link the 6-digit procedure code to doc types.
    Create Condition Records: VV11. Select document type and click on Communication. Mention partner function, medium, time. Output device: LP01, Spool request Name: SD_003, Suffix 2: order_confir & flag on print immediately.
    Once you press enter you will come across 2 key combinations:
    Sales organisation/ Customer Number: fill SO, Customer No, Partner Function Abbreviation, Partner to whom the output should be sent, time, medium, language. {It contains: Sales Orgn, Customer, Partner Function (The abbreviated form of the name that identifies the Partner) (During output determination, the system determines the recipient of the output from the master record for the specified partner function. In this field, you can explicitly specify a recipient that will override the standard partner. There must also be a master record for the partner that is specified explicitly.), Medium, Time & Language.}
    Order Type: Document Type, Partner Function (abbreviation), Partner, Medium, Time & Language.
    Hope this would be helpful.
    Regds,
    Rupali

  • Create and Change functionality for Sales order

    Hii All,
                Can any one please suggest me any Standard program or BAPI or IDOC for Sales order, it should cover create as well as change fuctionality of Sales order.
    this is very urgent to me.
    Suitable Answer will be Rewarded.
    Thankyou,
    Shobha.

    For change you can use:
    BAPI_SALESORDER_CHANGE         Sales order: Change Sales Order
    For create you have the following choices:
    BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance
    BAPI_SALESDOCU_CREATEFROMDATA with business object 'BUS2032'
    The difference between the create ones is the functionality you get e.g. create_from_data2 is the 'most powerful' but you also have to provide the most data. It just depends on what you want it to do.
    In terms of IDOCS:
    message type:
    SALESORDER_CREATEFROMDAT201 or
    SALESORDER_CREATEFROMDAT202 or
    ORDERS05
    Hope that helps,
    Michael
    Here is an example we use, you might want to populate additional fields or leave fields out in case you want different data to be transferred to the IDOC - however some fields are mandatory.
    create the order header structure
      ls_header-doc_type   = ls_screen-order_type.
      ls_header-sales_org  = gc_vkorg_aa01.
      ls_header-distr_chan = gc_distr_aa.
      ls_header-division   = gc_divis_aa.
      ls_header-purch_no   = ls_screen-po_num.
      ls_header-po_method  = ls_screen-po_source.
      ls_header-ship_cond  = ls_screen-ship_cond.
    create partner input table (sold to)
      ls_partner-partn_role = gc_role_sold.
      ls_partner-partn_numb = ls_screen-sold_to.
      APPEND ls_partner TO lt_partner.
    create partner input table (ship to)
      ls_partner-partn_role = gc_role_ship.
      ls_partner-partn_numb = ls_screen-ship_to.
      APPEND ls_partner TO lt_partner.
    items are added by looping at a table
        ls_item-material = <fs_upload>-matnr.
        ls_item-req_qty  = <fs_upload>-quantity.
      process the quantity, it needs to be three decimals, because it
      will be moved into a string in the BAPI and divided by 1000 before
      it is moved back into a number field (1.500 => 001500 => 1.5)
        ls_item-req_qty = ls_item-req_qty * 1000.
      truncate remaining decimal places if exist (1.2525 => 1252.5 => 1252 => 1.252)
        ls_item-req_qty = trunc( ls_item-req_qty ).
        price is taken from the file
          ls_item-cond_type = gc_cond_so_upld_price.
          ls_item-cond_val1 = <fs_upload>-price.
        condition one (price) is multiplied by 10 in the BAPI
          ls_item-cond_val1 = ls_item-cond_val1 / 10.
        no discount
          ls_item-cd_type2   = gc_cond_so_upld_disc.
          ls_item-cd_value2  = 0.
        ls_item-item_categ = ls_screen-item_cat.
          APPEND ls_item TO lt_item.
    then BAPI is called
      CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA'
        EXPORTING
          order_header_in           = ls_header
          business_object           = gc_bus_obj
        IMPORTING
          SALESDOCUMENT             = lv_vbeln
          RETURN                    = ls_return
        tables
          order_items_in            = lt_item
          order_partners            = lt_partner.
      IF ls_return-type NE gc_msgty_error AND
         ls_return-type NE gc_msgty_abend.
      No errors where found
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ELSE.
      There was an error or abend
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      ENDIF.

  • Creating Billing Plan data for sales order using BAPI

    Hello,
    Someone ones if there is any way to create a sales order (BAPI) and then create a billing plan (by means of another BAPI)?
    Or is there any way to create both at the same time?
    Kind Regards.

    Hi David and Nisha here is the code for creating sales order with bapi
    *& Report  YOBJ_BAPI_SALESORDER
    *& REPORT : CREATING SALES ORDER USING STANDARD BAPI
    *& AUTHOR : S.PAVAN KUMAR INUMARTHY
    REPORT  YOBJ_BAPI_SALESORDER.
    DATA : ORDER_HEADER_IN LIKE STANDARD TABLE OF BAPISDHD1 WITH HEADER LINE.
    DATA : ORDER_ITEMS_IN LIKE STANDARD TABLE OF BAPISDITM WITH HEADER LINE.
    DATA : ORDER_PARTNERS LIKE STANDARD TABLE OF BAPIPARNR WITH HEADER LINE.
    DATA : RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
    DATA : SALESDOCUMENT LIKE BAPIVBELN-VBELN.
    *APPENDING VALUES FOR HEADER.
    ORDER_HEADER_IN-DOC_TYPE = 'TA'.
    ORDER_HEADER_IN-SALES_ORG = '1000'.
    ORDER_HEADER_IN-DISTR_CHAN = '10'.
    ORDER_HEADER_IN-DIVISION = '00'.
    ORDER_HEADER_IN-SALES_GRP = '130'.
    ORDER_HEADER_IN-SALES_OFF = '1030'.
    APPEND ORDER_HEADER_IN.
    *APPENDING VALUES FOR ITEM
    ORDER_ITEMS_IN-MATERIAL = 'M-13'.
    ORDER_ITEMS_IN-PLANT = '1000'.
    ORDER_ITEMS_IN-SALES_UNIT = 'ST'.
    ORDER_ITEMS_IN-DIVISION = '07'.
    ORDER_ITEMS_IN-GROSS_WGHT = '28000'.
    ORDER_ITEMS_IN-NET_WEIGHT = '28000'.
    ORDER_ITEMS_IN-UNTOF_WGHT = 'KG'.
    ORDER_ITEMS_IN-VOLUME = '0.780'.
    ORDER_ITEMS_IN-VOLUNIT = 'M3'.
    APPEND ORDER_ITEMS_IN.
    *APPENDING VALUES FOR PARTNER
    ORDER_PARTNERS-PARTN_ROLE = 'AG'.
    ORDER_PARTNERS-PARTN_NUMB = '0000001000'.
    ORDER_PARTNERS-COUNTRY = 'DE'.
    ORDER_PARTNERS-TRANSPZONE = 'D000080000'.
    APPEND ORDER_PARTNERS.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
      EXPORTING
    *   SALESDOCUMENTIN               =
        ORDER_HEADER_IN               = ORDER_HEADER_IN
    *   ORDER_HEADER_INX              =
    *   SENDER                        =
    *   BINARY_RELATIONSHIPTYPE       =
    *   INT_NUMBER_ASSIGNMENT         =
    *   BEHAVE_WHEN_ERROR             =
    *   LOGIC_SWITCH                  =
    *   TESTRUN                       =
    *   CONVERT                       = ' '
    IMPORTING
       SALESDOCUMENT                  = SALESDOCUMENT
      TABLES
       RETURN                         = RETURN
       ORDER_ITEMS_IN                 = ORDER_ITEMS_IN
    *   ORDER_ITEMS_INX               =
        ORDER_PARTNERS                = ORDER_PARTNERS
    *   ORDER_SCHEDULES_IN            =
    *   ORDER_SCHEDULES_INX           =
    *   ORDER_CONDITIONS_IN           =
    *   ORDER_CONDITIONS_INX          =
    *   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 SY-SUBRC = 0.
              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *           EXPORTING
    *             WAIT          =
    *           IMPORTING
    *             RETURN        =
               ENDIF.
    WRITE : 'SALES ORDER IS :', SALESDOCUMENT.
    I have tested and go it.
    please go through it

  • Creating Billing Plan data for sales order using BAPI_SALESORDER_CREATEFROM

    Hi All,
    We are using BAPI_SALESORDER_CREATEFROMDAT2 to create the sales order.We are unable to get the fields for billing plan tab in this BAPI.
    Kindly let me know the fileds in BAPI that corresponds to the fileds of billing plan in sales order.
    Thanks in Advance,
    Kiran I.

    Hi kiran
    hi Dhanapal
    i ahve the same problem which u posted..
    My scenarion is to create billing plan while creation of order using the BAPI_SALESORDER_CREATEFROMDAT2 but could not find any structure to pass billing plan details
    pls can u let me know if u found any solution for this if so can u send me detailed mail..
    i want to populate in both way header level and item level (by removing check header plan in the billing plan tab)
    Pls let me know ASAP..
    Thanks
    anil

  • New Message type for Sales orders

    Hi,
    We have the message type is ORDSRP(ORDERS05) and Function module IDOC_OUTPUT_ORDRSP for the sales orders.
    We have lot of custom fields to be added to the IDoc.
    Can any one suggst if it is better extending the current message of create a new one.
    Thanks.
    Rohita.

    Hi Rohita,
    Instead of changing the standard domain, You have to make the changes in the User Exit.
    Say Qualifier 001,002,003 were already there in the domain.
    001--Purchase Date
    002--Delivery Date
    003--Ordered Date
    In the user exit u have to just add the segment and the qualifier without making any changes to the Standard Domain.
    These Qualifiers are just like other variables and u can add whatever values to them that u want..
    You can add Qualifier 004 for Trnasportation Date or Goods issue date and have to communicate the MiddleWare informing that date with this Qualifier will be Transportation Date and they will do the mapping to the corresponding field in other syste.
    You can have as many message types as u want for the same IDoc type. There is no harm in having multiple message type. And u dont need to change the standard domain. It can be done without changing the domain.
    If u analyse the FM closely u will realise that they have done coding for those values in the domain.
    So instead of adding it to domain u just have to do the coding for this new qualifier.
    Revert back if u need any help on it.
    Thanks...
    Message was edited by:
            Utsah Garg

  • Creating GetList Bapi Wrapper for Sales Order

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

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

  • Function Module to create AFS Outbound delivery for sales order

    Guys,
    I am looking for a function module to create deliveries for a sales order IN IS-AFS.
    I cannot make BAPI_DELIVERYPROCESSING_EXEC work. Also, if I use the IDOC type /AFS/DELVRY03 via message type WHSCON and function module IDOC_INPUT_DELVRY it doesn' work either.
    Does anyone know which function module I could use? I need to select specific AFS schedule lines though, but at this point I am not able to make any work.
    Thanks
    Leonardo

    This will not help .
    Edited by: Amit Khare on Aug 7, 2008 3:49 AM

  • Multiple PR doc type for Maintenance order - Non stock item category

    For non-stock item requirement in PM, we create a maintenance order and indicate item category as "N" in components tab. Accordingly a purchase requisition is created as per configuration. We have assigned PR doc. Type “FO – Framework requisition” for Maintenance Order Category.
    SPRO - PLANT MAINTENANCE & CS - Maintenance and Service Processing - Maintenance and Service Orders - General Data - Define Account Assignment Cat. and Document Type for Purchase Requisitions
    Now according to the new requirement, we need to have different PR Doc type as per CONTROL KEY mentioned in the Maintenance Order.
    Example:
    If the Control Key is “PM01 - Plant maintenance – internal” the purchase requisition document type should be “NB – Purchase Requisition”. If the Control Key is “PM03 - Plant maintenance-External(services)” the purchase requisition document type should be “FO – Framework Requisition”.
    Please advise how to configure the same.
    Regards
    Sathish Kumar Balakrishnan

    Hi Partha,
    This is a simple enhancement. In our scenario, we had configured PR document type "FO" in SPRO settings for "Document Type for Purchase Requisitions".
    Hence to have "NB" PR document type whenever material components are being indented through maintenance order, we used this enhancement COZF0002
    Please instruct your abaper to add similar logic, as shown below.
    Enhancement:COZF0002
    Functional module:EXIT_SAPLCOZF_002
    Include: ZXCOZU02
    Logic:
    IF sy-tcode eq 'IW21' or sy-tcode eq 'IW22' OR sy-tcode eq 'IW28'  OR sy-tcode eq 'IW31' or sy-tcode eq 'IW32'  OR sy-tcode eq 'IW38' .
      IF resbd_imp-postp = 'N'.
        eban_ord_cust_chg-bsart = 'NB'.
      ENDIF.
    endif.
    Hope this helps.
    Regards
    Sathish K B

  • Problem in using output type for purchase order

    Hi experts,
         I am using output type for first time so may be i have done wrong configuration for po output type.The steps i have done are :-
    1) Going to  tcode NACE->Selected  the row u201CEF Purchase Orderu201D and clicked on u201CProcedures".
    2) In procedures there are 2 procedures for the application EF (Purchase Order). To proceed further, we would need to find out the procedure that is currently active.Gone to transaction SPRO. In this, navigate as Materials management -> Purchasing ->Messages -> Output control -> Message Determination Schemas ->Define Message Schema for Purchase Order
    3) Clicking on u201CAssign Schema to Purchase Orderu201D. So, the procedure RMBEF1 is active for EF (Purchase Order) . 
    4) Go back to transaction NACE. Select u2018EFu2019 and click on u201COutput typesu201D.
    5)  Let us use the output type u201CNEU name purchase orderu201D for this purpose. Double-click on NEU.
    6) Ensured  that the checkboxes u201CAccess to conditionsu201D and u201Cmultiple issuingu201D are checked and the access sequence is 0001(DocType/PurchOrg/Vendor).Only 0001 and 0002 is available in f4 help for this.
    7) Now clicked on u201CProcessing Routinesu201D on the left hand side. Ensured that there is an entry for Medium u2018Au2019 (Distribution ALE).
    8) After that going back to the main screen of NACE. Select EF (Purchase Order) and clicked on u201CCondition Recordsu201D.
    Select NEU and clicked on u201CCondition recordsu201D. The pop-up box appears that gives three radio button option :-
      1) Purchasing output determination :purchasing org / vendor for EDI
      2) Purchasing output determination :doc. type / purchasing org /vendor
      3) Purchasing output determination :document type
          but it is not having option only for purchasing organisation through which we can send idoc for changes or creation of PO in that particular pur.org now if i choose 2) i have to give doc type and purchasing org both bcoz they are mandatory fields and value for vendor.
    9)  Also i  have done the necessary ALE configuration (not covered in this document). In the partner profiles, use the message type u201CORDERSu201D and the IDOC type u201CORDERS05u201D.In the tab u201CMessage Controlu201D, used the process codes u201CME10u201D and u201CME11u201D for u201CPO Createu201D and u201CPO Changeu201D respectively.
    but the idoc is not generated many times when po is changed and when once it is generated it is giving error
    Please suggest solution.
    Thanks in advance
    nehavt

    In me22n in messages tab after looking into  processing log it is giving->No recipient found for message type ORDCHG in the
    ALE model ,next time giving error as no idoc items belonging to purchasing document found,when i changed message type to ORDCHG the  status is green in messages tab it is giving-> error occured while idoc xyz is sent and in WE02 status is red 02
    error passing data to port(could not find code page for receiving system)

  • OUTPUT TYPES FOR SALE ORDER(VA01)

    Hi All,
    When i create a sale order, the data can be downloaded thru output type BA00 & standard program RSNASTED into SAPScript, but i wanted to download it to internal table. Can u please tell me the changes to be made after copying the standard program into Z... Program.

    Hello Rafi,
    Better U debug the report. Since the data will be in the internal table, if it is downloaded to the Script. So u no need to copy and make the changes.
    Vasanth

Maybe you are looking for

  • Large file processing in XI 3.0

    Hi, We are trying to process a large file of ~280 MB file size and we are getting timeout errors. I followed all the required tunings for memory and heap sizes and still the problem exists. I want to know if installation of decentral adapter engine f

  • Adding a Custom Component to Check-In Operation

    Hi everyone, Our technical knowledge is very basic in UCM and ECM. We are trying to add a JSP component which must have some interaction with the user just before a Check-in operation which should be consumed in the client's web browser. Can anyone p

  • COPA - upload R/3 hierarchy to the BW

    Hi, We have created user hierarchy in R/3 COPA (T-code KES3) for user characteristic WW002 (Country Ship to party). On the BW side there is a char. 0COUNTRY. I created DataSource in tr. KEB1 for WW002 and 0COUNTRY. The problem is that the hierarchy o

  • New Archlinux wallpaper

    I've made this wallpaper yesterday: http://wastedstudios.dyndns.ws/~mos/numerki2.png 1440x900 edit:  please use a thumbnail - Allan Last edited by Allan (2010-05-16 10:15:19)

  • About  "Append mode" of cs6, cc & cc2014 project file in order to insert xml sequence which is sent from 3rd-party tool

    let me ask you all something about  "Append mode" of cs6, cc & cc2014 project file in order to insert multiple xml sequence  which is sent from 3rd-party tool  into specific project file . Finalcut pro 7 & x  was supported this , but i am not sure wi