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

Limit on wait time for a program

Former Member
0 Likes
1,582

Hello Experts,

We have a unique situation in which we have to wait for an acknowledgement from PI which does not come back immediately bakc to the SAP ECC and hence we have to put a wait statment in the code. this program will run in background will send the PO detail to SAP PI and wait for an acknowledgement from PI. Is their any limitation on the time we can put in the program which is going to run in background. I am aware this is going to cause a performance issue but this program will never run in foreground mode .

Request you suggestions.

1 ACCEPTED SOLUTION
Read only

yuri_ziryukin
Product and Topic Expert
Product and Topic Expert
1,380

Hello Experts,

> We have a unique situation in which we have to wait for an acknowledgement from PI which does not come back immediately bakc to the SAP ECC and hence we have to put a wait statment in the code. this program will run in background will send the PO detail to SAP PI and wait for an acknowledgement from PI. Is their any limitation on the time we can put in the program which is going to run in background. I am aware this is going to cause a performance issue but this program will never run in foreground mode .

>

> Request you suggestions.

Hello Soumit,

what kind of acknowledgement (technically) are you waiting for? What interface to PI do you use?

IDoc? RFC? something else?

I strongly advise you not to use WAIT statement in your background program. In Dialog the WAIT statement is not dangerous because the context will roll out and work process will be free for other tasks. Batch job cannot roll out. It will stay in the batch work process for the whole time of WAIT statement.

If I were you, I'd try to implement asynchronous update when an acknowledgement from PI is received.

Regards,

Yuri

6 REPLIES 6
Read only

yuri_ziryukin
Product and Topic Expert
Product and Topic Expert
1,381

Hello Experts,

> We have a unique situation in which we have to wait for an acknowledgement from PI which does not come back immediately bakc to the SAP ECC and hence we have to put a wait statment in the code. this program will run in background will send the PO detail to SAP PI and wait for an acknowledgement from PI. Is their any limitation on the time we can put in the program which is going to run in background. I am aware this is going to cause a performance issue but this program will never run in foreground mode .

>

> Request you suggestions.

Hello Soumit,

what kind of acknowledgement (technically) are you waiting for? What interface to PI do you use?

IDoc? RFC? something else?

I strongly advise you not to use WAIT statement in your background program. In Dialog the WAIT statement is not dangerous because the context will roll out and work process will be free for other tasks. Batch job cannot roll out. It will stay in the batch work process for the whole time of WAIT statement.

If I were you, I'd try to implement asynchronous update when an acknowledgement from PI is received.

Regards,

Yuri

Read only

0 Likes
1,380

Hi Yuri,

We have a ABAP proxy scenario and the acknowledgement is technical acknowledgement. If you don't recommend a wait statement what other solution do you suggest. do we need to create a workflow ? i am not sure about asynchronous update

Read only

yuri_ziryukin
Product and Topic Expert
Product and Topic Expert
0 Likes
1,380

Hi Yuri,

> We have a ABAP proxy scenario and the acknowledgement is technical acknowledgement. If you don't recommend a wait statement what other solution do you suggest. do we need to create a workflow ? i am not sure about asynchronous update

Soumit,

what is this technical acknowledgement?

Show me how you check for it right now.

Yuri

Read only

0 Likes
1,380

Hi Yuri

By technical acknowledge i ment that PI send back acknowledgement back to ECC when the data has been delivered by the communication channel on the target system. we have achived this using SAP standard classes.

I have workaround in which we will be creating another report which will fetch the nessage id from the ztable where we will be storing the msd id for a message payload. if a acknowledgement is recived for that message we will do the further processsing.

Let hope this will solve our problem

Regards

Soumit

Read only

yuri_ziryukin
Product and Topic Expert
Product and Topic Expert
0 Likes
1,380

Yes, that's a better option than WAIT statement in the batch job.

Read only

0 Likes
1,380

Hi Soumit,

In your solution I just want to add some more points which will improve performance as well as make solution more appropriate.

If we have ceratin cut off time to receive the ack. from PI. than let us put date and time also in a Ztable than only you come to know that in given time frame for which you have recived the acknowledgement and for which not., and then reprocess accordingly comparing the time delay.

Otherwise how you come to know that for which records u need to reprocess, you are not able to distinguished between just sent which are waiting for ack. or earlier sent which are waiting for ack..