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

Delete Screen Queue

Former Member
0 Likes
1,163

Hi everybody,

I am calling a same dynpro (100) many times (recursively) and when I use the sentence CALL SELECTION-SCREEN 1000 and then I press BACK key again to leave the transaction, the program process dynpro 100 again as times as I invoked.

Do you know any way (sentence, function module, etc) to delete the screen queue?

kind regards

rasec

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,042

Hi rasec,

Actually you need to control using SET SCREEN & LEAVE SCREEN.

But this needs to be andled carefully. IF nothing works out which happens at times, you can simple do a SUBMIT program via selection screen on back button.

We did this couple of times and it works perfectly fine.

Cheers

VJ

10 REPLIES 10
Read only

suresh_datti
Active Contributor
0 Likes
1,042

I don't know if there is a Screeen Queue.. but did you try to use the sy-ucomm?

case sy-ucomm.

when 'EBCK'.

leave transaction.

endcase.

Regards,

Suresh Datti

Read only

Former Member
0 Likes
1,043

Hi rasec,

Actually you need to control using SET SCREEN & LEAVE SCREEN.

But this needs to be andled carefully. IF nothing works out which happens at times, you can simple do a SUBMIT program via selection screen on back button.

We did this couple of times and it works perfectly fine.

Cheers

VJ

Read only

abdul_hakim
Active Contributor
0 Likes
1,042

hi

instead of CALL SCREEN use LEAVE TO SCREEN statement.

Cheers,

Abdul Hakim

Mark all useful answers..

Read only

0 Likes
1,042

Thks for your responses! but as I said, I am calling the same dynpro many times. CALL SCREEN does not work so I am using CALL SELECTION-SCREEN 1000, it works but when I want to leave, finally, the transaction the system process the dynpro again

I think sentence SUBMIT could be a solution!

thks again guys!

Message was edited by: CESAR BENITO

Read only

0 Likes
1,042

hi

u cannot use SUBMIT for calling a dynpro program.use LEAVE TO SCREEN instead of CALL SCREEN in your program.

Cheers,

Abdul Hakim

Mark all useful answers..

Read only

0 Likes
1,042

It's not a dynpro program. It's a program with a selection screen (dynpro 1000) that invoke a dynpro (CALL SCREEN 100) more than once.

To return to selection screen I am using CALL SELECTION-SCREEN 1000 but I have the problems I explained above!

Do you follow me, now?

kind regards

Read only

0 Likes
1,042

since u r calling your dynpro screen from your selection screen use leave to screen 0 instead of call selection-screen.

Cheers,

Abdul Hakim

Read only

0 Likes
1,042

It worked Abdul! but besides you said, I had to replace my multiple CALL SCREEN 100 by LEAVE TO SCREEN 100 (except the first one call)

kind regards!

Read only

0 Likes
1,042

thatz what i said in my first reply itself..

Plz close the thread if your question has been answered.

Cheers,

Abdul Hakim

Read only

Former Member
0 Likes
1,042

Hi CESAR.

If you use the statement CALL SELECTION-SCREEN 1000,

then you have to check afterwards if the user hit back from there.

I.E.

WHEN 'BACK'

CALL SELECTION-SCREEN 1000

IF SY-SUBRC = 4.

LEAVE PROGRAM.

ENDIF.

Hope this helps.

Phil