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: 

report

Former Member
0 Kudos

pls send the code to the following questions.

1. how do i add a pushbutton on the application tool bar of report selection-screen.

2. how do i add a selection-screen parameter to get a local file name with pulldown.

Thanks in advance.

6 REPLIES 6

Former Member
0 Kudos

Hi kin,

1) The GUI status of a selection screen is generated by the system. The SET PF-STATUS statement in the PBO event of the selection screen has no effect on the standard GUI status. If you want to use your own GUI status for a selection screen or deactivate functions in the standard GUI status, you can use one of the following function modules in the PBO event of the selection screen:

<b>RS_SET_SELSCREEN_STATUS</b>

Sets another GUI status defined in the same ABAP program, or deactivates functions of the standard GUI status.

<b>RS_EXTERNAL_SELSCREEN_STATUS</b>

Sets a GUI status defined in an external function group. You must use the SET PF-STATUS statement to set the status in a special function module in this function group. You must pass the name of the function module that sets the status as a parameter to the function module RS_EXTERNAL_SELSCREEN_STATUS.

2) U have to use the fn module <b>WS_FILENAME_GET</b>

Please reward if useful.

Former Member
0 Kudos

hi

good

Just press CNTLSHIFTF5.. you will get object list on left side...

You will find GUI STATUS.. bellow that double click on your GUI Status...

then go to application tool bar on left side and place your curson on the first one. and click on INSERT BUTTON ( + ). then you will get space to insert your own button. then go ahead with creation of button and create Function code . Activate this GUI Status. Make sure that appropriate actions to be performed when that button is clicked in the USER-COMMAND.

thanks

mrutyun^

varma_narayana
Active Contributor
0 Kudos

Hi..

You can find the Solutions for both of ur Queries in this program: Try it.

REPORT zselfile1 .

TABLES:sscrfields.

**Create the Additional Selection screen to input filename

SELECTION-SCREEN: BEGIN OF SCREEN 10.

PARAMETERS: p_file TYPE rlgrap-filename.

SELECTION-SCREEN: END OF SCREEN 10.

**Create Application Toolbar Button on the Standard selection Screen

SELECTION-SCREEN FUNCTION KEY 1. "Its fcode will be FC01

PARAMETERS : p_werks TYPE marc-werks.

INITIALIZATION.

sscrfields-functxt_01 = 'Enter File'. "Assign the Text to the Button

AT SELECTION-SCREEN.

CASE sscrfields-ucomm. "Check the Fcode

WHEN 'FC01'.

CALL SELECTION-SCREEN 10 STARTING AT 5 8 ENDING AT 85 20.

ENDCASE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'F4_FILENAME' "Local file browser

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

field_name = 'P_FILE'

IMPORTING

file_name = p_file.

START-OF-SELECTION.

<b>Reward if Helpful.</b>

Former Member
0 Kudos

push button on application tool bar:

REPORT demo_sel_screen_function_key.

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'.

cud u explain ur 2nd requirement more clearly

Regards,

Anjali

Former Member
0 Kudos

2nd requirement:

TABLES SSCRFIELDS.

PARAMETERS:  P-FILE LIKE RLGRAP-FILENAME DEFAULT 'C:TEMPSAP.XLS'.

* Double click on TEXT-001 and type Save In
SELECTION-SCREEN PUSHBUTTON /35(10) TEXT USER-COMMAND F4CLICK.

INITIALIZATION.
  MOVE 'Save In' TO text.

AT SELECTION-SCREEN.

IF SSCRFIELDS-UCOMM = 'F4CLICK'.
 call function 'F4_FILENAME'
  EXPORTING
    PROGRAM_NAME        = SYST-CPROG
    DYNPRO_NUMBER       = SYST-DYNNR
    FIELD_NAME          = ' '
  IMPORTING
    FILE_NAME           = P-FILE.
ENDIF.

Regards,

Anjali