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 about the function module testing function

Former Member
0 Likes
1,797

Dear everyone

I am trying to use the testing function of a function module in order to understand how the following

function module works.

<Function module>

BAPI_SALESORDER_CREATEFROMDAT2 --> This function module is to create a sales order

I input several data in the test function, and I was the successful result with some sales order number.

However, this sales order is not actually registered in the system.

Would it be possible to run the function module (in the test mode), so that it would actually

register those documents (ex. sales orders) in the system.

I would like to see the actual sales orders to understand how the function module works.

Thank you very much in advance

Takashi

7 REPLIES 7
Read only

Former Member
0 Likes
1,747

Dear everyone

※Sorry, my initial message was hard to understand. So I will write it again.

I am trying to use the testing function of a function module in order to understand how the following

function module works.

<Function module>

BAPI_SALESORDER_CREATEFROMDAT2 --> This function module is used to create a sales order

I input several data in the test function, and I've got the successful result with some sales order number.

However, this sales order is not actually registered in the system.

Would it be possible to run the function module (in the test mode), so that it would actually

register those documents (ex. sales orders) in the system?

I would like to see the actual sales orders to understand how this function module works.

Thank you very much in advance

Takashi

Read only

0 Likes
1,747

Hi,

You are not able to find the sales order in the system because the data is not committed to the database yet. You can run the BAPI_TRANSACTION_COMMIT function module after the Sales order create function module to achieve this. Similar discussions are already answered in the forum. Please search.

After executing the Sales order BAPI, execute the below BAPI as shown here

Cheers,

Mahesh

Read only

0 Likes
1,747

Hi Takashi,

I guess you are run this FM in "se37".

If you are using source code in "se38",

please add FM "BAPI_TRANSACTION_COMMIT" after called the FM.

Regards.

Read only

0 Likes
1,747

Also you could read Function Module Test Sequence or look at help.sap.com.

Regards,

Raymond

Read only

0 Likes
1,747

Sorry, Mahesh-san

Would you happen to know how to give points to the people who answered my question?

For some reason, I cannot find any point button for this discussion...

Kind regards,

Takashi

Read only

Former Member
0 Likes
1,747


Thank you very much for your kind help, everyone!

I wanted to give you the points for your help, but for some reason, I cannot find the

point button anymore...

If I find it later, I will give you the points.

Anyhow, thank you very much for your support. I really appreciate it!

Takashi

Read only

Former Member
0 Likes
1,747

Hi Takashi,

The answer to your query is, in actuals there are some FMs that require explicit COMMIT, hence for the same set of FMs, SAP has provided a Standard Commit BAPI as BAPI_TRANSACTION_COMMIT.

The same is said by other fellows in the thread, when you are testing you can use the procedure as said by Mahesh in the thread responses.

BR/Thanks

Pranav Agrawal