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: 

Application tool bar ?

Former Member
0 Kudos

Hi All,

I want to add an input box in application tool bar of my custom screen. Is it possible Provide me some sample code for the same.

Thanks & Regards,

Navneeth K.

3 REPLIES 3

Former Member
0 Kudos

Hi,

Hope this helps:

codeTABLES: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.[/code]

Reward Points if found helpfull..

Cheers,

Chandra Sekhar.

0 Kudos

I want to add a input box directly to the application tool bar.

Former Member
0 Kudos

Hi Bothra,

This is how you can edit pushbuttons to application toolbar, hope this leads you to ur solution,

I am giving you an idea, just try this, in the mean time I will prepare a code for you and 'll post. What I understood is you want to display 3 Buttons in the application tool bar for the Tab 1 and 2 for the Tab 2.

Just declare an internal table with type sy-ucomm.

Data:itab type standard table of sy-ucomm.

Now you 'll be having one screen say 1001 in which two subscreens 0101 and 0102. For the screen 1001 create all the 5 (3+2) buttons.

Say you have a button called SAVE and function code is SAVE also.

Append save to itab.

Now when user will select the tab1 check the ok_code and in the PBO section for the screen 1001 you have to set the PF status as below.

In that case suppose you don't want to display the SAVE button so what you have to do is

set pf-status 'PF_1001' excluding itab.

So you have to just write a logic to handle this scenario with tab2 also.

Hope this would help you.

Reward if found helpfull,

Cheers,

Chaitanya.