Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Simulation BAPI for quotation create BAPI BAPI_QUOTATION_CREATEFROMDATA2

Former Member
0 Likes
2,468

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

1 ACCEPTED SOLUTION
Read only

former_member222709
Contributor
0 Likes
1,754

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.

10 REPLIES 10
Read only

former_member222709
Contributor
0 Likes
1,754

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.

Read only

0 Likes
1,754

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

Read only

former_member222709
Contributor
0 Likes
1,755

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.

Read only

0 Likes
1,754

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

Read only

0 Likes
1,754

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

Read only

former_member222709
Contributor
0 Likes
1,754

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.

Read only

0 Likes
1,754

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

Read only

0 Likes
1,754

No, you do not need the commit when running in test mode.

Read only

0 Likes
1,754

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

Read only

0 Likes
1,754

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.