Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9656

Re: issue is OVS help

$
0
0

As kathik said add GMR* and write the code as per below code


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 = ???
      lv_short = <ls_query_params>-job_id.
      REPLACE ALL OCCURRENCES OF '*' IN lv_short WITH '%' .
      IF lv_short NE ' ' AND lv_stext NE ' '.
        SELECT short stext  FROM hrp1000 INTO TABLE lt_select_list
        WHERE plvar = '01' AND otype = 'C' AND langu = 'EN' AND
            endda GE sy-datum AND ( short LIKE lv_short )
            ORDER BY short ASCENDING.
      ELSEIF lv_short EQ ' ' AND lv_stext NE ' '.
        SELECT short stext FROM hrp1000 INTO TABLE lt_select_list
        WHERE plvar = '01' AND otype = 'C' AND langu = 'EN' AND
            endda GE sy-datum 
            ORDER BY short ASCENDING.
      ELSEIF lv_short NE ' ' .
        SELECT short stext FROM hrp1000 INTO TABLE lt_select_list
        WHERE plvar = '01' AND otype = 'C' AND langu = 'EN' AND
            endda GE sy-datum AND short LIKE lv_short
            ORDER BY short ASCENDING.
      ENDIF.
      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  = `JOB_ID`
                               value = <ls_selection>-short ).

Viewing all articles
Browse latest Browse all 9656

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>