Creating OVS for a field

Hi All ,
I am trying to add the OVS for a particular field in my web dynpro application and for this I have done the folllowing:
1. I added the component WDR_OVS to my component interface.
2. I then added the following to my component controller
OVS     WDR_OVS                                 System Component for OVS Input Help
OVS     WDR_OVS     INTERFACECONTROLLER     Generic Input Help
3. I set the input help mode as 'Object Value Selector' and OVS Component usage as 'OVS' for the attribute 'Alternate_payee'.
4 . I then created a even handler type method ON_OVS in the main view and inserted the following code to it:
DATA: lifnr TYPE lfa1-lifnr,
        f4lfb1_z TYPE lfb1,
        filkd TYPE bseg-filkd,
        t_zemtab TYPE STANDARD TABLE OF izemtab,
        w_zemtab  LIKE LINE OF t_zemtab.
  DATA: lt_value_set TYPE TABLE OF wdr_context_attr_value,
            ls_value_set LIKE LINE OF lt_value_set.
  SELECT SINGLE * FROM  lfb1 INTO f4lfb1_z
                  WHERE lifnr = w_lifnr
                  AND   bukrs = '001'.
  CALL FUNCTION 'FI_VENDOR_ALTERN_PAYERS_READ'
    EXPORTING
      i_lifnr            = w_lifnr
      i_filkd            = filkd
      i_bukrs            = '001'
      i_lfb1_head_office = f4lfb1_z
    TABLES
      t_zemtab           = t_zemtab.
data w_alt_emp_string type string.
  LOOP AT t_zemtab INTO w_zemtab.
    concatenate w_zemtab-empfb ' ' w_zemtab-name1 ' ' w_zemtab-ORT01 ' ' w_zemtab-STRAS ' ' w_zemtab-PFACH into w_alt_emp_string RESPECTING BLANKS.
    ls_value_set-text = w_alt_emp_string.
    ls_value_set-value = w_alt_emp_string.
append ls_value_set to lt_value_set.
  ENDLOOP.
DATA lo_nd_alt_payee_info TYPE REF TO if_wd_context_node_info.
DATA lo_nd_alt_payee TYPE REF TO if_wd_context_node.
lo_nd_alt_payee = wd_context->get_child_node( name = wd_this->wdctx_alt_payee ).
lo_nd_alt_payee_info = lo_nd_alt_payee->get_node_info( ).
         lo_nd_alt_payee_info->set_attribute_value_set(
            name =  `ALERNATE_PAYEE`
            value_set = lt_value_set ).
Now when I run the application and do F4 on the desired field I am getting the short dump as ''OVS: Methode SET_OUTPUT_TABLE Cannot Be Called "
Can you please tell me what am I missing here?
Edited by: rajatg on Jul 27, 2011 9:42 PM

Hello,
WDR_OVS->OVS event follows a phase model approach. Once you create a event handled method for the OVS, the code template will be auto generated and it will look like this
* declare data structures for the fields to be displayed and
* for the table columns of the selection list, if necessary
  types:
    begin of lty_stru_input,
*   add fields for the display of your search input here
      field1 type string,
    end of lty_stru_input.
  types:
    begin of lty_stru_list,
*   add fields for the selection list here
      column1 type string,
    end of lty_stru_list.
  data: ls_search_input  type lty_stru_input,
        lt_select_list   type standard table of lty_stru_list,
        ls_text          type wdr_name_value,
        lt_label_texts   type wdr_name_value_list,
        lt_column_texts  type wdr_name_value_list,
        lv_window_title  type string,
        lv_group_header  type string,
        lv_table_header  type string.
  field-symbols: <ls_query_params> type lty_stru_input,
                 <ls_selection>    type lty_stru_list.
  case ovs_callback_object->phase_indicator.
    when if_wd_ovs=>co_phase_0.  "configuration phase, may be omitted
*   in this phase you have the possibility to define the texts,
*   if you do not want to use the defaults (DDIC-texts)
      ls_text-name = `FIELD1`.  "must match a field name of search
      ls_text-value = `MYTEXT`. "wd_assist->get_text( `001` ).
      insert ls_text into table lt_label_texts.
      ls_text-name = `COLUMN1`.  "must match a field in list structure
      ls_text-value = `MYTEXT2`. "wd_assist->get_text( `002` ).
      insert ls_text into table lt_column_texts.
*      lv_window_title = wd_assist->get_text( `003` ).
*      lv_group_header = wd_assist->get_text( `004` ).
*      lv_table_header = wd_assist->get_text( `005` ).
      ovs_callback_object->set_configuration(
                label_texts  = lt_label_texts
                column_texts = lt_column_texts
                group_header = lv_group_header
                window_title = lv_window_title
                table_header = lv_table_header
                col_count    = 2
                row_count    = 20 ).
    when if_wd_ovs=>co_phase_1.  "set search structure and defaults
*   In this phase you can set the structure and default values
*   of the search structure. If this phase is omitted, the search
*   fields will not be displayed, but the selection table is
*   displayed directly.
*   Read values of the original context (not necessary, but you
*   may set these as the defaults). A reference to the context
*   element is available in the callback object.
      ovs_callback_object->context_element->get_static_attributes(
          importing static_attributes = ls_search_input ).
*     pass the values to the OVS component
      ovs_callback_object->set_input_structure(
          input = ls_search_input ).
    when if_wd_ovs=>co_phase_2.
*   If phase 1 is implemented, use the field input for the
*   selection of the table.
*   If phase 1 is omitted, use values from your own context.
      if ovs_callback_object->query_parameters is not bound.
******** TODO exception handling
      endif.
      assign ovs_callback_object->query_parameters->*
                              to <ls_query_params>.
      if not <ls_query_params> is assigned.
******** TODO exception handling
      endif.
*     call business logic for a table of possible values
*     lt_select_list = ???
      ovs_callback_object->set_output_table( output = lt_select_list ).
    when if_wd_ovs=>co_phase_3.
*   apply result
      if ovs_callback_object->selection is not bound.
******** TODO exception handling
      endif.
      assign ovs_callback_object->selection->* to <ls_selection>.
      if <ls_selection> is assigned.
*        ovs_callback_object->context_element->set_attribute(
*                               name  = `COLUMN1`
*                               value = <ls_selection>-column1 ).
*      or
*        ovs_callback_object->context_element->set_static_attributes(
*                               static_attributes = <ls_selection> ).
      endif.
  endcase.
you need to adapt this code to pass the required structure and data.
BR, Saravanan

Similar Messages

  • Create OVS for a standard BO

    Dear All,
    I need to create OVS for account , because i want some conditions to add.
    Is it possible to create custom OVS for a standard BO if yes! please suggest steps or link or vid!
    Thanks in advanced!
    Regards,
    Dhruvin

    Hi, Dhruvin
         Yes,
         It is just like creating a custom OVS for your custom BO.
         Can you create OVS for a custom BO?
         You can see at
         Studio_od_1405
         9.3.2.5 Create an Object Value Selector Dialog Box
    Here are some pointers.
    1.Create screen (OVS) in studio
    2.Choose a custom BO or standard one.
    3. In the data model, bind Root and Item to the standard BO.
    4. Bind ObjectId and ObjectName with some fields from the standard BO.
    5. In the OVSValueHelpSelectorInport inport, add ObjectIdand ObjectName to the inport parameter.
    Hope this helps.
    Fred.

  • OVS for two fields in the same selct Option?

    Hi Experts,
    I am using select options in my view. I am using OVS for one field. I would like to use same OVS for another field in the same select option.
    I tried "case ovs_callback_object->context_attribute". Which return the field for which we press F4.
    But IT did not work here probably because this we can use only for context attributes fields.
    but But here I dont get the select option field.
    But in my case I have select options which are not mapped to any context attribute.
    How can I find , for which field in select options F4 help has been requested?
    Regards,
    Vishal.

    Hi,
    You can find which field in select options F4 help has been requested using I_OVS_DATA-M_SELECTION_FIELD_ID.
            CASE I_OVS_DATA-M_SELECTION_FIELD_ID .
                 WHEN 'PERNR'.
                 WHEN 'ENAME'.
                 WHEN OTHERS.
            ENDCASE.
    If you are using one OVS for more than one fileds, please remember that you need to provide different code for each fields at phase 0 (configuration) and phase 3 (apply result).
    Regards,

  • Should I create setters for static fields ?

    Hi all,
    I don't know if here is the right forum for this question, but I'd like to know if is recommended to create setters for static fields of a class or if I can directly assign a value to those fields.
    Thanks.

    No question, you can assign to static fields, it's more a question of style and thoughts about future requirements. At some point in the future maybe you'll want such setting to have side effects. Personally I think using getters and setters everywhere (even on isntance fields) can be a bit obsessive.
    On the whole, there's not that many occasions where accessing static fields that directly from outside the class makes sense. It's usually better, to my mind, to use a singleton pattern for global values. For me, static variables are more likely to either be constants, or things like instance lists more likely to be accessed through an Iterable interface.

  • Java Dictionary Project + create autonumber for KEY field?

    Hi there,
    I would like to create a Java Dictionary project that has a table with an AUTONUMBER as the key field.
    I know exactly how to do this in SQL Server using the IDENTITY field but cannot see an option when using the Java Dictionary project?
    Any ideas?
    Thanks for the help
    Lynton

    Has there been an update to this recently?  I am in need of exactly the same information.  The FAQ lists this:
    <i>Can I deploy a Java Dictionary table along with the table content?
    Yes. You can deliver the Java Dictionary table along the table content. There are two possibilities:
    Export from a reference database
    Specification of the table entries in an XML file (since SP5)
    Note that there is no modification support for table entries that are delivered in this way. Therefore, you can deliver table entries with program character or for examples, but not for templates or customizing data.</i>
    Now, I may be reading the note incorrectly, but it makes it sound like if you do populate a table with a XML file, the records cannot be modified thereafter.  Is this true?
    I'd also like to know how to develop the XML and where to put it, etc.  I've had no luck searching for this information.
    Thanks!

  • Create Rule for "Boolean" field attribute

    Hi all,
    I'm having a problem creating a Rule which references the value from a Checkbox in my User Form (hence, Boolean).
    I know how to create Rule to reference string values. But, apparently, the syntax is not the same when referencing a *"checkbox*" value.
    Here is the Rule I created :
    *<Rule name='Rule for Checkbox'>*
    *<switch>*
    *<ref>checkboxvalue</ref>*
    *<case>*
    *<isTrue>*
    *<ref>checkboxvalue</ref>*
    *</isTrue>*
    *<setvar name='MyTextField'>*
    *<s>Yes</s>*
    *</setvar>*
    *</case>*
    *<case>*
    *<isFalse>*
    *<ref>checkboxvalue</ref>*
    *</isFalse>*
    *<setvar name='MyTextField'>*
    *<s>No</s>*
    *</setvar>*
    *</case>*
    *</switch>*
    *<MemberObjectGroups>*
    *<ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>*
    *</MemberObjectGroups>*
    *</Rule>*
    In other words : if the Checkbox in my User Form is ticked (meaning, if the value is TRUE), then IDM should automatically allocate a value of "*YES"* to that text field in my user form *(MyTextField)*
    If the checkbox is not ticked, then the value of *"NO"* should be displayed in the Text Field.
    Is my syntax wrong?
    Thanks

    It depends on how you're generating the email. If you use a workflow it is relatively easy.
    Change the rule to (note that I added the rule argument, it's not really necessary, it just cleans the code up):
    <Rule name='Get To Address'>
        <RuleArgument name="boxvalue"/>
         <cond>
             <isTrue>
                 <ref>boxvalue</ref>
             </isTrue>
             <s>[email protected]</s>
             <s>[email protected], [email protected]</s>
         </cond>
    <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
    </Rule>Using the workflow service directly.
    <Activity>
        <Variable name="to">
            <!-- this assumes the checkboxvalue variable is already set -->
            <rule name="Get To Address">
              <argument name="boxvalue">
                  <ref>checkboxvalue</ref>
              </argument>
            </rule>
        </Variable>
      <Action id='0' application='com.waveset.provision.WorkflowServices'>
        <Argument name='op' value='notify'/>
        <Argument name='template' value='yourtemplate'/>
        <Argument name='to' value='$(to)'/>
        <Argument name="from" value="[email protected]"/>
        <Argument name="some_template_argument">
            <s>some value</s>
        </Argument>
        <Argument name='catch' value='notificationException'/>
      </Action>
    </Activity>Using the notify workflow subprocess is nearly identical. (I recommend this because retries are taken care of for you but it's up to you.)
    Finally your template is simple again. IDM should fill in the to value on based on the "to" variable you provided in the "to" argument. The "to" variable in turn was set by the rule.
    <EmailTemplate
    id="#ID#EmailTemplate:yourtemplate"
    name='yourtemplate'
    smtpHost='$(smtpHost)' 
    htmlEnabled='false'
    authEnabled='$(authEnabled)'
    userId='$(userId)'
    password='$(password)'
    ssl='$(ssl)'
    ignoreCert='$(ignoreCert)'>
    <!-- IDM provides the above values -->
      <subject>Your Subject</subject>
      <body>
    Hello.  The argument was $(some_template_argument).
    </body>
      <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#All' name='All'/>
      </MemberObjectGroups>
    </EmailTemplate>

  • Abap query: Create selections for extras field

    Hi,
    I have a custom query and Infosets where I have defined customer fields in Extras tab (infosets).
    Now I want create (into Infosets) a selections field (select-options) to filter the extras field created but I receive message AQ120 that say I can't do that !
    You know some trick to do this ?
    (I don't have any database table to join with selections)
    Thanks,
    Daniels

    Hi
    U can use the extrafield in the selection-screen of the query, why do u need to create a SELECT-OPTION in the infoset?
    Max

  • Creating calender for a field in a form

    hi,
    We have a date field in our form.We would like to implement it with a calendar.kindly help
    tahks and regards

    If you are talking of a date picker in a form, there is no ready-made solution. However, if you can generate the dates through a sql query, you can create a dynamic LOV and make the form field of type POPUP and attach the LOV to it. But the popup lov can show only 10 values at a time.
    Infact, there are lot of postings on date picker in this forum. If you perform a search, I am sure you will come out with good hits. Otherwise, lot of javascript sites have ready-made date-picker codes.
    If you come across such code, you can incorporate the same by generating the same code using htp.p() in a pl/sql block in the additional pl/sql section.
    While building the form, you can choose to build a custom form and then you can create an image link that calls the javascript you generate in the additional pl/sql section.
    Or,
    If you have some code that generates the dates in a browser window, you can create a procedure and call it through the link field in the form.

  • F4 help for Time field in Webdynpro Screen

    Hi Experts,
    I'm using TIMS data type for my Time field. In ECC we will have F4 function for the same data element, but in Webdynpro screen, am not getting the F4 help.
    I got some information from SCN that I need to go for some custom search help. But with which reference to the table, am I want to create it.
    Please let me know, is there any other possible way to create F4 for time field for webdynpro.
    Even I tried to use some standard search help, but am getting an error as 'Sending of dynpro ' ' not possible. No window system type specified'.
    Expecting valuable information from you experts.
    With Regards,
    RAM.

    Hi RAM,
    For time field, there is no SAP delivered search help in WDA , so we need to go for freely programmed search help.
    Please refer the below link, in which Mr. Thomas, has provided the links for search help document you can follow and create new search help component
    and also nugget of the component which can be imported using ZSAPLINK program.
    search help for time
    Regards,
    Rama

  • List of characters not supported for a field search of type char

    Hi,
    I have a field of type char.
    When we create entries for that field in a table we use special characters like &, etc. When searched it is not supported and not displayed in results.
    I suppose it might be because SAP can support for characters of specific ASCII codes.
    If you have any list of the ASCII codes supported in search, kindly let me know.
    Thanks and Regards,
    Jaisish

    Hi Jaisish,
    as far as I know, there are two "special" characters that act as jokers in a field search
    +: standing for one character
    *: standing for zero or more characters
    You can search for these characters into the content of a field, if you "escape" them. The symbol for escaping is "#" (before the special character + or *).
    For example, if you search for "#*", this will search all entries with an asterisk in its content.
    I hope this helps. Kind regards,
    Alvaro

  • Authorization for PO fields of over delivery and under delivery tolerance

    Hi,Any one know how to set authorization for PO fields of over delivery and under delivery tolerance?
    For example to allow certain user to edit the these fields but other users will be only display mode.

    Better create variant for restricting fields over & under delivery tolerance for certain users than applying authorization.

  • How to create/configure an OVS for a custom BO?

    I have created a new BO with three elements (ID, Name, FilterCriteria).
    For this BO I created a Query (QueryByElements):
    - Selection: ID, Name, FilterCriteria
    - Basic Find: ID, Name
    - Result: ID, Name, Filtercriteria
    After this I created an OVS for this BO.
    In DataModel Tab I bound the Items Node of the OVS to the Query Node of the BO, OVS:ObjectID -> Query:ID, OVS:ObjectName -> Query:Name and OVS:FilterCriteria -> Query:FilterCriteria.
    Next i created a structure in the OVS with the data fields: ID, Name, FilterCriteria and SerchText.
    In the Controller Tab I bound the ValueHelpQuery of the OVS to the (new) Query of the BO with this parameters:
    - ID : /Root/Structure/ID
    - Name : /Root/Structure/Name
    - SearchText : /Root/Structure/SearchText
    - FilterCriteria : /Root/Structure/FilterCriteria
    Inport:
    - ID : /Root/Structure/ID
    - Name : /Root/Structure/Name
    - SearchText : /Root/Structure/SearchText
    - FilterCriteria : /Root/Structure/FilterCriteria
    - + standard parameters like ParentComponent...
    Outport:
    - ObjectId : /Root/Items/ObjectId
    - ObjectName : /Root/Items/ObjectName
    With this configuration I get a correct value suggestion when I am typing in the field, and when i select a value from the drop down list the value is transferred to the field.
    But, if I open the screen:
    - the search is not working, I always see all values.
    - if I select a row, the value is not transferred to the field. the field is empty.
    I tried it without the FilterCriteria in the parameters and inport, but id shown the same behavior...
    Do you have any idea to solve this problem?
    Thanks,
    Eduard

    suddenly the transfer of the selected value from OVS UI to the fiels is working... I didn't change anything.
    But the search in the OVS UI is still not working. Has someone any ideas how to fix it?

  • OVS Help for Table Fields in WebDynpro for JAVA

    Is it possible  to create a ovs help input for table fields?
    If yes, how can I do it?
    Help me...
    Thanks!!!

    Hi,
    Use the code for tabel column also.
    Web Dynpro: the OVSBuilder utility or OVS Re-Reloaded
    Regards,
    Lavanya.G

  • Creating process for multiple Date fields for update or insert in APEX

    hello there,
    could someone please help me?
    i have a form on Apex based on view that is based on three tables and updating and inserting ok using trigger instead of.
    i have a problem now as in my form i have around 75 fileds (items) incuding 30 or more date fields which could be populated or left blank or update later.
    so for each date field i have two boxs; one for date, input as dd/mm/yyyy (text field) and second for time, input as 23:45. All dates will be insert or update manually by user. so as i mentioned not all date fields could be poulated at one stage.
    so i have created some process and validations and all of them work fine but i came accross if date left blank then (:) giving me problem so i have done following further process for each date field. In real table all the date fields have data type date.
    declare
    v_my_var date; -- for first date field
    str_dy VARCHAR2(10);
    dt_indx date;
    str_tm VARCHAR2(20);
    tm_indx date;
    begin
    str_dy := :p4_first_date
    str_tm := str_dy||' '||substr(:p8_first_date_hh,1,2)||':'||substr(:p8_first_date_HH,4,2);
    dt_indx := to_date(str_tm,'DD/MM/YYYY HH24:MI');
    IF str_dy is not null then
    v_my_var :=dt_indx;
    ELSE
    v_my_var := NULL;
    END IF;
    update table 1 set my_date = v_my_var where d_id= :p4_d_id;
    end;
    above code work fine but one date field of course therefore i have to do same code for each date field with changes and initialise variable again and again for each field.
    so i like to ask is there any easy way that is more professional. i was thinking about the procedure and using collection or similar but honestly not much experience on that so could some one please help me?
    I will be very thankful.
    KRgds

    Hi,
    You can do the needful by re-using the code if you can give the item names as P8_DATE1, P8_DATE_hh1, P8_DATE2, P8_DATEhh2 etc..So your item name just differs by a sequence.
    Now you write function which will return desired date value taking above items as input. Pass item names to this function, get session state using APEX_UTIL.GET_SESSION_STATE('item_name') API.
    Now modify you code as
    FOR i IN 1..30
    LOOP
    v_date_array[i] = f_get_date('P8_DATE'||i, 'P8_DATEhh'||i);
    END LOOP;
    ....Now you have all date valus in array. Just write one update as follows
    UPDATE  TABLE1
    SET date1 = my_date_array[1], date2 = my_date_array[2]..
    WHERE ....Hope it helps :)
    Cheers,
    Hari

  • How can I create a Text-Input Field in BexAnalyzer for a Planning Function

    Hello,
    i want to create a pre calculation(contribution accounting) for Materials in BI-Integrated Planning. These Materials aren't in the master data. So I create a new Info Object for pre calculated materials with only a material-number as key and a text-description.
    Now I want to write a Exit-Function, which creates new materials in these Info Object. The user should start this function in a planning application in BexAnalyzer. There the user should have the possibility to enter a text-description for the new material. How can I create such a Text-Field in BexAnalyzer and how can I read this text filed in a planning function (exit).
    Thanks in advance

    Hi Jürgen,
    you can create a parameter for this in the exit function and a variable for the parameter. In BEx Analyzer then create a button for the planning function; in the button parameterization use VAR_NAME = , i.e. use an Excel formula here to get the value from an Excel input field.
    The command range should be some 'hidden area' in your Excel sheet.
    But may be you don't need this. Use a characteristic without master data. Then ensure that that the query uses the option 'key' as display. In new lines you can then enter the key, the system creates a SID on the fly (but the text table will not be updated). In this scenario you may take text also from the key. May be you can update the text table (online or in batch) by simply using function modules from function group RSNDI_MD (not released by SAP).
    But observere that the system in BI Planning reads only the active version, i.e. if you change something on the fly the changes may not be visible.
    Regards,
    Gregor

Maybe you are looking for

  • Windows Vista Crashes when I puge in Ipod

    My window vista system crashes when I plug in my Ipod.I have vista since it came out and had no problem until a few days ago. Have not install anything on the computer. When I plug my ipod in it starts to sync for a few minutes then I get a blue scre

  • Linux J2SE 1.5.0 install w/o graphical interface

    Here's a special situation from the geniuses at Sun. 1. Bundle NetBeans for the J2SE. Never mind that people may want a 'server' installation. 2. So, I try to run it with the installer with the -console option on Linux (Fedora Core 4): $ ./jdk-1_5_0_

  • SSD - main bay or ultrabay

    so im thinking of buying a pretty standard T430. I will be buying a 128gb SSD to use as my boot drive and the 500gb as storage. my question is: it seems like a lot of people rip out the 500gb HDD, put it in the ultrabay and put the SSD in the main ba

  • Create Dynamic Distribution Groups Using Customized Filters

    I am looking to create a new Dynamic Distribution List.  Example:  DL - United States Users ([email protected])  In AD we have the 'Office' field filled accordingly, which contains the attribute USCA___ or USIL (US,California,etc or US, Illinois,etc)

  • Send key sequence to specific window in awesome

    I need send key sequence to foobar2000 running on wine. I think it could be done by focusing foobar window somehow, pasing to it key sequence "ctrl+c" or other, and then focus back to previous window Can i do this in awesome? How? Any reference is ap