Application Development 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: 

what is testrun option.

Former Member
0 Kudos
2,119

Hi,

I am new to development in ABAP. I dont know what a testrun option mean.

This is the test run declaration. What does it mean? Why & Where is it used?

test_run TYPE bapivbrktestrun-testrun.

Please let me know the testrun option?

1 ACCEPTED SOLUTION

Former Member
0 Kudos
365

Hi vishnu,

-->The test run informs you about the storage requirements and possible problems when copying clients.

-->Test run will estimate the time taken for the activity.

Thank you,

Regards.

6 REPLIES 6

former_member188827
Active Contributor
0 Kudos
365

the testrun is an import structure in some of da bapis.it has only 1 field TESTRUN which is of type char(1).

if testrun is assigned value 'X' when u call da bapi, it means it is for simulation purpose only. dat is result of bapi wont be updated in database but if it is set to space it 'll update da database when commit is used...

plz reward points if dis helps

Former Member
0 Kudos
366

Hi vishnu,

-->The test run informs you about the storage requirements and possible problems when copying clients.

-->Test run will estimate the time taken for the activity.

Thank you,

Regards.

Former Member
0 Kudos
365

hi

good

Using this method, you can reassign the program sub-tree to a point of entry position you enter. You can reassign sub-trees only within the tree to which they belong. It is not possible, for example, for the sub-tree to become a separate tree with the point of entry position as its top position. When you reassign a sub-tree that has positions that already have budget or plan values, the method automatically ensures that these values are transferred consistently within the tree. If you set the TEST_RUN indicator, the system checks if the sub-tree can be reassigned without errors. However, the sub-tree is not reassigned.

check this link too.

http://abap.wikiprog.com/wiki/BAPI_EXPENDITUREPROGTREE_REASS

thanks

mrutyun^

Former Member
0 Kudos
365

Test run means simulation run - it will not commit the any data base updates but it is a simulatation run.

This method can be used not only in the simulation run (TESTRUN = 'X') but also in an update run including update (TESTRUN = ' '). Both execution variants send back any errors that have occurred to the output table RETURN.

Regards,

Gopi ,

Reward points if helpfull.

Former Member
0 Kudos
365

hie ..

Generally, Test Run option is used when u just want to see the output of ur code without doing actual changes in the data base.

For example, If ur report deletes records from a database table based on a selection criteria....

if u want to just see which records are selected , without actually deleting from the database table the test run option can be used...usually test run option is a check box on selection screen.

when selected u have Simulation Screen Control (no changes in DB).

In ur case, i think the variable which ur declaring will be set to 'X' in ur code to enable test run functionality.

Hope this will be helpful.

Regards,

Pranali

Former Member
0 Kudos
365

If we use testrun, the data will not be updated in the database.

It is only to simulate the BAPI process.

Mainly this is useful to keep the Number Ranges intact.

But, In real time, we shd not use it.

Narendra