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

alv

Former Member
0 Likes
403

hi,

in alv's how to add a push buttons in application tool bar any body tell me?

4 REPLIES 4
Read only

Former Member
0 Likes
377

Hi

Check this aSample code for ur reqmt..

TABLES sscrfields.

PARAMETERS: p_carrid TYPE s_carr_id,

p_cityfr TYPE s_from_cit.

SELECTION-SCREEN: FUNCTION KEY 1,

FUNCTION KEY 2.

INITIALIZATION.

sscrfields-functxt_01 = 'LH'.

sscrfields-functxt_02 = 'UA'.

AT SELECTION-SCREEN.

CASE sscrfields-ucomm.

WHEN'FC01'.

p_carrid = 'LH'.

p_cityfr = 'Frankfurt'.

WHEN 'FC02'.

p_carrid = 'UA'.

p_cityfr = 'Chicago'.

ENDCASE.

START-OF-SELECTION.

WRITE / 'START-OF-SELECTION'.

Hope it helps.

Praveen

Read only

Former Member
0 Likes
377

Use it in your code

REPORT zmodify_screen.

TABLES: sscrfields.

INCLUDE <icon>.

SELECTION-SCREEN FUNCTION KEY 1.

SELECTION-SCREEN FUNCTION KEY 2.

SELECTION-SCREEN FUNCTION KEY 3.

INITIALIZATION .

CONCATENATE icon_next_object

'First Tab'

INTO sscrfields-functxt_01 .

CONCATENATE icon_next_object

'Second Tab'

INTO sscrfields-functxt_02.

CONCATENATE icon_next_object

'Third Tab'

INTO sscrfields-functxt_03.

AT SELECTION-SCREEN.

IF sscrfields-ucomm EQ 'FC01' .

  • write the code here what you want to

  • perform on pressing this button

ENDIF.

Read only

former_member402443
Contributor
0 Likes
377

Hi Ganapathi,

First of all create a pf status using

set pf-status ' ZMENU_SAVE'.

Then create a subroutine withe the SET_PF_STATUS.

FORM SET_PF_STATUS USING P_RT_EXTAB type slis_t_extab.

SET PF-STATUS 'ZMENU_SAVE'.

ENDFORM.

After this pass this subroutine name to the Reuse_alv_grid_display

I_CALLBACK_PF_STATUS_SET parameter.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

is_layout = gd_layout

it_fieldcat = lt_fieldcat

it_sort = lt_sort

I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

TABLES

t_outtab = ITAB2.

Reward Points, if useful.

Regards,

Manoj Kumar

Edited by: Manoj Kumar on Dec 24, 2007 10:53 AM

Read only

Former Member
0 Likes
377

Goto SE41. copy the gui status from BALVBT01 to your own program name it ALV_TEST.

provide a subroutine name in I_CALLBACK_SET_PF_STATUS, say PF_SET.

add this in program

FORM PF_SET USING T_EXTAB TYPE SLIS_T_EXTAB.

SET PF-STATUS 'ALV_TEST'.

ENDFORM.

Reward If useful

Regards

ANUPAM