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

BDC

Former Member
0 Likes
344

Hi friends,

I am creating sales order and based on sales order delivery and based on delivery invoice in one program through BDC by calling different transactions using call transaction method If I run this program in mode ‘A’ it is working fine but if I run in mode ‘N’ sales order is creating properly but while creating delivery getting the message like sales order is currently editing by my user id. That’s why delivery is not creating. I had given wait command for 4 seconds before call transaction vl01n and call transaction vf01 that time if I run multiple materials or materials with different batches for some batches sales order delivery invoice is creating properly and for some other batches getting the same message like sales order is currently editing by …… Can I extend wait command to few more seconds or please tell me the best solution to resolve this problem.

Thanks to all.

3 REPLIES 3
Read only

Former Member
0 Likes
319

u can used hardcode.

commit work.

wait 5.

Message was edited by:

Karthikeyan Pandurangan

Read only

varma_narayana
Active Contributor
0 Likes
319

Hi..

After each Call transaction statement use the statement

COMMIT WORK AND WAIT.

This may work for u.

<b>Reward if Helpful</b>

Read only

former_member196280
Active Contributor
0 Likes
319

Yes mode A it will work fine, now coming to MODE N it will have a problem as you told.. this is bacause sales order is getting created and you are running the delivery with the same order...to avoid this... try like this

Do 5 times.

***TIMER 4 seconds

***READ YOUR MESSAGEs..

IF SALES ORDER CREATED.

EXIT.

ENDIF.

ENDDO.

This is rough idea.. this will solve your problem instead of increasing the timer.. if it is getting created.. then it will wait... if created it will proceed with out waiting any long...

Why I am using 5 times instead of n times is sometimes Sales order may me locked by someother user... to avoid, infinite loop I am using 5 times..

OR

AFTER CALL transaction use,

COMMIT WORK AND WAIT.

Close the thread if your question is answered,

Regards,

SaiRam