How to hide input fields on selection screen using variant attribute
Hello all,
I want to know how to hide input fields on selection screen using variant attribute conpletely.
As you know, when setting the attribute of variant "Hide field" checked, the field is temporarily hidden, but when clicking "All Selections(F7)" button on the selection screen, the fileds become appeared.
I want to hide the field completely. Di you know how to do ?
Thank you for your support.
Regards,
Hideki Kozai
Use this attribute hide field and save the variant. Then create transaction for this program setting default variant for parameter Start with variant . The user who runs it will have it by defualt set.
Otherwise
in PBO simply use LOOP at screen and output = 0 for this field. This will ensure that field is invisible in any case.
Regards
Marcin
Similar Messages
-
How to make a field in selection screen as READ_ONLY !!
Hi,
How to make a field in selection screen as READ_ONLY !!.
Thanks,
SenthilThis is the code you need to have in your program.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'MYSELFLD'.
SCREEN-INPUT = 0.
MODIFY-SCREEN.
ENDIF.
ENDLOOP. -
Month/year input field in selection screen
Hi,
Can anyone tell how to declare an input field in selection screen in the format month/year with out day.
Thanks.
Prasad.hi ,
I have the same doubt ,
but its taking invalid input also as in if i enter 13/2006
Can it be avoided,
also can the calender be displayed at F4 on such field.
Thanks in advance
Regards
Bijal -
How to make required field on selection screen in Query
i'm now working with query(SQ01).
but don't know how to make required field on selection screen in Query.
thanks in advancei'm now working with query(SQ01).
but don't know how to make required field on selection screen in Query.
thanks in advance -
How to hide F8 function on selection screen.
Hi,
How to hide F8 function on selection screen.Just create a customer status and SET this status in your INITIALIZATION block.
<i>You can copy the standard status from program RSSYSTDB status %_00.</i>
Regards -
How to hide a block in Selection screen ?
Hello abap gurus,
I have a requirement where I have to hide a block on Selection screen. Can anyone of u give the command for that or code..
Its urgent !
Om Sai Ram,
aRgDHi,
Just paste the following code in abap editor.
*Selectionscreen elements..............................................
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS:
p_uname LIKE sy-uname
MODIF ID bl1. " User name
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS:
p_fname(10) TYPE c MODIF ID bl2
OBLIGATORY, " First name
p_lname(10) TYPE c MODIF ID bl2
OBLIGATORY, " Last name
p_empid(5) TYPE n MODIF ID bl2
OBLIGATORY. " Employee id
SELECTION-SCREEN END OF BLOCK b2.
*" Data declarations...................................................
Work variables *
DATA:
w_uname LIKE sy-uname. " User name
AT SELECTION-SCREEN OUTPUT EVENT *
AT SELECTION-SCREEN OUTPUT.
PERFORM validate.
AT SELECTION-SCREEN ON FIELD EVENT *
AT SELECTION-SCREEN ON p_uname.
PERFORM validate_uname.
END OF SELECTION EVENT *
END-OF-SELECTION.
PERFORM output.
FORM VALIDATE *
This subroutine disables all parameters if user name is not *
initialized or user name is not valid. *
There are no interface parameters to be passed to this subroutine. *
FORM validate.
w_uname = sy-uname.
IF p_uname IS INITIAL OR p_uname NE w_uname.
LOOP AT SCREEN.
IF screen-group1 EQ 'BL2'.
screen-active = '0'.
ELSE.
screen-active = '1'.
ENDIF. " IF screen-group1 EQ 'BL2'.
MODIFY SCREEN.
ENDLOOP. " LOOP AT SCREEN.
ELSEIF p_uname EQ sy-uname.
LOOP AT SCREEN.
IF screen-group1 = 'BL1'.
screen-active = 0.
MODIFY SCREEN.
ELSEIF screen-group1 = 'BL2'.
screen-active = 1.
screen-output = 1.
screen-input = 1.
screen-invisible = 0.
ENDIF. " IF screen-group1 = 'BL1'.
MODIFY SCREEN.
ENDLOOP. " LOOP AT SCREEN.
ENDIF. " IF p_uname IS INITIAL...
ENDFORM. " VALIDATE
Form VALIDATE_UNAME *
This subroutine gives error message and validates the user name. *
There are no interface parameters to be passed to this subroutine. *
FORM validate_uname .
IF p_uname IS INITIAL.
MESSAGE 'Enter the user name'(001) TYPE 'E'.
ELSEIF p_uname NE sy-uname.
MESSAGE 'Authorization unsuccessful'(002) TYPE 'E'.
ENDIF. " IF p_uname IS INITIAL.
ENDFORM. " VALIDATE_UNAME
Form OUTPUT *
This subroutine is used to print the output. *
There are no interface parameters to be passed to this subroutine. *
FORM output .
IF p_fname IS NOT INITIAL.
WRITE: / 'First name:'(003),p_fname.
WRITE: / 'Last name:'(004),p_lname.
WRITE: / 'Employee id:'(005),p_empid.
ENDIF. " IF p_fname IS NOT INITIAL.
ENDFORM. " OUTPUT
I think this solves your problem.
Reward if it helps you.....
Regards,
Sandhya -
Display input field on selection screen based on condition
Hi,
I have a report with selection with no of input fields and a checkbox .I want to hide few i/p fileds based on checkbox i/p.
If the checkbox = 'X',then only those fields should apper on screen for input.
how do we get this on sel screen.
thanks in advance.Hi,
you can use this code as reference.
Here, depens on check box, in the next screen resepective select options will be displayed.
You can use this logic for your requirement.
REPORT Z50871_SELECTOPS_DYNAMIC.
PARAMETERS : CH_EBELN AS CHECKBOX,
CH_VBELN AS CHECKBOX.
DATA: V_EBELN TYPE EKKO-EBELN,
V_VBELN TYPE VBAK-VBELN.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,
VBELN FOR V_VBELN MODIF ID G2.
SELECTION-SCREEN END OF SCREEN 100 .
AT SELECTION-SCREEN OUTPUT.
IF SY-DYNNR = 100.
IF CH_EBELN = 'X' AND
CH_VBELN = ''.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G1'.
SCREEN-ACTIVE = '1'.
ELSE.
SCREEN-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF CH_VBELN = 'X' AND
CH_EBELN = '' .
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G2'.
SCREEN-ACTIVE = '1'.
ELSE.
SCREEN-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF CH_EBELN = 'X' AND CH_VBELN = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G1'
OR SCREEN-GROUP1 EQ 'G2' .
SCREEN-ACTIVE = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDIF.
AT SELECTION-SCREEN.
IF SY-DYNNR = 1000.
IF CH_EBELN = 'X' OR CH_VBELN = 'X'.
CALL SELECTION-SCREEN 100.
ELSE.
MESSAGE I000(Z50871MSG) WITH 'Please select atleast one checkbox'.
ENDIF.
ENDIF.
Regards
Sandeep Reddy -
How to hide particular block in selection screen
Hi,
I am having different blocks in a selection screen.
How to show the blocks dynamically according to a radio button selection.
means how to Hide/show entire block.
Thanks,
anandanHi Anandan,
Try this program.
REPORT zvk_collect.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME NO INTERVALS.
PARAMETER : p_plant RADIOBUTTON GROUP g1 USER-COMMAND radio DEFAULT 'X',
p_mrp RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME NO INTERVALS.
PARAMETER : p_werks TYPE marc-werks MODIF ID sp1.
SELECTION-SCREEN END OF BLOCK b2.
*SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME NO INTERVALS.
*PARAMETER : p_berid TYPE smdma-berid MODIF ID sp2.
*SELECTION-SCREEN END OF BLOCK b3.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CHECK screen-group1 = 'SP1' OR
screen-group1 = 'SP2'.
IF p_plant = 'X'.
IF screen-group1 = 'SP2'.
screen-input = 0.
screen-active = 0.
screen-required = 1.
MODIFY SCREEN.
ENDIF.
ELSE.
IF screen-group1 = 'SP1'.
screen-input = 0.
screen-active = 0.
screen-required = 1.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Execute with Comments ON and Without Comments and See the difference
Reward if found helpful -
How to validate input's in selection-screen
Hi ,
can any one how to validate input's field's in selection-screen and each field has diffirent tables and what is the table name which has all the validating fields??
Thank's in advance..hi,
You can use validate selct-options using select query by obtaining the realtionship from table .Using the selection-screen events You can write code for validation as follows.
tables:
kna1. " General Customer data
*"Selection screen elements............................................
select-options:
s_kunnr for kna1-kunnr. " Customer number
*"Data declarations...................................................
Data declaration of the structure to hold kna1 details *
data:
begin of fs_customer,
kunnr type kna1-kunnr, " Customer number
adrnr type kna1-adrnr, " Address
anred type kna1-anred, " Title
erdat type kna1-erdat, " Created on
ernam type kna1-ernam, " Created by
end of fs_customer.
*"Constants declarations..............................................
constants
w_path type string value 'D:\DOWNLOAD\CUSTOMER'.
Internal table to hold customer details *
data:
t_customer like
standard table
of fs_customer.
AT SELECTION SCREEN OUTPUT *
at selection-screen.
perform retrieve.
Form RETRIEVE *
This subroutine retrieve customer data from table kna1 *
There are no interface parameters to be passed to this subroutine. *
form retrieve .
select kunnr " Customer number
adrnr " Address
anred " Title
erdat " Created on
ernam " Created by
into corresponding fields of table t_customer
from kna1
where kunnr in s_kunnr. " END SELECT
if sy-subrc ne 0.
message text-001 type 'E'.
exit.
endif. " IF SY-SUBRC NE 0
endform. " RETRIEVE
regards,
veeresh -
Input Fields of Selection Screen
HI
GIven the program name and the Screen #, i need to figure out all the Input fields , Data type and Length for that program( SAP STD REPORT).
I checked out the Element List in Se51 for the program name and screen number, I need something similar to it ..I need to pull out that data. How should i approach.
-Ravi.Output checkbox, means that it is a "disabled" input field. Output Only checkbox, means that it is more like a static text box.
F1 Help on Output Only.
<i>Pure output field
This specification makes sense only for template fields.
At runtime, the format of a template field can be distinguished from that of a field/text field, if it is defined as an output field, but not if it is defined as an input field.
If the flag is set for an output template, you cannot distinguish the format of a template field from that of a text field. This allows you to insert variable components in apparently fixed texts.
At runtime, you cannot dynamically modify the input/output attributes of output templates which have this flag set within the LOOP AT SCREEN ... ENDLOOP block in PBO modules.</i>
Regards,
Rich Heilman
Message was edited by: Rich Heilman -
How gray out the fields in selection screen with parameters
Hi,
Can any one help me how to gray out the selection screen fields
Start-of-selection----
Parameters : p_status TYPE edids-status MODIF ID xyz DEFAULT co_51.
End-of-selection----
i want to grayed out the field p_status.
except At selection-screeen output, can any one suggest the other method of gray out the above field.
Thank u
B Ravi Kumar -
How to validate ch field in selection screen
hi experts.......
how to validate ch field selection screen......... and which function module is used to validate parameter field i.e characterHello,
Is your requirement to Validate the Character Field? This is what I understand. If it is right, then do you want to Validate whether a Character Value is entered?
Check the below Sample Code.
At Selection-Screen on P_CHARFIELD.
IF P_CHARFIELD CA '1234567890'.
Message 'Enter an Alpha Character only' Type 'E'.
Endif.
Thanks and Regards,
Venkat Phani Prasad Konduri -
How to hide gui buttons in selection screen
In Selection screen how to hide buttons like back, exit,cancel buttons.
can any one help.Hi,
Create a new GUI Status for your program.. put whatever button you require for it..
In the AT SELECTION-SCREEN OUTPUT event..
SET pf-status xxx.
Regards,
Anand -
How to disable a field in selection screen based on condition.
Hi,
I have 2 radio buttons- p_normd, p_recov and 2 other controls - like text boxes, say tb1 and tb2. and some mandatory fields below.
If i choose p_normd, i want one control(tb2) to be disabled and if i choose p_recov, i want the other control(tb1) to be disabled(tb2 should be enabled then.)
Currently i am using the following code. The 1'st radiobutton is intially checked. But the problem is when i click on the 2'nd radio button, the other control(tb1) is not getting disabled. When i double click, i get an error telling mandatory field to be filled. Only after the other mandatory fields below are filled, and after i double click on the unchecked radiobutton, the other control gets disabled.
Please suggest what to do..
The current code below:
AT SELECTION-SCREEN OUTPUT. "ON RADIOBUTTON GROUP rg01.
LOOP AT SCREEN.
IF p_normd EQ c_x AND screen-group1 = 'SC2'.
MOVE 0 TO screen-input.
MODIFY SCREEN.
ENDIF.
IF p_recov EQ c_x AND screen-group1 = 'SC1'. "IF screen-name = 'ERDAT-LOW' OR screen-name = 'ERDAT-HIGH'.
MOVE 0 TO screen-input.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Thanks,
AmmuHi
declare your parameter as below:
parameters: p_x type c radio button group g1 user-command r.
in at selection screen output event .
check for the radio button.
loop at screen.
if screen group is <desired value>
then screen-active = 0 or 1. <do whatever you want to do.>
modify screen.
endloop.
see below the sample code.
<<<<<AT SELECTION SCREEN EVENT>>>>>
AT SELECTION-SCREEN ON BLOCK B1.
IF P_LCOST = C_X.
PERFORM CLEAR_FIELDS. " Clearing fields before loading the screen
CALL SELECTION-SCREEN 100 STARTING AT 20 5.
ELSEIF P_MCOST = C_X.
PERFORM CLEAR_FIELDS1. " Clearing fields before loading the screen
CALL SELECTION-SCREEN 101 STARTING AT 20 5.
ENDIF.
IF SY-SUBRC = 0.
PERFORM VALIDATION. " Validating selection screen input
ELSE.
LEAVE TO TRANSACTION C_TRAN.
ENDIF.
<<<<<<DECLARATION PART>>>>>>
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_LCOST RADIOBUTTON GROUP GI DEFAULT 'X',
P_MCOST RADIOBUTTON GROUP GI.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS WINDOW TITLE TEXT-002.
SELECTION-SCREEN BEGIN OF BLOCK B2.
PARAMETERS: P_COAREA TYPE CSKS-KOKRS OBLIGATORY, " controlling area
P_FYR TYPE COEP-GJAHR OBLIGATORY, " fiscal year
P_PERIOD TYPE COEP-PERIO OBLIGATORY. " fiscal period
SELECT-OPTIONS: S_CCNTR FOR V_KOSTL OBLIGATORY, " Cost Center
S_COELM FOR V_KSTAR MODIF ID M1, " Cost element
S_PDATE FOR V_BUDAT OBLIGATORY. " posting date.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN END OF SCREEN 100.
SELECTION-SCREEN BEGIN OF SCREEN 101 AS WINDOW TITLE TEXT-003.
SELECTION-SCREEN BEGIN OF BLOCK B3.
PARAMETERS: P_CCODE TYPE T001-BUKRS OBLIGATORY, " Company Code
P_FYEAR TYPE COEP-GJAHR OBLIGATORY. " fiscal year
SELECT-OPTIONS: S_GLACC FOR V_HKONT OBLIGATORY, " G/L Account
S_PCNTR FOR V_PRCTR MODIF ID M2, " Profit Center
S_PODATE FOR V_BUDAT OBLIGATORY. " posting date.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN END OF SCREEN 101.
thanks
LG
Edited by: LalitG on Apr 13, 2011 1:38 PM -
Hi Experts,
I hv a selection screen with,
1)SELECT-OPTIONS: input_fld_1 with domain value range of A, B, C, D, E, F
2)input_fld_2
3)PARAMETERS: input_fld_3 has the LIST BOX
So, my requirement is,
If the user selects/enters A, B, C, D in input_fld_1, the next moment/second (here, prog. shuld not ask the user to press any ENTER/button)
the input_fld_3 shuld b automatically dis-abled/un-able to input!
(I tried with MOD ID GRP1, but in this case, user has to press ENTER button, which is not suits to my requirement!)
So, Is it possible? If so How?
thanq.
Message was edited by:
Srikharhi Srikhar,
It is not possible to have your requirement.
As the AT SELECTION SCREEN OUTPUT will be triggered only when you press the ENTER key.
You need to ask user to press the enter key or you need to have USER COMMAND to the selection screen parameter, which I think is not available with select-options.
Reward points if useful.
Regards,
Atish
Maybe you are looking for
-
Need suggestion on how to get Adobe X to create/load the font. Others in the office can create the same Adobe file with no issues. Help please.
-
PSE 7...Unable to save edited photos in a version set
I am suddenly unable to save my edited photos in a version set. The edited photo is being saved on the hard drive but is not linked to the previous photo nor is visable in the open catalog. This issue in occuring in only one catalog but not in othe
-
Milestone Error when changing the status of service request.
Hi Expert. I got an issue where service request is displayed with an error "Item 10: Start and end dates must be identical for a milestone date". I took around 200 service requests and observed that in the change history, the response profile of the
-
hi all, i want to know how to add a tree like structure of folder in a container which is the class and method for this, and please mention something splitting a container thanks in advance,
-
SQL statement - tricky search problem
Hi, I am working in asp and use an Access db. I have a database with 500 shops around the world, the table contains among other things shop name, country and region (Europe, Asia etc). Then a search page with dropdown lists, one for Region and one fo