'BAPI_QUOTATION_CREATEFROMDATA2'  behaves different while called from SE38

Dear Friends
I am trying to run the bapi 'BAPI_QUOTATION_CREATEFROMDATA2' and 'BAPI_TRANSACTION_COMMIT' in proper sequence as recommended by SAP.
I am entering the minimum data recommended by SAP help on this BAPI.
When I run the above senario manually from transaction SE37 and selecting
from the menu  Function Module -> Test -> Test Sequence,
everything works fine and this also creates a quote and when I check, it
is adding lots of extra related data.
However, when I call the same two functions from another program (SE38),
even though I am entering the same Data, I get different behaviour and
also the quote is not getting created. When I check the ls_return value,
it says that 'sold-to-party' is missing.  I don't know why this problem
doesn't arise when I run the BAPI manually from SE37.
I would appreciate if you can please give me any feedback or some expert comments.
Please see the SE38 program that I am using to test these two BAPIs.
==========================================================
*& Report  ZQUOTECREATE_TEST
report  zquotecreate_test.
data: ls_quotation_header_in        type  bapisdhd1,
      ls_behave_when_error          type  bapiflag-bapiflag,
      ls_quotation_partners         like  bapiparnr occurs 1 with header line,
      ls_return                     like  bapiret2  occurs 1 with header line.
ls_quotation_header_in-distr_chan = '12'.
ls_quotation_header_in-division = '00'.
ls_quotation_header_in-sales_org = '1000'.
ls_quotation_header_in-doc_type = 'AG'.
ls_behave_when_error              = 'P'.
ls_quotation_partners-partn_role = 'SP'.
ls_quotation_partners-partn_numb = '1012'.
call function 'BAPI_QUOTATION_CREATEFROMDATA2'
  exporting
    quotation_header_in            = ls_quotation_header_in
    BEHAVE_WHEN_ERROR              = ls_BEHAVE_WHEN_ERROR
importing
  salesdocument                  =  ls_salesdocument
  tables
    return                         = ls_return
    quotation_partners             = ls_quotation_partners
call function 'BAPI_TRANSACTION_COMMIT'
exporting
   wait          = ' '
IMPORTING
  RETURN        =

Dear friends
I figured out the conversion problem involving 'QT' and 'AG'.
There is this flag 'CONVERT' which doesn't affect while running manually but while calling from SE38, I have to turn it on by putting a value 'X" and so the AG-QT issue is resolved
So if you can please respond to the other problem with error 'Please enter sold-to-party or ship-to-party', I would appreciate.
Again with the same test data, the above error message doesn't show up while running the BAPI manually from SE37 and QUOTE gets created successfully. However, when the same BAPI is called from SE38 program I get the above error message and QUOTE doesnt get created.

Similar Messages

  • Authentication Issues while calling from OSB to REST

    I am routing from a proxy Service in OSB to a REST ful Web Services.I need to apply security settings while calling REST ful services so i created groups which has users who can only call the Web Services.I did all the security settings in the weblogic Server console.
    The authentication works fine but the problem is that when i doesnot give any username or password it should give me a "Authentication required" error.But instead it calls the web services .I need not want that to happen.
    Anyone pls help me in this issue

    My proxy service uses a http protocol and gets the query string and routes it to the business service which is a REST ful based web services.My need is to apply security settings betwwen business service and service component(REST ful based web services).
    I created the security settings in weblogic server console using the following steps
    1.I created an user in the user and groups option in the security realm tab with Default Authenticator as provider selected
    2.I created a Stand-Alone Web Application Scoped Role in the application scope in the security tab with XACML RoleMapper as the provider selected in the war(REST ful web services) file deployed in the console.
    3.I added the user created in the security realm tab in this Stand-Alone Web Application Scoped Role created.
    I then tested the business service(which connects to the REST ful web service component) with username and password in the transport option in testing console as the one created in the server console.
    The business service gives the response only when the username and password matches to the one created or when username/password is weblogic/welcome1(this is the username and password given while creating the OSB domain).
    It should throw me an Authentication failed error when the username is wrong and that works except for the condition that the username and password is empty.
    How to make the service to throw an error when the username and password is empty like the same as when the username is mismatched.
    Help me out in this issue.

  • Executable behaving different when called f/Java

    I have an executable that is run from the command line which behaves differently when I run it from my application. The executable takes MP3s files as arguments and merges them together. When I use large files from within my app, it doesn't respond, but using the same files from the command line works fine. I was thinking it might be a memory thing, but the executable should get its own space seperate from the VM. Does anyone have any suggestions? Thanks!

    I do not have the source for the executable, so I wouldn't be able to pull lines out of there. It works from my Java app when I pass in smaller files, so I know I have the syntax correct, but with larger files it hangs. When I run the same thing from the command line with the larger files it runs like a champ. I was trying to use my task manager (I'm on Win NT) to look at memory usage since the only variable seems to be file size, but nothing seems to indicate it is a memory issue.

  • Giving report format option to user while calling from Menu?

    Dear Gurus....How can we give our user the choice to choose the report format while it is being called from a drop-down menu (mmb file)? Plzzz be careful that giving the Desformat parameter on report parameter form is not a good option here. I'm looking someway to pass this optional parameter from the calling form or menu.

    Dear Magoo...I meant that I've a program unit (procedure) which takes all the required information to run a report (including report file name, parameters if necessary, destination, server name etc and report desformat). Initially I was giving the user a Poplist on entry forms to choose the report desformat and then passed it to the procedure to call a report. Now I've attached the reports on menu (mmb file) and attached that procedure to menu calling the report. but when I'm placing the poplist on the form to which menu is attached, then procedure gives the error of bad bind variable/expression due to that poplist. Is there anything wrong from my side? Got my words magoo?

  • Report does not show the main section while calling from forms 6i

    Hi
    I am running report from report from forms 6i but is does not show the data in main section, where as the data in the header section is ok.
    But when i run the same report independantly from report builder it show the both header and main section with relevent data.
    pl solve the matter
    thanks in advance

    can you tell me more about this, you might check if you are using different users when you call this report or if the user has all privileges to see all tables in this report

  • How to add the parameters onto the reports while calling from forms

    Hi all,
    I am using oracle forms 10g. I want to call a report from the form.
    But i dont know how to add parameters to the url while using
    web.show_document();
    i have a sample code. But it does not add the forms values onto the url.
    DECLARE
    v_host varchar2(100);
    v_port varchar2(10);
    v_parameter_string varchar2(4000);
    v_username varchar2(50);
    v_password varchar2(50);
    v_database varchar2(50);
    BEGIN
    -- Get the full domain name of the server from the formsweb.cfg
    tool_env.getvar('SERVER_URL',v_host);
    -- Get the username/password and database from the .env file
    tool_env.getvar('APPLICATION_USERNAME',v_username);
    tool_env.getvar('APPLICATION_PASSWORD',v_password);
    tool_env.getvar('APPLICATION_DATABASE',v_database);
    -- If it is localhost then we are running on windows and need to use the windows port, otherwise we
    -- are on AIX and need to use the AIX port
    IF v_host = 'localhost' THEN
         v_port := '8889';
    ELSE
         v_port := '7778';
    END IF;
    -- Now build the parameter string for running the report      
    v_parameter_string := 'server=rep_fsprod';
    v_parameter_string := v_parameter_string||'&report=AAP_TOTAL_CONTRACT_VALUE_RPT.rdf';
    v_parameter_string := v_parameter_string||'&userid='||v_username||'/'||v_password||'@'||v_database;
    v_parameter_string := v_parameter_string||'&execution_mode=batch';
    v_parameter_string := v_parameter_string||'&comm_mode=synchronous';
    v_parameter_string := v_parameter_string||'&destype=cache';
    v_parameter_string := v_parameter_string||'&desformat=pdf';
    -- Now run the report
    web.show_document('http://'||v_host||':'||v_port||'/reports/rwservlet?'||v_parameter_string,'_blank');
    END;
    Are we able to add the text values in the form from to the URL.
    Please let me know....
    thanks in advance....
    Naveen

    hello
    read the following white paper http://www.oracle.com/technology/products/forms/pdf/10g/frm10gsrw10g.pdf
    cheers
    Q

  • Issue in webdynpro application while calling from UWL

    Hi All,
    I am working on APPRAISAL workflow in HCM module.
    In new version of SAP has provided ABAP web dynpro application HAP_MAIN_DOCUMENT (component HAP_MAIN_DOCUMENT)
    but it is not integrated with workflow. Earlier insted of this application there was a BSP application and this was integrated with workflow.
    Now to integrate ABAP webdynpro application with workflow I have created new web dynpro application and calling HAP_MAIN DOCUMENT application and when I test through SE80 transaction then I am just passing Work Item ID and it is opening HAP_MAIN DOCUMENT application. I have done it as follows.
    In swfvisu I am passing Work Item ID and In application I am getting business object details using this I am createing a URL and then using exit plug I am calling HAP_MAIN_DOCUMENT application
    *METHOD exit1 .*
    * DATA lo_nd_new_url TYPE REF TO if_wd_context_node.
      **DATA lo_el_new_url TYPE REF TO if_wd_context_element.**
      **DATA ls_new_url TYPE wd_this->element_new_url.**
      **DATA lv_url TYPE wd_this->element_new_url-url.**
      **DATA: l_cmp_api TYPE REF TO if_wd_component,**
            **result TYPE REF TO if_wd_window,**
            **l_window1 TYPE REF TO if_wd_window_manager.**
    ***     navigate from <CONTEXT> to <NEW_URL> via lead selection**
      **lo_nd_new_url = wd_context->get_child_node( name = wd_this->wdctx_new_url ).**
    ***     @TODO handle non existant child**
    ***     IF lo_nd_new_url IS INITIAL.**
    ***     ENDIF.**
    ***     get element via lead selection**
      **lo_el_new_url = lo_nd_new_url->get_element( ).**
    ***     @TODO handle not set lead selection**
      **IF lo_el_new_url IS INITIAL.**
      **ENDIF.**
    ***     get single attribute**
      **lo_el_new_url->get_attribute(**
        **EXPORTING**
          **name =  `URL`**
        **IMPORTING**
          **value = lv_url ).**
      **wd_this->fire_exit_plg( url = lv_url ). "abap_true**
    ***  l_cmp_api = wd_this->wd_get_api( ).**
    ***  l_window1 = l_cmp_api->get_window_manager( ).**
    ***  result = l_window1->create_external_window(**
    ***url = lv_url ).**
    ***  result->open( ).**
    **ENDMETHOD.**
    In SE80 it is opening application perfectly in same session of new Z webdynpro application.
    But when I click on UWL workitem it is not opening.
    In dubugging I checked that workitem ID is passed correctly also URL is created correctly for HAP_MAINDOCUMENT but it is not opening.
    Please let me know is there any setting in UWL config.
    Edited by: Akshay Kale on Nov 17, 2009 11:51 AM
    Edited by: Akshay Kale on Nov 23, 2009 10:07 AM

    Hi akshay,
       Check the following links ,
    Workitems, UWL and Web Dynpro for ABAP
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20f4843e-314f-2a10-2a88-8c4afa20dda6
    another that talks about swfvisu
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a002d1eb-33f0-2b10-f391-e1e0c3057c17&overridelayout=true
    hope this helps.
    Thanks,
    Sahiba

  • RFC call having problem while calling from webdynpro

    Hi ,
    I am facing a strange problem .In my webdynpro i have a RFC function module . the structure is like this.
    Loop.
    <GET current system>.
    TRY.
    call <RFC FUNCTION MODULE> DESTInation <own system> .
    ENDTRY.
    ENDLoop
    With in the Function module we have created  a BDC seesion.
    Here the loop is running for 10 times .for the first time it is the rfc call is perfect and a session is created in sm35.
    For the second loop run the system is going to hang.and when i checked sm35 the next day 1 session is created (for the second loop)
    Like this the session are created in different days .And the session created times are like00:00:04,00:00:08 etc.
    I have checked if any hold time is there for the session but there is noting like this .
    And i digged more and checked in SM50 there the call is running in background and it is connected some other system though i have given the target system as own system.
    please advice me about this and how to find the root cause for this.
    thanks

    Thanks for your reponse .
    Here the problem is it has already been developed now the Bug is the function call is still running and the sessions created as
    below
    17.06.2010     00:00:30     SAPMSSY1
    17.06.2010     00:00:28     SAPMSSY1
    16.06.2010     00:00:36     SAPMSSY1
    15.06.2010     01:21:46     SAPMSSY1
    15.06.2010     00:59:33     SAPMSSY1
    15.06.2010     00:01:06     SAPMSSY1
    Now teh problem is why the sessions are not created at the same time i executed it.ie,on 11:06:2010.
    so,please let me know why is call is taking that much long time .(it is very rare for RFC call for such a long time ).

  • How to set Command Timeout in Crystal report while calling from C# code

    I am using Crystal report XI R2.  I am calling SQL server 2005 stored procedure as source in the report. I want the report should timeout from the website if the stored procedure doesn't return resultset after 5 minute. Could you please assist how should I chnage the below code to achieve that.
    Code :
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using CrystalDecisions.CrystalReports.Design;
    using CrystalDecisions.Shared;
    using CrystalDecisions.Web;
    using CrystalDecisions.CrystalReports.Engine;
    namespace CrystalTest
        public partial class _Default : System.Web.UI.Page
            protected ReportDocument rd;
            protected CrystalReportViewer Crv;
            protected void Page_Load(object sender, EventArgs e)
                rd = new ReportDocument();
                rd.Load(Request.MapPath("FXRate.rpt"));
                SetDBLogonForReport(GetCrvConnectionInfo(), rd);
                ParameterFields crtParamFields;
                ParameterDiscreteValue crtParamDiscreteValue1;
                ParameterField crtParamField1;
                ParameterDiscreteValue crtParamDiscreteValue2;
                ParameterField crtParamField2;
                ParameterDiscreteValue crtParamDiscreteValue3;
                ParameterField crtParamField3;
                ParameterDiscreteValue crtParamDiscreteValue4;
                ParameterField crtParamField4;
                ParameterDiscreteValue crtParamDiscreteValue5;
                ParameterField crtParamField5;
                ParameterDiscreteValue crtParamDiscreteValue6;
                ParameterField crtParamField6;
                crtParamFields = new ParameterFields();
                crtParamDiscreteValue1 = new ParameterDiscreteValue();
                crtParamField1 = new ParameterField();
                crtParamDiscreteValue1.Value = "USD";
                crtParamField1.ParameterFieldName = "@BaseCurrCode";
                crtParamField1.CurrentValues.Add(crtParamDiscreteValue1);
                crtParamFields.Add(crtParamField1);
                crtParamDiscreteValue2 = new ParameterDiscreteValue();
                crtParamField2 = new ParameterField();
                crtParamDiscreteValue2.Value = "EUR";
                crtParamField2.ParameterFieldName = "@CounterCurrCode";
                crtParamField2.CurrentValues.Add(crtParamDiscreteValue2);
                crtParamFields.Add(crtParamField2);
                crtParamDiscreteValue3 = new ParameterDiscreteValue();
                crtParamField3 = new ParameterField();
                crtParamDiscreteValue3.Value = "2008-05-28 00:00:00";
                crtParamField3.ParameterFieldName = "@FromDate";
                crtParamField3.CurrentValues.Add(crtParamDiscreteValue3);
                crtParamFields.Add(crtParamField3);
                crtParamDiscreteValue4 = new ParameterDiscreteValue();
                crtParamField4 = new ParameterField();
                crtParamDiscreteValue4.Value = "2008-05-28 00:00:00";
                crtParamField4.ParameterFieldName = "@ToDate";
                crtParamField4.CurrentValues.Add(crtParamDiscreteValue4);
                crtParamFields.Add(crtParamField4);
                crtParamDiscreteValue5 = new ParameterDiscreteValue();
                crtParamField5 = new ParameterField();
                crtParamDiscreteValue5.Value = "ashok12";
                crtParamField5.ParameterFieldName = "@CurrentUser";
                crtParamField5.CurrentValues.Add(crtParamDiscreteValue5);
                crtParamFields.Add(crtParamField5);
                crtParamDiscreteValue6 = new ParameterDiscreteValue();
                crtParamField6 = new ParameterField();
                crtParamDiscreteValue6.Value = DateTime.Now.ToString("dd MMM yyyy hh:mm");
                crtParamField6.ParameterFieldName = "@ClientTime";
                crtParamField6.CurrentValues.Add(crtParamDiscreteValue6);
                crtParamFields.Add(crtParamField6);
                Crv.ParameterFieldInfo = crtParamFields;
                Crv.DisplayGroupTree = false;
                Crv.BestFitPage = true;
                Crv.ReportSource = rd;
            private void SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument)
                Tables tables = reportDocument.Database.Tables;
                foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
                    TableLogOnInfo tableLogonInfo = table.LogOnInfo;
                    tableLogonInfo.ConnectionInfo = connectionInfo;
                    table.ApplyLogOnInfo(tableLogonInfo);
            public static CrystalDecisions.Shared.ConnectionInfo GetCrvConnectionInfo()
                CrystalDecisions.Shared.ConnectionInfo con = new CrystalDecisions.Shared.ConnectionInfo();
                con.ServerName = System.Configuration.ConfigurationSettings.AppSettings["conServer"].ToString();
                con.DatabaseName = System.Configuration.ConfigurationSettings.AppSettings["conDatabase"].ToString();
                con.UserID = System.Configuration.ConfigurationSettings.AppSettings["sesUser"].ToString();
                con.Password = System.Configuration.ConfigurationSettings.AppSettings["sesPwd"].ToString();
                return con;
            private void Page_Unload(object sender, System.EventArgs e)
                if (rd != null)
                    rd.Close();
                    rd.Dispose();
                if (Crv != null)
                    Crv.HasCrystalLogo = false;
                    Crv.Dispose();

    Yes it is possible to use datasets. resources listed below. One hting to be aware of; Using datasets larger than about 5,000 records (depending on the report) is not advisable. Performance will potentially be an issue with datasets that are too large.
    Crystal Reports Guide To ADO.NET
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/401c4455-a31d-2b10-ae96-fa57af5aec20
    Reporting Off ADO.NET Datasets
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2091d0c3-da1d-2b10-22be-a3426b183f75
    VS2005_Walkthroughs
    http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf
    VB samples:
    https://smpdl.sap-ag.de/~sapidp/012002523100006252822008E/net_win_smpl.exe
    In the above samples see VBNET_WIN_ADODOTNET
    C# samples
    https://smpdl.sap-ag.de/~sapidp/012002523100006252722008E/csharp_win_smpl.exe
    BTW., notes databse is here:
    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true
    Articles can be searched here;
    https://www.sdn.sap.com/irj/sdn/businessobjects-articles
    Ludek
    Edited by: Ludek Uher on Feb 17, 2009 1:22 PM

  • Query behave strange when called from java

    Hi,
    I had the same scenario a few times in two different queries in different databases (10g v2) and so not putting the query.
    When I run the query from sqlplus/toad it takes less than a second
    When I run it from java it takes about 5 minutes.
    I could have thought it is something to do with Java ...
    But when I rename the underlying table and use the new name in the query it takes normal (less than a second) time both in java and sqlplus/toad.
    Before changing the name, I have tried rebuilidng the indexes and analyzing the table. The table has about 10 million rows and 13 indexes in one scenario and as less as 400k with 3 indexes in the other scenario. and in both cases updated once daily.
    Each time this happends either a rename or dropping and recreating the table is solving the problem. I am lost.. any ideas what might be causing this problme; any solutions.
    Thanks

    Do whatever it is you are doing that makes it faster and run an Explain Plan capturing the output with DBMS_XPLAN. Also save off the stats collected on the table and indexes
    Then, when performance deteriorates capture another plan along with the stats.
    What is different?
    A table with 13 indexes is an indication of an issue. I would suggest someone take a good look at why so many indexes are there.

  • Old workflow behaving differently in upgrade from 4.6 C to ECC 6.0

    We are facing an issue in the workflow . Old and existing workflows before the upgrade have  different paths then the new workflow in the ECC6.
    Means , the same workflow when started from scratch is working fine , but when the old workflows are copied and run (the way which client is testing or you can say this way they do their work), then the workflow takes a different path. All the forks ,events,if clause are appearing as the last steps in the workflow grapic.
    Now my point is, that in upgrade there should not be any major change happened in SAP, seems that we may be missing some step to be performed after upgrade or during upgrade forits  standrad as well as custom worflows.

    Hello,
    I've never done the upgrade myself, but judging from what I've read it's very very important that you try to complete as many workflow instances before the upgrade. That doesn't help you much, but maybe others will take note.
    All you can do is search for your particular problem. Are there any error messages in the workflows?
    regards
    Rick Bakker
    Hanabi Technology

  • Java application behaving differently when run from netbeans

    Hi,
    When i run my program from netbeans it receives packets from ip addresses which are not in my subnet
    but when i run it from outside netbeans it doesn't receives packets from ip addresses which are not in my subnet.
    Can anybody explains why my application is showing different behavior when run from netbeans and when run independently?
    Thanks.

    Bingo! My script started the rmiregistry and continued on to start the servers. Apparently, it was too quick. I put a 10 second delay after the rmiregistry startup and all is working as it should.
    Thanks for your help. You get the Duke dollars if I can figure out how that works.

  • Applescript in Automator behaves differently when executed from inside Automator, or as an Automator application

    Hello everyone,
    I'm trying to execute an Automator workflow at startup, which I do by saving the workflow as an application, and adding it to the startup list, this works fine.
    My workflow works fine when executed from within Automator (ie clicking on the "Execute" button), but does not anymore when the Automator application is executed (ie. simply double clicking on my Automator file)
    I have narrowed it down to an Applescript inside my workflow which fails only when the application is executed from the finder (the step works fine from within Automator). The script automatically creates an ad hoc wifi network.
    The line which specifically fails is :
    set menu_extras to value of attribute "AXDescription" of menu bar items
    Anyone has any idea why executing the workflow from within automator, and executing it from the finder yield different results ?
    The crazy thing is that all this worked fine up until a few days ago, there might have been an update since (running Mavericks 10.9.2), but nothing game-changing.

    You will need to provide more than the one line of AppleScript you quote if you want a definitive answer.  (We can't even see which app you are addressing this to.)

  • Not getting values for HR_READ_SUBTYPE while calling from Webdynpro appl

    Hello,
    When we pass infotype,begda,endda and other required parameters and run this FM in standalone we are
    getting values however when same FM is called through Webdynpro ABAP application it is not returning values.
    I tried debugging and i found out that some buffer issue is there.
    But still my problem is not sloved.
    can anyone tell me what can be the reason?
    Regards,
    Mayank

    Hi Mayank,
    Can you tell me how much entries you are getting in return when you run FM standalone.
    there may be possiblility of huge amount of data returnning.
    If u can give more details that will be great!!
    Thanks

  • Error in PeopleTools 8.48 while calling CI based Web Services from BPEL

    Hi All,
    I am working with a CI based web serives and using the PeopleSoft generated wsdl file while calling from a BPEL process. When I am using the same component in PeopleTools 8.47, it's working fine. But the same is NOT working when I'm using PeopleTools 8.48 using the same BPEL server and program.
    Here is the error message :-
    exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: oracle_endpoint: oracle_endpoint.
    Please help if you know the answer.

    Hi,
    You need to download all the associated xml schemas from PeopleSoft portal and store them in the path where you are creating BPEL process, it's different from what we used to do in PeopleTools 8.47 ( there was only one wsdl file), whereas in PeopleTools 8.48 you need to copy all associated xml schemas.
    But I m not able to find out why the native JAVA error is thrown, do I need to provide some patches?

Maybe you are looking for