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

Problem with using BAPI to create order

Former Member
0 Likes
1,260

Hi expert,

I got a problem when I using BAPI_PLANNEDORDER_CREATE. I used BAPI explore and then found this BAPI. I used Single_Test and entered parameters for the import parameters HEADERDATA. I assigned following data:

PLDORD_PROFILE :LA

MATERIAL:100-100

PLAN_PLANT:1000

TOTAL_PLORD_QTY:2

ORDER_START_DATE:11.06.2009

And then I got the return message shows Planned order 36625 will be created. But I went to T-Code MD12(Individual Display) and typed 36625 in the field. But system showed messgae "Planned order 36625 does not exist" !!

I hope to know which part I've missed. Please give me some advised. Thanks a lot.

3 REPLIES 3
Read only

Former Member
0 Likes
1,066

Hi,

With single test it will just create the Order in test mode.

The order will be created only if BAPI_TRANSACTION_COMMIT is called.

Regards,

Ankur Parab

Read only

Former Member
0 Likes
1,066

Hi,

You need to use BAPI_TRANSACTION_COMMIT just after BAPI_PLANNEDORDER_CREATE.

Mark WAIT = 'X' in the IMPORT parameter of BAPI_TRANSACTION_COMMIT.

For testing if it is working or not:

  • Goto SE37 --> click on FUNCTION MODULE --> TEST -->TEST SEQUENCES

  • First give BAPI_PLANNEDORDER_CREATE and then BAPI_TRANSACTION_COMMIT.

  • Execute accordingly one by one with proper data.

  • Goto the transaction from where you can check entry has been created or not.

Regards

Read only

Former Member
0 Likes
1,066

HI,

If you are executing a BAPI via SE37, then an explicit call to BAPI_TRANSACTION_COMMIT is mandatory.

Even when you do use this BAPI in your program, check for the entries in your return table, if there are no entries with A or E, then you shoudl call BAPI_TRANSACTION_COMMIT.

Hope this helps.