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

Question reg BAPI

Former Member
0 Likes
578

Hi,

Can we test run a bapi .Lets say i trying to create a requisiton with line item 10

say line item 5 has an invalid material number so a requistion won't be created Right.

Can we do a test run programtically.

let say if everything is ok Bapi CREATES A REQUISTION-I don't want this first i want to know whether the bapi can create a requistion or not WITH THE INPUT DATA.

Let say if it cannot i want to see the error messages --This part is ok for me

when everything is ok it creates a requistion right- Now i don't want to update the database because this is a test run right.

question1)Is there a way we can know whether requistion can be created with actually updating the corresponding data base tables

2) what happens to the sequence number

i NEED WHETHER ITS POSSIBEL TO DO PROGRAMITICALLY AND IF YES WHAT PARAMTERS DO I NEED TO PASS .

i WOULD APPRECIATE IF ANYONE OF COULD SUCH CODE AS A REFERNCE FOR ME

THANKS

Kajol

1 ACCEPTED SOLUTION
Read only

former_member192429
Active Participant
0 Likes
558

In many cases for BAPI's you need to call the BAPI_TRANSACTION_COMMIT function module to update it to the data base. So I guess by not calling Commit Bapi you could test it.

-Kriss

4 REPLIES 4
Read only

former_member192429
Active Participant
0 Likes
559

In many cases for BAPI's you need to call the BAPI_TRANSACTION_COMMIT function module to update it to the data base. So I guess by not calling Commit Bapi you could test it.

-Kriss

Read only

nitesh_jain3
Active Participant
0 Likes
558

Dear Kajol,

You can do this in two ways:

1. By single testing the BAPI function module

2. In a program by calling the function BAPI_TRANSACTION_ROLLBACK after the BAPI call

Cheers

Nitesh

Read only

0 Likes
558

Hi all,

what about the seq number, would it be lost or same seq no would be regenerated the next time

Thanks

Read only

0 Likes
558

when u run in test mode , u wll get the same Number .

Regards

Peram