‎2007 Sep 26 4:26 AM
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.
‎2007 Sep 26 4:39 AM
Reports
http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
rewards if useful..........
Minal
‎2007 Sep 26 4:49 AM
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.
‎2007 Sep 26 4:52 AM
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^
‎2007 Sep 26 4:59 AM
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>
‎2007 Sep 26 5:07 AM
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
‎2007 Sep 26 5:26 AM
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