Select options in wddomodifyview

Hi all.
I am using two components.
I pass a parameter from one to another one, and this value should be shown  in a field of a select options  (that has been created in wddoinit).
The method  wddoinit is executed before the parameter has value.
I have tried to create select options in the method 'wddmodifyview', ( there the parameter already has value), but select options  doesn´t appear when executing itself webdynpro.
Can I create a select options in a method that  this is not wddoinit ?
Thanks in advance.

Hi Ana, Try this one..
You can pass the values from one WDP component to another using assistance class.
Create a "Z" subclass using CL_WD_COMPONENT_ASSISTANCE as Super Class.
In the Attribute Tabpage define a variable "pernr"which will hold the data from one application to another.
Steps for assigning the class to you application
1) Select the Web Dynpro Component
2) You will see a field for Assistance Class--> enter the name of your ZClass.
You can directly access the variable in you application as
wd_assist->pernr
Bhawanidutt.

Similar Messages

  • Using roadmap and select-options

    I'm new to abap web dynpro, i'm using a roadmap with 4 views. This is working fine but, when I try to use select options in view1 they don't show. When I set view1 as default view the select options are working fine.
    this is how my current web dynpro looks like:
    Main view -> roadmap with viewcontainerUIElement
        view1 -> viewContainerUIElement + table (in the window I embedded the select options in the viewContainerUIElement)
        view2
        view3
        view4
    In view1 I'm using wddoinit to initialise the select options.
    Thanks in advance!

    Hi Srinivas,
    According to you mail, I will provide some solution please try them. It will definitely works.
    ---> Create a attribute which holds the lead selection values of the RADIO_GROUP.
    ---> When you click on the Next View, You will fire the plug. Right. Just before firing the Plug, update the above
          attribute with update information.
    > Do the same code for Select-options code in the WDDOINIT except the passing the values to the select-options.
    > Please pass the attribute information to Select-options with updated information in the method WDDOMODIFYVIEW every time. Without creating a attribute also you can approach the same method. Just for simple access we can create a attribute. Otherwise without that we can do the same.
    So Just populate the values into Select-options depending on the value of RADIO_GROUP you will do the same coding WDDOMODIFYVIEW. But initialization of SELECT-OPTIONS can be only done in the method WDDOINIT method only. WDDOINIT method only execute first time once you go through it and go back and move forward then this method won't execute.
    I hope this logic will work for you. If not Please send me the Code related to SELECT-OPTIONS and RADIO_GROUP Button information.
    I will be in office today up to 4.45 PM (IST). You can contact me in this time otherwise we will discuss on webex tomorrow morning at 9 AM.
    Warm Regards,
    Vijay

  • Problem in Select Option Freely programmed F4 Help

    Hi All,
    I had a Component 'A'  where i used select option. I used Freely programmed search help for the select option field.
    If i click F4 in the select option field it will call one component in which i have one more select option in component B.
    In component B select option field if i manually entering value and search and click apply values button the values are comming in the select option field in component A.
    But if i pressing the F4 in Component B and search and click apply values the value are not comming in the Component 'A'.
    If i open again component B and closing it without any action the value is coming in component A.
    If i debugged and see the WDDOMODIFYVIEW of tHE WDR_SELECT_OPTION is not getting called for component A.In which it has Rendering delta method of CL_WDR_SELECT_OPTION.
    Any idea about this.
    Regards,
    Ganesh.

    hi Ganesh,
    i have read your post several time and i am still not able to get hold on your problem. Probably it is to do with your complex approach of nested select_option, i can not judge why you did this way. I would advice you to step back and see it for yourself
    1)if it is need to have nested select_option
    2)check component initialization and destroy
    2)check event subscriptions

  • ABAP WD, Clear select options

    Hi all,
    I have 2 select options in my web dynpro and I want to clean the value of the second select options
    when the first select options is selected.
    I have tried it using:
    (m_handler: type ref IF_WD_SELECT_OPTIONS)
    DATA:
         i_it_range_table TYPE REF TO data.
         i_it_range_table = wd_this->m_handler->create_range_table( i_typename = 'select_option_2' ).
         CALL METHOD wd_this->m_handler->set_range_table_of_sel_field
           EXPORTING
             i_id           = 'select_option_2'
             it_range_table = i_it_range_table.
    or:
      CALL METHOD wd_this->m_handler->upd_selection_field
        EXPORTING
          i_id                      = 'select_option_2'
          it_result                 = i_it_range_table.
    But the value appears.
    How do i solve this?
    Thanks.

    Hi Sascha.
    I had tried with this method and the value appeared, but i have used again and I have seen my problem.
    The problem was select option was modified in method WDDOMODIFYVIEW. I'm going to repair it.
    Thanks a lot.

  • Reference is lost when updating selection option

    Hi all,
    In my application, I need to update selection screen according to user input, like update dropdown list. Therefore, I write my coding at view event WDDOMODIFYVIEW to ensure my method UpdateScreen is called at every roundtrip. Everything runs OK except when I click sign/option and choose any sign of selection option following dump occurs:
    The following error text was processed in the system ICX : Access via 'NULL' object reference not possible.
    The error occurred on the application server pwdf4646_ICX_12 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_ELEMENT~SET_ATTRIBUTE of program CL_WDR_CONTEXT_ELEMENT========CP
    Method: SET_SIGN of program CL_WDR_SELECT_OPTIONS=========CP
    Method: ON_SIGN_OPTION_LEAVE of program CL_WDR_SELECT_OPTIONS=========CP
    Method: ONACTIONON_ENTRY_SELECTED of program /1BCWDY/ALMK9CLI947HVDFYUZV5==CP
    Method: ONACTIONON_ENTRY_SELECTED of program /1BCWDY/ALMK9CLI947HVDFYUZV5==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/ALMK9CLI947HVDFYUZV5==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
    Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    It losts ref since I call if_wd_select_options~upd_selection_field before choosing sign. If user clicks sign/option, there's no need to update selection screen because no user input changes. But how can I judge this?

    Please let me comment more since no attachment can be uploaded. Following are key steps I do:
    1) Build selection screen of two select options with this:
      lr_range = lr_selopt->create_range_table( i_typename = 'CRMT_PROCESS_TYPE' ).
      lr_selopt->add_selection_field(
        i_id                       = 'ACT_PROCTYPE'
        it_result                  = lr_range
        i_description              = 'Transaction Type'
      lr_range = lr_selopt->create_range_table( i_typename = 'CRMT_ACTIVITY_CATEGORY' ).
      lr_selopt->add_selection_field(
        i_id                          = 'ACT_CAT'
        it_result                     = lr_range
        i_value_help_structure_field  = 'CATEGORY'
    2) At method WDDOMODIFYVIEW, I update the description for example:
      lr_range = lr_selopt->create_range_table( i_typename = 'CRMT_PROCESS_TYPE' ).
      lr_selopt->upd_selection_field(
        i_id                       = 'ACT_PROCTYPE'
        it_result                  = lr_range
        i_description              = 'New Transaction Type'
    Then, if I click the sign button before select option and choose a sign, it gets dump.
    I know the calling of upd_selection_field interferes something, but I have to update screen in order to complying with user input.

  • Collapase Select Options Tray

    Hi All,
    I am reusing Select Options( WDR_SELECT_OPTIONS ) in my screen.
    Is there a way to collapse the Tray(  if_wd_select_options=>mc_block_type_tray ) of Select Options when the page is initially loaded.
    This is  my code for Adding a tray and adding select option fields using add_selection_field later.
    * create a block
      wd_this->l_handler->add_block(  i_id         = 'ID01'
                                      i_block_type            = if_wd_select_options=>mc_block_type_tray
                                      i_title                      =  ' '
                                      i_width                    = '100%').
    Thanks

    Hi Santosh,
    There is no standard method available to control the behaviour BLOCK  of WDR_SELECT_OPTION.
    You need to do an enhancement in view SELECTION_SCREEN of component and use the post exit of WDDOMODIFYVIEW( ) method.
    Sample code;
      IF FIRST_TIME EQ ABAP_TRUE.
        DATA LO_TRAY TYPE REF TO CL_WD_TRAY.
          LO_TRAY ?= VIEW->GET_ELEMENT('ID01').
      if lo_tray is bound.
          LO_TRAY->SET_EXPANDED( ABAP_FALSE ).
      endif.
      ENDIF.
    Note: the changes made in WDR_SELECT_OPTIONS may impact globally for other applications. Instead you can copy the component WDR_SELECT_OPTION and do the necessary changes.
    Hope this helps you.
    Regards,
    Rama

  • Report help for multiple Date Select options

    Hi Friends,
    For a particular year wise report, the client wants 12 date select-options which are changeable and informal every year .The report will also be displayed as per the given date selection period wise. Please help me how to fetch the datas from the table as per the given selection period. Currently the report have one date select-option where the user gives selection range as 1.04 to 31.03. It's related to EB power consumption report and hence the new requirement on date selection which are informal and not a fixed date of every year.
    Ex:Selection-Screen
    Period 1 : 08.04.2008 to 12.05.2008
    Period 2: 12.05.2008 to 20.06.2008
    Period 3: 21.06.2008 to 28.07.2008
    Period 4: 29.07.2008 to 15.08.2008
    Period 5: 15.08.2008 to 21.09.2008
    Period 6 : 21.09.2008 to 14.10.2008
    The data will derive as per the above selection ranges.......
    Please advise with example.
    thanks & regards
    Sankar.

    >
    sankar babu wrote:
    > Ex:Selection-Screen
    > Period 1 : 08.04.2008 to 12.05.2008
    > Period 2: 12.05.2008 to 20.06.2008
    > Period 3: 21.06.2008 to 28.07.2008
    > Period 4: 29.07.2008 to 15.08.2008
    > Period 5: 15.08.2008 to 21.09.2008
    > Period 6 : 21.09.2008 to 14.10.2008
    Hi,
    In this case just derive all records matching dates between 08.04.2008 (low in first select-options) and 14.10.2008(high in last select-options.
    Also my advice is to use a single select-options and prompt the user to give the dates as ranges in the multiple entries dialog which can be opened by clicking the button on the right side of the select-options.
    Regards
    Karthik D

  • How To... Change the Data Type for a SELECT-OPTIONS at run time.

    Hello,
    I am trying to restrict the values available for entry into a SELECT-OPTIONS at run time depending on user input.
    The logic is as follows. The user has two input fields. A PARAMETER field which has the type RSDIOBJNM and allows them to choose an InfoObject. And the user has a SELECT-OPTIONS field to allow them to select the Characteristic values for that InfoObject.
    I would like the following example to be possible:
    The user enters 0MATERIAL into the PARAMETER. When the user clicks on the SELECT-OPTIONS control code will derive a list of possible options the user can enter in the SELECT-OPTIONS. In this case only values found in the master data or at least no values greater than 18 characters.
    I have looked at the following function module SELECT_OPTIONS_RESTRICT and this do not appear to be helpful as they only restrict on the signs allowed for the values (unless I misunderstand, it is a complex function module!).
    The code I have so far is (thus the user enters a InfoObject into p_char1 and the select options so_char1 should only accept active values of that InfoObject):
    declaration of variables for user interface
      DATA c_char(32) TYPE c.
    declaration of count variable
      DATA i_count TYPE i.
    declaration of user interface
      SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
        PARAMETERS: p_ipack TYPE RSLOGDPID.
      SELECTION-SCREEN END OF BLOCK a1.
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
        PARAMETERS: p_char1 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char1  for c_char NO INTERVALS.
        PARAMETERS: p_char2 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char2  for c_char NO INTERVALS.
        PARAMETERS: p_char3 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char3  for c_char NO INTERVALS.
      SELECTION-SCREEN END OF BLOCK b1.
    Is what I am trying to do possible???
    Thanks for any help. Ross.

    You really want to restrict possible values of a select-option based on another field, not change the length of type of the select-option field, right?
    Here is what you do:  Code a custom F4 value help for the select-option at event AT SELECTION-SCREEN ON VALUE REQUEST FOR..  The first thing you do here is read the value of the parameter field (p_ipack in your example).  You can use function module DYNP_VALUES_READ.  Based on this value, you can propose values for the select-option fields.  Note that the use can still enter whatever s(he) wishes in to the select-option field without pressing F4. In this case, you will have to code some input validations taking into account the value in the p_ipack field.

  • Select-options in SELECT query - syntax error

    Hi all,
      I get the error below when I try to use the select options in a SELECT query . Please help me.
    "The IN operator with "SO_AWART" is followed neither by an internal
    table nor by a value list."
    The code i have used(Logical database  PNP is used):
    TABLES: pernr,
            catsdb.
    INCLUDE ztime_cwtr_top.    " global Data
    INCLUDE ztime_cwtr_f01.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    SELECT-OPTIONS SO_AWART FOR CATSDB-AWART.
    PARAMETERS P_THRES TYPE I.
    SELECTION-SCREEN END OF BLOCK B1.
    Get data from CATSDB table. Workdates within the date interval are considered.
      SELECT pernr workdate awart catsquantity beguz enduz status
      FROM catsdb
      INTO TABLE it_catsdb
      WHERE pernr  = pernr-pernr    AND
           workdate GE pn-begda     AND
           workdate LE pn-endda     AND
           status   IN ('20', '30') AND
           awart    IN  so_awart .
          awart    IN ('1100', '1137', '1138', '1139', '1140',
                      '1147', '1148', '1149', '1157', '2003' ).
    when I give the values directly i do not get any syntax error, but when I use select options in the where condition I get the syntax error.
    I have tried different options like using only the select-options in the where condition.
    Thanks in advance.....
    Madhu

    Solved.
    Code with syntax error:
    include z...top .
    include z...fo1.
    select-options: xxxxxxx
    Code  with no syntax error:
    select-options: xxxxxxx
    include z...top .
    include z...fo1.
    Thanks for all your help,
    Madhu

  • How to hide some select-option of Logical Database in report?

    How to hide select-option of  Logical Database in report?eg . In Logical Database 'PNP' , my code is 'GET  PERNR' , excute the report , select-screen is displayed . I want to hide some select-options , such as PNPPERNR-LOW .
    Edited by: rongrong wang  on Mar 26, 2008 9:31 AM

    U need to write code in initialization as
    initialization.
    loop at screen.
    if screen-name = 'PNPPERNR-LOW'.
    screen-active = '0'.
    modify screen.
    endif.
    if screen-name = 'PNPPERNR-HIGH'.
    screen-active = '0'.
    modify screen.
    endif.
    endloop.

  • 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,
    Mani

    In 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,
    Mani

    HI 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

  • Select-option in ABAP objects

    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 important

    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

  • Can we use select options in smartform

    can we use select options in smartform if so can any one send me a sample code...
    Thanks
    bhaskhar

    Hi ,
    Can u explain why u want to use select options in smartforms . U can try it in program lines .
    Its better to use select options in the driver program and fetch data accordingly in the driver program or passing the selected values from select options to the smatfrom and fdetching the data there in smartform .
    Regards

  • Checking against Select-Options with "CP" using "IF value IN select_option"

    Dear experts,
    first of all: I'm sorry, if this question already should have been asked and answered!
    I tried quite a lot of search terms but didn't find anything helpful.
    We are using a statement like "IF value IN select_option" to perform comparisons after the Select-Options have been used in a SELECT statement. This logical expression fails (compared to the results of the DB-SELECT) whenever a select-option line contains the option CP (Contains Pattern). To be more specific: The case sensitivity of the LOW value doesn't seem to play a role any more. A variable with the value 'ABCD' would be positively checked against a select-option with OPTION 'CP' and LOW 'abc*', whereas this value wouldn't have been selected if the select-option had been used in a DB-SELECT.
    Does anybody know a workaround?
    Thanks in advance
    Andreas

    Dear Keshav,
    it's an own field in an own table, defined as CHAR of length 140 (lowercase allowed), reflecting to a line of remittance info of an account statement. A regular Select-Option for this field is provided in a report which works perfectly fine regarding the case sensitivity. For reasons I don't want to point out in detail we need to check a value in this field against the select-option without selecting it from the db again.
    Let's assume that a field remittance_info contains the value 'ABCD'.
    A line of the select-option table looks like this:
    select_option_table-SIGN = 'I'
    select_option_table-OPTION = 'CP'
    select_option_table-LOW = 'abc*'.
    Then an ABAP statement such as
    IF remittance_info IN select_option_table.
    * would be true !!!
    ENDIF.
    but wouldn't deliver a result in a SELECT such as
    SELECT * FROM my_table INTO TABLE my_internal_table WHERE remittance_info IN select_option_table.
    because of the differences in lower/upper case.
    regards
    Andreas

Maybe you are looking for

  • Mac won't start, gives me the kernel stop-sign

    Ok, this is my big big problem.. One day, i was just doing nothing on my dear computer, starting up firefox or something, then suddenly everything stopped. I couldn't do anything. I forced-restarted the computer with the boot-button. When im trying t

  • NI cDAQ-9172 is not recognizing a NI 9237

    I am trying to use a NI 9237 with a NI cDAQ-9172 to measure pressure using a pressure transducer. When I plugged the 9237 into the cDAQ it was not recognized. As I remember with this piece of eqiupment, once a module is plugged in it should be recogn

  • Installing php, mysql and apache

    Hey guys, Basically Im at university and doing a web development project and i need to use mysql and php, and someone told me leopard already comes with it? Does anyone know how i can get it to work correctly? any steps from the beginning? - am new t

  • Automatic Purging of Recyclebin

    Hi, Anybody can tell me when recyclebin is purged automatically in Oracle 10g. I was trying to insert some records using a database link in production DB, I am also using an audit table to track all DDL operations by using DDL trigger). At the time o

  • Performance issues-assigning background jobs to a designated server

    Hello all, we have been having peformance issues in our production enviorment and were entertaining the idea of running all our our background jobs on a separate/designated server.  Has anyone had any experience with this and if so any insight on how