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

Getting an additional screen while moving back from ALV grid

raveeshsaurabh3
Active Participant
4,852

Hi Gurus,

We have developed a process log for our program with using CL_GUI_ALV_GRID. We had to display the two ALVs together, so we have used splittor to split the container.

But now when  we move back from our ALV display to selection screen, using LEAVE TO SCREEN 0. An extra screen is displayed which does not belong to our program. It belongs to program SAPMSSY0. When we press BACK on this extra screen, we move back to selection screen. We have been debugging the program for two days. I am not sure where does the problem lie?

It looks like we are doing some basic mistake here. Could you please point it out.

Thank alot for your help!!

Warm Regards,

Raveesh

1 ACCEPTED SOLUTION
Read only

raveeshsaurabh3
Active Participant
4,303

Hi All,

This was a program error. This has happened since we had written SKIP between two selection screen blocks.

Thanks & Warm Regards,

Raveesh

Hi Gurus,

We have developed a process log for our program with using CL_GUI_ALV_GRID. We had to display the two ALVs together, so we have used splittor to split the container.

But now when  we move back from our ALV display to selection screen, using LEAVE TO SCREEN 0. An extra screen is displayed which does not belong to our program. It belongs to program SAPMSSY0. When we press BACK on this extra screen, we move back to selection screen. We have been debugging the program for two days. I am not sure where does the problem lie?

It looks like we are doing some basic mistake here. Could you please point it out.

Thank alot for your help!!

Warm Regards,

Raveesh

15 REPLIES 15
Read only

ipravir
Active Contributor
0 Likes
4,303

Hi Raveesh,

I am not sure, Please check somewhere have you use WRITE statement in program.

Regards,

Praveer.

Read only

0 Likes
4,303

Hi Praveer,

We have not used WRITE statement anywhere.

Thanks,

Raveesh

Read only

ipravir
Active Contributor
0 Likes
4,303

Hi Raveesh,

When you are Selection BACK button, what screen is display.

Can you provide screen shot of the screen.

Because, i have tried with write statement before call ALV screen, so after clicking BACK button, ALV is display but without tool bar, and again pressing the BACK button, the initial screen is coming.

Regards,

Praveer.

Read only

Former Member
0 Likes
4,303

Try to use SET SCREEN 0 or LEAVE SCREEN instead of LEAVE TO SCREEN 0.

Read only

himanshu_gupta13
Product and Topic Expert
Product and Topic Expert
0 Likes
4,303

Hi Raveesh,

Have you developed that program as Executable Program/Module Pool Program.

My Idea is make an executable program for selection screen, add a screen for alv report and call this screen in event start-of-selection. On back event use the leave to screen 0 with SUPPRESS DIALOG command.


Also refresh your alv grid.

Check for any Write Statement.

Many Thanks / Himanshu Gupta

Read only

SwadhinGhatuary
Active Contributor
0 Likes
4,303

Hi,

hope you use AT EXIT Command in PAI event, check and I need what you written in back , cancel and exit.

I come across many discussion where this bug come because of screen refresh just before back.

Read only

0 Likes
4,303

Hi Swadhin,

We have written the code for BACK at module USER_COMMAND_9000 at PAI.

CASE SY-UCOMM.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

ENDCASE.

Read only

0 Likes
4,303

Hi,

I hope after two times click on back button control back to selection screen.

share code with screen flow for analysis as I found every thing ok till we discuss.

Read only

0 Likes
4,303

Hi,

You need to change User-command level when clicking back from your alv grid.

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

Read only

SwadhinGhatuary
Active Contributor
0 Likes
4,303

Hi,

simply debug once BCALV_EDIT_04 ,

hope you get your answer.

Read only

Former Member
0 Likes
4,303

Hi Raveesh,

Try adding this,

CASE ucomm.

  WHEN 'BACK'.

    set SCREEN 0.

    LEAVE SCREEN.

  WHEN 'EXIT' or 'CANCEL'.

    LEAVE PROGRAM.

  WHEN OTHERS.

ENDCASE.

It might be helpful.

Regards,

Karthik Sridhar.

Read only

raveeshsaurabh3
Active Participant
4,304

Hi All,

This was a program error. This has happened since we had written SKIP between two selection screen blocks.

Thanks & Warm Regards,

Raveesh

Read only

0 Likes
4,303

In case that anyone going through the same problem: It worked for me.

Read only

mohit_johri1
Explorer
0 Likes
4,303

Thanks for the solution. I had exactly same issue.

Read only

kartikrajag
Participant
0 Likes
4,303

Thanks Raveesh for posting the solution as well. I had exactly same issue. By removing the skip statement from selection screen fixed the issue.