Select options in web dynpro ABAP  (Event on_check)

Hi,
how can I raise a message in the event-handler method on check for a specifc field out of the Select-Option.
Best regards,
Marcus

Hello,
Create a new method and call it when you want to show the message.
METHOD message_handling .
  DATA:
    lr_current_controller TYPE REF TO if_wd_controller,
    lr_message_manager    TYPE REF TO if_wd_message_manager.
  lr_current_controller ?= wd_this->wd_get_api( ).
  lr_message_manager = lr_current_controller->get_message_manager( ).
  lr_message_manager->report_t100_message(
    msgid = iv_msgid
    msgno = iv_msgno
    msgty = iv_msgty
    p1    = iv_p1
    p2    = iv_p2
    p3    = iv_p3
    p4    = iv_p4 ).
ENDMETHOD.
In this method, the program show a message that is declared in a mesasge class. If you look at IF_WD_MESSAGE_MANAGER there are other methods to show a message.
And you can find more information at this blog https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/8402. [original link is broken] [original link is broken] [original link is broken]
Regards,

Similar Messages

  • SELECT OPTIONS IN WEB DYNPRO ABAP

    Hello experts, im working with select options in a WEB Dynpro.
    There are four buttons (cancel,check,reset,copy) that apears above my select option.
    My question is: There is a way to hide that buttons?
    THANKS!

    Sure, you can disable them using the SET_GLOBAL_OPTIONS methdo of the IF_WD_SELECT_OPTIONS class.  Something like this:
    wd_this->m_handler->set_global_options(
        i_display_btn_cancel  = abap_false
        i_display_btn_check   = abap_false
        i_display_btn_reset   = abap_false
        i_display_btn_execute = abap_false ).

  • Select options in web dynpro ABAP (search help f4 problem)

    hi...
    from the Tutorial of select options i have created select option for two parameters S_CARR_ID and S_CONN_ID but i get f4 help for only S_CARR_ID, but the parameters passed to both for   m_handler->add_selection_field are the same.
    i also tried to attach my search help by passing one more parameter (I_VALUE_HELP_ID) but it dose not help.
    could any one suggest me how to get f4 help.
    thank you.
    Regards
    kailash.
    code snap ->
    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 = 'S_CARR_ID' ).
    add a new field to the selection
      wd_this->m_handler->add_selection_field(
                     i_id = 'S_CARR_ID'
                     it_result = lt_range_table
                     i_read_only = read_only
    create a range table that consists of this new data element
      lt_range_table =
        wd_this->m_handler->create_range_table(
             i_typename = 'S_CONN_ID' ).
    add a new field to the selection
      wd_this->m_handler->add_selection_field(
                     i_id = 'S_CONN_ID'
                     it_result = lt_range_table
                     i_read_only = read_only ).

    hi kailash,
      check wheteher  the field u r refering is having search help.
        if it has then set the additional parameters in method add_selection_field
      I_VALUE_HELP_STRUCTURE = 'VBC07'(name of the table)                                                   I_VALUE_HELP_STRUCTURE_FIELD = 'FKART'( field name)
    ex:
    wd_this->go_select_options1->add_selection_field( i_id = 'FKART'
                                                       I_WITHIN_BLOCK = 'BLOCK1'
                                                       I_VALUE_HELP_STRUCTURE = 'VBCO7'
                                                       I_VALUE_HELP_STRUCTURE_FIELD = 'FKART'
                                                       it_result = lo_range_table
                                                       i_read_only = lv_read_only
    regards,
    janakiram.
    Edited by: janakiram raju on Mar 11, 2008 11:40 AM

  • Validation of select-options in WEb DynPro ABAP

    Can anyone please help me on validating select-options. I want to have a functionality like what we use in normal text field while validating the field. We generally use the REPORT_ATTRIBUTE_ERROR_MESSAGE funciton.
    How can we achieve the same thing with select-options, cuz the select-options are not bound with any attribute.
    Edited by: Tirth Pandya on May 7, 2009 2:02 AM

    Hi,
    Refer to this link..Re: validate select option fields

  • Event should trigger when press enter on select option in web dynpro.

    I want to trigger a event for validation when enter is pressed in select option in web dynpro.
    as the select option is created by the coding and there is no method to trigger the event.
    please advice.

    Pls post it ABAP Forum
    Rgds
    Sumanth.Gururaj
    Consultant/Systems Analyst- SAP SD/MM

  • Theming Options for Web Dynpro ABAP/Java - Custom CSS

    What options are available for creating a custom CSS for WDA?  My project is going towards SAPUI5, and they want to apply the same look and feeavl to their Web Dynpro applications.
    I know the Theme Designer is an option - but this customer is running on NW 7.3.  Obviously to get the WD CSS to look similar UI5, it will require changing all of the WD selectors.
    Finally, we have a 7.4 Sandbox.  If I build the theme there, is it backwards compatible to their 7.3 landscape?

    UI Theme Designer is the only supported way and it is available for NW 7.3 as well, assuming you are up to date on Support Packages. As long as you create a theme with UI Theme Designer the theme will work in any system that supports the same, there might be small functional and visual differences though depending on the SP levels of the source and target systems. SAP recommendation is to always use the latest version available to create (and consume) themes. You could start by using the Cloud version of UI Theme Designer, export and import into your own system. That said your NW 7.3 system needs to support UI Theme Designer to be able to use custom themes created by it.

  • Row selection in Table (Web Dynpro Abap)

    Hello,
    I have 2 views in my web dynpro component.
    In first view ,  i am taking carrid and on click of submit button , i am displaying connid,fldate,currency,planetype,seatsmax in second view.
    I have one button on second view to go back to fist screen.
    Now, My question is :
    if i select a one row of table , i want to dispaly deatils of that row in first view.
    How can i do this?
    Please help.

    The second part of the requirement is not clear on where woudl you click and where shoudl the data be shown.
    However, all this data should be ideally maintained in the component controller i.e. the c.controller should have the conterxts and map relevant nodes to the appropriate views.
    Now, all the data is in c.controller which can be accessed from any view within the component. This way you can show any data in contexts in preferred view.
    Regards,
    Sharath

  • Problem in getting parameter value from selection screen in web dynpro abap

    Hi,
    I am facing problem in getting parameter value from selection screen.
    Please find my code below:
    DATA LT_PAR_ITEM TYPE IF_WD_SELECT_OPTIONS=>TT_SELECTION_SCREEN_ITEM.
    FIELD-SYMBOLS:<FS_PAR_ITEM> LIKE LINE OF LT_PAR_ITEM,
                                 <FS_OBJ_USAGE>    TYPE REF TO data.
      WD_THIS->M_HANDLER->GET_PARAMETER_FIELDS( IMPORTING ET_FIELDS = LT_PAR_ITEM ).
      LOOP AT LT_PAR_ITEM ASSIGNING <FS_PAR_ITEM>.
        CASE <FS_PAR_ITEM>-M_ID.
          WHEN `OBJ_USAGE`.
             ASSIGN <FS_PAR_ITEM>-M_VALUE->* TO <FS_OBJ_USAGE>.      
    [ Here, sy-subrc is 4,  <FS_OBJ_USAGE> is not assigning.]
        ENDCASE.
      ENDLOOP. 
    So, can any one solve this problem.
    Thanks in advance,
    Radhika

    Hi Radhika,
    Try using GET_RANGE_TABLE_OF_SEL_FIELD...
    Please Refer below code..
       DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA: RT_CARRID TYPE REF TO DATA.
      DATA: ISFLIGHT TYPE TABLE OF SFLIGHT.
      DATA: WSFLIGHT TYPE SFLIGHT.
      FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE.
    Retrieve the data from the select option
      RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    Assign it to a field symbol
      ASSIGN RT_CARRID->* TO <FS_CARRID>.
      CLEAR ISFLIGHT. REFRESH ISFLIGHT.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE ISFLIGHT FROM SFLIGHT
                           WHERE CARRID IN <FS_CARRID>.
      NODE_FLIGHTS = WD_CONTEXT->GET_CHILD_NODE( NAME = `FLIGHTS` ).
      NODE_FLIGHTS->BIND_ELEMENTS( ISFLIGHT ).
    Thanks,
    Regards,
    Kiran

  • Select Options in Web dynpro

    Hi,
    I have a report, this has select options for users to enter the selection criteria. On the screen users can see 'Cancel', 'Check', 'Reset' and 'Copy' buttons but NO 'SAVE'!!!
    Is there a way to save the selection made by the user as a variant? by doing this users can just select their Variant and execute the report.
    Thank you,
    Renu

    >
    Renu P wrote:
    > So, You mean to say that, If I'm a user and when every I run a WDA report " Do I have to enter the selections each and everytime? "
    >
    > - Renu
    Short answer - yes.  You can of course build something application specific to save the select-option values, but there is nothing like the variant supplied by the framework.
    Using personalization you can save single input values as favorites (right mouse click on a field and choose User Settings->Use Current Value as Default.  However this isn't really like the old style variant, no does it capture complex values like those that can be represented within a select-option.

  • Web Dynpro Abap: Select-Options: Save Selection Data

    Hello,
    I am using select-options in web dynpro abap.  Need to add a feature where the user can save his selection values as a variant. 
    All I can think of is getting all the selection values and saving these into a Z table.
    Can you suggest a better way?
    Thank you.
    Irene

    Hi Irene,
    Alas, it's currently not possible. You could write your own wrapper though adding a save button. Inside of the action handler you could retrieve the range tables of all fields, convert their content to a structure you like and save it a fitting db table. My suggestion is to use XML and a DB table with a XSTRING field in the data section to store the range table values.
    Using personalization will allow you to customize your ui and to hide certain select option fields.
    Best regards,
    Thomas

  • Possibility of Web dynpro ABAP development for SAP R/3 4.7 Version

    Hi Experts,
         I request for information regarding Web Dynpro ABAP. We have SAP R/3 4.7 as back end. And we are going to implement NetWeaver 2004s - Enterprise Portal 7.0 as front end. We are taking development option as Web Dynpro ABAP. Is it possible to do development in Web Dynpro ABAP where you have SAP R/3 version as 4.7.
    Regards,
    Venkat.

    Hi Heidi ,
    Thank you for your reply. I have assigned points to you. Could you pls give any SAP notes which is giving this information
    Regards,
    Venkat.

  • Web Dynpro ABAP - Select Option and ALV Component Usage

    Hi,
    I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
    Web Dynpro ABAP - Select Option and ALV Component Usage  
    In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
    Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
    I implemented and generated the web dynpro with success but when i execute a test i get a dump on select-option definition.
    Note
    The following error text was processed in the system ECD : Exception condition "TYPE_NOT_FOUND" raised.
    The error occurred on the application server ITAWSECCS01D_ECD_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
    I went in debug and the piece of code dumping is:
    lt_range_table =
    wd_this->m_handler->create_range_table( i_typename = 'S_PROJ' ).
    Is there someone who can help me?
    Thanks in advance,
    Stefano.

    Hi,
    I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
    Web Dynpro ABAP - Select Option and ALV Component Usage
    In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
    Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
    I implemented and generated the web dynpro with success but when i execute a test i get
    an error as
    Note
    The following error text was processed in the system EI6 : Exception condition "TYPE_NOT_FOUND" raised.
    The error occurred on the application server EC6IDES_EI6_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
    I have created a table zmy_table and trying to make USERID field as a select-options.I've written the code as shown below .
    data: itab type standard table of zmy_table,
    wa type zmy_table.
    data:
    node_employee type ref to if_wd_context_node,
    elem_employee type ref to if_wd_context_element,
    stru_employee type wd_this->element_employee ,
    item_userid like stru_employee-userid.
    navigate from <CONTEXT> to <EMPLOYEE> via lead selection
    node_employee = wd_context->get_child_node( name = wd_this->wdctx_employee ).
    @TODO handle not set lead selection
    if ( node_employee is initial ).
    endif.
    get element via lead selection
    elem_employee = node_employee->get_element( ).
    @TODO handle not set lead selection
    if ( elem_employee is initial ).
    endif.
    alternative access via index
    Elem_Employee = Node_Employee->get_Element( Index = 1 ).
    @TODO handle non existant child
    if ( Elem_Employee is initial ).
    endif.
    get single attribute
    elem_employee->get_attribute(
    exporting
    name = `USERID`
    importing
    value = item_userid ).
    select *
    from zmy_table
    into table itab
    where userid = item_userid.
    node_employee = wd_context->get_child_node( 'EMPLOYEE' ).
    node_employee->bind_elements( itab ).
    Is there someone who can help me and can tell am i doing wrong?
    Thanks in advance,
    Dheeraj

  • ABAP Web Dynpro ALV: event for "tabel selection menu" needed

    Hi all,
    we need to react on the "table selection menue" control in our ALV grids. We found, that event "lead_select" is triggerd, if single lines are selected and if "delete selection" from the table selection menu is used.
    But if the "select all" item is used, the event is not triggered.
    Is there another event we can use? Does anybody know a sensible workaround for this problem?
    Thanks  and regards
    Joachim

    Hello Joachim,
    perhaps it's better to post your question in the WebDynpro ABAP forum:
    Web Dynpro ABAP
    Best regards
    Stephan

  • Cannot see Ecatt option in context menu in web dynpro abap in SE80 ECC 6.0

    Hi ,
    I saw a presentation by Thomas in which there is option of recording ecatt script on context menu in web dynpro abap application.we are on ECC 6.0 we are trying to record WDA applications and test them by using Ecatt but I am unable to see the option of recording the ecatt script in SE80 editor.
    Why could this be happening

    Thanks ,
    I saw that disappointing note ...any other way to automate web dynpro abap testing ? please advise.

  • Event handling for closing a browser window on portal in web dynpro abap

    Hi,
    I am new to portal as well as web dynpro. Is it possible to handle portal events in web dynpro abap? My requirement is whenever a browser window is closed on portal, if any new system messge has been added I want to display them in a pop-up. I checked examples from the package 'SWDP_TEST' but they trigger events in web dynpro and pass them to portal. I want to subscribe to the close event of portal and handle it in my web dynpro abap application. How can I achieve this? Please suggest.
    Thanks and regards,
    Amrutha

    Amrutha S wrote:
    Is it possible to handle portal events in web dynpro abap? My requirement is whenever a browser window is closed on portal, if any new system messge has been added I want to display them in a pop-up. I checked examples from the package 'SWDP_TEST' but they trigger events in web dynpro and pass them to portal. I want to subscribe to the close event of portal and handle it in my web dynpro abap application. How can I achieve this? Please suggest.
    Hi,
    I dont think that you can code to close IE browser window as you cannot access MS IE APIs in WD ABAP. I looked into closing IE browser and got http://p2p.wrox.com/general-net/16588-handling-ie-close-event.html . reading this, it seems the coding can be done in C#(asp) etc.
    also refer Closing of IE window
    I hope this is useful for you.
    Thanks,
    Chandra

Maybe you are looking for