Current Time as a Select-Option, Want to default to 4 Hours Earlier?
How would I do this?
Thank-You
hi,
do this way ...
select-options : s_uzeit for syst-uzeit.
initialization.
data : v_time like sy-uzeit,
v_defa like sy-uzeit.
v_defa = sy-uzeit.
v_time = sy-uzeit - 14400.
s_uzeit-low = v_time.
append s_uzeit.
Regards,
Santosh
Similar Messages
-
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 -
Select option , want to hide the selection field
hi all,
I have a select option
s_flight low to high
as per my requirement i just want to show the low and high fields.
I dont want "s_flight" to be displayed on the screen.
Can someone please help me with thisGoto Selection Text and in Text window infront of that selection text make text field blank..
-
Field in the selection screen as a select option with two default values
Hi All,
can anybody tell me how to put field in the selection screen with two defaul values.
for ex: selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005.
please reply ASAP. Its urgent.
Thanks in advance,
MadhuHi Madhu,
Since Select options are nothing but ranges, you can use the following code to add two distinct values to the select options by default.
s_ktokd-sign = 'I'.
s_ktokd-option = 'EQ'.
s_ktokd-low = 'Y001'.
append s_ktokd.
s_ktokd-low = 'Y005'.
append s_ktokd.
clear s_ktokd.
However, if you want to mention a range like all the values between these given two values to be considered then u may use,
select-options : s_ktokd for KNA1-KTOKD default 'Y001' to 'Y005'.
or
s_ktokd-sign = 'I'.
s_ktokd-option = 'BT'.
s_ktokd-low = 'Y001'.
s_ktokd-high = 'Y005'.
append s_ktokd.
Reward if helpful. -
Select options no intervals - default value
Hi All,
I have the following statement for selection.
SELECT-OPTIONS : S_BUKRS FOR BSEG-BUKRS no intervals.
I have to default it with values 1000 and 1100. When I click the right arrow button next to the field, I should see 1000 and 1100.
Can someone please help me in implimenting it.
Thanks,
Veni.Hi,
SELECT-OPTIONS : S_BUKRS FOR BSEG-BUKRS no intervals.
At selection-screen output.
S_BUKRS-low = '1000'.
S_BUKRS-sign = 'I'.
S_BUKRS-options = 'EQ'.
append s_bukrs.
S_BUKRS-low = '1100'.
S_BUKRS-sign = 'I'.
S_BUKRS-options = 'EQ'.
append s_bukrs.
Thanks,
Senthil -
Anyone have suggestions?
Go to:
Settings > General > Date & Time > Time Zone
Check if you have your correct zone selected. Also, do you sync your calendars with any Mac or PC or Web service (like Google calendar)? If so, check if all your time zone settings are the same.
Cheers,
JP -
Update a select-option From Table
Hi,
I'm originally a C++ developer trying to learn ABAP.
I want to append values to a select-option from a table if another select-option is specified. I wrote some code that I believe will work but looks very inefficient to me. Any advice on how to streamline this process would appreciated.
The following is pseudo code and I left out some tweaks for simplicity and understanding but the basic idea is there. I want to add selection criteria to a select-option based upon a second select option (that may or may not be provided) table lookup.
Example:
DATA: groups TYPE table3.
SELECT-OPTIONS:
s_accountNo FOR table1-accountNo,
s_accountGroupNo FOR table2-accountGroupNo.
**** get the Account Groups that meet the selection criteria.
START-OF-SELECTION
SELECT * INTO TABLE groups
FROM table3
WHERE accountGroupNo IN s_accountGroupNo.
**** Remove duplicate accounts from the Account Groups
SORT groups BY accountNo.
DELETE ADJACENT DUPLICATES FROM groups COMPARING accountNo.
**** Append the account #'s onto the s_accountNo range/select-option
LOOP AT groups.
APPEND groups-accountNo TO s_accountNo.
ENDLOOP.
**** manually edit the s_accountNo to have the correct option/sign for use in further select statements.
LOOP AT s_accountNo.
s_accountNo-sign = 'I'.
s_accountNo-option = 'EQ'.
MODIFY s_accountNo.
ENDLOOP.
Thanks much,
-ChrisThe actual selection is fairly complicated from my point of view. I wrote the accountNo example to make things less confusing for me as much as anyone else, not to hide anything. I also didn't expect this amount of feedback, though it is appreciated.
The eventual select statement that is done is the following:
SELECT DISTINCT vttp~zseq_num
likp~vbeln
likp~lprio
likp~vstel
lips~werks
likp~lgnum
lips~posnr
lips~lgort
lips~vgbel
lips~vgpos
lips~sobkz
lips~lfimg
lips~vrkme
lips~matnr
lips~volum
mara~raube
vttk~dplbg
vttp~tknum
vttp~tpnum
likp~berot
likp~vkorg
likp~lfart
INTO TABLE temp_deliveries
FROM vttk
INNER JOIN vttp
ON vttk~tknum = vttp~tknum
INNER JOIN likpuk AS likp
ON vttp~vbeln = likp~vbeln
INNER JOIN lipsup AS lips
ON likp~vbeln = lips~vbeln
INNER JOIN mara
ON lips~matnr = mara~matnr
WHERE likp~vstel = p_vstel
AND lips~werks = p_werks
AND likp~lgnum IN s_lgnum
AND likp~vbeln IN s_vbeln
AND lips~vgbel IN s_vgbel
AND vttk~dplbg IN s_dplbg
AND vttk~tknum IN s_tknum
AND mara~raube = p_raube
AND likp~lfart IN ('ZLF', 'NL')
AND lips~kosta <> 'C'
AND lips~kosta <> ''
AND likp~kostk <> 'C'
AND likp~vbtyp = outbound.
and the structure it is put into is the following:
TYPES: BEGIN OF type_deliveries,
zseq_num TYPE vttp-zseq_num,
vbeln TYPE likp-vbeln,
lprio TYPE likp-lprio,
vstel TYPE likp-vstel,
werks TYPE likp-werks,
lgnum TYPE likp-lgnum,
posnr TYPE lips-posnr,
lgort TYPE lips-lgort,
vgbel TYPE lips-vgbel,
vgpos TYPE lips-vgpos,
sobkz TYPE lips-sobkz,
lfimg TYPE lips-lfimg,
vrkme TYPE lips-vrkme,
matnr TYPE lips-matnr,
volum TYPE lips-volum,
raube TYPE mara-raube,
dplbg TYPE vttk-dplbg,
tknum TYPE vttk-tknum,
tpnum TYPE vttp-tpnum,
berot TYPE likp-berot,
vkorg TYPE likp-vkorg,
lfart TYPE likp-lfart,
sdabw type likp-sdabw,
orig_lgort TYPE lips-zzorig_lgort,
selected TYPE flag,
counter(15) TYPE n,
END OF type_deliveries.
Currently there is a select option for tknum and I am attempting (successfully with my change shown above, though as many have pointed out I may be misusing the intended functionality) to add another select-option for s_pickno which is a field of a custom table that has pickno as one of it's unique keys and tknum as another of it's fields. The idea is to be able to take a pickno and use it to find all the tknum's associated and then use them in the select statement above as well as any tknum's provided as initial input by the user. If there is a better method than modifying the s_tknum selection I'm open to feedback.
Apologies that my initial example did not portray this, but being new I was a little overwhelmed myself and want something I can wrap my head around better. There's my wall of text -
Hi,
Is there any way to deafult current date to date select-option in web dyn pro?hi,
Check following code:
DATA:
lr_componentcontroller TYPE REF TO ig_componentcontroller,
l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
DATA:
lt_range_table TYPE REF TO data,
lt_types TYPE string_table,
rt_range_table TYPE REF TO data,
text TYPE string,
typename TYPE string.
DATA: vbeln TYPE lips-vbeln,
erdat TYPE lips-erdat,
auart TYPE vbak-auart,
trnsp TYPE vtadd01t-add_info,
kunnr TYPE likp-kunnr.
DATA:
num_events TYPE i.
DATA: uname TYPE sy-uname.
uname = sy-uname.
wd_context->set_attribute( name = 'CUSTOMER'
value = uname ).
wd_context->GET_ATTRIBUTE( Name = 'TRANSPORTER_CODE'
Value = uname ).
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( ).
lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VBELN_VL' ).
wd_this->m_handler->add_selection_field(
i_description = 'Sales Document'
i_id = 'VBELN'
i_obligatory = 'X'
it_result = lt_range_table
i_value_help_structure = 'LIPS'
i_value_help_structure_field = 'VBELN' ).
lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'ERDAT' ).
wd_this->m_handler->add_selection_field( i_id = 'ERDAT' i_obligatory = 'X' it_result = lt_range_table ).
*lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VTTK_ADD01' ).
*wd_this->m_handler->add_selection_field( i_id = 'VTTK_ADD01' I_DESCRIPTION = 'CHAHA' it_result = lt_range_table ).
wd_this->m_handler->add_selection_field(
i_description = 'Transporters Code'
i_id = 'VTTK_ADD01'
it_result = lt_range_table
i_value_help_structure = 'VTADD01T'
i_value_help_structure_field = 'ADD_INFO' ).
*Supress Global options in Used Component
wd_this->m_handler->set_global_options(
i_display_btn_cancel = ''
i_display_btn_check = ''
i_display_btn_execute = ''
i_display_btn_reset = '' ).
lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VBAK-AUART' ).
wd_this->m_handler->add_selection_field(
i_description = 'Sales Document Type'
i_id = 'AUART'
i_obligatory = 'X'
it_result = lt_range_table
i_value_help_structure = 'VBAK'
i_value_help_structure_field = 'AUART' ).
ENDMETHOD.
METHOD onactionexecute .
DATA: node_saledoc TYPE REF TO if_wd_context_node.
DATA: node_crdate TYPE REF TO if_wd_context_node.
DATA: node_transcode TYPE REF TO if_wd_context_node.
DATA: node_doctype TYPE REF TO if_wd_context_node.
DATA: node1 TYPE REF TO if_wd_context_node.
DATA: node2 TYPE REF TO if_wd_context_node.
DATA: rt_saledoc TYPE REF TO data.
DATA: rt_crdate TYPE REF TO data.
DATA: rt_transcode TYPE REF TO data.
DATA: rt_doctype TYPE REF TO data.
FIELD-SYMBOLS: <fs_saledoc> TYPE table,
<fs_crdate> TYPE table,
<fs_transcode> TYPE table,
<fs_doctype> TYPE table.
Retrieve the data from the select option
rt_saledoc = wd_this->m_handler->get_range_table_of_sel_field(
i_id = 'VBELN' ).
Assign it to a field symbol
ASSIGN rt_saledoc->* TO <fs_saledoc>.
Retrieve the data from the select option
rt_crdate = wd_this->m_handler->get_range_table_of_sel_field(
i_id = 'ERDAT' ).
Assign it to a field symbol
ASSIGN rt_crdate->* TO <fs_crdate>.
Retrieve the data from the select option
rt_doctype = wd_this->m_handler->get_range_table_of_sel_field(
i_id = 'AUART' ).
Assign it to a field symbol
ASSIGN rt_doctype->* TO <fs_doctype>.
Retrieve the data from the select option
*rt_transcode = wd_this->m_handler->get_range_table_of_sel_field(
*i_id = 'VTTK_ADD01' ).
Assign it to a field symbol
assign rt_transcode-> to <fs_transcode>.
node_saledoc = wd_context->get_child_node( name = 'S_VBELN' ).
node_saledoc->bind_table( <fs_saledoc> ).
node_crdate = wd_context->get_child_node( name = 'S_ERDAT' ).
node_crdate->bind_table( <fs_crdate> ).
node_doctype = wd_context->get_child_node( name = 'S_AUART' ).
node_doctype->bind_table( <fs_doctype> ).
IF <fs_doctype> IS NOT INITIAL
AND <fs_crdate> IS NOT INITIAL
AND <fs_saledoc> IS NOT INITIAL
wd_comp_controller->execute_zotddelvnote_vend_tari( ).
ENDIF. -
How to pass select-option variable in function
hi ,
select-option : s_akont for KNB1-akont OBLIGATORY.
i have to pass s_akont in function without using
s_akont-low & s_akont-high.
rightnow i am passing like s_akont but it is giving me a error :
s_akont is followed by niether by an internal table nor by a value list.
what should i write.
regards
rajHello Raj
I assume that you want to import your select-options into your function module(s). Since select-options are, by default, itabs with header lines you have to pass your select-options as following:
CALL FUNCTION 'Z_...'
TABLES
it_selopt = s_akont[].
The TABLES parameter it_selopt could be of type ANY or better of type <b>TABLE</b>.
If you want to use generic select-option structure you can use <b>RSDSSELOPT</b> and the table type <b>TT_RSDSSELOPT</b>. In this case you would need to copy your select-options from s_akont to a generic type s_generic (of type RSDSSELOPT).
Regards
Uwe -
Time field in selection screen
Hi All,
I have one requirement like we need to create the selection screen with date and time fields to hold the values of shift times. Please find below example.
In selection screen I am using select-option for creating selection screen withr date and time fields.
Select-option : Date :- From Date to To-Date (Ex : 07-08-2009 to 07-09-2009
Shift 1:u2013 From-Time to To-Time (Ex : Values 6:00:00 to 14:00:00)
Shift 2 :u2013 From-Time to To-Time (Ex : Values 14:00:00 to 22:00:00)
Shift 3 :u2013 From-Time to To-Time (Ex : Values 22:00:00 to 6:00:00)
When I try to press enter is giving message like u201CLower Limit is Greater than higher limitu201D for shift 3 selection field.
Please let me know how can we design the selection screen for this type of scenario.
Thanks in Advanceu2026u2026
Amjad.Hi,
I have added two time fields in a line using PARAMETERS. Hope this code might be helpful to add any number of time fields as you need:
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) TEXT-R01 FOR FIELD p_par1.
PARAMETERS p_par1 like sy-uzeit.
SELECTION-SCREEN POSITION 30.
SELECTION-SCREEN COMMENT 45(10) TEXT-R02 FOR FIELD p_par2.
PARAMETERS p_par2 like sy-uzeit.
SELECTION-SCREEN END OF LINE.
Thanks,
Sathya. -
Hi again,
i have a Select-Options.
Per Default 4 buttons(cancel,Check,Reset,Copy) are also generated with this select-options.
I dont want this buttons,only the ranges-table.
How can i hide this buttons?
ThanksHi Marco.
There should be a method called set_global_options in the interface controller of
select options component. Just check it out, there you can switch buttons on/off.
Hope this helps.
Cheers,
Sascha -
Making to-field in select-option mandatory
hi experts
I defined an OBLIGATORY select-option with no-extension option. but the user wants not only the "from" field is OBLIGATORY but also the "to" filed.
I know I can do it if I define 2 parameters in the same line. but is there any other option if using select-option
many thanks
Edited by: Thomas Zloch on Nov 4, 2010 9:54 AM - subject changedUse the FM [SELECT_OPTIONS_RESTRICT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=select_options_restrict#sdn_content_category_value_wiki] in the initialization of the report, and only allow "I/BT" records types.
FORM restrict_select.
* Local data
DATA: restrict TYPE sscr_restrict,
opt_list TYPE sscr_opt_list,
*** TYPE sscr_***.
* Create Options
* - Option ALL : any selection allowed
CLEAR opt_list.
MOVE 'ALL' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt,
opt_list-options-cp,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-nb,
opt_list-options-ne,
opt_list-options-np.
APPEND opt_list TO restrict-opt_list_tab.
* - Option RNG only ranges of values
CLEAR opt_list.
MOVE 'RNG' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt.
APPEND opt_list TO restrict-opt_list_tab.
* Affect Options to actual select-options
* - ALL by default
CLEAR ***.
MOVE: 'A' TO ***-kind,
'*' TO ***-sg_main,
'ALL' TO ***-op_main.
APPEND *** TO restrict-***_tab.
* RNG to a single select-option
CLEAR ***.
MOVE: 'S' TO ***-kind,
'SO_FIELD' TO ***-name,
'I' TO ***-sg_main,
'RNG' TO ***-op_main.
APPEND *** TO restrict-***_tab.
* Execute
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
EXCEPTIONS
OTHERS = 0.
ENDFORM. " restrict_select
Regards,
Raymond -
Need to find our current time from sqlplus
I need to find out current time from sqlplus.
select sysdate from dual;
Hmmm ... time to hit the manuals?!?! -
Hi,
I have date as select-option.
I am required to
default current date minus one day to current date .simply my select-option-low = sy-datum-1,
select-option-high = sy-datum should be defaulted.
How to do this...?
thanksHI,
Please refer the code below:
tables: bsis.
select-options : so_date for bsis-budat.
at selection-screen output.
so_date-low = sy-datum-1.
so_date-high = sy-datum.
append so_date.
Thanks,
Sriram Ponna. -
Selection options element and button in one line
Hello,
I would like to ask or it is posible to create such screen:
SELECTION-SCREEN BEGIN OF BLOCK area1
WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-050.
SELECTION-SCREEN POSITION 28.
SELECT-OPTIONS: s_chcoun FOR vbak-vbeln.
SELECTION-SCREEN POSITION 79.
SELECTION-SCREEN PUSHBUTTON (4) c_icon USER-COMMAND show_info.
SELECTION-SCREEN END OF LINE.
SELECT-OPTIONS: s_chcou FOR vbak-aufnr.
SELECTION-SCREEN END OF BLOCK area1.
now selection and button-icon is in one line, but selection element position is different against others.
O it is posible to get selection option like a default and button at the end of selection line. I think main problem is max position 79.
Thank youHi,
Try Begin of line and position for all the selection screen elements.
For example:
SELECTION-SCREEN BEGIN OF BLOCK area1
WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-050.
SELECTION-SCREEN POSITION 28.
SELECT-OPTIONS: s_chcoun FOR vbak-vbeln.
SELECTION-SCREEN POSITION 79.
SELECTION-SCREEN PUSHBUTTON (4) c_icon USER-COMMAND show_info.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 28.
SELECT-OPTIONS: s_chcou FOR vbak-aufnr.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK area1.
Maybe you are looking for
-
Hello to all and thanks in advance for any help or thoughts anyone has on this subject. I am a new web designer with 3 sites under my belt. I am working on 3 more at the same time. My newest client is a restaurant/dinner theater with a menu and sched
-
WLC: two active Radius servers
Hello! Does anyone know, whether it is possible to configure several active RADIUS servers, so that the WLC can send accounting information to several different accounting servers at the same time? Maybe it is planned to be released in future versio
-
Re: Oracle Solaris Cluster 3.3 using Oracle Solaris 09/10 on virtualbox
Dear All, I am trying to build a solaris cluster 3.3 on virtualbox using Oracle Solaris 09/10. My host OS is Ubuntu 10.10. But, when i try to add the second node, it is not able to find the node1 says "unable to connect to node1". Can anyone help me
-
Airport error after updating to 10.4.8
my airport is error (could not detect any network) after i updating system to 10.4.8, is anyone know this problem? how can i fix this problem?? thx!
-
EBS-Interconnect Integration problem - Need Urgent Help
Hi, I am facing problem while trying to connect Oracle Interconnect with Oracle ESB using BEPL Plug-in feature. I was actually going though one document on ESB-Interconnect integration and follow all the steps. It did create an entry to ESB console b