Regarding button in Selection
Hi All ,
I have a requirement where in i need to assign an input field to download data after clicking a button on the selection screen.
Regards,
Shafiq
Hi
You can design your menu with pf-status, add the button and the text on the menu.
Assign the Function code for the button on the menu.
In your program write code, to call the FM for F4-help for file name, when the ok-code matches that of the button.
Regards
Raj
Similar Messages
-
Regarding button in selection screen
Hi all,
A query...
After clicking the button on the screen, when i press the execute button it should give a display saying the corresponding button i clicked....
But its not working out frnds...
tables sscrfields.
data flag.
parameters test.
selection-screen pushbutton /20(10) but1 user-command cli1.
selection-screen pushbutton /20(10) text-020 user-command cli2.
initialization.
but1 = 'Button 1'.
At selection-screen.
if sscrfields-ucomm = 'cli1'.
flag = '1'.
elseif sscrfields-ucomm = 'cli2'.
flag = '2'.
endif.
start-of-selection.
if flag = '1'.
write :/'Button 1 was clicked'.
elseif flag = '2'.
write :/'Button 2 was clicked'.
endif.
Thanking u all.
regards,
surajHi,
<b>CHECK THIS CODE now it's working</b>
data flag.
selection-screen pushbutton /20(10) but1 user-command CLI1.
selection-screen pushbutton /20(10) but2 user-command CLI2.
initialization.
but1 = 'Button 1'.
but2 = 'Button 2'.
At selection-screen.
<b>if sy-ucomm = 'CLI1'.</b>
flag = '1'.
<b>elseif sy-ucomm = 'CLI2'.</b>
flag = '2'.
endif.
start-of-selection.
if flag = '1'.
write :/'Button 1 was clicked'.
elseif flag = '2'.
write :/'Button 2 was clicked'.
endif.
Regards,
Priyanka. -
Regarding radio button and selection screen
hi
i have a requirement to grey out one particular select option , if any one of 4 radio button is selected. (total 5 radio buttons ) .
how do i proceed .
SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: p_year for s021-spmon obligatory,
p_kunag FOR vbrk-kunag ,
p_matnr FOR vbrp-matnr ,
p_augru FOR vbrp-augru_auft ,
p_vbeln FOR vbrk-vbeln .
SELECTION-SCREEN END OF BLOCK blk1.
SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
PARAMETERS: nrw RADIOBUTTON GROUP g1 default 'X'user-command check,
mwd RADIOBUTTON GROUP g1user-command check,
rws RADIOBUTTON GROUP g1user-command check,
edu RADIOBUTTON GROUP g1user command check
standard RADIOBUTTON GROUP g1 .
SELECTION-SCREEN END OF BLOCK blk2.
SELECTION-SCREEN END OF BLOCK blk.
i know we need to use at-selection screen output.
but how do i set ONLY that particular select option , to no input.Hi ,
Use like This
User Dynamic Selection
at selection-screen output.
select single * from t000md.
loop at screen.
case screen-group1.
when 'REL'.
if not p_old is initial.
screen-input = '0'.
screen-required = '0'.
screen-invisible = '1'.
endif.
modify screen.
when 'BEL'.
if not p_new is initial.
screen-input = '0'.
screen-required = '0'.
screen-invisible = '1'.
endif.
modify screen.
when 'ARB'.
if p_new is initial.
screen-input = '0'.
screen-required = '0'.
screen-invisible = '1'.
endif.
modify screen.
when 'MTA'.
if p_new is initial.
screen-input = '0'.
screen-required = '0'.
screen-invisible = '1'.
endif.
modify screen.
endcase.
endloop.
Reward Points if it is useful
Thanks
Seshu -
Error during creation of push button on selection screen
Hi,
I wanted to create push buttons on selection screen,
Code:
DATA DB1 TYPE VBAP-WERKS.
DATA DB2 TYPE MARA-MATNR.
SELECT-OPTIONS : SPLANT FOR DB1,
SCLASS FOR DB2.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3.
INITIALIZATION.
DATA FUNCTXT TYPE SMP_DYNTXT.
CLEAR FUNCTXT.
DATA: FUNCTXT_01 TYPE SSCRFIELDS-FUNCTXT_01.
FUNCTXT-TEXT = 'DEL'.
SSCRFIELDS-FUNCTXT_01 = FUNCTXT.
CLEAR FUNCTXT.
FUNCTXT-TEXT = 'EDIT'.
SSCRFIELDS-FUNCTXT_02 = FUNCTXT.
CLEAR FUNCTXT.
FUNCTXT-TEXT = 'CRE'.
SSCRFIELDS-FUNCTXT_03 = FUNCTXT.
But during activating, I'm getting the error as : Field "SSCRFIELDS-FUNCTXT_01" is unknown. It is neither in one of the specified tables nor defined by "DATA" statement.
Please suggest solutions to overcome this error.
Regards
Darshan MSHi,
trans. for examples of selection screen : BIBS
regards
Fred -
New tab in XD01 only when company code data button is selected
Hello all,
I added a new tab in XD01 with the help of BADIs CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS.
But the new tab is appearing at all levels i.e general as well as company code level.
But my client needs the new tab to be displayed only when the company code data button is selected.
How do I restrict this?
Any pointers to this would be highly appreciated.
Thanks in advance.
Regards,
Chandra.Dear sriraj
If you found solution exactly Make it correct answer but remember in this Post to which Answer you have given Correct answer so dont do like this
Because in future people easily trace there solution
Dear Mahesh .. Here my intention to guide him only not to blame any one
thanks a lot -
Creating push button on Selection screen application toolbar
Hi Friends,
this is a HR-ABAP report. I have to create a push button on Selection screen. when user clicks on that push button 'MODAL DIALOG BOX' has to be displayed containing some data.
plz kindly give some sample code to do this.
Regards,
Radhika Dasharatha.Hi,
1)Use SELECTION-SCREEN PUSHBUTTON /10(20) PUSH USER-
COMMAND 'ABC'. in selection screen.
2) Give the static name to button in INITIALIZATION event like PUSH = 'PRESS'.
3) At selection screen.
if sy-ucomm eq 'ABC'.
call FM HR_BE_GE_MODAL_DIALOG
endif.
Thanks
Sandeep
Reward if useful -
Radio button and select option in one line
Hi,
I have an requirement in which i need to display the radio button and select option in one line in an report program.
How can i do it?
Regards,
Arun.Hi,
Try this code.
TABLES: bkpf.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_r1 RADIOBUTTON GROUP a.
SELECTION-SCREEN COMMENT 4(20) text-001 FOR FIELD p_r1.
SELECTION-SCREEN COMMENT 30(12) text-002 FOR FIELD p_date.
SELECTION-SCREEN POSITION 39.
SELECT-OPTIONS: p_date FOR bkpf-budat OBLIGATORY.
SELECTION-SCREEN END OF LINE.
PARAMETERS: p_r2 RADIOBUTTON GROUP a.
text-001 = " Radio button"
text-002 = "Posting date" -
Button "Service Selection" in ML81N doesn't appear
After introducing the PO and creating the SES, the button "Service Selection" is missing, so I can't continue doing the SES.
This happens only in DEV, but not in QAS and PROD.
I believe it has nothing to do with customizing.
Thanks.Hi,
Check latest GUI 6.40 or 7.10 version and update patch level in DEV. Better Consult Basis Consultant.
Regards,
Biju K -
Radio Buttons on Selection Screen
Hi,
I have four radio buttons on selection screen in a frame, all belonging to the same group.
When the program is called using transaction 1, first two radio buttons are displayed. When the program is called using transaction 2, bottom two radio must be displayed.
I am doing this using the following code.
The problem is : When last two are displayed, there is empty space left on the top and first two are displayed there is empty space left in the bottom of the frame. How can this be taken care of such there are no empty spaces in the box frame?
Code:
Radio Buttons for Table Name
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-005.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_ot RADIOBUTTON GROUP grp1 MODIF ID one.
SELECTION-SCREEN COMMENT 5(31) text-001 FOR FIELD p_ot.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_exp RADIOBUTTON GROUP grp1 MODIF ID one.
SELECTION-SCREEN COMMENT 5(31) text-002 FOR FIELD p_exp.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_cost RADIOBUTTON GROUP grp1 MODIF ID two.
SELECTION-SCREEN COMMENT 5(31) text-003 FOR FIELD p_cost.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_att RADIOBUTTON GROUP grp1 MODIF ID two.
SELECTION-SCREEN COMMENT 5(31) text-004 FOR FIELD p_att.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK bl1.
Initialization
INITIALIZATION.
Display Table Names depending on transaction calling the program
PERFORM display_table_names.
FORM display_table_names.
DATA : l_mod_id(3) TYPE c.
IF sy-tcode EQ 'ZVTEST1'.
l_mod_id = 'ONE'.
ELSEIF sy-tcode EQ 'ZVTEST2'.
l_mod_id = 'TWO'.
ENDIF.
LOOP AT SCREEN.
IF screen-group1 EQ l_mod_id.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDFORM. " display_table_namesHi,
REPORT Z_SALES MESSAGE-ID ZZ .
* Variables *
DATA: IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_MSGS LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA: V_FILE TYPE STRING.
* Internal Tables *
DATA: BEGIN OF IT_SALES OCCURS 0,
AUART,
VKORG,
VTWEG,
BSTKD,
KUNNR_KUNAG,
KUNNR_KUNWE,
KETDAT,
KPRGBZ,
PRSDT,
BSTKD_1,
KUNNR_KUNAG1,
KUNNR_KUNWE1,
KETDAT_1,
KPRGBZ_1,
PRSDT_1,
ZTERM_1,
INCO1,
INCO2,
MABNR,
KWMENG,
BSTKD_2,
KUNNR_KUNAG2,
KUNNR_KUNWE2,
KETDAT_2,
KPRGBZ_2,
PRSDT_2,
ZTERM_2,
INCO1_1,
INCO2_2,
KSCHL,
KBETR,
END OF IT_SALES.
* Selection-Screen *
*Selection Screen 1
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_FILE(25) TYPE C,
O_FILE(25) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
*Selection Screen 2
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
PARAMETERS: CAL_TRA RADIOBUTTON GROUP G1 USER-COMMAND FLAG,
SESSION RADIOBUTTON GROUP G1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK B2.
*Selection Screen 3
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.
PARAMETERS: MODE DEFAULT 'X' MODIF ID BL1,
UPDATE DEFAULT 'X' MODIF ID BL1.
SELECTION-SCREEN END OF BLOCK B3.
*Selection Screen 4
SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-003.
PARAMETERS: SES_NAM(25) MODIF ID BL2,
KEP_TRAS TYPE C DEFAULT 'X' MODIF ID BL2,
LOC_DATE TYPE SY-DATUM MODIF ID BL2,
USER TYPE SY-UNAME DEFAULT SY-UNAME MODIF ID BL2.
SELECTION-SCREEN END OF BLOCK B4.
* At Selection-Screen Output *
AT SELECTION-SCREEN OUTPUT.
IF CAL_TRA = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'BL1'.
SCREEN-ACTIVE = '1'.
ENDIF.
IF SCREEN-GROUP1 = 'BL2'.
SCREEN-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF SESSION = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'BL1'.
SCREEN-ACTIVE = '0'.
ENDIF.
IF SCREEN-GROUP1 = 'BL2'.
SCREEN-ACTIVE = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
* At Selection-Screen *
AT SELECTION-SCREEN.
PERFORM VALIDATE_MANDATORY_FIELDS.
***************** INITIALIZATION ********************
INITIALIZATION.
LOC_DATE = SY-DATUM - 1.
* Start of Selection *
START-OF-SELECTION.
V_FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = V_FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
TABLES
DATA_TAB = IT_SALES
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*& Form VALIDATE_MANDATORY_FIELDS
* text
FORM VALIDATE_MANDATORY_FIELDS.
IF P_FILE IS INITIAL OR O_FILE IS INITIAL.
MESSAGE E000 WITH 'ENTER BOTH THE FILE NAMES'.
ENDIF.
IF CAL_TRA = 'X'.
IF MODE IS INITIAL OR UPDATE IS INITIAL.
MESSAGE E000 WITH 'ENTER BOTH THE OPTIONS'.
ENDIF.
IF SY-SUBRC <> 0.
IF MODE <> 'A' OR MODE <> 'E' OR MODE <> 'N'
OR MODE <> 'a' OR MODE <> 'e' OR MODE <> 'n'.
MESSAGE E000 WITH 'Mode should be either A, E or N'.
ENDIF.
IF UPDATE <> 'S' OR UPDATE <> 'A'
OR UPDATE <> 's' OR UPDATE <> 'a'.
MESSAGE E000 WITH 'Mode should be either S or A'.
ENDIF.
ENDIF.
ENDIF.
IF SESSION = 'x'.
IF SES_NAM IS INITIAL
OR KEP_TRAS IS INITIAL
OR LOC_DATE IS INITIAL
OR USER IS INITIAL.
MESSAGE E000 WITH 'ENTER ALL THE FIELDS'.
ENDIF.
ENDIF.
ENDFORM. "VALIDATE_MANDATORY_FIELDS
Regards
vijay -
How to disable save button on selection screen (1000) run from other report
Hi Experts,
Can any one let me know how to disable save button on selection screen (1000) run from other report.
Say I am running from report R1 which submits report R2, but the save button should be disabled on
report R2(selection screen 100).
Thanks in advance.
Regards
RP.Hi RPReddy16 ,
Try this:
DATA :BEGIN OF t_extab occurs 0,
fcode like rsmpe-func,
END OF t_extab.
REFRESH T_EXTAB.
MOVE 'SAVE' TO T_EXTAB-FCODE.
APPEND T_EXTAB.
CLEAR T_EXTAB.
SET PF-STATUS 'STATUS' EXCLUDING T_EXTAB.
Regards,
José -
How to disable execute button in selection-screen
Hi,
I have already placed a execute button in selection screen but now I want to diable
1. All std buttons including F8
2. but excluding F1
regards
paulHi
Check this FM : RS_SET_SELSCREEN_STATUS
sample code :
DATA: BEGIN OF i_exc OCCURS 0,
code LIKE sy-ucomm,
END OF i_exc.
DATA: ws_repid like sy-repid.
CLEAR i_exc.
i_exc-code = 'ONLI'.
APPEND i_exc.
MOVE: sy-repid TO ws_repid .
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = ' '
p_program = ws_repid
TABLES
p_exclude = i_exc.
Laxman
Message was edited by: Laxmana Kumar -
How to Add Push Button On Selection Screen
Hi Experts,
How to add Push button on Selection Screen.
Points will b rewarded for useful help.
Bohra.Hi,
To create a pushbutton on the selection screen, you use:
SELECTION SCREEN PUSHBUTTON [/]<pos(len)> <push>
USER-COMMAND <ucom> [MODIF ID <key>].
The [/]<pos(len)> parameters and the MODIF IF addition have the same function as for the formatting options for underlines and comments.
<push> determines the pushbutton text. For <push>, you can specify a text symbol or a field name with a maximum length of eight characters. This character field must not be declared with the DATA statement, but is generated automatically with length <len>. The field must be filled before the selection screen is called.
For <ucom>, you must specify a code of up to four characters. When the user clicks the pushbutton on the selection screen, <ucom> is entered in the UCOMM of the SSCRFIELDS interface work area. You must use the TABLES statement to declare the SSCRFIELDS structure. The contents of the SSCRFIELDS-UCOMM field can be processed during the AT SELECTION-SCREENevent.
Ex.
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.
Regards,
Bhaskar -
Radio button in selection screen and push button
Hi experts,
I want to give radio button in selection screen side by side.
how we can do this on slection screen.
secondly i want to resize push button on selection screen.
please provide me the exact solution.
thanks
babbalHi babbal,
For Your Requriment yo can go to tcode se51 & then give ur program name & give screen number as 1000 because 1000 is default screen for all the programs and in se51 Press Layout button & then you can make changes to the Selection screen according to your requriment
Hope it will be Helpfull.......!!
Thanks & Regards,
Bhushan -
Command Button on selection screen application tool bar
Hi All,
I want to add command Button on selection screen application bar.
it is my z progarm .
please suggest one sample code .
regards,
Ajay reddyGoto SE41, create a Status and the call it in your app.
SET PF-STATUS 'TEST'.
Greetings,
Blag. -
Code for execute button on selection screen to get result
hi experts,
I need a help for writing a code for execution button on selection screen.Like in normal report on abap editor
we insert selection criteria like number and we get the result according that particular number on next screen.
same thing i am trying here also. So i am writing a code on button that when i press the button it will go to the next
screen according to the selection criteria.
Plz help me helpful answers are appriatiated !!!
Thanks & regards
Vipul Guptahi,
In the OnAction write :
1. get the values entered in selection criteria using :
DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.
DATA lo_el_cn_check TYPE REF TO if_wd_context_element.
DATA ls_cn_check TYPE wd_this->element_cn_check.
DATA lv_ca_check LIKE ls_cn_check-ca_check.
navigate from <CONTEXT> to <CN_CHECK> via lead selection
lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).
get element via lead selection
lo_el_cn_check = lo_nd_cn_check->get_element( ).
get single attribute
lo_el_cn_check->get_attribute(
EXPORTING
name = `CA_CHECK`
IMPORTING
value = lv_ca_check ).
Now lv_ca_check has your value entered in Selection criteria.
2. write the select query to fetch data according to selection criteria.
select * from <table> into correponding field of table <internl table>
where Field = lv_ca_check.
3. Now in the internal table <internl table> you have values according to search criteria.
4. Bind the internal table with node which is binded to table to show data.
lo_nd->bind_table( internaltable ).
I hope it is clear .
Maybe you are looking for
-
Balance confirmation certificate of vendor from SAP
Hai, Could any guide me in geeting balance confirmation cerficiate / statement of vendor / customer balance from SAP Thanks.
-
SLF4J instead of Java Util Logging?
Hi BDBJE team, Is it included on the BDBJE roadmap a migration from "Java Util Logging" to a most flexible framework like SLF4J? BR, /César.
-
Global error handling question.
Hello! I've implemented error reporting logic in my app, so when some error occurs the email has been sent with error message, and error id. But it would be nice to locate error place (line number), i know that there is getStackTrace() method of err
-
Cannot get Quick Preview to run....
Hi, this might sound really stupid. I'm new to Aperture. Love the idea of Quick Preview - but how do I get it to work??? I watched the online Aperture's official tutorial videos (which flickr really bad, btw) and used 'Help'. When I press 'P' or go t
-
Embed Captivate v into MS PowerPoint 2003
Is there a kind person out there who could send "simple step x step" instructions explaining how to embed a Captive v4 project into a MS Powerpoint 2003 slide ? Thanks in advance Noel