Problem with Creation of CRM Order via Function Module Test

I am trying to check the order creation process from external systems by using the test function in Tcode SE37 with Function Module BAPI_BUSPROCESSND_CREATEMULTI.
I have created a Test Sequence of the following FMs:
BAPI_BUSPROCESSND_PROCSETTINGS
BAPI_BUSPROCESSND_CREATEMULTI
BAPI_PROCESS_SAVE
BAPI_TRANSACTION_COMMIT
All that I have been able to create so far is an order header without a Sold-to or Ship-to and no items. I am able to populate the Organization data, Header text and Appointments. The only partner function that is being populated is the one that is being automatically picked up from my user master.
For the BAPI_BUSPROCESSND_CREATEMULTI I am populating the following tables:
HEADER          1 entry
ITEM               2 entries
PARTNER          2 entries
ORGANISATION     1 entry
APPOINTMENT          2 entries
INPUT_FIELDS          41 entries     
SCHEDULELINE     2 entries
I have created the entries based upon information gained through debugging function module CRM_ORDER_MAINTAIN during the creation of a service order.
It would be interesting to know if anybody has successfully created an order via the SE37 test function and if so, it would be useful to see the data in the relevant tables.

HEllo ,
Write a wrapper to the function module CRM_ORDER_MAINTAIN.
To populate the Text use below code
  ls_input_field_names-fieldname  = 'REF_GUID'.
  INSERT ls_input_field_names INTO TABLE lt_input_field_names.
  ls_input_field_names-fieldname  = 'REF_KIND'.
  INSERT ls_input_field_names INTO TABLE lt_input_field_names.
  ls_input_field_names-fieldname  = 'TDID'.
  INSERT ls_input_field_names INTO TABLE lt_input_field_names.
  ls_input_field_names-fieldname  = 'TDSPRAS'.
  INSERT ls_input_field_names INTO TABLE lt_input_field_names.
  ls_input_field_names-fieldname  = 'TDSTYLE'.
  INSERT ls_input_field_names INTO TABLE lt_input_field_names.
  ls_input_field_names-fieldname  = 'TDFORM'.
  INSERT ls_input_field_names INTO TABLE lt_input_field_names.
  ls_input_field_names-fieldname  = 'LINES'.
  INSERT ls_input_field_names INTO TABLE lt_input_field_names.
  ls_input_field_names-fieldname  = 'MODE'.
  INSERT ls_input_field_names INTO TABLE lt_input_field_names.
  CLEAR ls_input_fields.
  ls_input_fields-ref_guid    = attr_guid.
  ls_input_fields-ref_kind    = 'A'.
  ls_input_fields-objectname  = 'TEXTS'.
  CONCATENATE 'CRM_ORDERH' order_guid INTO ls_input_fields-logical_key.
  ls_input_fields-field_names = lt_input_field_names.
  INSERT ls_input_fields INTO TABLE attr_t_inputfields.
Call Order maintain FM to create any order
  CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    EXPORTING
      it_text               = lp_order->attr_t_text
      it_partner          = lp_order->attr_t_partner
    IMPORTING
      et_exception     = et_exception
    CHANGING
      ct_orderadm_h     = lp_order->attr_t_orderadm_h
      ct_input_fields      = lp_order->attr_t_inputfields
    EXCEPTIONS
      error_occurred    = 1
      document_locked   = 2
      no_change_allowed = 3
      no_authority      = 4
      OTHERS            = 5.
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
Regards
Satish

Similar Messages

  • Problem with calling a report from a function module. Please help! URGENT!

    Hi Experts,
       I have a scenarion like this:
      XI -
    > Function Module -
    > ABAP Report
      From XI I am callingf a function module in another R/3 system. This function module inturn calls a ABAP report using SUBMIT statement. The function module and the report reside in the same R/3 system.
      I am calling the report like this:
    SUBMIT yseg_save_bp_data WITH SELECTION-TABLE rspar
                                 AND RETURN.
    The problem is when I run the function module directly in the R/3 system then it calls the report without any problem.
    On the other hand, when I call the function module from XI then the report is not called. On debug mode I found that the program exits just at the Submit statement. Why is this strange problem?
    What mistake am I doing? Is there any limitations or restrictions with SUBMIT statement.
    What is the correct way of using submit statement in this scenario?
    Kindly help me!
    Thanks
    Gopal

    Hi Rao,
       I have created the FM as remote RFC. Infact XI is able to call the FM. Only problem is when it reaches the point where the report is called via SUBMIT it exits.
    Help me please!
    Thanks
    Gopal

  • Problem with creation of Sales Order with reference to Contract

    Hi,
    I have a problem when creating Sales order with reference to Contract , shipping condition was not copied. Is there any existing copy routines suitable to accomodate this?
    Thanks!

    your functional team can help you in finding one.

  • Problem with creation of purchase order with new implementation.

    Hi Guru's of SAP MM,
    i got this error when i implemented a new company with all co-code, plant and storage location.
    i craeted the PO. even though i have assigned sloc to plant and plant to co-code. and co-code to purchasing org. it is telling in PO that,  the purchasing organisation not assigned to the plant.
    i checked regarding the org- structure with Enterprise Structure.

    Hi,
    As per your posting it is clear that you are maintaining purchase organization at company code level. which means the same purchase organization can cater the needs of all plants which are under that company code, provided if the purchase organization is assigned to the plants which are under the company code.
    bye
    sridhar thota`

  • Create transfer order via Function Module

    Dear SAP guru,
    I have the following requirement that the transfer requirements will be created for replenishment into dedicated storage bins from another storage types.
    To do this, I use a user exit to calculate what is my replenishment quantity required for all the dedicated bins of this particular material.
    Once, the TR is created.  TO should be generated next. And, that is the problem that I faced here.  The quantity to replenish to each of the dedicated storage bin could be different, depends on the quantity in the storage bin at that time.
    For example, I have 3 dedicated bins for one material as follows:
    A-01             100 pc
    A-02               50 pc
    A-03               50 pc
    Assume that the maximum quantity per bin is 300pc, and once I run the replenishment program earlier, I will have a TR created with 700 pc.
    Now, what I want during the TO creation, is to search the dedicated bin and also determine the required quantity for each of the bin.  In this case, my TO will have 3 items, i.e.
    A-01             200pc
    A-02             250pc
    A-03             250pc
    Is there any way to do it?
    Please advise.
    Thanks.
    Tom

    Hi Tom,
    You can use the Transation SMOD find the possible SAP enhancements. All extensions in the the WM-Umfled can select you, if you enter MWMTO* and die F4-help press. You then get a list of extensions which are possible. Hope this helps.

  • Create Return Order via Fucntional module

    Hi all,
    I am trying to create a return order with refernce to invoice via fucntional module SD_SALESDOCUMENT_CREATE
    In SALES_HEADER_IN, I am giving REF_DOC - Invoice number, REFDOC_CAT - M
    In SALES_HEADER_INX , I am putting X mark for the above fields
    I am Passing necessary details with material.I see the return order is created succesfully, but the invoice number is not updated in Accounting tab - Reference fields - Header.
    Please anyone help me if the values what I have passed is correct or not to create the return order via Functional module
    regard
    Mano

    Hi Mano,
    Could you please upload screenshot of the field you are referring to
    thanks
    santosh

  • Adding a new conditon on head via function modul?

    Hi,
    is there a way to add a condition to an order via function module? I mean in customizing we have maintained the calc scheme (and everything else) and assign it to the order. What we want is to add the new condition type to the head of the order via function module. The scenario is as follows:
    We create an order and have on the header a field for a value. If you type a value in the field and press enter the condition should be created and calculatetd. The result is given in the condition tab of the order on header level.
    We try to not do a modifictaion. therefore i am looking for a function module. Is there someone who could help?
      thanks and regards,
           Ming

    Why can't this be done by the pricing configuration?
    There are also pricing user exits available, which are not modifications and exist for this purpose exactly (i.e. when for some reason configuration alone is not enough). See the list here:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erplo/sdUserexits

  • Problems with pricing in Internet Order screen(CRM E-Commerce 5.0)

    Good afternoon !
            We are using CRM 5.0 with CRM E-Commerce 5.0, and we are experiencing problems with pricing in the order screen.
            When we create an order and insert one item at this order, this item is processed and the price is calculated and shown correctly, both in the item and in the table of totals at the right corner(where is the Total Net Price, freight value, etc).
            If we change the quantity of this item, or insert more one item(with the same or other product), the price turns to zero, both in the item(s) and in the table of totals mentioned above. Also, in the table of totals, the freight value remains being calculated, even in this cases when the prices is turned to zero.
            What can be happening in this case ? What can I check to determine the cause and solve this problem ?
            Thank you in advance !
            Wilson

    Good afternoon !
            This problem was solved adjusting some parameters of partner determination.

  • Problems with creation of catalogue XPGrpwise and temporary

    Problems with creation of catalogue XPGrpwise and temporary files.
    I use GroupWise 8.01 and WinXP (SP2), OpenOffice 3.1.
    Why at opening files in Library, temporary files are not created in catalogue C:\Documents and Settings\Jon Smith\Local Settings\Temp\XPGrpwise, and created in catalogue C:\Documents and Settings\Jon Smith\My Documents. That causes problems. How to change a situation that worked as it is necessary.
    Catalogue XPGrpWise is created and leaves duly in catalogue C:\Documents and Settings\Jon Smith\Local Settings\Temp\.

    Cvetaev,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Problem with Creation of TemSe file...

    HI Experts...
    Here im facing the problem with creation of # 3 rd Quarters
    Temse file.when ever i use the tcode pc00_m40_f24 and entering the details of quater 3 ...here im showing up the ABAP Runtime error."""Overflow for arthimitic operation Type P in program  HINCF240"".
    What could be done to overcome the problem.Please advice.
    Regards,
    V Sai.

    Hi experts/Sriram...
    Thanks for the reply.
    The -
    >showing the line....
            QS80_TAB-DEDMT=QS80_TAB-DEDMT+S80-DEDMT
    Where should we change to get rid of this runtime error.
    Here in my quality everthing is fine and we have uploaded patches in quality upto recent one sp80.But in prod. the patchlevel is sp71.Will it be the reason.
    Please advice me on this as i have to complete the issue of F16.
    Thanks and Regards,
    V Sai.

  • There is any Performance problem with Creation of many Y or Z  Programs.

    HI,
    There is any Performance problem with Creation of many Y or Z  Programs. plz give clarity regarding this to me......
    regards
    ganesh

    Ganesh,
    Can you please mention the context and the purpose of creating these custom program.  And application are you referring to?
    Regards,
    Rohit

  • Problem with creation of jar with external libraries

    hi guys, I've no problem with creation of jar,i use this command:
    jar -mcf MANIFEST.MF NameFile.jar *.class
    my file manifest is this:
    Manifest-Version: 1.0
    Created-By: Me
    Main-Class: NameFile
    Now,I've to make a jar file,but i have to use some external libraries in jar format.
    I've read on sun tutorial and i've added to manifest this line:
    Class-Path: dt.jar formshelp.jar formsrt.jar jh.jar looks-1.3.1.jar substance.jar TableLayout.jar
    But the jar file doesn't work, neither with a double click nor with console...
    Someone can help me?Thanks!:)

    Darkweb wrote:
    sorry but,the external libraries that i use are in .jar,what i've to do to include these libraries in my jar?One of 3 things
    1) Take them out of the jar, and put them in a folder, preferably a folder in the same folder as the jar
    2) Write a custom classloader to load classes from nested jars
    3) Extract the contents of all the dependency jars, and jar them all up with your own code
    The first is almost always the most preferable, the second one is doable but brittle and resistent to updating dependencies ( you have to release everything for any changes you need, even if it's not a change in your own code ) and the third one is tedious and suffers from the same robustness problems of the second, not to mention that a lot of software licences prohibit you from actually doing it. Do the first one, it's by far the most common and easiest to maintain. I really wouldn't advise the third option, ever, though. Any activity that reduces the modularity of your application is ill-advised

  • Error in Extraction with Generic Datasource via Function Module

    Dear Gurus,
    Iam working for BI-HR module.We are extracting data with generic data source via function module. The client some more extra fields in already existing DS. So we made a copy of that Function module and tried to create new generic DS, we got error while extraction like "Error occured during the extraction process". Can you please help in resolving this issue, your valuable suggestion would be highly appreciated.
    Thanks and regards
    Arun S

    Hi,
    Which structure are you using??
    Are you using the same old structure for this function module as well.
    Have you enhanced the structure with new required fields.
    New extrac fields needs to be added to existing structure if you are using the same or create a new one and make sure that you have all the fields in the structure which you are going to use in the data source.
    You need to take care for the append as well and the issue could be in the code as well.
    Make sure you have written the proper code and just for the new fields done an append
    Thanks
    Ajeet

  • Problem with "new page as a copy" function in 4.2

    Hi all,
    I found several problems with version 4.2 in the functionality of "new page as a copy".
    In particular, copying a page from another application, you lose the references to the template (eg template region, button ...) and these are replaced by a numeric code (eg 426589173 ... instead of "Region without Buttons and Titles") and, worst of all, the reference is lost to the buttons on the process conditions and branches.
    Has anyone encountered the same problem? I never had any problems with version 4.1.1
    Thanks
    Stefano
    Edited by: Stefano_i0600006 on 18-ott-2012 7.52
    Edited by: Stefano_i0600006 on 18-ott-2012 7.52

    Hi Stefano,
    Thank you for bringing this issue to our attention. I've logged bug *14786585* to track this issue. We'll endeavour to identify a resolution as soon as possible.
    Regards,
    Hilary

  • How to create Billing Plan in sales order using Function module /BAPI

    hi,
    How to create Billing Plan in sales order using Function module /BAPI
    i hv check few FM such
    BILLING_SCHEDULE_READ
    BILLING_SCHEDULE_GET_NUMBER
    BILLING_SCHEDULE_SAVE
    But unable to create billing plan for a sales order.....any other method to create???

    Hi,
    Use this link.
    Create sales order with billing plan via LSMW and BAPI BUS2032
    BAPI or Function to update Billing Plan in Sales Order Items
    Hope this will help you.
    Regards,
    Vijay

Maybe you are looking for

  • Showing the same page after savin

    hi!!! i m creating website ...i m using ajax.When the page loads..there are 2 combo box one for state and other for city.on select of state city will get populated and on select of city my age will dynamically generate textbox along with combo box.Th

  • How to get suppliers & their bank details in R12

    Hi ALL , Please will someone guide me how to get the suppliers with their respective bank details in R12 (with putting in consederation that i need all suppliers whther they r having bank details or not ) Thanks Alot

  • SOAP to IDOC needs Response

    Hi Team, We had a scenario SOAP to IDoc using some XSLT MAppings. We configured teh scenario, but where as client needs response, since IDOC does not have response, client needs the response from PI to the same SOAP Application as response. for this

  • Trying to reset my itunes password

    My son forgot his password...trying to have it reset but the email authenitcation never goes out

  • Safari Crashing in Snow Leopard

    Safari is continuously crashing in 10.6.8.  Crash report below.  I looked at some of the older support threads but cannot locate the 32-bit option and i just did a fresh install of Safari with hopes that the crashing would stop (which it has not).  A