How to set selection screen field obligatory dymically
hi expert,
i have to make selection screen field obligatory while selecting a check box,i am using the following code can any one help me regards, thanks in advance.....
PARAMETER:p_user TYPE adr6-smtp_addr ,
p_check AS CHECKBOX user-command ucomm.
at SELECTION-SCREEN.
case sy-ucomm.
when 'UCOMM'.
PERFORM set_obligatory.
ENDCASE.
FORM set_obligatory .
LOOP AT SCREEN.
IF SCREEN-name = 'P_USER'.
SCREEN-REQUIRED = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDFORM. " set_obligatory
Hi,
The following is the sample code.
PARAMETERS : p_barea TYPE ps0171-barea DEFAULT 'Z1' MODIF ID pb,
" Benefit Area
p_imfil TYPE rlgrap-filename, " Import file name
p_lock TYPE ztx_int-int_name
DEFAULT 'ZHBNT06A_METLIFE_INBOUND' MODIF ID pb, " Lock
p_test TYPE c AS CHECKBOX, " Test run
p_update type c as checkbox. " default 'X'
SELECTION-SCREEN END OF BLOCK selb01.
AT SELECTION-SCREEN OUTPUT *
AT SELECTION-SCREEN OUTPUT.
Benefit Area field made display only field
LOOP AT SCREEN.
IF screen-group1 EQ 'PB'.
CLEAR screen-input.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards
Vick
Similar Messages
-
I have a question that ...
i have 2 options --
when select 1st option , show group1 screen
when select 2nd option, show group2 screen
like the follow ..which is pretty work!....but i have another question that how to set the screen field ..
my question is that if i select group1 screen...i want to set
if S1_EBELN = '' and S1_IHREZ = ''.
message e398 with 'pls input one of these two options!'.
elseif S1_EBELN ne '' and S1_IHREZ ne ''.
message e398 with 'Only one of these two options input is allowed!'.
endif.
i've tried to insert these statement within the LOOP...but not work ......
so can anyone know how to set?
PARAMETERS:
R1 RADIOBUTTON GROUP OPT1 USER-COMMAND R DEFAULT 'X'.
PARAMETERS:
R2 RADIOBUTTON GROUP OPT1.
SELECTION-SCREEN BEGIN OF BLOCK RPT1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: S1_BUKRS FOR EKKO-BUKRS MODIF ID ABC.
SELECT-OPTIONS: S1_EBELN FOR EKKO-EBELN MODIF ID ABC .
SELECT-OPTIONS: S1_IHREZ FOR EKKO-IHREZ MODIF ID ABC .
SELECTION-SCREEN END OF BLOCK RPT1.
SELECTION-SCREEN BEGIN OF BLOCK RPT2 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: S2_BUKRS FOR EKKO-BUKRS MODIF ID DEF.
SELECT-OPTIONS: S2_MBLNR FOR MKPF-MBLNR MODIF ID DEF.
SELECT-OPTIONS: S2_XBLNR FOR MKPF-XBLNR MODIF ID DEF .
SELECTION-SCREEN END OF BLOCK RPT2.
IF R1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'DEF'.
screen-input = '1'.
SCREEN-required = '1'.
SCREEN-INVISIBLE = '1'.
screen-input = '0'.
screen-output = '1'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF R2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'ABC' .
screen-active = '0'.
screen-input = '0'.
screen-output = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Modified ur code .
tables : ekko, mkpf.
PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .
SELECTION-SCREEN BEGIN OF BLOCK RPT1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: S1_BUKRS FOR EKKO-BUKRS MODIF ID ABC.
SELECT-OPTIONS: S1_EBELN FOR EKKO-EBELN MODIF ID ABC .
SELECT-OPTIONS: S1_IHREZ FOR EKKO-IHREZ MODIF ID ABC .
SELECTION-SCREEN END OF BLOCK RPT1.
SELECTION-SCREEN BEGIN OF BLOCK RPT2 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: S2_BUKRS FOR EKKO-BUKRS MODIF ID DEF.
SELECT-OPTIONS: S2_MBLNR FOR MKPF-MBLNR MODIF ID DEF.
SELECT-OPTIONS: S2_XBLNR FOR MKPF-XBLNR MODIF ID DEF .
SELECTION-SCREEN END OF BLOCK RPT2.
at selection-screen output.
IF R1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'DEF' .
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF R2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'ABC' .
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
at selection-screen .
if r1 = 'X'.
if s1_ebeln[] is initial and s1_ihrez[] is initial..
message e001(zxx) with 'pls input one of these two options!'.
endif.
if NOT s1_ebeln[] IS initial.
IF NOT s1_ihrez[] IS INITIAL.
message e001(zxx) with 'only one entry in Ebeln or Ihrez is
allowed'.
ENDIF.
ENDIF.
endif.
START-OF-SELECTION.
WRITE:/ 'hi'.
***add on
split the text into two texts .
<b>if NOT s1_ebeln[] IS initial.
IF NOT s1_ihrez[] IS INITIAL.
message e001(zxx) with text-001 text-002.
*'only one entry in Ebeln = text-001
or Ihrez is allowed'. = text-002.</b>
regards,
vijay -
How can we make screen fields obligatory?
hi, guru's
how can we make screen fields obligatory while desiging a screen in screen painter (se51)?
regards,
satheesh.Hi,
Go to attributes of the field in layout..
go to program tab and check input field..
and in drop downlist put required..
Thats it..
Reward points if it helps..
Regards,
Omkar. -
How to validate selection-screen field
Hi all,
How to validate a selection-screen field defined as a select-options.for Ex i declared a selection-screen field select-options:s_matnr for mara-matnr.
Then how to validate this field.Hi,
write the below code in AT SELECTION-SCREN.
EX :
AT SELECTION-SCREEN.
*-- Validate the Selection screen data
PERFORM VALIDATE_SELSCR_DATA.
WRITE THE below code in Form "VALIDATE_SELSCR_DATA".
IF S_MATNR[] IS INITIAL.
*--MATNR is initial.
message e000(MsgCLass) with 'matnr is empty'.
ELSE.
SELECT MATNR
INTO MARA-MATNR
FROM MCHA
UP TO 1 ROWS
WHERE MATNR IN S_MATNR.
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'Invalid MATNR entered'.
ENDIF.
ENDIF. -
How to put Mandatory option for selection screen fields in ABAP Queries
Hi Experts
Can anyone tell me how to put mandatory option for the selection screen fields in ABAP Queries.
Manually I had written code in the At Selection Screen option in infoset to display error message if that field is blank.
But I need to display the selection fields with the tick mark (obligatory mark).
How to do this?
Appropriate answers will be awardedHi
For parameter option
parameters : p_kunnr type kna1-kunnr obligatory.
For select option
select-options: s_date for vbak-erdat obligatory.
Plz rewards points ,
Regards ,
Ganesh. -
How position the cursor in selected screen field insted of defualt field
Hi All,
Can you pls let me know , how to position the cursor in selected selection-screen filed. My requirement is i have 3 selection-screen fields, By default cursor is positioned on field screen field, but i want the cursor to be positioned at 3rd screen field to enter input, i want to do this coz i am filling first 2 screen fields with default values, so i need to position the cursor at 3 rd screen filed. let me know if it is possible to achieve this.
Thanks in advance.
Regards
VishalYou will need to point it to the LOW field.
report zrich_0001.
tables: reguh.
select-options :
s_bukrs for REGUH-ZBUKR default 'US10',
s_laufd for REGUH-LAUFD default sy-datum,
S_LAUFI FOR REGUH-LAUFI .
at selection-screen output.
<b>set cursor field 'S_LAUFI-LOW'.</b>
Welcome to SDN! PLease be sure to award points for helpful answer and mark you post as solved when solved completely. Thanks.
Regards,
Rich Heilman -
How to schedule the background job using current selection screen field val
Hello Friends,
How to schedule the background job using current selection screen field values.
after completion of the job the spool should be sent as a mail to SAP Inbox.
Is there any way to create the variant dynamically by reading the current selection screen values.
Thanks,
RaviHi,
To get the variant details you can use teh following FM.
'RS_VARIANT_CONTENTS'.
Regards,
Ankur Parab -
How to populate f4 values to standard pnp selection screen fields
Hi Experts,
my question is how to populate f4 values to standard pnp selection screen field. i am using LDB PNP for a report , it displays several fields with f4 values, i need to remove all the stadard f4 values and want to place my f4 values in the selection screenHi Venkat,
To put ur own values in the F4 help of any field...all u have to do is.
1st fetch all the records that u need to display in F4 help list...in one internal table.
and then use the function module 'F4IF_INT_TABLE_VALUE_REQUEST'
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield =
value_org =
tables
value_tab =
return_tab =
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
where retfield is the field for which u need to give the F4 help.
and valu_tab is the internal table in which u have the list of records to be displayed.
this would do the work...
I dont have the system in front of me...as soon as i have...will try to send a piece of code, to make ur work easy.
Till then hope this helps u...all the best
Regards,
Radhika -
How to assign maintenance view to a selection screen field in a program.
Hi Experts,
I have created a custom table. Now, I have a program where there is a selection screen field for example "Load". After entering a value in the selection screen, and press enter, the user must be redirected to the maintenance view of the custom table to modify the specifed record.
Can anyone help me on how to do that?
Thanks a lot for ur precious help.
Regards,
AkshHi,
What is the need to search for a program.
Use transaction SM30 or SE16 to create or maintain entries in the table.
e.g. if the Maintenance view is created on table A, then Goto transaction SM30 or SE16 and give the table name as A and proceed. This will automatically take u to the maintenance view on tha table A.
Regards,
Himanshu -
How to link a search help to a selection screen field
Hi All,
I am using field PKWRG from PA0017 table in selection screen. I need F4 help there as in Tcode PA30 . But this field does not have value table or check table. However, it has a search help attached 'TRV_PKWRG' .
But, I donot know how to assign a search help to a selection screen field. Please help.
Regards,
NibhaHello,
Fetch all the data which from the table which you want to show in the search help and pass the value to the FM
F4IF_INT_TABLE_VALUE_REQUEST and the selection-screen event must be
at selection-screen on value request parameter or selection option variable.
BCALV_TEST_FULLSCREEN
BCALV_TEST_FULLSCREEN_CALLS
BCALV_TEST_FULLSCREEN_PRINT
BCALV_TEST_FULLSCREEN_STATUS
BCALV_TEST_GRID
BCALV_TEST_GRID_DRAG_DROP
BCALV_TEST_GRID_EDITABLE
BCALV_TEST_GRID_EVENTS
BCALV_TEST_GRID_INDEX
BCALV_TEST_GRID_TOOLBAR
BCALV_TEST_HIERSEQ_LIST
BCALV_TEST_LIST
BCALV_TEST_LIST_PRINT
BCALV_TEST_LIST_STATUS
BCALV_VERIFY_DTYPES_D0100_F01
BCSMENUF01
BDLCOF10
BDLDVI10
BDLTREDF -
How to change standard selection-screen fields
hi i am kishore.
i have requirement.
i have to change selection-screen label purchase order to purchase docuement in request for quatation.
pls suggest that how to change the standard selection screen field labels.Hi.
This is possible.
Just try out this way.Heres is an example.
TABLES: pernr.
data: i_tab type standard table of RSSELTEXTS with header line.
initialization.
i_tab-name = 'PNPPERNR'.
i_tab-kind = 'S'.
i_tab-text = 'Employee ID'.
append i_tab.
CALL FUNCTION 'SELECTION_TEXTS_MODIFY'
EXPORTING
program = 'ZESO_TEST'
tables
seltexts = i_tab
EXCEPTIONS
PROGRAM_NOT_FOUND = 1
PROGRAM_CANNOT_BE_GENERATED = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks and regards,
Maheshwari.V -
How to display the selection screen fields for selected checkboxes
Hi all,
I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
Thanks
sriman.hi,
Try this code
report z_13317_sdn2.
tables : mara, marc, dd03l.
parameters : p_chk1 as checkbox user-command ABC,
p_chk2 as checkbox user-command PQR,
p_chk3 as checkbox user-command XYZ.
select-options : s_matnr for mara-matnr modif id A,
s_ersda for mara-ersda modif id A,
s_werks for marc-werks modif id B,
s_lvorm for marc-lvorm modif id B,
s_tab for dd03l-tabname modif id C.
data: v_chk1,
v_chk2,
v_chk3.
at selection-screen output.
loop at screen.
if screen-group1 = 'A' or
screen-group1 = 'B' or
screen-group1 = 'C'.
screen-input = 0.
modify screen.
endif.
endloop.
loop at screen.
if v_chk1 = 'X'.
if screen-group1 = 'A'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk2 = 'X'.
if screen-group1 = 'B'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk3 = 'X'.
if screen-group1 = 'C'.
screen-input = 1.
modify screen.
endif.
endif.
endloop.
at selection-screen.
if sy-ucomm = 'ABC'.
if v_chk1 = ' '.
v_chk1 = 'X'.
else.
v_chk1 = ' '.
endif.
endif.
if sy-ucomm = 'PQR'.
if v_chk2 = ' '.
v_chk2 = 'X'.
else.
v_chk2 = ' '.
endif.
endif.
if sy-ucomm = 'XYZ'.
if v_chk3 = ' '.
v_chk3 = 'X'.
else.
v_chk3 = ' '.
endif.
endif.
Regards,
Sailaja. -
How to fill internal table with selection screen field.
Hi all,
i am new to sap . pls tell me how to fill internal table with selection screen field.Hi,
Please see the example below:-
I have used both select-options and parameter on the selection-screen.
Understand the same.
* type declaration
TYPES: BEGIN OF t_matnr,
matnr TYPE matnr,
END OF t_matnr,
BEGIN OF t_vbeln,
vbeln TYPE vbeln,
END OF t_vbeln.
* internal table declaration
DATA : it_mara TYPE STANDARD TABLE OF t_matnr,
it_vbeln TYPE STANDARD TABLE OF t_vbeln.
* workarea declaration
DATA : wa_mara TYPE t_matnr,
wa_vbeln TYPE t_vbeln.
* selection-screen field
SELECTION-SCREEN: BEGIN OF BLOCK b1.
PARAMETERS : p_matnr TYPE matnr.
SELECT-OPTIONS : s_vbeln FOR wa_vbeln-vbeln.
SELECTION-SCREEN: END OF BLOCK b1.
START-OF-SELECTION.
* I am adding parameter value to my internal table
wa_mara-matnr = p_matnr.
APPEND wa_mara TO it_mara.
* I am adding select-options value to an internal table
LOOP AT s_vbeln.
wa_vbeln-vbeln = s_vbeln-low.
APPEND wa_vbeln TO it_vbeln.
ENDLOOP.
Regards,
Ankur Parab -
How to make the selection screen field names to apper as in logon language
hai
the selection screen field names should appear
as that of logon language
and <u>before that once i logon with a language
it should pop up the (some)message in the logon language</u>.
For the selection screen filednames to appear as that
of the logon language whether i have to maintain the textelements for all screen fields in all possible languages or i have to write only in english and tell mentioning it to changeIn <b>SE38</b> --> Goto --> Translate.
Choose target language, and start making the translation -;)
Greetings,
Blag. -
How to assign F1 help to the selection screen fields
Hi All,
I have a requirement.I have to create a button named "HELP" at the side of Execute button in the selection screen.If I place my cursor in the selection screen field and I press that "HELP" button, I should get the Documentation help for that field.
Please suggest me on this.
Thanks in advance.
Sreeharsha SinguruHi sreeharsha,
here a short example:
TABLES: MARA.
TABLES: SSCRFIELDS.
TYPE-POOLS: ICON.
DATA: CURSORFIELD(20).
SELECTION-SCREEN: BEGIN OF LINE.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECT-OPTIONS: S_MTART FOR MARA-MTART.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: SKIP 3.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: PUSHBUTTON (10) PB01 USER-COMMAND HELP.
SELECTION-SCREEN: END OF LINE.
AT SELECTION-SCREEN.
GET CURSOR FIELD CURSORFIELD.
CASE SSCRFIELDS.
WHEN 'HELP'.
CASE CURSORFIELD.
WHEN 'S_MATNR-LOW'.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT' "Make your own Text
EXPORTING
TITEL = 'Information'
TEXTLINE1 = 'Information for field:'
TEXTLINE2 = 'S_MATNR-LOW'
START_COLUMN = 10
START_ROW = 15.
WHEN 'S_MTART-LOW'.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT' "Make your own Text
EXPORTING
TITEL = 'Information'
TEXTLINE1 = 'Information for field:'
TEXTLINE2 = 'S_MTART-LOW'
START_COLUMN = 10
START_ROW = 15.
ENDCASE.
ENDCASE.
INITIALIZATION.
CONCATENATE ICON_INFORMATION 'Help' INTO PB01.
START-OF-SELECTION.
SELECT * FROM MARA WHERE MATNR IN S_MATNR.
WRITE: / MARA-MATNR.
ENDSELECT.
Hope it helps.
Regards, Dieter
Maybe you are looking for
-
I have over 50 gigs of music on iTunes; can I store only some on my laptop and the rest on a backup HDD?
-
SQL - Select Help - Case When? Return Value from Second Table?
Hi - next to folks on this board I am probably somewhere between a Beginner and an Intermediate SQL user. Ive been using a case when statement in plsql to find "all those who's status in any program was cancelled during a specific time, but have beco
-
What are my options for configuring a virtual interface on an x2100 server with Sol10 Because the interface shows up as the type " nge0" I am assuming that the hardware does not support it per the info below. Is there another alternative or a softwar
-
Add new fields to coding block-transaction code-OXK3
Hi Friends I need below clarification in addition of new fields to Coding block from transaction code- OXK3. 1) Which approach is adivsable either EXPERT MODE or BASIC MODE. 2) In Expert mode access key will be required to add field manually into BSE
-
Way to have a Spry table fill remainder of a window
Does anyone know of a cross platform way to get a Spry table to fill the remainder of a window, assuming the top has, for example, controls for performing a query? None of the Spry samples I've seen are designed this way. But then I guess that's not