WD Table onleadselect method - button diability

Hi all,
In benefits application once the user selects a medical or dental plan, he will be taken to plans within it by individual vendors. Once the user selects a plan like HMO, he should select the dependent coverage too, so that he selects the dependent coverage and then he clicks on button "Dependent Coverage" . This button is always enabled, but for some selections I dont need this button to be enabled.
So here is my main controller, VcBenefitsPlanDetail, and Views are DetailCostCreditView, ContainerPlanDetailView. I created a value attribute in context of contriller, mapped it to both views. I created a method and assigned this to table on lead select. Within that I wrote the following lines of code
String Default1 = null;
Default1 = wdContext.currentOfferDetailCostCreditElement().getDepcv();
if (Default1 == "DEF")
          wdThis.wdGetVcBenefitsPlanDetailController().wdGetContext().currentContextElement().setDepEnable(false);
          else {
               wdThis.wdGetVcBenefitsPlanDetailController().wdGetContext().currentContextElement().setDepEnable(true);
And for button, I assigned this value attribute to button enable fieldm, within container view.
But this code didnt seem to work at all,
Now, I have these following questions,
1) Can I access the current context selection like this? or should I iterate one by one?
2) When the row select happened, does this method execute and take and can pass the depenable value to the button? Or should I have to write this code in wdmodifyview??
Please suggest where I am going wrong?
Thanks
Murthy

You should never compare two string objects using "==" instead you have ot use equals("DEF") or equalIgnoreCase("DEF") //If you want ignore case;
Only primitive data types,like int or double data types should be compared using "==" operator

Similar Messages

  • Passing a internal table from method

    Hi All,
       I am using Object Oriented Programming in my program.
       I want to pass a Internal Table from a method calling statement written in a start-of-selection.
       Can any one give me the syntax for
    1. Declaring a method with importing parameter as internal table.
    2. Syntax for Method Implementation
    3. Syntax for calling the method from start-of-selection.
    helpful answers are rewarded.
    Regards,
    Azaz Ali.

    Hi,
      Calling Method is similar to calling function Module.
    CALL METHOD cl_gui_frontend_services=>gui_download
       exporting
          filename    =
    IMPORTING
       FILELENGTH                =
      changing
        data_tab                  = <b>( this is ur internal table name )</b>*  EXCEPTIONS
       FILE_WRITE_ERROR          = 1.
    <b>In OO ABAP u avoid creating table with header line</b>
    Best way to call method is to use <b>PATTERN</b> Button  
    1) Click Pattern Button
    2) Select Abap Object Pattern
    3) Enter
    4) Select Call Method
    5) Enter instance name ( i. e  used for create object ) ( No need for static method like gui_download )
    6) Enter Class / Interface name
    7) Enter Method Name
    done.
    <b>passing value to method is similar to FM.
    Creating internal table for Method
    any TYPE ........SAY  TY_Intern
    Then Syntax Should Be
    DATA : OO_INTERNAL_TABLe type table of TY_Intern.
    pass this to the Method.
    Hope This will solve ur problem.
    Please Mark Helpful Answers</b>
    Message was edited by: Manoj Gupta

  • Exporting Internal Table from Methods

    Hi Experts,
    I wanted to export an internal table from Methods and I am using below syntax and its not working.
    METHODS get_data IMPORTING value(s_matnr) type mara-matnr
                     exporting it_tab TYPE STANDARD TABLE itab.
    Please let me know what is the proper syntax.
    Thanks
    Basanagouda

    Hi,
    Define itab as a 'table type' of standard table.
    Example: TYPES: t_sflight TYPE STANDARD TABLE OF sflight.
    METHODS : get_data IMPORTING s_carrid type sel_carrid
    EXPORTING e_tab type t_sflight.
    ENDCLASS

  • How do I move a table with radio buttons to another page?

    I created a document in Word, converted to PDF, added a page (which was created in Adobe Forms Central, only way to get a table with radio buttons - see below for example).
    The issue I have is whilst using the Trial of Adobe XI Pro I was able to move this table up a page and place it under the header.  Now that the trial has run out I cannot complete this task with other documents.
    I started to edit using LiveCycle but it won't let me move the table.
    We have Acrobat X Pro but when I go to edit, it directs me to edit in LiveCycle.  I have tried moving the table using all of these programs.  Can anyone help/guide please? 

    Thank you for your reply.  I am new to editing a pdf and using these programs. I have subscribed to Acrobat XI Pro.  When I try to edit the document it directs me to LiveCycle.  I cannot move the table in LiveCycle.  It won't let me, and I cannot make changes in XI Pro as I did in the trial as it directs me to edit in LiveCycle.  Am going in circles.

  • Internal table in method of class (BADI)

    Hello people !!
    I need to use an internal table into method of class. I don´t know very well how to use it. I know that it hasn´t a header; but I don´t know how to defined and use it.
    I need to use in a method of badi.-
    I will be grateful by the help that your could offer to me.-
    Thank you so much,
    Esther.-

    Thank you for your answer.
    But, I had defined as de fist item, but I had defined with a structure of dictinary.
    Now, in my code, I need to deposit information to the above mentioned table. Then, when I try to accede to the fields of the estructure, when I compile it gives me the following mistake:
    "ACC_DATA" is a table without a header line and therefore has no          
    component called "CUENTA".     
    I attach departs from the code:
    types: es_accdata type standard table of Z_ES_ACCDATA.
    data: acc_data  type es_accdata.
          loop at it_mseg into r_mseg.
          si es Entrada de Mercancía
            if r_mseg-bwart = '101'.
              at first.
                acc_data-cuenta = r_mseg-sakto.
                if not r_mseg-kostl is initial.
                  acc_data-centro_coste = r_mseg-kostl.
                else.
                  acc_data-orden_inversion = r_mseg-aufnr.
                endif.
              endat.
              monto = monto + r_mseg-dmbtr.
            endif.
          endloop.
    Thank you againg, for a new answer !!!!
    bye, Esther.-

  • BPM Scenario :  " Error accessing table SXMS_AS_STATUS method: INSERT"

    Hi all,
    Webservice --> XI -->BW .
    BPM has been used to send to send the response back.
    BPM :
    start ->Receive(Request)> Transformation(Responsemap)>Send(SendtoR/3)->Send(Send Response) ---> stop.
    We are getting the error as " The error is <SAP:Stack>Error accessing table SXMS_AS_STATUS method: INSERT</SAP:Stack>
    There are some messages that Webservice sent and XI received them but this error occured during some process in XI. and this is causing some discrepancy in the data sent and received.
    Any idea what might be the problem ? Is there anything which I need to change in the parameters to rectify this error?
    -Deepthi.

    Hi
    Just check this note , can get some clue
    SAP-Note 1124049
    Regards
    Abhishek

  • Dynamic table with radio buttons

    I need to load a dynamic table with radio buttons that allow
    the user to select an item in the table. I need to have it add a
    radio button with a unique identifier for each table item.
    For example: the table will load all of the seminars
    locations available in a certain state, the radio button will allow
    the user to select the city in which they would like to attend and
    that value will get passed to the registration page. The value of
    each radio button would be equal to the location_id in the database
    for each of the locations in the table (The table includes the
    date, day, venue, address, hotel info, etc. details for each city.)
    When I add dynamic radio buttons and set the value to the
    location_id in the database, it allows the user to select multiple
    radio buttons. I cannot find any information on how to
    resolve.....??
    Any help is appreciated.

    beanieboo wrote:
    > I need to load a dynamic table with radio buttons that
    allow the user to select
    > an item in the table. I need to have it add a radio
    button with a unique
    > identifier for each table item.
    >
    > For example: the table will load all of the seminars
    locations available in a
    > certain state, the radio button will allow the user to
    select the city in which
    > they would like to attend and that value will get passed
    to the registration
    > page. The value of each radio button would be equal to
    the location_id in the
    > database for each of the locations in the table (The
    table includes the date,
    > day, venue, address, hotel info, etc. details for each
    city.)
    >
    > When I add dynamic radio buttons and set the value to
    the location_id in the
    > database, it allows the user to select multiple radio
    buttons. I cannot find
    > any information on how to resolve.....??
    > Any help is appreciated.
    Give each radio button the same name
    <input type="radio" name=theLocation" value="<?php
    $recordset['location_id'] ?>">
    Mick

  • Why are multiple slides under one table of contents button?

    I'm using Captivate 8, and notice that when I preview my course, the table of contents buttons directly correspond with each slide but then after that, the remaining slides are lumped under one table of contents button.  How can I fix this?  In other words, when looking at the table of contents, it looks like my course only has 6 slides when in reality there's 30...many of which are lumped under the last button.

    You have to scroll, they are not under one button at all.
    Good practice is to group slides, then you'll see the hierarchy in the TOC and you are able to collapse all groups. That way the TOC will have a clean look, and the user can open a group to see the individual slides.

  • How to refresh table column during button method call ?

    Hi,
    I have one table on my screen in which there are 5 rows.
    One of the column of this table is Status with initial value Not Completed.
    Now when I press submit button my 5 processes are started in for loop one by one.
    After completion of 1st process, I am updating 1st row status with Completed and vise a versa.
    But change is reflected on table after by method call over means if my submit action take 5 minutes to finish all 5 process than after 5 minutes, I can see all rows with status Completed while I want it to reflect as soon as I set its status.
    How can I do this ?
    regards,
    devang

    .. or break up the method in 5 methods (for each process a separate method) and with you button you call the first method. then when at the end of the method you call a javascript which updates the first column to completed and the js calls the second method (with queue of client event and serverListener) ... and so on and so on.
    Really not so cool idea but I think it's achievable:)

  • How to return an internal table with methods ?

    Hi,
    I am an Java programmer and very new to ABAP.
    How do I return a internal table with a method? I have the table GP1_PRODUCTS and want to return a copy of this table as an internal table called PRODUCTS.
    Here is my code that does not work:
    class PRODUCTS definition
      public
      final
      create public .
    public section.
    *"* public components of class PRODUCTS
    *"* do not include other source files here!!!
      methods GET_PRODUCT_LIST
        returning
          value(PRODUCTS) type GP1_PRODUCTS .
    protected section.
    *"* protected components of class PRODUCTS
    *"* do not include other source files here!!!
    private section.
    *"* private components of class PRODUCTS
    *"* do not include other source files here!!!
    ENDCLASS.
    CLASS PRODUCTS IMPLEMENTATION.
    * <SIGNATURE>---------------------------------------------------------------------------------------+
    * | Instance Public Method PRODUCTS->GET_PRODUCT_LIST
    * +-------------------------------------------------------------------------------------------------+
    * | [<-()] PRODUCTS                       TYPE        GP1_PRODUCTS
    * +--------------------------------------------------------------------------------------</SIGNATURE>
    method GET_PRODUCT_LIST.
    DATA: it_products TYPE STANDARD TABLE OF GP1_PRODUCTS.
    select * from GP1_PRODUCTS into table it_products.
    PRODUCTS = it_products.
    endmethod.
    ENDCLASS.

    You have to create a table type for your table GP1_PRODUCTS.
    If you use global class (created in SE24), than:
    Create a Table Type in SE11
    Go to SE11, Enter a name like ZPRODUCTS in the Data Type
    There will be popup when you press the Create button to decide a type. Select the Table Type
    Enter  GP1_PRODUCTS  in the Line Type.
    * method declaration
      methods GET_PRODUCT_LIST
        returning
          value(PRODUCTS) type ZPRODUCTS.
    If you use local class:
    TYPES: ty_products type standard table of GP1_PRODUCTS..
    * method declaration
      methods GET_PRODUCT_LIST
        returning
          value(PRODUCTS) type ty_products
    Regards,
    Naimesh Patel

  • Exporting parameter of type table in Method of a Class

    Hi Experts,
    I want to pass an internal table from my method in ABAP class to a workflow.
    For thi spurpose i have cretaed a parameter of type table in the method.
    My problem is that i am not able to bind this to a workflow/task  container.
    I can see all the other parameters of the method in thw workflow while binding except for the parameter of type table ( i.e internal table ).
    Any idea ?
    Thanks,
    Radhika.

    Assuming that you are trying to export the internal table from class method to task conatiner.
    I have cretaed a Structure 'zemails' in se11
    Already you have created a Structure in the SE11 , why don't you just create one Table Type of ZEMAILS in SE11. Once you hvae created in DDIC then in the class signature declare the ltmails of type the tabale type that you create. and then in the task conatiner also try to declare the container element with the same name and same table type.
    In the class method declare the lt_mails as Exporting. save and actiavte. And one more thing if that element is not present in the Task conatiner then as soon as you try to open in the change mode and click on the binding button of the task it will prompt you asking whether you want to trnasfer the mssing elements if you clcik Yes then the same element which you have declared in the class will created with the same type. but make sure in the task conatiner you delcare the lt_mails as IMport export element.

  • Make Table visible after button is clicked

    Hi,
    How to make a table visible only after a button is clicked on the screen?
    I have two input fields and based on that data we click a search button and data is displayed.
    How to make the table  visible only after the button is clicked.
    Regrads

    hi ,
    u proceed as follows :
    1 bind visible property ur table to a context attribute of type wdui_visibility
    2 set the default value to '01' , making it '01 ' means initially ur UI wud be invisible
    3 in the onActionEvent method , when button is clicked , read the context attribute
    4 set its value to '02' using set_attribute method , u can do it using code wizard
    DATA lo_nd_cn_all TYPE REF TO if_wd_context_node.
         DATA lo_el_cn_all TYPE REF TO if_wd_context_element.
         DATA ls_cn_all TYPE wd_this->element_cn_all.
         DATA lv_invisible LIKE ls_cn_all-invisible.
    *    navigate from <CONTEXT> to <CN_ALL> via lead selection
         lo_nd_cn_all = wd_context->get_child_node(
         name = wd_this->wdctx_cn_all ).
    *    get element via lead selection
         lo_el_cn_all = lo_nd_cn_all->get_element(  ).
    *    get single attribute
         lo_el_cn_all->set_attribute(
           EXPORTING
             name  =  `INVISIBLE`
             value = '02' ).
    set attribute INVISBLE under context node cn_All to visible
    5 press control + f7 , use the radio button read context node /attribute
    for visible / invisble , instead of setting attribute to '01' and '02' , u can do it dis way
    wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_visible )." to make it visible.
    wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_none ). "to make it invisible
    this way u wud be able to achieve ur desired functionality
    regards,
    amit

  • Update of database table on save button of different component

    Hi all,
    I wanted to update the data base table on click of save button which is present in other component.
    The component A i have the view screen  and I made node with dictionary structure. I want to modify the database table once user click on save button which is in Component B.
    I tried to change the node of view present in component A and make interface node as yes but could not change it.
    any approach ?
    Regards

    Hi Kiran,
    Just make the node(which contains all the data ) on component A as interface node, map it in the component B. In the OnAction method of Save button of component B, just read that node and get the values in an internal table and then use ABAP modify statement to modify the database table according to the data present in the internal table.
    Regards
    Arjun

  • Webdynpro FPM Table Control Toolbar Buttons

    Dear Experts,
    In Webdynpro FPM Configuration, Table control tool bar to be enhanced with custom buttons and it should call the custom web dynpro applications.
    After adding the buttons, where we have to configure the FPM Event ID's and corresponding actions.
    Please check and let me know.
    Thanks & Regards,
    Sunil KS

    Hi Sunil,
    You have to create enhancement implementation for your application configuration. Then you have  to follow the below procedure for enhanceing the feeder class.
    1. Create explicit enhancement for your feeder class by choosing spiral button in the class object toolbar, then it will provide pre,post and override method for your methods.
    2. As per your requirement you need to add some action in your table control toolbar, for that you need to implement post exit for the GET_DEFINITION method.
    3. Enhance your FPM application for adding the table control button and assign the created action in your feeder class and process the events in the post exit implementation of your PROCESS_EVENT method.
    THanks & Regards
    Praveen Gupta

  • Can not insert or update [TABLE] from internal table in method

    I've faced a problem with OO abap. I've tried to insert into [ TABLE ] from internal table, but i've got error msg after i compiled.
    "An explicit work area is necessary in the OO context. Use "INSERT wa INTO [TABLE] itab""
    After  i changed to loop in work area and INSERT INTO  [TABLE] VALUES gw_data., everything is fine, can compile and run.
    This is error code.
      METHOD set_data_to_table.
        REFRESH gi_data.
        CLEAR gi_data.
        IF gi_file[] IS NOT INITIAL.
    * Set data for modify table
          LOOP AT gi_file INTO gw_file.
            MOVE-CORRESPONDING gw_file TO gw_data.
            me->conversion_input( EXPORTING im_vendor = gw_data-vendor
                                  CHANGING  ch_vendor = gw_data-vendor ).
            APPEND gw_data TO gi_data.
          ENDLOOP.
          INSERT [TABLE] FROM TABLE gi_data.
    *      LOOP AT gi_data INTO gw_data.
    *        INSERT INTO  [TABLE] VALUES gw_data.
    *        IF sy-subrc = 0.
    *          COMMIT WORK.
    *        ELSE.
    *          ROLLBACK WORK.
    *        ENDIF.
    *      ENDLOOP.
        ELSE.
          MESSAGE 'No data found' TYPE 'I'.
        ENDIF.
      ENDMETHOD.                    "set_data_to_table

    Hi Matthew,
    I think there is no difference in database insert between OO and non-OO.
    The correct syntax according to ECC600 online documentation is
    [Inserting Several Lines|http://help.sap.com/saphelp_erp2005vp/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm]
    To insert several lines into a database table, use the following:
    INSERT target FROM TABLE itab \[ACCEPTING DUPLICATE KEYS].
    This writes all lines of the internal table itabto the database table in one single operation. If one or more lines cannot be inserted because the database already contains a line with the same primary key, a runtime error occurs. You can prevent the runtime error occurring by using the addition ACCEPTING DUPLICATE KEYS.
    Whenever you want to insert more than one line into a database table, it is more efficient to work with an internal table than to insert the lines one by one.
    I think the syntax
    INSERT my_dbtable FROM TABLE gi_data.
    should work, your suggestion may lead to syntax error.
    Regards,
    Clemens

Maybe you are looking for

  • How can I tell if my 2008 Macbook is dying?

    I have a Macbook that was purchased in August of 2008. I have replaced my battery once. However, now it will say not charging, even if it sometimes does charge. My airport will shut off automatically if my computer sits idle for a few minutes and res

  • XCode 5 for Mac OS X 10.7.5

    Hi, I want to develope Apps for IOS 7, so I need Xcode 5. I have a Mac Pro with Mac OS X Lion 10.7.5 installed. For Xcode 5 I need Mountain Lion. So I tried to install Mountain Lion from the App Store. However the App Store tell me, that Mountain Lio

  • Complicated Query Problem - Booking System

    I am currently developing a hotel booking system for my University final year project and am having some serious problems with my queries to calculate room availability. I felt the best method to calculate room availability was to first calculate whi

  • LV Find Circular Edge 2 library function?

    Hi, I have been using the IMAQ Find Circular Edge vi to determine pixel information about images being generated in my lab.  The program works fine, but upon looking into the vi, I couldn't seem to find the function or algorithm actually used to dete

  • HT4889 migration time

    how long should migration to a newcomputer take??