Pushbuttons on selection-screen
Hi ,
i have a push button on the selection screen , when press it my list must be displayed.
how can i do it.
Regards
Arun
REPORT Z3_SELECTION_SCREEN .
Tables : MAKT,SSCRFIELDS.
DATA : FLAG VALUE '0'.
SELECTION-SCREEN BEGIN OF BLOCK ONE WITH FRAME title TEXT-001 NO
INTERVALS .
selection-screen begin of line.
Parameters : MATNR like MAKT-MATNR MODIF ID SC1 value check,
MAKTX LIKE MAKT-MAKTX MODIF ID SC1.
selection-screen end of line.
SELECTION-SCREEN END OF BLOCK ONE .
*SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN : PUSHBUTTON 10(20) TEST USER-COMMAND ABCD.
SELECTION-SCREEN : PUSHBUTTON 40(20) TEST1 USER-COMMAND ABCD1.
SELECTION-SCREEN : PUSHBUTTON 70(20) TEST2 USER-COMMAND ABCD2.
*SELECTION-SCREEN END OF LINE.
INITIALIZATION.
TEST = 'List'.
TEST1 = 'TEST1'.
TEST2 = 'TEST2'.
AT SELECTION-SCREEN .
IF SSCRFIELDS-UCOMM = 'ABCD'.
SELECT SINGLE MAKTX FROM MAKT INTO (MAKTX) WHERE MATNR = MANTR AND
SPRAS = SY-LANGU.
eNDIF.
Start-of-selection.
Write: / MAKTX.
Similar Messages
-
Pushbutton in selection screen
Hi all
i want to deactivate a pushbutton in selection screen.
please help me...its urgent
rewards assured..Hi gaurav,
1. So, wats the use of MODIF ID?
or wats the flaw in my approach
Theres no flaw in your approach.
2. Further, you are right.
Whats the use of MODIF ID
For buttons, we can use the name of the button.
3. But if there is some parameter
(along with LABEL on the left,
or a radiobutton, with some text),
4.
Then with MODIF ID, the label also gets
affected.
(whereas if we just use the parameter name,
the label may still remain)
5. To get the differnce, just copy paste
6.
report abc.
parameter : abc(10) type c MODIF ID A.
At selection-screen output.
ONCE CHECK WITH THIS CODE
loop at screen.
if screen-name = 'ABC'.
screen-input = 0.
screen-invisible = 1.
modify screen.
endif.
endloop.
THEN CHECK WITH THIS CODE
loop at screen.
if screen-GROUP1 = 'A'.
screen-input = 0.
screen-invisible = 1.
modify screen.
endif.
endloop.
regards,
amit m. -
Calling a screen at pushbutton in selection screen
hii all,
please provide me the suitable code for calling a screen on pushbutton in selection screen....
thanks
babbalTABLES: SSCRFIELDS.
TYPE-POOLS ICON.
DATA: FUNCTXT TYPE SMP_DYNTXT.
PARAMETERS: P_VBELN LIKE VBAK-VBELN.
SELECTION-SCREEN: FUNCTION KEY 1.
INITIALIZATION.
FUNCTXT-ICON_ID = ICON_NEXT_OBJECT.
FUNCTXT-ICON_TEXT = 'PUSHBUTTON'.
SSCRFIELDS-FUNCTXT_01 = FUNCTXT.
AT SELECTION-SCREEN.
CASE SSCRFIELDS-UCOMM.
WHEN 'FC01'.
CALL SCREEN 100.
ENDCASE.
regards,
prakash reddy .s -
Adding functionality to the pushbuttons in selection screen
Hi,
Where to add the logic to the pushbutton in the selection screen.In the PBO or PAI of that screen.If possible can anyone send an example for that?Hey!
Check out this sample code.
REPORT z_prog.
DATA:
BEGIN OF fs_spfli,
carrid LIKE spfli-carrid, " Airline Code
connid LIKE spfli-connid, " Flight Connection Number
airpfrom LIKE spfli-airpfrom, " Departure airport
airpto LIKE spfli-airpto, " Destination airport
deptime LIKE spfli-deptime, " Departure time
arrtime LIKE spfli-arrtime, " Arrival time
END OF fs_spfli,
BEGIN OF fs_sflight,
carrid LIKE sflight-carrid, " Airline Code
connid LIKE sflight-connid, " Flight Connection Number
fldate LIKE sflight-fldate, " Flight date
seatsmax LIKE sflight-seatsmax, " Maximum seats in economy class
seatsocc LIKE sflight-seatsocc, " Occupied seats in economyclass
END OF fs_sflight,
w_checkbox TYPE c, " Variable for checkbox
w_currentline TYPE i, " Variable to display current
" line
w_lines TYPE i,
w_read TYPE c .
* Internal Table to hold flight schedule information *
DATA:
t_spfli LIKE
TABLE OF
fs_spfli.
* Internal Table to hold flight information *
DATA:
t_sflight LIKE
TABLE OF
fs_sflight,
t_sflight1 LIKE t_sflight.
* START-OF-SELECTION Event *
START-OF-SELECTION.
PERFORM get_data_spfli.
* END-OF-SELECTION Event *
END-OF-SELECTION.
SET PF-STATUS 'MENU'.
PERFORM display_data_spfli.
* TOP-OF-PAGE Event *
TOP-OF-PAGE.
PERFORM header_table_spfli.
* AT LINE-SELECTION EVENT *
AT LINE-SELECTION.
SET PF-STATUS space.
IF sy-lsind EQ 1 AND sy-lilli GE 4.
PERFORM get_data_sflight.
PERFORM display_data_sflight.
PERFORM flag_line.
ENDIF. " IF sy-lsind EQ 1..
* AT USER-COMMAND *
AT USER-COMMAND.
IF sy-lsind EQ 1.
SET PF-STATUS space.
CASE sy-ucomm.
WHEN 'DISPLAY'.
PERFORM get_data_sflight1.
PERFORM display_data_sflight.
WHEN 'SELECTALL'.
PERFORM select_all.
PERFORM flag_line.
WHEN 'DESELECTAL'.
PERFORM deselect_all.
PERFORM flag_line.
ENDCASE. " CASE sy-ucomm
ENDIF. " IF sy-lsind EQ 1
* TOP-OF-PAGE DURING LINE-SELECTION *
TOP-OF-PAGE DURING LINE-SELECTION.
PERFORM sec_list_heading.
*& Form get_data_spfli
* This subroutine fetches the data from SPFLI
* This subroutine does not have parameters to pass
FORM get_data_spfli .
SELECT carrid " Airline Code
connid " Flight Connection Number
airpfrom " Departure airport
airpto " Destination airport
deptime " Departure time
arrtime " Arrival time
FROM spfli
INTO TABLE t_spfli.
ENDFORM. " GET_DATA_SPFLI
*& Form display_data_spfli
* This subroutine displays the data of SPFLI
* This subroutine does not have parameters to pass
FORM display_data_spfli .
LOOP AT t_spfli INTO fs_spfli.
WRITE: /02 w_checkbox AS CHECKBOX,
05 w_read,
fs_spfli-carrid UNDER text-001,
fs_spfli-connid UNDER text-002,
fs_spfli-airpfrom UNDER text-003,
fs_spfli-airpto UNDER text-004,
fs_spfli-deptime UNDER text-005,
fs_spfli-arrtime UNDER text-006.
HIDE:
fs_spfli-carrid,
fs_spfli-connid.
ENDLOOP. " LOOP AT t_spfli..
ENDFORM. " DISPLAY_DATA_SPFLI
*& Form header_table_spfli
* This subroutine diplays the headings of table spfli
* This subroutine does not have parameters to pass
FORM header_table_spfli .
WRITE: /10 text-001 COLOR 4,
25 text-002 COLOR 4,
40 text-003 COLOR 4,
55 text-004 COLOR 4,
70 text-005 COLOR 4,
85 text-006 COLOR 4.
ENDFORM. " HEADER_TABLE
*& Form get_data_sflight
* This subroutine fetches the data from SFLIGHT
* This subroutine does not have interface parameters to pass
FORM get_data_sflight .
SELECT carrid " Airline Code
connid " Flight Connection Number
fldate " Flight date
seatsmax " Maximum seats in economy class
seatsocc " Occupied seats in economyclass
FROM sflight
INTO TABLE t_sflight
WHERE carrid EQ fs_spfli-carrid
AND connid EQ fs_spfli-connid.
ENDFORM. " GET_DATA_SFLIGHT
*& Form display_data_sflight
* This subroutine displays the SFLIGHT data
* This subroutine does not have interface parameters to pass
FORM display_data_sflight .
LOOP AT t_sflight INTO fs_sflight.
WRITE: / fs_sflight-carrid UNDER text-001,
fs_sflight-connid UNDER text-002,
fs_sflight-fldate UNDER text-007,
fs_sflight-seatsmax UNDER text-008 LEFT-JUSTIFIED,
fs_sflight-seatsocc UNDER text-009 LEFT-JUSTIFIED.
ENDLOOP.
CLEAR: fs_sflight.
ENDFORM. " DISPLAY_DATA_sflight
*& Form sec_list_heading
* This subroutine diplays the headings of table spfli
* This subroutine does not have interface parameters to pass
FORM sec_list_heading .
WRITE: /2 text-001 COLOR 4,
15 text-002 COLOR 4,
33 text-007 COLOR 4,
45 text-008 COLOR 4,
60 text-009 COLOR 4.
ENDFORM. " SEC_LIST_HEADING
*& Form get_data_sflight1
* This subroutine displays the data from SFLIGHT according to checkbox
* clicked.
* This subroutine does not have interface parameters to pass
FORM get_data_sflight1 .
DATA:
lw_checkbox TYPE c.
DESCRIBE TABLE t_spfli LINES w_lines.
DO w_lines TIMES.
w_currentline = 3 + sy-index.
CLEAR:
w_checkbox,
fs_spfli.
READ LINE w_currentline FIELD VALUE
w_checkbox INTO lw_checkbox
fs_spfli-carrid INTO fs_spfli-carrid
fs_spfli-connid INTO fs_spfli-connid.
IF sy-subrc EQ 0.
IF lw_checkbox EQ 'X'.
SELECT carrid " Airline Code
connid " Flight Connection Number
fldate " Flight Date
seatsmax " Max Seats
seatsocc " Occupied Seats
FROM sflight
INTO TABLE t_sflight1
WHERE carrid EQ fs_spfli-carrid
AND connid EQ fs_spfli-connid.
IF sy-subrc EQ 0.
APPEND LINES OF t_sflight1 TO t_sflight.
ENDIF. " IF sy-subrc EQ 0.
ENDIF. " IF lw_checkbox EQ 'X'
ENDIF. " IF sy-subrc EQ 0.
ENDDO. " DO w_lines TIMES
ENDFORM. " GET_DATA_SFLIGHT1
*& Form select_all
* This subroutine selects all the records of SPFLI
* This subroutine does not have interface parameters to pass
FORM select_all .
DESCRIBE TABLE t_spfli LINES w_lines.
DO w_lines TIMES.
w_currentline = sy-index + 3.
READ LINE w_currentline FIELD VALUE
w_checkbox INTO w_checkbox.
IF sy-subrc = 0.
MODIFY LINE w_currentline FIELD VALUE
w_checkbox FROM 'X'.
ENDIF. " IF sy-subrc = 0.
ENDDO. " DO lw_line TIMES.
ENDFORM. " SELECT_ALL
*& Form deselect_all
* This subroutine deselects all the records of SPFLI
* This subroutine does not have interface parameters to pass
FORM deselect_all .
DESCRIBE TABLE t_spfli LINES w_lines.
DO w_lines TIMES.
w_currentline = sy-index + 3.
READ LINE w_currentline FIELD VALUE
w_checkbox INTO w_checkbox.
IF sy-subrc = 0.
MODIFY LINE w_currentline FIELD VALUE
w_checkbox FROM ' '.
ENDIF. " IF sy-subrc = 0.
ENDDO. " DO lw_line TIMES.
ENDFORM. " DESELECT_ALL
*& Form flag_line
* This subroutine flags the line which has been read
* This subroutine does not have interface parameters to pass
FORM flag_line .
DESCRIBE TABLE t_spfli LINES w_lines.
DO w_lines TIMES.
w_checkbox = 'X'.
READ LINE sy-lilli FIELD VALUE
w_read INTO w_read
w_checkbox INTO w_checkbox.
IF sy-subrc EQ 0.
MODIFY CURRENT LINE
FIELD FORMAT w_checkbox INPUT OFF
FIELD VALUE w_read FROM '*'.
ENDIF. " IF sy-subrc EQ 0
ENDDO. " DO w_lines TIMES
ENDFORM. " FLAG_LINE
Regards
Abhijeet
Edited by: Abhijeet Kulshreshtha on Jul 11, 2008 9:10 AM -
Get TEXT OF Pushbutton on selection-screen
HI ,
How can i get the name of the pushbutton on the selection-screen.Dear Arun,
First of all Thanks for giving me points for your 'Time Query'.
It was my first inauguration in sdn.
Regarding this 'Button Name' Query,
It seems to me that your problem is still not solved.
All the answers provided do 'Something Else'
and your 'Real Questions' remains unsolved.
Its a very good question. I also tried much and
presently conclude that for achieving this :
1. Some Discipline in Naming Convention has to be followed.
2. This discipline is between
a) Name of button
b) user command for this button
3. I have written a sample code in which
a) 3 buttons appear on screen.
b) press any one button
c) then press 'Execute' Button For displaying name
4. The main logic is to
a) search by using a 'Loop at Screen'
b) In the loop, in the name field search the ucomm.
5. I hope this will be satisfactory till time. If it get
something more, i will let u know.
6. Once again please give points if u feel satisfied.
Thanks & Regards,
Amit Mittal.
REPORT abc.
DATA : btnname(8) TYPE c.
REQUIRED
TABLES sscrfields.
Create Button
Note : Name Of Button 'U1_HELLO'
Starts with 'U1' (assigned user command)
This kind of discipline required
SELECTION-SCREEN PUSHBUTTON /10(20) u1_hello USER-COMMAND u1.
SELECTION-SCREEN PUSHBUTTON /10(20) u2_hello USER-COMMAND u2.
SELECTION-SCREEN PUSHBUTTON /10(20) u3_hello USER-COMMAND u3.
Init
INITIALIZATION.
MOVE 'BUTTON 1' TO u1_hello.
MOVE 'BUTTON 2' TO u2_hello.
MOVE 'BUTTON 3' TO u3_hello.
AT SELECTION-SCREEN.
*------- Loop at Screen
LOOP AT SCREEN.
IF screen-name CS sscrfields-ucomm.
FOUND
btnname = screen-name.
ENDIF.
ENDLOOP.
END-OF-SELECTION.
WRITE: 'BUTTON NAME IS ' , btnname. -
Value from Program to Selection screen using pushbutton on Selection Screen
Sir,
I am creating a Selection screen for update some fields using selection screen. I have 6 fields on screen. First 3 Fields are mendaotry for fetching the data to dispay last 3 fields. I have create a push button for fetch the last 3 fields using first 3 fields.
So Plz guide me how to do that. I have used At Selection Screen with user command. but result is zero.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'FETCH'.
IF AGSLNO-LOw is NOT INITIAL.
SELECT SINGLE AGATE_ENTRY_NUM BTRANSPORTER_CODE B~TRUCK_NO
INTO (V_GTENT_N, V_TR_CODE, V_TRUCK_NO)
FROM ZGATEOUT AS A
INNER JOIN ZGATE_IN AS B ON AGATE_ENTRY_NUM = BGATE_ENTRY_NUM
AND AWERKS = BWERKS
AND ATRANSPORTER_CODE = BTRANSPORTER_CODE
INNER JOIN ZTRPTR_REQ AS C ON AWERKS = CWERKS
AND ATRANSPORTER_CODE = CTRANSPORTER_CODE
WHERE C~AGSLNO = AGSLNO-LOW.
ENDIF.
ENDIF.
S_GTENT_N-low = V_GTENT_N.
S_TR_CODE-low = V_TR_CODE.
S_TRUCK_NO-low = V_TRUCK_NO.
Thanks.
RamHi.,
did you assigned user command to push button..!!
put a break point at IF sscrfields-ucomm = 'FETCH'. and check whether at selection screen event is triggered or not. and check the ucomm value .
check this help for reference: http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba81635c111d1829f0000e829fbfe/content.htm
hope this helps u.,
Thanks & regards,
Kiran -
Dynamic text in selection screen
Hi all,
I have one requirement in selection screen. I have a parameter and one pushbutton in selection screen .
To the right side of the parameter, i need to display the text based on some manipulation in a internal in the program.
If I click on the pushbutton in selection screen , manipulations will be done in the program in a internal table. if the result is ok i need to display the text in the right side of the parameter otherwise no need to display.
How can I achieve this.
Urgent
Thanks
SaravanaHi
Write the code in the
AT selection-screen ON PARAMETER of the Button.
So when pressed on button, that code will do some process and the result will be displayed.
check it, whether it displays the text or not on selection screen.
see the doc
AT SELECTION-SCREEN - selscreen_event
Syntax
| { ON {para|selcrit} }
| { ON END OF selcrit }
| { ON BLOCK block }
| { ON RADIOBUTTON GROUP radi }
| { }
| { ON {HELP-REQUEST|VALUE-REQUEST}
| FOR {para|selcrit-low|selcrit-high} }
| { ON EXIT-COMMAND }.
Alternatives:
1. ... OUTPUT
2. ... ON {para|selcrit}
3. ... ON END OF selcrit
4. ... ON BLOCK block
5. ... ON RADIOBUTTON GROUP radi
6. ... { }
7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
{para|selcrit-low|selcrit-high} }
8. ... ON EXIT-COMMAND
Effect
These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
Alternative 1
... OUTPUT
Effect
This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
Note
The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
Alternative 2
... ON {para|selcrit}
Effect
This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
Note
If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
Alternative 3
... ON END OF selcrit
Effect
This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
Alternative 4
... ON BLOCK block
Effect
This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
Alternative 5
... ON RADIOBUTTON GROUP radi
Effect
This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
Note
The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
Alternative 6
Effect
The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
Alternative 7
... ON { HELP-REQUEST | VALUE-REQUEST } FOR
{para|selcrit-low|selcrit-high} }
Effect
The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
Notes
These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
Alternative 8
... ON EXIT-COMMAND
Effect
This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
Example
In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
REPORT demo_at_selection_screen.
Global data
DATA: sflight_tab TYPE TABLE OF sflight,
sflight_wa LIKE LINE OF sflight_tab.
Selection screens
PARAMETERS p_carrid TYPE spfli-carrid.
SELECTION-SCREEN BEGIN OF SCREEN 500.
SELECT-OPTIONS s_conn FOR sflight_wa-connid.
DATA s_conn_wa LIKE LINE OF s_conn.
SELECTION-SCREEN END OF SCREEN 500.
Handling selection screen events
AT SELECTION-SCREEN ON p_carrid.
IF p_carrid IS INITIAL.
MESSAGE 'Please enter a value' TYPE 'E'.
ENDIF.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD p_carrid
ID 'ACTVT' FIELD '03'.
IF sy-subrc = 4.
MESSAGE 'No authorization for carrier' TYPE 'E'.
ELSEIF sy-subrc <> 0.
MESSAGE 'Error in authority check' TYPE 'A'.
ELSE.
IF sy-ucomm = 'ONLI'.
CALL SELECTION-SCREEN '0500'.
ENDIF.
ENDIF.
AT SELECTION-SCREEN.
IF sy-dynnr = '0500'.
IF s_conn IS INITIAL.
MESSAGE 'Please enter values' TYPE 'W'.
ELSE.
SELECT *
FROM sflight
INTO TABLE sflight_tab
WHERE carrid = p_carrid AND
connid IN s_conn.
IF sy-subrc <> 0.
MESSAGE 'No flights found' TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
Main program
START-OF-SELECTION.
Reward points if useful
Regards
Anji
Message was edited by:
Anji Reddy Vangala -
Symbol as default in a selection screen in alv
hi all,
how to bring GE(>=) symbol as default in a selection screen in alv report.
by
Ramesh.Hai Ramesh,
Create Pushbuttons in selection screen ,In pushbutton write the ' >=' instead of providing the text.
Try like this may be u will find the answer,
REPORT DEMO.
TABLES SSCRFIELDS.
DATA FLAG.
SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,
PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,
END OF LINE,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,
PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,
END OF LINE,
END OF SCREEN 500.
AT SELECTION-SCREEN.
CASE SSCRFIELDS.
WHEN 'CLI1'.
FLAG = '1'.
WHEN 'CLI2'.
FLAG = '2'.
WHEN 'CLI3'.
FLAG = '3'.
WHEN 'CLI4'.
FLAG = '4'.
ENDCASE.
START-OF-SELECTION.
TIT = 'Four Buttons'.
BUT1 = 'Button 1'.
BUT3 = 'Button 3'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
CASE FLAG.
WHEN '1'.
WRITE / 'Button 1 was clicked'.
WHEN '2'.
WRITE / 'Button 2 was clicked'.
WHEN '3'.
WRITE / 'Button 3 was clicked'.
WHEN '4'.
WRITE / 'Button 4 was clicked'.
WHEN OTHERS.
WRITE / 'No Button was clicked'.
ENDCASE.
This example defines four pushbuttons on a selection screen that is displayed as a dialog box. The selection screen is defined in a statement chain for keyword SELECTION-SCREEN.
If the text symbols TEXT-020 and TEXT-040 are defined as 'Button 2' and 'Button 4', the four pushbuttons appear as follows on the selection screen displayed as a dialog box.
CLI1, CLI2, CLI3 and CLI4 are used for <ucom>. When the user clicks one of the pushbuttons, the AT SELECTION-SCREEN event is triggered, and the FLAG field is set. The FLAG field can be further processed during subsequent program flow after the user has chosen Execute.
Refer the above code, and make change just to clear all the fields in the selection screen, when corresponding push button is clicked..
May be this answer is helpful to u.
Regards,
Skumari -
Tooltip on pushbutton on alv report selection screen
Hi Experts,
I have a selection screen with two pushbuttons i want to provide tooltip on this button when user takes his cursor on it .. some part of my code
Selection screen:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) text-t02 FOR FIELD p_info.
PARAMETERS: p_info TYPE string.
SELECTION-SCREEN: PUSHBUTTON 68(10) but1 USER-COMMAND cli1.
SELECTION-SCREEN : END OF LINE.
PARAMETERS: r_exe_im RADIOBUTTON GROUP rb1.
PARAMETERS: r_st RADIOBUTTON GROUP rb1.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN: PUSHBUTTON /1(20) exec1 USER-COMMAND cli2.
SELECTION-SCREEN: FUNCTION KEY 1.
SELECTION-SCREEN END OF BLOCK b1.
please tell me on these selection fields how to display tool tip.
Thanks and regards,
Roshan.Hi,
After completing your executable program in SE38, activate it and goto SE51(Screen painter).
Here give the name of your program and screen number as 1000.
Click on Change.
Goto Element List Tab.
Here you will find all your elements from your program.
Select the required element and click on Properties.
Here you will find a Tooltip Text property. Click on the button 'Text' of this property.
You will be given 2 options 1) Text from Text element 2) Text from Variable
Enter as per requirement
Save and Activate.
Hope this will be useful
Regards
Bhupal -
Problems in at selection-screen output - setting pushbutton invisible
Hello,
I hope I can get some help here
I have a problem with setting a pushbutton invisible
i have a field (long-text) in my screen - and behind this a pushbutton for calling the editor
if in a variant the parameters field is set invisible i also want to set the pushbutton invisible
i have no idea why in the at selection-screen output event screen-invisible is always 0 - but in the variant the field is set invisible.
i need to know if the parameters field is invisible to set the pushbutton the same
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) S_TXB_L1.
PARAMETERS S_TXT_L1 TYPE ZHR_FC_STRING.
SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_1 USER-COMMAND YLTXT1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) S_TXB_L2.
PARAMETERS S_TXT_L2 TYPE ZHR_FC_STRING.
SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_2 USER-COMMAND YLTXT2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) S_TXB_L3.
PARAMETERS S_TXT_L3 TYPE ZHR_FC_STRING.
SELECTION-SCREEN PUSHBUTTON 79(15) P_LTX_3 USER-COMMAND YLTXT3.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME(7) = 'S_TXT_L'.
MERK_INVISIBLE = SCREEN-INVISIBLE.
ENDIF.
IF SCREEN-NAME(6) = 'P_LTX_'.
SCREEN-INVISIBLE = MERK_INVISIBLE.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Thanks very much...
HelmutI agree - there seems to be some confusion here. In the variant the field can only be "hidden" while in the code it is possible to make the field completely invisible. 'Hiding' the field in the variant merely hides it by default and adds a 'plus' button to the toolbar, by clicking which the hidden elements can be exposed.
As far as changing the screen fields goes, I find it usefull to use MODIF ID. Perhaps this blog could be helpful:
http://friendlyabaper.blogspot.com/2009/07/my-super-awesome-selection-screen.html
P.S. Please use the code tags for the code, per Forum Rules. -
Logical Database selection screen pushbutton
Hello All,
I need to create a pushbutton on a selection screen of a logical database. Basically this pushbutton when clicked will either display or suppress some fields on the screen. I have tried to use the SSCRFIELDS option to create a pushbutton, however that never displays for me. Logical Database DDF has an example of a pushbutton that I am looking to create, however the functionality will be different. I am not sure what I am missing, can anyone help? Thanks.
JohnHello All,
Thanks for your replies. However, there is something that is causing these options not to work. For some reason when using SSCRFIELDS nothing displays. For the SELECTION-SCREEN PUSHBUTTON command, we see the push button however our code for some reason is not working. I have another developer working this with me and we are both stumped. We are mirroring that DDF Logical Database and are not having any luck so far. Does anyone have any further suggestions?
John -
Dynamic variables: SELECTION-SCREEN PUSHBUTTON
hi, how I can create 100 buttons on a cycle so dynamic?
example:
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-001 USER-COMMAND but1.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-002 USER-COMMAND but2.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-003 USER-COMMAND but3.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-004 USER-COMMAND but4.
SELECTION-SCREEN END OF LINE.
.....must be dynamic and they can be 100 and just 10
thanks in advance.
goudden.It gives you an error cause the macro is wrong. Try like this:
define create_line.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-&1 USER-COMMAND b&1.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-&2 USER-COMMAND b&2.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-&3 USER-COMMAND b&3.
SELECTION-SCREEN PUSHBUTTON (4) TEXT-&4 USER-COMMAND b&4.
SELECTION-SCREEN END OF LINE.
end-of-definition.
selection-screen begin of block b01.
create_line: 001 002 003 004, 005 006 007 008.
selection-screen end of block b01. -
I have designed one push button on the selection screen below to input fields. If I press that button then I need to do some bdc programs after that I need to display log in the output screen. For this what I did is I have created perform statement in at selection screen event. And I am calling all the transactions inside of that form. But I am not able to display log in the output screen as it is under at selection screen event. So how to provide the log in the output screen after pressing push button.
What I did is under start of selection I am looping messtab internal tables. The log displaying after I press execute button but it is not displaying after I press push button.
Please help me what logic I have to build for this.
Thanks a lot in advance.Try something like this.
REPORT RICH_0001.
tables: sscrfields.
selection-screen PUSHBUTTON 1(20) pb_test user-command PB1.
at selection-screen.
if sy-ucomm = 'PB1'.
sscrfields-ucomm = 'ONLI'.
endif.
start-of-selection.
write:/ 'StartOfSelection has been executed'.
Regards,
Rich Heilman -
HOW CAN I PLACE 2 PUSHBUTTONS SIDE BY SIDE ON THE SELECTION-SCREEN?
i want to place 2 buttons but using my code, the other goes below the first. Can anyone help me?
hi,
write as below
selection-screen: pushbutton 10(30) text-003 user-command
clk1 modif id sg1,
pushbutton 50(50) text-004 user-command clk1
the push buttons appear in the same line.
reward if useful,
thanks and regards
Edited by: hema bobbili on May 23, 2008 6:58 AM -
How to disable a pushbutton created in selection screen.
How to disable a pushbutton created in selection screen.
you can make it invisible during runtime.
At the event, AT SELECTION-SCREEN OUTPUT. you can turn attributes on and off for screen elements. In this case, invisible = 1, makes the element invisible, 0 makes is visible.
here is a short sample.
report zrich_0001.
parameters: p_check type c.
selection-screen pushbutton 40(20) gocfg
user-command gocfg.
at selection-screen output.
loop at screen.
if screen-name = 'GOCFG'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
Regards,
Rich Heilman
Maybe you are looking for
-
Hi Experts, I am working on webdynpro application.I am using 2 views Read_values and Display_values. In read_values i am entering the material number and siplaying the table using ALV in Display_values. Problem i am not able to see ALV display in Di
-
Using Image Capture to scan with Canon Pixma MX700
I previously had trouble connecting my Canon Pixma MX700 to my MBP, but soon figured out that I needed a new high speed USB 2.0 cable, versus the old one I was trying to use it with. Doh! So now it prints without any trouble at all, and I know that a
-
Unable to generate users.xml file
Hi All, I have installed OCS 10.1.2.0.0.and applied the cumulative patchset and now on OCS 10.1.2.3.0 Now i am trying to migrate users and their mail box from exchange 5.5 running on Windows NT 4 server. I have installed the esmigration tool on a mac
-
Creating Bookmarks in form using JavaScript on searched string.
Hi all, I am currently working on SAP Adobe Form to which I need to add bookmarks dynamically where the Searched string is found and this should be done during its Assembly. Any help is appreciated. Edited by: gopbhav on Jul 19, 2010 8:12 PM Edited b
-
Hello, does anyone have any suggesstions on what alerts to enable on RTMT for CUCM? I see some listed in Red and other in Black. We curently seem to be generating an excessive amount of alerts and I would like to pare that back to only relevant ale