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

Adding a input box in the application tool bar

Former Member
0 Likes
734

HI,

How to add a input box in the application tool bar..? I need a F4 help also for the input box.

Thanks,

Kishore B A

1 ACCEPTED SOLUTION
Read only

former_member189059
Active Contributor
0 Likes
635

Hello,

Not sure of your exact reqt

But got some sample code to create a button on the toolbar which once clicked gives a new popup window with additional parameters

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.
***Your list processing.

HI,

How to add a input box in the application tool bar..? I need a F4 help also for the input box.

Thanks,

Kishore B A

2 REPLIES 2
Read only

former_member189059
Active Contributor
0 Likes
636

Hello,

Not sure of your exact reqt

But got some sample code to create a button on the toolbar which once clicked gives a new popup window with additional parameters

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.
***Your list processing.

Read only

Former Member
0 Likes
635

Hi,

I hope this functionality is not available in SAP.

Cheers,

Bujji