Creating hyperlink in column based on data, in ALV Web Dynpro ABAP

Hi,
I have a scenario in which i need to create hyperlink on a column. However all rows in that column need not be hyperlink. Based on the data i need to create it as hyperlink.
eg: Column1 Column2
      ABC        1234
      DEF     5678
      GHI          9123
      DEF     5678
So in above case where data is DEF i keep it as hyperlink, other rows are not.
I am using ALV component to display data in a view container element.
Please help me with this.
Regards,
Saud

hi,
DATA: lr_column TYPE REF TO cl_salv_wd_column.
lr_column = l_value->if_salv_wd_column_settings~get_column( 'CONNID' ).
DATA: lr_link_to_action TYPE REF TO cl_salv_wd_uie_link_to_action.
CREATE OBJECT lr_link_to_action.
lr_link_to_action->set_text_fieldname( 'CONNID' ).
*lr_link_to_action->SET_ENABLED_FIELDNAME( 'BOOL' ).*
lr_column->set_cell_editor( lr_link_to_action ).
Here BOOL is my context attribute of type wdy_boolean inside the context node.
Now based on the value of BOOL , your link to action will vary.
DATA lo_nd_cn_flight TYPE REF TO if_wd_context_node.
  DATA ls_cn_flight TYPE wd_this->element_cn_flight.
  DATA lt_cn_flight TYPE wd_this->elements_cn_flight.
*   navigate from <CONTEXT> to <CN_FLIGHT> via lead selection
  lo_nd_cn_flight = wd_context->get_child_node( name = wd_this->wdctx_cn_flight ).
  SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE lt_cn_flight.
    *LOOP AT LT_CN_FLIGHT INTO LS_CN_FLIGHT WHERE CARRID = 'AA'.*
      *LS_CN_FLIGHT-BOOL = ABAP_TRUE.*
      *MODIFY LT_CN_FLIGHT FROM LS_CN_FLIGHT TRANSPORTING BOOL.*
      *ENDLOOP.*
  lo_nd_cn_flight->bind_table( lt_cn_flight ).
CN_FLIGHT is my context node binded to ALV. Now in above code you can set the  value of BOOL attribute and link to Action will depend on this value.

Similar Messages

  • XML Meta data integration in Web Dynpro ABAP

    Hello,
    Is it possible to integrate XML Meta data with UI definitions in Web Dynpro for ABAP like Project Import in Development Studio?
    Thanks!
    Y. Hryhorovych

    Hi Yuriy,
    Web Dynpro components and applications are normal development objects. This means, you can transport them to any system using the change and transport system. There is no need to work with a separare xml representation.
    Best regards,
    Thomas

  • Declaring Data Globally in Web Dynpro ABAP

    Hi,
    I have a 2 views in my web dynpro application. 1) Selection and 2) Display. On the Selection view, I have a select option. On the slection view, onclick of a button I have written the following code:
    DATA: LR_SELECT_OPTIONS TYPE REF TO IWCI_WDR_SELECT_OPTIONS.
    DATA LR_HELPER TYPE REF TO IF_WD_SELECT_OPTIONS.
    DATA: LT_RANGE TYPE REF TO DATA.
    FIELD-SYMBOLS: <LT_RANGE_TABLE> TYPE WD_THIS->ELEMENTS_RANGE,
    <LS_FIELD> TYPE LINE OF
    IF_WD_SELECT_OPTIONS=>TT_SELECTION_SCREEN_ITEM.
    DATA: LR_COMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    DATA: LT_FIELDS TYPE IF_WD_SELECT_OPTIONS=>TT_SELECTION_SCREEN_ITEM.
    LR_COMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
    IF LR_COMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
    LR_COMP_USAGE->CREATE_COMPONENT( ).
    ENDIF.
    LR_SELECT_OPTIONS = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).
    LR_HELPER = LR_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).
    LR_HELPER->GET_SELECTION_SCREEN_ITEMS( IMPORTING
    ET_SELECTION_SCREEN_ITEMS = LT_FIELDS ).
    READ TABLE LT_FIELDS ASSIGNING <LS_FIELD> INDEX 1.
    ASSIGN <LS_FIELD>-MT_RANGE_TABLE->* TO <LT_RANGE_TABLE>.
    DATA : LR_RANGE TYPE REF TO IF_WD_CONTEXT_NODE.
    LR_RANGE = WD_CONTEXT->GET_CHILD_NODE( 'RANGE' ).
    LR_RANGE->BIND_TABLE( <LT_RANGE_TABLE> ).
    My question is that I want the data entered by the user on the selection view in the select options to be visible on the next view, Display. So how and where do I declare the field symbol <LT_RANGE_TABLE>, so that it is globally visible.
    Regards,
    Mick

    Hi,
    I have been able to get rid of the problem posed in my earlier mail about assigning values from a field symbol to an internal table. Now its back to the same old problem.
    As mentioned earlier I have a view1 in which I am populating a range (select option), which I want to display on the next view, view2.
    On view1, on click of the button, I have populated internal table I_RANGE2.
    DATA: IT_RANGE2 TYPE TABLE OF ZTTRANGE.
    ZTTRANGE is a table type in SE11 with linetype as ZRANGE (structure in SE11).
    I want to pass I_RANGE2 to the method in the component controller:
    WD_COMP_CONTROLLER->HOLD_DATA( CHANGING IT_RANGE = IT_RANGE2 ).
    In the component controller the parameter IT_RANGE has been declared as
    PARAMETER             TYPE                REFTo             Associated Type
    IT_RANGE                 Changing              u221A (Tick)                ZTTRANGE
    But I am getting an error:
    IT_RANGE2 is not type-compatible with formal parameter IT_RANGE.
    Please help resolve this error.
    Mick

  • Data validation for Date Field in Web Dynpro ABAP

    Hi ,
    In my WDA i want to perform data validation for date filed. (i.e. While creating a new record i have to check the Start Date should be always lesser than End Date.)
    If u ll enter the wrong date it should validate the Date and throw an error message.
    Please Reply soon its urgent.
    Thanks,
    Deepika

    Hi,
    First read the two attributes start date and end date.
    Then write the following condition.
    IF item_start_date > item_end_date.
    Error message.
    Endif.
    For pop up error message you need to use Create_window method of the Interface if_wd_window.
    Thanks.

  • Date field in Web Dynpro ABAP

    Hi All,
    I want to implement the Input Date Field on my WebdynPro Application in the same way as it is availble at "SCN - Contribution Points / filter criteria" .
    I want to give the user the option to change the year , past or future easily.
    I have tried to call that date UI Element , but unable to do so.
    Please help me which UI Element to use as am new in WebDynPro ABAP...
    Thanks and Regards
    Hemachandran

    hello,
    One way of doing is  -  declare two attributes(DATE_LOW and DATE HIGH ) in the context node of type DATS.Place two input feilds in the view INPUT1 and INPUT2 , bind the two attributes to the two input feilds.
    The other way is use  OVS ( object value selector ) Search Help.
    Regards,
    Naga

  • Question about meta-data of Web Dynpro ABAP / Web Dynpro Java

    Hello together,
    everywhere I can read, that Web Dynpro meta-data is platform independent.
    I´ve read into a book, that the meta-data of Web Dynpro Java is saved as XML and
    that Web-Dynpro Java Runtime generates runnable classes and sourcecode out of this...
    - What about Web-Dynpro ABAP? Is Meta-code in ABAP is saved in XML too?
    - just for theory: is ist possible to take the meta-data of a Web-Dynpro ABAP component and
      generate a Web-Dynpro Java Component out of this?
    I tried to find it out but i failed... In table WDR_RR_LOAD (is this the right one?) I found only the
    field data. But this is a RAWSTRING and I don´t know how to make I "readable".
    I must know this for my thesis for my studies, not for work.
    Thank you very much !!!!
    Greetings,
    Oliver

    Me again,
    I am not sure if I understood it right...
    The meta-data which describes the visual part of a view is saved as XML and
    would be rendered i.e. in the webbrowser... Right?
    What about the meta-data of the Web Dynpro application?
    Is this meta-code into an other structure or XML too?
    Thank you very much.
    Many Greetings,
    Oliver

  • Unable to create or update the Excel Personal data provider in Web Rich

    Hi All,
    Iam getting the below error message ,when iam using Excel as personal data provider in WEBI Rich Client.
    "Unable to create or update the Excel Personal data provider in Web Rich Client Cannot open the workbook WIS:10872"
    Please suggest a solution ,it helps a lot..
    Regards
    Mahesh

    Hi,
    Was this issue resolved? I see this post has been marked answered but there wasn't any information on what it took to resolve the issue.
    We have our CMS and processing servers on Linux while our Scheduling servers are on Windows. The WEBI reports with external data providers fail to run on Infoview/ scheduler.
    We were told this is addressed in FP 3.6 but that is not the case. We installed FP 3.6 but still continue to see these errors. It required us to manually deploy the ExtensionFactoryService package for enabling the refresh of such reports on infoview/schedulers. It also involves placing of the file used [.xls/.txt] on the linux server on the PersonalDPFiles directory.
    No luck so far!!!
    Any help would be greatly appreciated!
    Thanks
    Avinash

  • Action (navigation) when click on Hyperlink field in ALV web dynpro

    Hi - I had a question about Hyperlink in ALV web dynpro and it was answered in  Link: [web dynpro abap ALV link to (hyperlink);
    Now I need to click the Hyperlink field and navigate to another screen.
    i.e. I have a Object ID (PR Number) when I click the PR number I need to open the PR Document also another case is at the item level if the PR has more than one item I'm showing the word "MULTIPLE" so if the user click on Multiple I need to show all the items (material) in another ALV table that I already create.
    Thanks for your help!
    Jason P-V

    Hi,
    As per my understanding, there are PR number and Material and other columns in the SAME ALV table right.
    There is a ONCLICK event for ALV not for the VIEWCONTAINTERELEMENT.
    In the View where you have the ALV as component usage under view's properties, you have ALV usage right.
    Now, under the METHODS tab of the ALV, implement an event
    Onclick   EventHandler  ONCLICK(press F4) of that ALV.
    Now the Click event is implemented for that ALV. When ever you click on any column(Hyperlink) this gets called.
    Here there are parameters that you need to use it. R_PARAM has both the index and the element.
    Based on the COLUMN you can call the respective event.
    The index that you have clicked i shown from r_param->index and you can also know ATTRIBUTE name(column name).
    If attribute eq 'PRNUMBER'
    *call the Purchase requistion transaction
    elseif attribute eq 'MATNR'.
    *call the popup for other ALV as component usage to display item details.
    endif.
    Refer this Article -
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/bd28494a-0801-0010-45a3-fc359d82d3e8&overridelayout=true
    Hope this is clear.
    Regards,
    Lekha.
    Edited by: Lekha on Sep 26, 2009 12:57 PM

  • Changing colour based on cells for ALV in Web Dynpro ABAP

    Hi,
    I have a requirement where I need to change the font color for some cells of ALV in Web Dynpro ABAP. I am able to change the font color for whole row or whole column but need to know how to change it based on cells.
    My output should be something like the picture attached to this discussion. The coloumns/cells where I need the font colour can change for different rows, based on some internal condition.
    Please let me know how to achieve this...... Thank you.
    - Divya Posanpally

    Hi Divya,
    Your requirement can be achieved as below
    Create an attribute for each column of alv i.e. COLOR_F1, COLOR_F2, COLOR_F3...... COLOR_F10 of type WDY_UIE_LIBRARY_ENUM_TYPE in the context node which holds the color value
    Now while configuring ALV, set the field name of semantic color for each column as below
                   data lv_color_fld_name type string.
                   data lo_text_view type ref to cl_salv_wd_uie_text_view.
              loop at lt_columns into ls_column.
              concatenate 'COLOR'  ls_column-id into lv_color_fld_name separated by '_'.
              lo_text_view ?=  ls_column-r_column->get_cell_editor( ).    
              if lo_text_view is bound.
              lo_text_view->SET_SEMANTIC_COLOR_FIELDNAME( value = lv_color_fld_name ).
              endif.
              endloop.
    Set the color based on the condition
             loop at lt_data into ls_data.
                        if ..... "your condition here.
                        ls_data-color_f1 = cl_wd_text_view=>e_semantic_color-NEGATIVE.
                        ls_data-color_f2 = cl_wd_text_view=>e_semantic_color-POSITIVE.
                        elseif...... " another condition
                        endif.
              endloop.
    Note: You can optimize the code as per your requirement
    Hope this helps you.
    Regards,
    Rama

  • How to add button ui element in alv table data in web Dynpro ABAP

    Hi Experts,
    I have one requirement,
    Actually I was devloped normal table in web Dynpro ABAP
    in that i have one column Display as a button .
    when i select that button need to display some data.
    same requirement i need to devlope in alv table.
    i am going to attach file please check.
    Thanks in advance.
    Regards,
    Subba Reddy.

    Hi,
    You can create Button in your ALV table column with below code
    DATA lo_button              TYPE REF TO cl_salv_wd_uie_button.
    CREATE OBJECT lo_button.
        CALL METHOD lv_value->if_salv_wd_column_settings~get_column
          EXPORTING
            id    = <your column name>
          RECEIVING
            value = lo_system_select_hdr.
        lo_button->set_enabled( value = abap_true ).
       lo_button->set_text( value = 'Avaliable List'  ).
        lo_button->set_tooltip( value = 'Avaliable List' ).
        lo_system_select_hdr->set_cell_editor( value = lo_button ).
    And for button click action,
    Create a method (say SHOW_DATA( ) ) with on_click event handler.And when you click button on your ALV table, SHOW_DATA( ) method will trigger.
    Thanks
    KH

  • How to fix few rows in ALV after filtering on a column in Web Dynpro ABAP

    Hi,
    I have the following requirement:
    In an ALV, when i filter based on a column, then this filter should not be applied to 2 of its rows.
    These rows relate to totals. The totals are manually calculated as they require other component information too.
    Along with the filter result, these total rows have to be displayed.
    Let me know in case ALV in Web Dynpro ABAP supports this functionality.
    Regards,
    Rekha

    Hi,
    ALV table does not support this functionality.
    You can display the total in an another table instead.
    I had the same requirement with total and had to display the totals separately.
    Thanks,
    Feroz

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • Adobe form to save data using Web Dynpro ABAP

    Hi. I am pretty new to SAP world and trying to learn and work on a task given to me relate to
    creating Adobe offline form using Web Dynpro ABAP same time.
    I have several questions and hopefully, many gurus like you will provide answers.
    I noticed there are many examples creating and using Adobe interactive forms (though not many newer version),
    but I didn't see (at least I didn't find any) any detail example on saving data to an internal table (such as fixed assets, vendor master, etc)
    using interactive form. Is there any detail explanation/example on this?
    I have ask this question in another forum (before I found this forum) but didnu2019t get the answer yet.
    2. When I tried to see graphic layout and modify the layout from Web Dynpro, I can't see the graphic layout.
    All I see is text list of fields/buttons that I created, but can't see section for graphic layout where I can modify layout.
    I am sure I didn't install/configure something correctly.
    Anyone has any idea what I didn't do?
    I have another question, but I will wait till later after I figure out above ones first.
    Thanks for all your help in advance.
    John

    Hi John,
    In the WD4A view, there is a button "Show/Hide Layout Preview".
    Click on that button to be able to see the Layout.
    Note that this button is next to the Pretty Print button.
    regards,
    Reema.

  • How to get the ep user information data in the web dynpro?

    Hi all
      I want to create a web dynpro application on EP.I want to get the ep user information data in the web dynpro.How can I do?Thanks.

    Lin,
    Two steps to achieve this:-
    <b>Step 1:</b> Add the following code in your view Controller:-
    IWDClientUser user = WDClientUser.getCurrentUser();
    IUser objUser = user.getSAPUser();
    wdContext.currentContextElement().setXXXX(objUser.getUniqueName());
    wdContext.currentContextElement().setYYYY(objUser.getFirstName());
    wdContext.currentContextElement().setZZZZ(objUser.getLastName());
    where XXXX, YYYY , ZZZZ are the context names.
    getUniqueName : Gives Login id of Portal user.
    getFirstName : Gives First Name of the Portal user.
    getLastname : Gives Last Name of the Portal user.
    <b>Step 2 : </b>Use "Organize imports" and make sure that you have the following two libraries added in the build path of your project. You can do these by right clicking on your project name ==> Properties ==> Java Build Path ==> Libraries ==> Add External jars.
    The external jars are :
    <b>com.sap.security.api.jar
    com.sap.security.api.perm.jar</b>
    Finally rebuild your project and deploy.
    Regards,
    <b>Chintan Virani.</b>

  • Data Maintenance Web Dynpro ABAP versus Classic ABAP

    I am working on a project where I will have to create a couple of custom master data tables. In classic SAP it is very easy to create standard table maintenance screens for master data via transaction SE54 where you can assign an authorization group for security purposes if necessary. Although we very much like Web Dynpro ABAP development, I cannot find an easy way to create the same userfriendly table maintenance screens as we know them in classic SAP.
    That's why I am a bit in doubt: on the one hand we want the web look and feel, but on the other hand creating the maintenance functionality in classic sap is very simple and straight forward. Whatever the solution will be, classic or not, it will become part of a portal someday. I know both solutions can be linked to a portal so that's no decision maker in our case.
    Does somebody have any idea if there is something available for generating standard data maintenance screens in Web Dynpro ABAP without the need for a lot of additional coding? Basically I am looking for a web dynpro replacement for transaction SE54.
    Looking forward to your thoughs!!
    kind regards
    Angelique Heutinck
    IFF

    Hi Angelique Heutinck  ,
                                       Webdynpro abap is a screen design interface, as module pool, in module pool development we can only desigh screens, similarly in wda is also intented to design screen that are web enabled,
    while in classical abap we have the povision to call a transaction from a screen, while in wda, we have the provision to call another screen or view, but not a transaction.
    unfortunately we cant embedd a tranction inside a wda development, so the only provision to simulate SE54 in wda is to create screens manually.
    Regards
    Sarath

Maybe you are looking for

  • Idoc generated for creation of sales order

    Hi all, In my project we have two different boxes-I and B.When a purchase order is created in I Box an idoc is triggered which goes to the B Box and creates a sales order.I want to do some changes in E1EDKA1 and E1EDPA1 segment in the idoc in I Box s

  • Storage Management Provider Development

    With the reference of the msdn web page SMP development I generated a skeletal code for my SMP provider using the 3 mandatory classes: StorageProvider, StorageSubSystem and VirtualDisk. I copied all the methods for all 3 classes from the MOF's of MSF

  • Built-in iSight not recognized on web browsers

    Hello, I have recently updated plugins and my browser (Firefox AND Safari) said that an error occurred with the plugins and data had been lost. I know that a lost a few key plugins, and ever since, my iSight hasn't been recognized online anywhere. Fa

  • Synchronous operation with a message selector possible?

    I have a situation where the following condition exists: - a number of servlet threads (1-n) will post to request to an external asynchronous system with a unique id. - the external system will post the responses to a JMS queue. - my servlet threads

  • Please ship future iPod Shuffles with Shuffle Mode TURNED OFF

    I just got my iPod and loaded it full of podcasts. It kept flashing orange indicating that it was empty. I spent more than 4 frustrating hours restoring, reloading, reading, forums etc etc. Finally, I found a post that said the iPod will not play Pod