‎2011 Aug 23 5:52 AM
Hi Friends,
I am trying to Create Quotation using the standard BAPI ,BAPI BAPI_QUOTATION_CREATEFROMDATA2 from my webdynpro application.If the user is satisfied with the schdule lines(or the any data ) that it is going create in SAP,then the commit work should happen.
for that to happen user should know what it is creating and I heard about SImulation.
What is the simulation BAPI for quotation create and How do I use it?
Please help me.
Regards,
Xavier.P
‎2011 Aug 23 6:30 AM
Hi Xavier,
If you test the BAPI directly from SE37, then, you will see that a corresponding result table is the output with every input table (may be confusing) after execution.
In the program/code, the fields of the table paramters are updated automatically as per the actual Quotation Data.
If you still have any specific doubts, please mention an example.
Regards,
Pranav.
‎2011 Aug 23 6:02 AM
Hi Xavier,
There is nothing specific as Simulation BAPI, but there is a Simulation or TEST RUN Mode in BAPI.
If you check out the Import Parameters of the BAPI, you'll find the parameter, TESTRUN.
Use:
TESTRUN = 'X', to execute the BAPI in Test Mode or Simulate the Quotation Creation. If the user is happy with the output, you can then run the BAPI again with
TESTRUN = ' ' and other parameters as required. Then call 'BAPI_TRANSACTION_COMMIT' for the Quotation to be saved.
Regards,
Pranav.
‎2011 Aug 23 6:12 AM
Hi Pravnav,
Thnkas for the answer,but how do I read the created data when TESTRUN = 'X is passed?
do i need to use BAPI for reading quotation,but the quotation is not committed?
regards,
Xavier.P
‎2011 Aug 23 6:30 AM
Hi Xavier,
If you test the BAPI directly from SE37, then, you will see that a corresponding result table is the output with every input table (may be confusing) after execution.
In the program/code, the fields of the table paramters are updated automatically as per the actual Quotation Data.
If you still have any specific doubts, please mention an example.
Regards,
Pranav.
‎2011 Aug 23 6:36 AM
but pranav,
How we get in SE37, in my program will i get the output in Output table,if I run in Test mode?
Regards,
Xavier.P
‎2011 Aug 23 6:43 AM
Hi Pranav,
Do you mean to say like, looking at the output table what we see in SE37,we need to mention in our program also for every input table,so that likely could be captured in output table?
Regards,
Xavier.P
‎2011 Aug 23 6:54 AM
Hi Xavier,
Well that is the BASIC Concept of the Table parameters. It works as Changing Paramaters. The Input Tables are used for processing and the output is changed/updated/modified Table parameter.
Regards,
Pranav.
‎2011 Aug 23 9:12 AM
Hi Pranav,
I have tested the same,I have passed item quanity which is more than available stock ,then system should proposes two scheduled delivery dates.But those two scheduled dates I am not getting in tables parameter QUOTATION_SCHEDULES_IN of the BAPI.
I have passed TESTRUN = 'X',is it required to to call BAPI_TRANSACTIONCOMMIT even when we are runnig in Testmode?
Regards,
Xavier.P
‎2011 Aug 23 9:19 AM
‎2011 Aug 23 9:22 AM
Hi Simone,
How can I see the Schedule lines (or) any data that the BAPI is going to create?
I do not see see my Input table parameters getting updated values.
Regards,
Xavier.P
‎2011 Aug 23 10:35 AM
Hi Xavier,
Ideally, there should not be any check in quotation item quantity and available stock. A quotation is used to tell vendors prices and the quantity the vendor can deliver.
To create schedule lines you need to mention in SCHEDULE_IN or else system will create a single schedule line.
Finally, refer the RETURN Table parameter for errors, information messages, etc. The return parameters will help you passing the required parameters to the BAPI.
Read the Function Module Documentation for perfect HELP.
Regards,
PRanav.