cancel
Showing results for 
Search instead for 
Did you mean: 

icons in normal alv

Former Member
0 Kudos

Hai

can any one give me example of normal interactive alv ..

report.

I hav one alv rep having 5 secondary lists.

1) i need to print this report via diff. options unconverted, richtext format, spreadsheet, html format

2)i wnt icons such as firstpage, prev, nxt, last page icons on toolbar.

3)back arrow, uparrow, close arrows as well.

How to do this...plz tell me

wt is the procedure..>> guide me in detail

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Hari,

1. All these functinalities 1,2,3

are already avaialable by default

in alv toolbar and printout time.

2. Even if u put your own buttons in the toolbar

, and assign tcodes to them,

then u must handle them in your code.

*----


However, if u want to implent it,

1. From SE80, Function Group SALV,

copy the STANDARD Gui status

to your program, by right clicking.

Copy as 'STANDARD_COPY'

2. In your program,

call FM with this parameter

i_callback_pf_status_set = 'SET_PF_STATUS'

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = progid

i_callback_user_command = alvcallback_formname

it_fieldcat = alvfc

is_layout = alvly

i_save = 'A'

i_callback_pf_status_set = 'SET_PF_STATUS'

it_events = alvev[]

TABLES

t_outtab = incrfg

EXCEPTIONS

OTHERS = 2.

Write :

FORM set_pf_status USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'STANDARD_COPY'.

ENDFORM. "SET_PF_STATUS

regards,

amit m.

Message was edited by: Amit Mittal

Message was edited by: Amit Mittal

Former Member
0 Kudos

HI..AMIT

I followed your procedure..

i wrote as PERFORM SET_PF_STATUS.

and called FORM ...using extab...

it showing an error at PERFORM statement

former_member188685
Active Contributor
0 Kudos

hi check this yesterday thread.

vijay

Former Member
0 Kudos

Hi

When you call the fm REUSE_ALV_LIST_DISPLAY, you move the name of FORM (to set your GUI) to parameter i_callback_pf_status_set:

So

GT_REPID = SY-REPID:

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = GT_REPID

...........

i_callback_pf_status_set = 'SET_PF_STATUS'

....................

In your program you have to define that form, it has to be like this:

FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'MY_GUI'.

ENDFORM. "SET_PF_STATUS

You don't need to use PERFORM statament, just only FORM statament.

Max

Former Member
0 Kudos

Hai Friends,

thank u for helping me..

One more help from u guys..

1) green horizontal row allow user go back one llevel.,

yellow up arrow prompt the user to confirm yes or no to exit the report., red cross arrow will exit the report in the toolbar.

2) i wnt to save this report..

A dialog box should open having options ( In which format should hte list be saved a)unconverted, spreadsheet, rich text format, html format )

This is save list in a file.

can u guys give some idea on this.?

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

just check this.

      • this is how you call the basic list.

g_repid = sy-repid.

REFRESH : gt_events.

  • basic list ALV Call

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = g_repid

i_callback_pf_status_set = 'FRM_PF_STATUS' "set PF Status

i_callback_user_command = 'FRM_USER_COMMAND' "secondary list

i_callback_html_top_of_page = c_html_top_of_page

it_fieldcat = gt_fieldcat

i_html_height_top = 13

TABLES

t_outtab = gt_isrlog1 "Basic list data

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

          • This is ur secondary list.

&----


*& Form FRM_USER_COMMAND

&----


  • User command

----


FORM frm_user_command USING p_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

*

CLEAR gt_isrlog1.

READ TABLE gt_isrlog1 INDEX rs_selfield-tabindex.

CASE p_ucomm.

WHEN '&IC1'.

  • Build Secondary list

PERFORM build_secondary_list.

ENDCASE.

ENDFORM. "FRM_USER_COMMAND

There are so many standard ALV programs for you ref. just go to SE38 and give BCAL* and do a F4 you will get list of all the ALV's.

Regards,

Lakshmikanth.

former_member188685
Active Contributor
0 Kudos

Hi,

You can assign them in ALV , change the pf status and add the icons what ever you required. and handle them in user command. did you tried it yesterday.

thanks

vijay