Application Development 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: 

Problem in Back Button in ALV report

former_member224404
Active Participant
0 Kudos

Hi Team,

I have created a report which has a selection screen. Based on the input I am showing an ALV OO grid in my custom screen 0100. Now In the system toolbar on my 0100 screen I have enabled back, up and exit button. On click of which I am wrting 'LEAVE TO SCREEN 0. '

But it doesn't take me to the selection screen. Rather it throws me out of the transaction. Can anybody

suggest me a command so that when I click on back button it will take to the selection screen.

Thanks,

Mainak

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

if you use CALL SCREEN 0100 then it will work. but in your case you are not using call screen i guess.

are you using set screen , leave screen/ leave to screen 100

end-of-selection.
call screen 100. "try this and see..

7 REPLIES 7

Former Member
0 Kudos

r u using submit command inthis alv

former_member188685
Active Contributor
0 Kudos

if you use CALL SCREEN 0100 then it will work. but in your case you are not using call screen i guess.

are you using set screen , leave screen/ leave to screen 100

end-of-selection.
call screen 100. "try this and see..

0 Kudos

Hi Vijay,

You are right! I was using set screen. Now I am using call screen and it worked!

Cheers!!

Mainak

Former Member
0 Kudos

Hi,

Go through given program it is very usefull for you,

***Correct your program as follows...

PROGRAM rsolett1 MESSAGE-ID sy.

TYPE-POOLS: slis.

data: repid like sy-repid.

DATA: w_fieldcat TYPE slis_fieldcat_alv,

t_fieldcat TYPE slis_t_fieldcat_alv.

DATA: w_listheader TYPE slis_listheader,

t_listheader TYPE slis_t_listheader.

DATA: BEGIN OF t_output OCCURS 0,

slno TYPE char10,

name TYPE char10,

lino TYPE char10,

prof TYPE char10,

addr TYPE char10,

fanm TYPE char10,

plbu TYPE char10,

END OF t_output.

w_fieldcat-col_pos = 1.

w_fieldcat-fieldname = 'SLNO'.

w_fieldcat-seltext_m = 'SERIAL NUMBER'.

APPEND w_fieldcat TO t_fieldcat.

CLEAR w_fieldcat.

w_fieldcat-col_pos = 2.

w_fieldcat-fieldname = 'NAME'.

w_fieldcat-seltext_m = 'NAME'.

APPEND w_fieldcat TO t_fieldcat.

CLEAR w_fieldcat.

w_fieldcat-col_pos = 3.

w_fieldcat-fieldname = 'LINO'.

w_fieldcat-seltext_m = 'LICENCE NUMBER'.

APPEND w_fieldcat TO t_fieldcat.

CLEAR w_fieldcat.

w_fieldcat-col_pos = 4.

w_fieldcat-fieldname = 'PROF'.

w_fieldcat-seltext_m = 'PROFESSION'.

APPEND w_fieldcat TO t_fieldcat.

CLEAR w_fieldcat.

w_fieldcat-col_pos = 5.

w_fieldcat-fieldname = 'ADDR'.

w_fieldcat-seltext_m = 'ADDRESS'.

w_fieldcat-do_sum = 'X'.

APPEND w_fieldcat TO t_fieldcat.

CLEAR w_fieldcat.

w_fieldcat-col_pos = 6.

w_fieldcat-fieldname = 'FANM'.

w_fieldcat-seltext_m = 'FATHER NAME'.

APPEND w_fieldcat TO t_fieldcat.

CLEAR w_fieldcat.

w_fieldcat-col_pos = 7.

w_fieldcat-fieldname = 'PLBU'.

w_fieldcat-seltext_m = 'PLACE OF BUSSINESS'.

APPEND w_fieldcat TO t_fieldcat.

CLEAR w_fieldcat.

*PUPULATING TOP-OF-PAGE.

w_listheader-typ = 'H'.

w_listheader-info = 'FORMA'.

APPEND w_listheader TO t_listheader.

CLEAR w_listheader.

repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = repid

i_callback_pf_status_set = 'SET_PF_STATUS'

i_callback_user_command = ' '

i_callback_top_of_page = 'SUB_TOP_OF_PAGE'

it_fieldcat = t_fieldcat

i_default = 'X'

TABLES

t_outtab = t_output.

FORM set_pf_status USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'ZPFSTATUS'.

ENDFORM.

Edited by: Ganesh Modhave on Aug 12, 2008 1:06 PM

Thanks&Regards,

Naresh kumar

0 Kudos

>

>

> Edited by: Ganesh Modhave on Aug 12, 2008 1:06 PM

>

>

> Thanks&Regards,

> Naresh kumar

So that's Ganesh's code... right?

If you do this once more, your user ID will be deleted.

0 Kudos

Hi Julius,

Surprise that was my code.

Hee Naresh is it really helped you ?

Cheers!!

Reddy

Former Member
0 Kudos

Hi,

Use this statements and try "Leave Program" or Set screen 0.

Cheers!!