Default Current year in select option field on selection Screen
Dear Experts,
I want to set current year as default value in fiscal year select-options field on selection screen.
for this, i hv written following code
DATA:VAR_DATE TYPE SY-DATUM.
DATA VAR(4) TYPE C.
VAR_DATE = SY-DATUM.
VAR = VAR_DATE+0(4).
this retrieves current year .
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
SELECT-OPTIONS I11 FOR ANLC-GJAHR DEFAULT VAR TO VAR.. "Fiscal Year
SELECTION-SCREEN END OF BLOCK B1.
Now when i am executing program pop-up is raised describing "Specify the range Limits". Please help.
Regards,
Apoorv Sharma
>
Ganga Bhavani R wrote:
> Use below lines.
>
> SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
> SELECT-OPTIONS I11 FOR ANLC-GJAHR DEFAULT SY-DATUM+0(4). "Fiscal Year
> SELECTION-SCREEN END OF BLOCK B1.
Hi, Ganga,
I think it will not working properly that way, Please test the bellow Sample Code.
TABLES: anlc.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
SELECT-OPTIONS i11 FOR anlc-gjahr .
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
IF i11[] IS INITIAL.
i11-low = sy-datum+0(4).
APPEND i11.
ENDIF.
Thanks and Regards,
Faisal
Similar Messages
-
Lock in parameter/select-options field
Hi,
How can we block another user from executing report with the same value of parameter/select-option field entered on screen by user?
for example:
Report ZZZ, parameter field sales org = A, run by user 1.
Another user, say B, attempts to run the report by entering the same sales org = A. In these second execution of the report, I need to display error message saying that user A is running the report then report cant be run by user B.
Do i need to put lock object for these?
thanks alots
AliaNo, there is no mechanism to restrict in that way.
but you can create a Z-table with one column (vkorg)
now make a little change in the report..
1.check if any entry of vkorg is there in that z-table.
if not proceed, else error msg.
2.craete an entry of that vkog in that z-table.
3.Normal processing of this report.
4.at end delete that entry of vkorg from z-table.
thus you can achieve mutual exclusion.
cheers.
Message was edited by: Anid -
Initializu00EDng select options field with default values and with NO INTERVALS
Dear All,
I have used WDR_SELECT_OPTIONS technology within WD Abap.
I also have added the fields which have to be taken into consideration.
lt_range_table =
wd_this->m_handler->create_range_table(
i_typename = 'PLANT' ).
wd_this->m_handler->add_selection_field(
i_id = 'PLANT'
it_result = lt_range_table
i_read_only = read_only ).
Can I assign two values to this field 'PLANT' whereby the user may take only these values.
I mean kind of pre initializíng of this select options field with default values.
Due to this handling it should be prevented that the user can give other values
except this values.
Additonally it should be fine whether it is possible to disable the second input field
of this select options field like NO INTERVALS .
Regard
sas
Regard
saswd_this->m_handler->add_selection_field(
i_id = 'PLANT'
it_result = lt_range_table
I_NO_INTERVALS = 'X'
i_read_only = read_only ).
Pls check 'WDR_TEST_SELECT_OPTIONS' web dynpro component -
How to write in selection screen after the select option field?
Hi
Please help me with this...
i need to write format of date after the select option field in the selection screen.
its like..
date ___________ to ___________ <b>yyyymmdd</b>
points will be awarded..
thanxUse selection-screen comment 1(31) text-005 -> this will give you format option.
See the below sysntax ,you have to use like this
Selection-screen begin of block b2 with frame title text-002.
selection-screen begin of line.
selection-screen comment 1(31) text-004.
parameter: r_1 radiobutton group rad1.
selection-screen end of line.
selection-screen begin of line.
Aging Report
selection-screen comment 1(31) text-005.
parameter: r_2 radiobutton group rad1.
selection-screen comment 40(30) text-003.
parameter: p_expir as checkbox.
selection-screen end of line.
selection-screen begin of line.
Materials with no Expiry Date
selection-screen comment 1(31) text-006.
parameter: r_3 radiobutton group rad1.
selection-screen comment 40(30) text-007.
parameter : p_bin as checkbox ."default 'X'.
selection-screen end of line.
selection-screen end of block b2.
selection-screen end of block b0. -
Dialog programming - How to place a select-option field in a dialog screen
Hi all,
In Dialog Programming, How to place a select-option field in a dialog screen.
Kindly give me some example code...
Thanks,
Jaffer Ali.Shi Ali,
U can add select-options in ur module pool by using SELECTION-SCREEN BEGIN OF SCREEN <scrn> AS SUBSCREEN command.
check this link for reference.....
http://help.sap.com/saphelp_47x200/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/frameset.htm
Example Code :
DATA : ok_code TYPE sy-ucomm.
SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X',
p_rad2 RADIOBUTTON GROUP grp1,
p_rad3 RADIOBUTTON GROUP grp1.
SELECT-OPTIONS: s_matnr FOR mara-matnr,
s_matkl FOR mara-matkl,
s_mtart FOR mara-mtart.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 1010.
START-OF-SELECTION.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
MODULE status_0100 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
CALL SCREEN 1010 .
ENDMODULE. "status_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
SCREEN 100 ****************
PROCESS BEFORE OUTPUT.
MODULE status_0100.
CALL SUBSCREEN sub_1010 INCLUDING sy-repid '1010'.
<b>***** where sub_1010 is name of sub-screen area</b>
PROCESS AFTER INPUT.
CALL SUBSCREEN sub_1010.
MODULE user_command_0100.
<<< REMOVED BY MODERATOR >>>
Harimanjesh AN
Edited by: Marcelo Ramos on Dec 17, 2008 7:54 PM -
Select-Option field grey out-no further input
Hi SDNers,
I have select Option field sales document type AUART ,I need to default the values and should grey out the field to not allow the user from entering any other value.
I have tried using modif id,
at-selection screen output
loop at screen
screen-intensified = '1'.
modify screen.
endloop.
but this code only highlights the entire line,but doesn't meet the requirement.
Please provide ur valuable suggestions.
Thanks
Reddyhi,
use:
at-selection screen output
loop at screen.
if screen-group1 = '123'.
screen-input = 0.
modify screen.
endif.
endloop.
A. -
Select-option field on module pool screen
hi all,
Can anyone pls let me know, how to design and use a field like a select-option field on a Module-pool screen i.e. how can i get that multiple selections tab after the high field of the select-options.
thanks in advance,
vinnyAll you need to do is define your selection screen and then embed it in a subscreen area of your dynpro(screen). Here is a sample program.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
<b>selection-screen begin of screen 1010 as subscreen.</b>
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
selection-screen end of block b1.
selection-screen end of screen 1010.
start-of-selection.
call screen 100.
*& Module STATUS_0100 OUTPUT
module status_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
endmodule.
*& Module USER_COMMAND_0100 INPUT
module user_command_0100 input.
endmodule.
<b>* Screen screen 100 with a subscreen area called "subscreen_1010"
* Screen Flow Logic follows
*process before output.
* module status_0100.
* call subscreen subscreen_1010 including sy-repid '1010'.
*process after input.
* call subscreen subscreen_1010 .
* module user_command_0100.</b>
Regards,
Rich Heilman -
How to hide the select-options fields on radiobutton select in webdynpro
hi
Could you please help how to hide the select-option fields in webdynpro
there are four radio buttons
for every radiobutton there is corresponding the select_option filed is associated to it
user as only provision select one radio button and reset of the select-option fileds should be hidden
which ever the radio button is selected corresponding the select-options fileld should be displayed
please find the attachement belowHi Nine,
To hide select options you should use interface method REMOVE_SELECTION_SCREEN_ITEM of IF_WD_SELECT_OPTIONS.
Sample code :
Write the below code in the Event handler of Radio Button.
DATA lv_r_helper_class TYPE REF TO if_wd_select_options.
lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
lv_r_helper_Class->REMOVE_SELECTION_SCREEN_ITEM(exporting i_id = 'Select_option1_id1').
This will hide first select option of your screen.Similarly pass select_option_id2 to hide it and so on.
Regards,
Ravikiran.k -
Adding default value for a select-options in a selection-screen
hello gurus,
i have a report program with the following select-options in a selection-screen block:
select-options: so_site for MyTable-werks.
i want the so_site to have a default value once the program displays. can it be possible?
regards,
sidHi sid,
1. Whenever we use select-option,
an internal table of type range is
automatically created.
2. so, in fact, we have to put
record in this internal table.
3. eg. Just copy paste in new program.
4.
report abc.
tables : t001.
select-options : bukrs for t001-bukrs.
initialization.
bukrs-sign = 'I'.
bukrs-option = 'EQ'.
bukrs-low = '1000'.
append bukrs.
regards,
amit m. -
Disable the Select-options field in the viewcontainer
Hi,
I have two select option fields(Date,Number) in a viewcontainer .
Now i need to disable one of the select-option field(Date) in the view container based on the condition.If I give Enability for the view container then both the select options will get diasbled.Is there any way to disable only Date select-option field in the view container.
Thanks in Advance.
Regards,
bala.Hi,
I just tested this solution and it is working for me....Following on Thomas's suggestion...I did the following....
I just had one select-option on my scr...but it can be done with two too...
step1:
created three attributes at component level under the attribute tab ( as suggested by Thomas )
ENABLE_PRI_SELECTOPTION type WDY_BOOLEAN
M_HANDLER type ref to IF_WD_SELECT_OPTIONS
M_WD_SELECT_OPTIONS type ref to IWCI_WDR_SELECT_OPTIONS
Note: all are with public check box checked....so that all your views can see these attributes
I created a method at componenet controller leverl: create_select_option....in this method i have following code:
DATA:
lt_range_table TYPE REF TO data,
* rt_range_table TYPE REF TO data,
read_only TYPE abap_bool,
typename TYPE string.
DATA:
lr_componentcontroller TYPE REF TO ig_componentcontroller,
l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
* create the used component
l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
* get a pointer to the interface controller of the select options
*component
wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
* init the select screen
wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
* create a range table that consists of this new data element
lt_range_table = wd_this->m_handler->create_range_table(
i_typename = 'PERSNO' ).
* add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'PERSNO'
I_VALUE_HELP_TYPE = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
I_VALUE_HELP_ID = 'ZHELP_WDA_PERNR'
I_NO_INTERVALS = abap_true
it_result = lt_range_table
i_read_only = wd_this->ENABLE_PRI_SELECTOPTION ). <-----pls see here how i am controlling the read only property
I assume you know this much...already....but i am just putting everything down....
step2:
in my view where i want to display the select-options....i added this code under my wddoinit method
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_false. <--pls see initially we want this field to be open
lo_componentcontroller->create_select_option(
step3:
i did not have much logic to control the select option field so i added a button which if user presses the field become disable...
under that button action method i added the following code:
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_true.
"<---pls see here how i am changing the global *attribute which Thomas has suggested for controlling the "read only" attibute for the select-option field....you can put this under *your "if" statement....
"this step is very important if you do not remove the field you will get the dump...since it will try to add the same field again
"which produces dump from system....
lo_componentcontroller->m_handler->REMOVE_SELECTION_SCREEN_ITEM(
i_id = 'PERSNO' ).
"now call the same method which we created at component level to create the select_options...
lo_componentcontroller->create_select_option(
that is all....it works great for me.....let us know if still have any questions....
Thanks...
AS... -
F4 help FOR A SELECT OPTION FIELD
Hi,
Can anyone tell how to provide F4help for a select-option field?
Regards,
HemaHello,
If you created a search help in the DDIC...Then check the check box EXPORt parameter for one of the fields
If you used the function module Make sure you pass the correct values..Also the field name in CAPITAL letters..
Check this code..
TABLES: T005T.
DATA: BEGIN OF t_t005 OCCURS 0,
land1 TYPE t005-land1,
END OF t_t005.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(6) v_text FOR FIELD P_LAND1.
PARAMETERS: p_land1 TYPE t005-land1.
SELECTION-SCREEN COMMENT 13(35) v_text1.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
v_text = 'Country'.
v_text1 = ' '.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_land1.
REFRESH: t_t005.
SELECT land1
INTO TABLE t_t005
FROM t005.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = 'T005'
PVALKEY = ' '
retfield = 'LAND1'
dynpprog = sy-repid
DYNPNR = sy-dynnr
dynprofield = 'P_LAND1'
callback_program = sy-repid
value_org = 'S'
TABLES
value_tab = t_t005
EXCEPTIONS
parameter_error = 1
no_values_found = 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
Deepu.K -
How can i used pai in screen 1000 to change the select-options field?
hi,all.
I want used pai to change the select-options field,but it can't works.
the mainly code is:
REPORT ZTEST99.
TABLES :MARA,MAKT,MARC.
SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TITLE0 .
select-options:s_matnr for mara-matnr,
s_werks for marc-werks MODIF ID ID1.
SELECTION-SCREEN END OF BLOCK B0.
parameters:p_flag as checkbox.
at selection-screen OUTPUT.
LOOP AT SCREEN.
IF P_FLAG = 'X' .
IF screen-group1 = 'ID1'.
screen-input = '0'.
ELSE.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
CALL SCREEN 1000.
when i click p_flag,then i want to change s_werks from OBLIGATORY to no OBLIGATORY.
how can i realized?
Thanks for all.
SunHi ,
change your code like this.
Change in your code:
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECT-OPTIONS : s_matnr for mara-matnr,
s_werks for marc-werks MODIF ID ID1.
SELECTION-SCREEN END OF SCREEN 100 .
At selection-screen.
if sy-dynnr = '100'.
IF P_FLAG = 'X' .
LOOP AT SCREEN.
IF screen-group1 = 'ID1'.
screen-required = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
else.
LOOP AT SCREEN.
IF screen-group1 = 'ID1'.
screen-required = 1.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
my code :
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 -
Select-option field in dialog programming
hi guys,
i need to declare field matnr as select-option range in dialog programming..how can i code it in the module program?This questions has been answered many times (even in february)
- search sdn wiki (2 commented samples at [SELECT-OPTIONS on Dialog programming screen|http://wiki.sdn.sap.com/wiki/display/ABAP/SELECT-OPTIONSonDialogprogrammingscreen] and [Select-Options in Module Pool Programming|http://wiki.sdn.sap.com/wiki/display/ABAP/Select-OptionsinModulePoolProgramming])
- search abap online help ([SELECTION-SCREEN - AS SUBSCREEN |http://help.sap.com/abapdocu_70/en/ABAPSELECTION-SCREEN_SUBSCREEN.htm] with sample at [Selection Screens as Subscreens |http://help.sap.com/abapdocu_70/en/ABENSEL_SCREEN_SUBSCREEN_ABEXA.htm])
Regards,
Raymond -
How can I define select options fields as import paramter at Function Modules ?
Because I intend to pass select options fields to a FM in order to implement the below shown
code .
FUNCTION xyz
importing
ID
DESCRIPTION
CHANGING
REFERENCE(ZSC_INFO) TYPE SC_INFO
select * from SC_INFO into corresponding fields of table ZSC_INFO
where
ID in so_id and
DESCRIPTION in so_des and
ENDFUNCTIONHi,
The question is not completely clear to me but if you want to use the value of the select option and use it as an import parameter in a function module then some tips can be:
1. The value of the select option can be singles values or a range. Need to pick up the right values.
2. The import parameter and the variable you want to use must be of the same type.
DATA: tp_id TYPE <data type from the import parameter of the FM TEST>.
tp_id = so_vkorg-low "select option vkorg, you can use so_vkorg-high also for single values
CALL FM 'TEST'
IMPORT
ID = tp_id
EXPORT
DESCRIPTION = tp_description.
I hope that this is what you are looking for.
Best regards,
Guido Koopmann -
Select Options field width?
Hello,
In my WD view i have many Select Options fields which are grouped into various blocks. Now when i see the output all the Select Option fields within its block look good with equal widths between the text and field, but between various block levels the width isn't the same. Is there anyway i can control the width for Select Option field elements? Thanks.
Regards,
VasuHi Vasu.
AFAIK you do not have any chance to configure the layout of the select options.
You can only use blocks as you already did.
So why you do not use blocks for all your select options to avaoid this issue?
Cheers,
Sascha
Maybe you are looking for
-
Help! how to use sequence in in Oracle
i have a table name account and i want the id column used the sequence XJ.ID so how to modfiy the .jdo file? here is the .jdo file <?xml version="1.0" encoding="UTF-8"?> <jdo> <package name="test"> <class name="Account" objectid-class="AccountId"> <e
-
Noise problem with moving bitmaps
I'm having trouble with the most recent Flash player (9,0,45,0). When displaying moving bitmaps, the player sometimes shows horizontal noise lines across the image. This doesn't happen on all platforms, but it does happen on my customers', so I've go
-
Monitoring of messages (Out of Box)
Hi Experts, I have been developing critical interfaces with Legacy systems(MES) with PI7.11. I have question from my team like can we monitor centrally the messages out of box (PI), centrally the messages status in both outbound/inbound scenarios (As
-
When lumia 800 update available for india?
when lumia 800 1600.2483.8106.11500 update available for indian users?
-
I am saving images as JPGs in highest quality in photoshop cs3, but when referred to via xml in a flash movie, they display as yellow. but when i resave these using paint shop pro as a test to a jpg, they are fine. what am I doing wrong?