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: 

add buttons on application tool bar in selection screen

Former Member
0 Kudos

hi kindly help me in adding additional application tool bar buttons in selection screen of a report.

kumar.

7 REPLIES 7

Former Member
0 Kudos

Hi,

TABLES SSCRFIELDS.

SELECTION-SCREEN FUNCTION KEY 1.

PARAMETERS:NAME(6) TYPE C DEFAULT 'BHARAT'.

WRITE:/ NAME.

INITIALIZATION.

MOVE 'BACK' TO SSCRFIELDS-FUNCTXT_01.

AT SELECTION-SCREEN.

IF SSCRFIELDS-UCOMM = 'FC01'.

SET SCREEN 0.

ENDIF.

regards,

bharat.

Former Member
0 Kudos

Hi,

Use set-pf-status in Initilization event. The set pf status that you will use here , u create in menu painter with required buttons.

Thanks&Regards

Giridhar Karnam

satykumar
Product and Topic Expert
Product and Topic Expert

Former Member
0 Kudos

chk this

*&  Adds buttons to application toolbar of selection screen.           *
*&---------------------------------------------------------------------*

REPORT  zsscrappbut NO STANDARD PAGE HEADING.

TABLES: t030, skat, sscrfields.


SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
                                     TITLE text-001.
SELECT-OPTIONS: p_ktopl FOR t030-ktopl,
                p_komok FOR t030-komok,
                p_ktosl FOR t030-ktosl.
SELECTION-SCREEN SKIP.

* Add button to application toolbar
SELECTION-SCREEN FUNCTION KEY 1.  "Will have a function code of 'FC01'
SELECTION-SCREEN FUNCTION KEY 2.  "Will have a function code of 'FC02'
*                                                                 .....
SELECTION-SCREEN END OF BLOCK block1.



************************************************************************
*INITIALIZATION.
INITIALIZATION.

* Add displayed text string to buttons
MOVE 'Application button' to SSCRFIELDS-FUNCTXT_01.
MOVE 'Excecute report ????' to SSCRFIELDS-FUNCTXT_02.
*                                                 .....


************************************************************************
*AT SELECTION-SCREEN.
AT SELECTION-SCREEN.

if sscrfields-ucomm = 'FC01'.
  break-point.
elseif sscrfields-ucomm = 'FC02'.
  break-point.
endif.

Former Member
0 Kudos

Hi,

You can use

<b>SELECTION-SCREEN: FUNCTION KEY 1,

FUNCTION KEY 2.</b>

*for buttons on selection screen.

*And you can use it inthe following manner

<b>AT SELECTION-SCREEN .

CASE SSCRFIELDS-UCOMM.

WHEN 'FC01'.

<Code>

WHEN 'FC02'.

<Code>

ENDCASE.</b>

Reward if helpful.

Regards,

Sandhya

raymond_giuseppi
Active Contributor

Firs add reference to screen fields

TABLES: SSCRFIELDS.

You can activate 1-4 function keys by

SELECTION-SCREEN FUNCTION KEY 1.

Then describe the function keys in LOAD-OF-PROGRAM or INITIALIZATION

DATA smp_dyntxt TYPE smp_dyntxt.
CLEAR smp_dyntxt.
smp_dyntxt-text = text-t01.
smp_dyntxt-icon_id = '@GX@'.
smp_dyntxt-icon_text = text-i01.
smp_dyntxt-quickinfo = text-q01.
smp_dyntxt-path = 'T'.
sscrfields-functxt_01 = smp_dyntxt.

An then you check usage in

AT SELECTION-SCREEN.
  CASE SSCRFIELDS-UCOMM.
    WHEN 'FC01'.

Regards

Former Member
0 Kudos

Whats wrong with my code??????