Programming a select option in abap webdynpro
Dear Gurus,
I have used a select option in a specific webdynpro, but this select option does not
enable the same functionalities as select option in SAP GUI.
As an example, the possibility to upload a file or the clipboard in the multiple
selection for individual value is not available.
This is really a problem for my customer.
Any solution ?
Thanks in advance.
F.Alllut
Moderator message : Post the question in Web Dynpro forum. Thread locked.
Edited by: Vinod Kumar on Jul 11, 2011 7:00 PM
check this code
REPORT ZSELOPT_TO_CLASS .
TABLES: VBRK.
SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
DATA: IT_VBELN TYPE RSELOPTION.
DATA: X_VBELN TYPE RSDSSELOPT.
CLASS C1 DEFINITION.
PUBLIC SECTION.
DATA: IT_VBRP TYPE VBRP_TAB,
X_VBRP LIKE LINE OF IT_VBRP.
METHODS: GET_DATA IMPORTING S_VBELN TYPE RSELOPTION.
METHODS: DISP_DATA.
ENDCLASS.
CLASS C1 IMPLEMENTATION.
METHOD GET_DATA.
*SELECT * FROM VBRP*
INTO TABLE IT_VBRP
WHERE VBELN IN S_VBELN.
ENDMETHOD.
METHOD DISP_DATA.
LOOP AT IT_VBRP INTO X_VBRP.
WRITE:/ X_VBRP-VBELN,
X_VBRP-POSNR.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
DATA OBJ TYPE REF TO ZCL_SELOPT.
CREATE OBJECT OBJ.
LOOP AT S_VBELN.
MOVE S_VBELN-LOW TO X_VBELN-LOW.
MOVE S_VBELN-HIGH TO X_VBELN-HIGH.
MOVE S_VBELN-SIGN TO X_VBELN-SIGN.
MOVE S_VBELN-OPTION TO X_VBELN-OPTION.
APPEND X_VBELN TO IT_VBELN.
ENDLOOP.
CALL METHOD OBJ->GET_DATA
EXPORTING
S_VBELN = IT_VBELN.
CALL METHOD OBJ->DISP_DATA.
Edited by: moazam hai on May 17, 2008 6:17 AM
Edited by: moazam hai on May 17, 2008 6:19 AM
Similar Messages
-
Re : select-options in abap-objects program
Dear friends,
I want to give select-options in abap-objects program. How to give that.
Thanking You
with regards,
ManiIn the transaction SE24, enter your class name, click modify.
in the tab named "Types" you have to declare two types. By example, if you want to receive one select-options that in your program that uses this class is declared like:
" P_SAKNR FOR SKAT-SAKNR".
you've got to declare two types in the class:
a- TYPES: begin of E_S_SAKNR,
sign(1),
option(2),
low(10),
high(10),
end of E_S_SAKNR.
b - TYPES E_T_SAKNR type standard table of E_S_SAKNR.
so, in the class method that you want to receive P_SAKNR as importing parameter. You got to do this:
method TEST importing ET_SAKNR type E_T_SAKNR.
now, in the implementation of this method you should be able to use ET_SAKNR as the same way as you usually use a parameter or a select-option. You could use it in a select with the operator IN by example.. -
Re : select-options in abap objects
Dear friends,
I want to give select-options in abap-objects program. How to give that.
Thanking You
with regards,
ManiHI Mani,
It's common mix ABAP Procedural with ABAP Objects in the same program.
You should use the same way used in ABAP procedural program as Marco Cerdelli sad.
But inside ABAP OBJECTS classes you can't use is these statement type.
Don't forget to close this thread and all yours previous when your question be answered ! In case of doubt read the [rules of engagement|https://forums.sdn.sap.com/].
Best Regards.
Marcelo Ramos -
How to write text name of parameters / select options in ABAP list??
Hi gurus, i must read the text name of parameterd / select options in ABAP program and write it in a list of the same program for log.......how can i do it??
Thanks in advance!
Best regards!
Ferdinando
Message was edited by:
Ferdinando SellittoHello Ferdinandino
Useful function modules are:
RS_PRINT_SELECTIONS
RS_LIST_SELECTION_TABLE (Generates list according to values in selection table(RSPARAMS))
RS_REFRESH_FROM_SELECTOPTIONS (Current contents of selection screen)
Function module RS_REFRESH_FROM_SELECTOPTIONS can provide the input for function module RS_LIST_SELECTION_TABLE.
Regards
Uwe -
Hi Guys,
I need a small help from you. I want to know how to populate the value from select-option to abap object. Please help me, it is very importantcheck this code
REPORT ZSELOPT_TO_CLASS .
TABLES: VBRK.
SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
DATA: IT_VBELN TYPE RSELOPTION.
DATA: X_VBELN TYPE RSDSSELOPT.
CLASS C1 DEFINITION.
PUBLIC SECTION.
DATA: IT_VBRP TYPE VBRP_TAB,
X_VBRP LIKE LINE OF IT_VBRP.
METHODS: GET_DATA IMPORTING S_VBELN TYPE RSELOPTION.
METHODS: DISP_DATA.
ENDCLASS.
CLASS C1 IMPLEMENTATION.
METHOD GET_DATA.
*SELECT * FROM VBRP*
INTO TABLE IT_VBRP
WHERE VBELN IN S_VBELN.
ENDMETHOD.
METHOD DISP_DATA.
LOOP AT IT_VBRP INTO X_VBRP.
WRITE:/ X_VBRP-VBELN,
X_VBRP-POSNR.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
DATA OBJ TYPE REF TO ZCL_SELOPT.
CREATE OBJECT OBJ.
LOOP AT S_VBELN.
MOVE S_VBELN-LOW TO X_VBELN-LOW.
MOVE S_VBELN-HIGH TO X_VBELN-HIGH.
MOVE S_VBELN-SIGN TO X_VBELN-SIGN.
MOVE S_VBELN-OPTION TO X_VBELN-OPTION.
APPEND X_VBELN TO IT_VBELN.
ENDLOOP.
CALL METHOD OBJ->GET_DATA
EXPORTING
S_VBELN = IT_VBELN.
CALL METHOD OBJ->DISP_DATA.
Edited by: moazam hai on May 17, 2008 6:17 AM
Edited by: moazam hai on May 17, 2008 6:19 AM -
How to set default value in select option for ABAP query
Hi experts,
What is the way to set up default values for select-options in ABAP query.
e.g.
I have one field 'Year' in my ABAP query selection screen.
I want value of current year to be appeared here whenever user execute report
Thanks in Advance
-HarkamalHi Harkamal,
execute your Query via SQ01. On Selection-Screen
goto save Variant. Mark your field
as selection variable an press Button election variable.
Take variable from TVARV and use it.
Than save the Variant.
Look at TVARV if the 'Year' is updated to the actualYear!
regards, Dieter -
Hide Select option properties in Webdynpro ABAP
Hi,
I have a select option defined in my Webdynpro application.
I want to control/hide few properties of this SELECT-OPTION. How do I do that.
I am using Select-option of type IF_WD_SELECT_OPTIONS.
ags.Done:
wd_this->mr_select_options->add_selection_field(
i_id = attribute_info-name
i_description = label_text
i_value_help_structure = value_help_structure
i_value_help_structure_field = value_help_structure_field
i_no_extension = no_extension
* Begin of changes by ASINHA
* This is used to avoid pattern from select options
I_USE_COMPLEX_RESTRICTION = abap_true
* End of changes by ASINHA
it_result = select_options_range
i_no_intervals = wd_assist->true ). -
AUTOCOMPLETE option in ABAP webdynpro
Hi ,
Can we implement auto complete option for a particular field in a view in ABAP webdynpro.For Example,in google search page if we type some word,it will automatically show the list possible searches values as dropdown.Please let me know if this is possible either in ABAP or ABAP webdynpro.
Thanks,
Vigneswaran SHi,
According to this thread:
Autocomplete
Auto-Completion for WD4A seems not possible (see Quote from Thomas).
I haven't heard of Auto-Completion for plain ABAP, I don't think it's been realized yet (but I'm NOT entirely sure here).
regards, Lukas -
Parameters and Select Option in ABAP OO
Hi all,
it's possible to build an application starts with a method of a class thats declares parameters and select-option or I have to do it custom creating a dynpro and some input field as parameters?
thanks
enzoJust to add detail: the function module RS_REFRESH_FROM_SELECTOPTIONS returns a table of TYPE RSPARAMS_TT.
The structure of this table is:
SELNAME
RSSCR_NAME
KIND
RSSCR_KIND
SIGN
TVARV_SIGN
OPTION
TVARV_OPTI
LOW
TVARV_VAL
HIGH
TVARV_VAL
the first field is the name of the selection parameter, the others have the same structure obtained declaring a range with:
TYPES|DATA <rangetab> TYPE RANGE OF <type>.
see the help topic http://help.sap.com/saphelp_470/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/content.htm -
Search help for PERNR select options in Webdynpro
Hi,
I am using the method: lv_r_helper_class->add_selection_field
and passing the value:
i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
to get search help for pernr select option in the webdynpro application.
But can anyone please tell me what value i have to pass to
i_value_help_id = ??hi,
pass your search help name there so that your desired search help ll come there..
use this,
i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
i_value_help_id = 'SEARCHHELPNAME'
if you want standard SH means comment this stmt,
if you dont want SH means,
use tis,
i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_NONE
hope this helps,
Mathan R. -
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 -
Check box before select option in a report program.
Hi All..
I have a report program with select options..I want to put a checkbox before the select option, aligned with it...Is it possible..
Regards
RudraHi Rudra,
Take the below help program. In the below program I am disabling the text fields....
Take the refrence and do it will fix the problem
&***************************Reward Point if helpful***************************&
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-003.
PARAMETERS: P1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND Z1.
SELECT-OPTIONS: S_PMNUX FOR S076-PMNUX MODIF ID MI1.
PARAMETERS: P_WENUX LIKE S076-WENUX MODIF ID MI1.
PARAMETERS: P5 TYPE CHAR15 AS LISTBOX VISIBLE LENGTH 15 MODIF ID MI1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 7.
PARAMETERS: P3 RADIOBUTTON GROUP G2 MODIF ID MI1.
SELECTION-SCREEN COMMENT 10(10) TEXT-001 MODIF ID MI1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 7.
PARAMETERS: P4 RADIOBUTTON GROUP G2 MODIF ID MI1.
SELECTION-SCREEN COMMENT 10(10) TEXT-002 MODIF ID MI1.
SELECTION-SCREEN END OF LINE.
PARAMETERS: P_FILE TYPE RLGRAP-FILENAME MODIF ID MI1.
PARAMETERS: P2 RADIOBUTTON GROUP G1.
SELECT-OPTIONS: S_PMNUX1 FOR S076-PMNUX MODIF ID MI2. " Product Group
PARAMETERS: P_WENUX1 LIKE S076-WENUX MODIF ID MI2. " Plant
PARAMETERS: P6(15) TYPE C AS LISTBOX VISIBLE LENGTH 10 MODIF ID MI2.
*PARAMETERS: P_EMAIL(255) TYPE C MODIF ID MI2.
PARAMETERS: P_EMAIL TYPE SOMLRECI1-RECEIVER. " Email Address
SELECTION-SCREEN END OF BLOCK B1.
* AT SELECTION-SCREEN OUTPUT *
AT SELECTION-SCREEN OUTPUT.
IF P1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'MI2'.
SCREEN-INVISIBLE = 0.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 1.
SCREEN-OUTPUT = 1.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'MI2'.
SCREEN-INVISIBLE = 0.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 1.
SCREEN-OUTPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF P2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'MI1'.
SCREEN-INVISIBLE = 0.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 1.
SCREEN-OUTPUT = 1.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'MI1'.
SCREEN-INVISIBLE = 0.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 1.
SCREEN-OUTPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'MI2'.
SCREEN-INVISIBLE = 0.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 1.
SCREEN-OUTPUT = 1.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'MI1'.
SCREEN-INVISIBLE = 0.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 1.
SCREEN-OUTPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF. -
WDA select-options value help configuration
Hello,
I would like to configure the value help in the select-options component in WebDynpro ABAP. I used the parameter I_VALUE_HELP_TYPE of the method ADD_SELECTION_FIELD, but I didn't know how to pass a correct value for this parameter. Could someone give me an example with coding? That would be great! Thanks in advance.
Regards,
GeorgFor those of you who, like me, get a screen full of OTR keys on the buttons and tabs, the answer is on the first tab, 6th button. Note that it is based on SPFLI, so the expected linkage between CARRID and CONNID does not happen.
The code is in MAIN_VIEW method ONACTIONON_CRS_FLD_F4_CASES.
The essence of it is:
wd_this->m_handler->add_selection_field(
i_id = CARRID
it_result = lt_range_table
i_value_help_structure = 'SFLIGHT'
i_value_help_structure_field = "CARRID ).
wd_this->m_handler->add_selection_field(
i_id = CONNID
it_result = lt_range_table
i_value_help_structure = 'SFLIGHT'
i_value_help_structure_field = "CONNID ).
The result is that you select the CARRID, and that restricts the CONNIDs.
I have used SFLIGHT because it will give linked search helps for CARRID and CONNID. It works with parameters too, but remember GET_PARAMETER_FIELD is not currently implemented (it exists, but contains no code, so your program will seem to work, but it won't) , so use GET_PARAMETER_FIELDS which does work. -
Multiple Single Values with Select Options
hi,
I'm using the SELECT_OPTIONS to accept the multiple input values through CREATE_RANGE_TABLE and it is working well but
1) i have requirement for some input fields that should accept multiple single values means without RANGES(From .. To).. Usually we achieve this by statement SELECT-OPTIONS in ABAP, could you help me out how i can achieve same functionality in webdynpro application.
2) i'm using dictionary search helps for WD4A, here i need to select multiple rows in the F4 results.
kindly provide suggestion how to achieve above functionalities.
thanks,
gupta.Hi , make the ls_rsoptions-eq eq abap_true .. this disable the multiple value selection
data: ls_complex_restrictions type if_wd_select_options=>t_complex_restrictions,
ls_rsoptions type rsoptions.
clear ls_rsoptions.
ls_rsoptions-bt = abap_false.
ls_rsoptions-cp = abap_false.
*ls_rsoptions-eq = abap_true. " for enable only single value*
ls_rsoptions-ge = abap_false.
ls_rsoptions-gt = abap_false.
ls_rsoptions-le = abap_false.
ls_rsoptions-lt = abap_false.
ls_rsoptions-nb = abap_false.
ls_rsoptions-ne = abap_false.
ls_rsoptions-np = abap_false.
ls_complex_restrictions-m_exclude = ls_rsoptions.
clear ls_rsoptions .
ls_rsoptions-bt = abap_false.
ls_rsoptions-cp = abap_false.
*ls_rsoptions-eq = abap_true. " for enable only single value*
ls_rsoptions-ge = abap_false.
ls_rsoptions-gt = abap_false.
ls_rsoptions-le = abap_false.
ls_rsoptions-lt = abap_false.
ls_rsoptions-nb = abap_false.
ls_rsoptions-ne = abap_false.
ls_rsoptions-np = abap_false.
ls_complex_restrictions-m_include = ls_rsoptions.
wd_this->m_handler->ADD_SELECTION_FIELD(
I_ID = typename
I_DESCRIPTION = 'N length 5'
IT_RESULT = lt_range_table
I_COMPLEX_RESTRICTIONS = ls_complex_restrictions
I_USE_COMPLEX_RESTRICTION = ABAP_TRUE
I_NO_EXTENSION = ABAP_false
I_NO_INTERVALS = ABAP_TRUE ).
for result see this screen shot from the below URL , hope this is your requirement
[http://i35.tinypic.com/2u8ckno.jpg|http://i35.tinypic.com/2u8ckno.jpg]
Regards
Chinnaiya P -
Hi all,
I am using F4 help for two input boxes, is it possible for these two input boxes to have the same functionality as that of Select-Options in ABAP/4, where in u can make multiple selections.
Thanx in Advance.
Regards,
Neo.it wont work for multiple values, just for ranges.
two inpufield a) from b)to
in your application declare a range.
ranges: user for sy-uname .
now user will have the same format as select option.
sign, option, low , high
Regards
Raja
Maybe you are looking for
-
What do I need to create PDF files on my iPad?
So, in trying to resolve the frustration I am having in using Adobe Reader for iOS to create PDFs (without having to pay Adobe another 25% of my current Creative Cloud subscription....) I logged a sales eqnuiry via Adobe website. I get a call back wi
-
MacBook Pro Battery bulging after 10.6.8 upgrade
I have a MacBook Pro Core Duo 17-inch: 2.16GHz (MA092LL/A), purchased in May 2006. It has been a superb performer. I ran Tiger (10.4.11) on the machine until recently, when I upgraded to Snow Leopard (10.6.8). I usually run the machine on the power s
-
Transfer of values from one recon to other recon account
Guru's, I wanted to change the recon account of a vendor from 8050001 to 8050002. Few entries are already posted in the vendor with the recon 8050001. I know that FAGL101 can be used to transfer the values from 8050001 to 8050002. In the OBBW I did t
-
Itunes for Windows 7, cannot find the album which was imported to my library
Tried to import an album from a CD to my iTunes library. The iTunes dislogue box said the music was imported but it is nowhere to be found in My iTunes Library. I attempted to download the CD again and the dialogue box said it had already been impo
-
Unable to set homepage as google.co.in
i go to tool , then option then general , and in home page i change my home page , but only for that day home page change , next day again same old site open in new tab as a home page