Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Publishing and Consuming Query Webservice - Query_View_Data

Hi Experts,

I have set up "Query_View_Data" taking reference from Weblog

/people/prakash.darji/blog/2006/09/04/work-with-xmla-web-service-for-bi-data-in-external-applications --> Document : Web Services within SAP NetWeaver 2004s BI - Create, Discover, and Consume! --> Page Nos. 26 to 42.

I am able to test my Query Webservice from my BW system using transaction WSADMIN & the Request as well as Response are successful.

Now I am trying to create a Visual Composer - iView.

In this iView, I am trying to define the webservice (Tools --> Define Webservice).

The URL which I enter for the webservice is :

http://<Server>:<Port>/sap/bw/xml/soap/queryview?wsdl

Port I am using same as my VC / EP Port.

I am getting an Error Message : Invalid Webservice URL

Am I missing anything ?

Please suggest.

Thanks and regards - Rajesh Sarin (09987014089)

Former Member
replied

i have already written the wrapper for RRW3_GET_QUERY_VIEW_DATA

it works for almost all types of queries

ZBW_QUERY_OUTPUT_METADATA structure definition

FIELDNAME   type	LVC_FNAME
OUTPUTLEN  type	LVC_OUTLEN
DATATYPE    type	DATATYPE_D
SCRTEXT_L   type	SCRTEXT_L

top include

function-pool z_firp_eq_nu  message-id brain.
type-pools: rrx1 .
data: r_request type ref to cl_rsr_request.
data: r_dataset type ref to cl_rsr_data_set.
data: zcx_message type ref to cx_rsr_x_message.
data: zcx_root type ref to cx_root.
data: lcount type i .
data: xcount type i .
data: wa_var type rrx1_s_var.
data: i_var type rrx1_t_var.
data: i_var_final type rrx1_t_var.
data: wf_variant type variant .
data: wa_axis like line of r_dataset->n_sx_version_20a_1-axis_data .
data: wa_axis_info like line of r_dataset->n_sx_version_20a_1-axis_info .
data: wa_chars like line of wa_axis_info-chars .
data: tmp_char type rrws_thx_axis_chars.
data: wa_tmp_char type rrws_sx_axis_chars .
data: wa_attrinm type rrws_s_attrinm.

data: wa_cell like line of r_dataset->n_sx_version_20a_1-cell_data .
data: wa_textsymbols like line of r_dataset->n_sx_version_20a_1-txt_symbols .
data: wa_textsymbols1 like line of r_dataset->n_sx_version_20a_1-txt_symbols .
data: wa_set like line of wa_axis-set.
data: tmp_set type rrws_tx_set.
data: wa_tmp_set type rrws_sx_tuple .
data: wa_dattrinm type rrws_s_attributes .
data: i_iset_iobjnm type  rsd_iobjnm ,
      e_iobjnm type  rsd_iobjnm .

data: q_variables type rrxw3tquery .
  data: q_return like bapiret2 occurs 0 with header line .
  data: error_string type string.
  data: no_of_chars type  i ,
        no_of_keyf type i .
  data: var_nam(10) .
  data: iobj_detail like bapi6108 .
  data: iobj_details like bapi6108 occurs 0 with header line .
  data: it_fieldcat type lvc_t_fcat,
        is_fieldcat like line of it_fieldcat.
  data: new_table type ref to data.
  data: new_line  type ref to data.
  field-symbols: <ltable> type any table,
                 <l_line>  type any,
                 <l_field> type any.

  data: meta_data like zbw_query_output_metadata occurs 0 with header line .
  data: r_result type string .
  data: off  type i,
      moff type i,
      mlen type i.
  data: iobj_return like bapiret2 occurs 0 with header line .
  data: wf_ip type rsinfoprov ,
        wf_query type rszcompid .

  data: i_axis_info type  rrws_thx_axis_info ,
        i_cell_data type  rrws_t_cell ,
      i_axis_data type  rrws_thx_axis_data ,
      i_txt_symbols type  rrws_t_text_symbols .

data: stat_tab type zfi_qstat_fm .

  data: n_counter(3) type n .
  data: char_count type i .
  data: wf_fldnm(40) .

  data: struct_type type ref to cl_abap_structdescr,
tab_type type ref to cl_abap_tabledescr ,
      comp_tab type cl_abap_structdescr=>component_table,
      comp like line of comp_tab,
      dref type ref to data ,
      dref1 type ref to data ,
      op_len type i .

function module source code.

function z_execute_query_nu.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(QUERY_NAME) TYPE  CHAR50
*"  EXPORTING
*"     VALUE(XML_OUT) TYPE  STRING
*"     VALUE(META_OUT) TYPE  STRING
*"  TABLES
*"      QUERY_VARIABLES TYPE  RRXW3TQUERY
*"      RETURN STRUCTURE  BAPIRET2 OPTIONAL
*"      META STRUCTURE  ZBW_QUERY_OUTPUT_METADATA OPTIONAL
*"  EXCEPTIONS
*"      BAD_VALUE_COMBINATION
*"      USER_NOT_AUTHORIZED
*"      UNKNOWN_ERROR
*"      QUERY_NOT_FOUND
*"      NO_APPLICABLE_DATA
*"      INVALID_VARIABLE_VALUES
*"      NO_AUTHORITY
*"      ABORT
*"      INVALID_INPUT
*"      INVALID_VIEW
*"----------------------------------------------------------------------

* update custom stat table.

  clear stat_tab .
  call function 'CONVERSION_EXIT_GENID_INPUT'
    exporting
      input  = query_name
    importing
      output = stat_tab-query.

  stat_tab-mandt = sy-mandt .
*stat_tab-query = query_name .
  stat_tab-rdate = sy-datum .
  stat_tab-rtime = sy-uzeit .
  stat_tab-ruser = sy-uname .
  call function 'SOTR_SERV_TABLE_TO_STRING'
   exporting
     flag_no_line_breaks       = 'X'
*   LINE_LENGTH               =
*   LANGU                     = SY-LANGU
   importing
     text                      = stat_tab-comments
    tables
      text_tab                  = query_variables .

  modify zfi_qstat_fm from stat_tab .

  clear: wf_ip, wf_query .
  split query_name at '/' into wf_ip wf_query .
  clear :q_variables ,i_axis_info,i_cell_data,i_axis_data,i_txt_symbols.
  refresh: q_variables,i_axis_info,i_cell_data,i_axis_data,i_txt_symbols .

  q_variables[] = query_variables[] .

  call function 'RRW3_GET_QUERY_VIEW_DATA'
   exporting
     i_infoprovider                = wf_ip
     i_query                       = wf_query
*   I_VIEW_ID                     =
     i_t_parameter                 = q_variables
   importing
     e_axis_info                   = i_axis_info
     e_cell_data                   = i_cell_data
     e_axis_data                   = i_axis_data
     e_txt_symbols                 = i_txt_symbols
   exceptions
     no_applicable_data            = 1
     invalid_variable_values       = 2
     no_authority                  = 3
     abort                         = 4
     invalid_input                 = 5
     invalid_view                  = 6
     others                        = 7 .

  case sy-subrc .

    when 0 .
** find no. of key figures
      clear: lcount ,wa_axis , wa_axis_info .
      read table i_axis_data  into wa_axis with key axis = '000'  .
      if sy-subrc eq 0 .
        clear no_of_keyf .
        loop at wa_axis-set into wa_set .
          at new tuple_ordinal .

            no_of_keyf = no_of_keyf + 1 .
          endat .
        endloop .
        clear wa_set .
*        DESCRIBE TABLE wa_axis-set LINES no_of_keyf .
      endif .

** find number of characteristics
      read table i_axis_info  into wa_axis_info with key axis = '001'  .
      if sy-subrc eq 0 .
        clear no_of_chars .
        describe table wa_axis_info-chars lines no_of_chars .
      endif .

      clear : iobj_detail , iobj_details .
      refresh iobj_details .
      clear wa_axis_info .
* get chars. details
      read table i_axis_info  into wa_axis_info with key axis = '001'  .
      if sy-subrc eq 0 .
        clear wa_chars .
        refresh tmp_char .

        loop at wa_axis_info-chars into wa_chars .
          clear wa_tmp_char .
          move-corresponding wa_chars to wa_tmp_char .
          insert wa_tmp_char into table tmp_char.
          if not wa_chars-attrinm[] is initial .
            loop at wa_chars-attrinm into wa_attrinm .
              clear :wa_tmp_char-chanm , wa_tmp_char-caption .
              move: wa_attrinm-attrinm to wa_tmp_char-chanm ,
                    wa_attrinm-caption to wa_tmp_char-caption .
              insert wa_tmp_char into table tmp_char.
            endloop .
          endif .
        endloop .


        loop at tmp_char into wa_chars .
          clear off .
******** added on 01/01/2006

          clear :off, moff, mlen .
          find '___' in section offset off of
                 wa_chars-chanm .
*               MATCH OFFSET moff
*               MATCH LENGTH mlen.
          if sy-subrc eq 0 .
            clear : i_iset_iobjnm , e_iobjnm .
            move: wa_chars-chanm to i_iset_iobjnm .
            call function 'RSD_IOBJNM_GET_FROM_INFOSET'
              exporting
                i_iset_iobjnm       = i_iset_iobjnm
             importing
               e_iobjnm            = e_iobjnm
*   E_INFOSET           =
*   E_FIELDNM           =
*   E_UNINM             =
*   E_IOBJ_TEXT         =
*   E_T_IOBJ_CMP        =
             exceptions
               name_error          = 1
               no_field            = 2
               others              = 3 .

            clear wa_chars-chanm  .
            move: e_iobjnm to wa_chars-chanm .
*    off = moff + mlen .
*          SHIFT wa_set-chanm LEFT BY off PLACES .
          else.

************end of 01/01/2006

            find '__' in section offset off of
                   wa_chars-chanm
                   match offset moff
                   match length mlen.
            if sy-subrc eq 0 .
              off = moff + mlen .
              shift wa_chars-chanm left by off places .
            endif .
          endif . " two __ or three _
          clear: iobj_return .
          refresh : iobj_return .

          call function 'Z_BAPI_IOBJ_GETDETAIL'
            exporting
              version    = rs_c_objvers-active
              infoobject = wa_chars-chanm
            importing
              details    = iobj_detail.


          if  not iobj_detail is initial .
            move-corresponding iobj_detail to iobj_details .
            append iobj_details .
            clear iobj_details .
          else .
            move: wa_chars-chanm to iobj_detail-infoobject ,
                  wa_chars-caption to iobj_detail-textlong .
            move-corresponding iobj_detail to iobj_details .

            append iobj_details .
            clear iobj_details .

          endif .
          clear : iobj_detail .
        endloop .
      endif .

* build field cat. for building the itab
      clear: is_fieldcat, it_fieldcat .
      refresh : it_fieldcat .
      loop at iobj_details .
        is_fieldcat-fieldname = iobj_details-infoobject .
        if is_fieldcat-fieldname+0(1) eq '0' .
          shift is_fieldcat-fieldname left by 1 places .
        endif .
*        IF iobj_details-datatp = 'CHAR' .
*          is_fieldcat-datatype = iobj_details-datatp.
        is_fieldcat-outputlen = '130' .
*        ELSE .
        is_fieldcat-datatype = 'CHAR' . "iobj_details-datatp.
*          is_fieldcat-outputlen = iobj_details-outputlen .
*        ENDIF .

        is_fieldcat-scrtext_l = iobj_details-textlong.
        append is_fieldcat to it_fieldcat.
        clear : is_fieldcat .
      endloop .


      clear :n_counter, wa_axis .
      read table i_axis_data  into wa_axis with key axis = '000'  .
      if sy-subrc eq 0 .
        loop at wa_axis-set into wa_set .
          at new tuple_ordinal .

            n_counter = n_counter + 1 .

            concatenate 'VALUE' n_counter into is_fieldcat-fieldname .
            is_fieldcat-outputlen = '30'.
            is_fieldcat-datatype = 'CHAR'.
          endat .
          concatenate is_fieldcat-scrtext_l wa_set-caption into is_fieldcat-scrtext_l separated by  ` ` .

*        is_fieldcat-scrtext_l = wa_set-caption.
          at end of tuple_ordinal .
            shift is_fieldcat-scrtext_l left deleting leading ' ' .
            append is_fieldcat to it_fieldcat.
            clear : is_fieldcat .
          endat .

        endloop .
      endif .

      clear meta_data .
      refresh meta_data .
      loop at it_fieldcat into is_fieldcat .

        move-corresponding is_fieldcat to meta_data .
        append meta_data .
        clear: meta_data, is_fieldcat .
      endloop .

* create itab
      sort it_fieldcat by fieldname.
      delete adjacent duplicates from it_fieldcat comparing fieldname .
      clear: comp , comp_tab ,is_fieldcat .
      refresh comp_tab .

      loop at it_fieldcat into is_fieldcat .
        clear op_len .
        op_len = is_fieldcat-outputlen .
        comp-name = is_fieldcat-fieldname.
        comp-type = cl_abap_elemdescr=>get_c( op_len ).
        append comp to comp_tab.
        clear : is_fieldcat , comp .
      endloop .

      clear struct_type .

call method cl_abap_structdescr=>create
  exporting
    p_components = comp_tab
    p_strict     = cl_abap_structdescr=>false
  receiving
    p_result     =  struct_type .

*      struct_type = cl_abap_structdescr=>create( comp_tab ).
      clear tab_type .
      call method cl_abap_tabledescr=>create
        exporting
          p_line_type  = struct_type
          p_table_kind = cl_abap_tabledescr=>tablekind_std
*    P_UNIQUE     = ABAP_FALSE
*    P_KEY        =
*    P_KEY_KIND   = KEYDEFKIND_DEFAULT
        receiving
          p_result     = tab_type .

      create data dref1 type handle tab_type.

      assign dref1->* to <ltable>.

      create data dref type handle struct_type.

      assign dref->* to <l_line>.


*      CALL METHOD cl_alv_table_create=>create_dynamic_table
*        EXPORTING
*          it_fieldcatalog = it_fieldcat
*        IMPORTING
*          ep_table        = new_table.
*
*
** Create a new Line with the same structure of the table.
*      ASSIGN new_table->* TO <ltable>.
*      CREATE DATA new_line LIKE LINE OF <ltable>.
*      ASSIGN new_line->* TO <l_line>.


      clear :wa_axis , char_count , lcount, xcount.
      refresh tmp_set .
      loop at i_axis_data into wa_axis where axis = '001' .
        loop at wa_axis-set into wa_set .
          clear wa_tmp_set .
          move-corresponding wa_set to wa_tmp_set .
          insert wa_tmp_set into table tmp_set.
          if not wa_set-attributes[] is initial .
            loop at wa_set-attributes into wa_dattrinm .
              clear: wa_tmp_set-chanm , wa_tmp_set-chavl , wa_tmp_set-chavl_ext , wa_tmp_set-caption .
              move: wa_dattrinm-attrinm to wa_tmp_set-chanm ,
                    wa_dattrinm-attrivl to wa_tmp_set-chavl ,
                    wa_dattrinm-attrivl to wa_tmp_set-chavl_ext ,
                    wa_dattrinm-caption to wa_tmp_set-caption .

              insert wa_tmp_set into table tmp_set.
            endloop .
          endif .


        endloop .
      endloop .

      loop at tmp_set into wa_set .
        at new tuple_ordinal .
          if lcount gt 0 .
            lcount = lcount - 1 .
          endif .
          clear <l_line> .
        endat .
        clear off .
******** added on 01/01/2006

        clear :off, moff, mlen .
        find '___' in section offset off of
               wa_set-chanm .
*               MATCH OFFSET moff
*               MATCH LENGTH mlen.
        if sy-subrc eq 0 .
          clear : i_iset_iobjnm , e_iobjnm .
          move: wa_set-chanm to i_iset_iobjnm .
          call function 'RSD_IOBJNM_GET_FROM_INFOSET'
            exporting
              i_iset_iobjnm       = i_iset_iobjnm
           importing
             e_iobjnm            = e_iobjnm
*   E_INFOSET           =
*   E_FIELDNM           =
*   E_UNINM             =
*   E_IOBJ_TEXT         =
*   E_T_IOBJ_CMP        =
           exceptions
             name_error          = 1
             no_field            = 2
             others              = 3 .

          clear wa_set-chanm  .
          move: e_iobjnm to wa_set-chanm .
*    off = moff + mlen .
*          SHIFT wa_set-chanm LEFT BY off PLACES .
        else.

************end of 01/01/2006
          find '__' in section offset off of
                 wa_set-chanm
                 match offset moff
                 match length mlen.
          if sy-subrc eq 0 .
            off = moff + mlen .
            shift wa_set-chanm left by off places .
          endif .
        endif . " check three _ or two _

        if wa_set-chanm+0(1) eq '0' .
          shift wa_set-chanm left by 1 places .
        endif .
        assign component wa_set-chanm of structure <l_line> to <l_field>.
        if wa_set-chavl = '#' .
*            <l_field> =  wa_set-chavl_ext .
        else .
          concatenate wa_set-chavl_ext wa_set-caption into <l_field> separated by ' ' .
        endif .

        at end of tuple_ordinal .
          clear: xcount , char_count , n_counter .

          lcount = lcount + 1 .

          loop at i_cell_data into wa_cell from lcount .

            n_counter = n_counter + 1 .
            if n_counter gt no_of_keyf .
              exit .
            endif .

            concatenate 'VALUE' n_counter into wf_fldnm .
            assign component wf_fldnm of structure <l_line> to <l_field>.

            <l_field> = wa_cell-value .


          endloop .

          lcount = lcount + no_of_keyf .
          insert <l_line> into table <ltable>.

        endat .


      endloop .
      clear :xml_out, meta .
      refresh meta .

      meta[] = meta_data[] .
      call transformation (`ID`)
            source meta   = meta_data[]
                   output = <ltable>[]
            result xml xml_out.

    when 1 .
      raise no_applicable_data .
    when 2 .
      raise invalid_variable_values .
    when 3 .
      raise no_authority .
    when 4 .
      raise abort .
    when 5 .
      raise invalid_input .
    when 6 .
      raise invalid_view .
    when others .
      raise unknown_error .
  endcase .

endfunction.

Z_BAPI_IOBJ_GETDETAIL source (this is called in the main fm)

function z_bapi_iobj_getdetail.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(VERSION) LIKE  BAPI6108-VERSION DEFAULT 'A'
*"     VALUE(INFOOBJECT) LIKE  BAPI6108-INFOOBJECT
*"  EXPORTING
*"     VALUE(DETAILS) LIKE  BAPI6108 STRUCTURE  BAPI6108
*"     VALUE(RETURN) LIKE  BAPIRET2 STRUCTURE  BAPIRET2
*"  TABLES
*"      COMPOUNDS STRUCTURE  BAPI6108CM OPTIONAL
*"      ATTRIBUTES STRUCTURE  BAPI6108AT OPTIONAL
*"      NAVIGATIONATTRIBUTES STRUCTURE  BAPI6108AN OPTIONAL
*"      ATRNAVINFOPROVIDER STRUCTURE  BAPI6108NP OPTIONAL
*"      HIERARCHYCHARACTERISTICS STRUCTURE  BAPI6108HC OPTIONAL
*"      ELIMINATION STRUCTURE  BAPI6108IE OPTIONAL
*"----------------------------------------------------------------------
type-pools:rs ,rsa .
* Local data declarations
  data: l_msgv1            like sy-msgv1,
        l_msgv2            like sy-msgv2,
        l_msgv3            like sy-msgv3,
        l_s_dtel           type rsddtel,
        l_s_viobj          type rsd_s_viobj,
        l_t_iobj_cmp       type rsd_t_iobj_cmp,
        l_s_iobj_cmp       type rsd_s_iobj_cmp,
        l_t_atr            type rsd_t_atr,
        l_s_atr            type rsd_s_atr,
        l_s_atr_nav        type rsd_s_atr_nav,
        l_t_atr_nav        type rsd_t_atr_nav,
        l_s_bapi_iobj_cmp  like bapi6108cm,
        l_s_bapi_atr       like bapi6108at,
        l_s_bapi_atr_nav   like bapi6108an.

* Initialization
  clear: return,
         details.
  refresh: compounds,
           attributes,
           navigationattributes,
           atrnavinfoprovider,
           hierarchycharacteristics,
           elimination.


  call function 'RSD_IOBJ_GET'
    exporting
      i_iobjnm       = infoobject
      i_objvers      = version
    importing
      e_s_viobj      = l_s_viobj
      e_t_iobj_cmp   = l_t_iobj_cmp
      e_t_atr        = l_t_atr
      e_t_atr_nav    = l_t_atr_nav
    exceptions
      iobj_not_found = 1
      illegal_input  = 2
      others         = 3.
  if sy-subrc <> 0.
    l_msgv1 = infoobject.
    l_msgv2 = version.
    call function 'BALW_BAPIRETURN_GET2'
      exporting
        type   = rs_c_error
        cl     = rsa_c_rsar
        number = '316'
        par1   = l_msgv1
        par2   = l_msgv2
      importing
        return = return
      exceptions
        others = 0.
* Das InfoObject &1 existiert nicht in der Version &2
    exit.
  endif.

  move-corresponding l_s_viobj to details.
  details-infoobject = l_s_viobj-iobjnm.
  details-version    = l_s_viobj-objvers.
  details-type       = l_s_viobj-iobjtp.
  details-textshort  = l_s_viobj-txtsh.
  details-textlong   = l_s_viobj-txtlg.
*-- Add DDIC properties to InfoObject
  call function 'RSD_DTELNM_GET_FOR_IOBJ'
    exporting
      i_iobjnm   = l_s_viobj-iobjnm
    importing
      e_dtelnm   = l_s_dtel-dtelnm
    exceptions
      name_error = 1
      others     = 2.
  .
  if sy-subrc <> 0.
    l_msgv1 = 'Data element for InfoObject'.  "#EC NOTEXT
    l_msgv2 = l_s_viobj-iobjnm.
    l_msgv3 = 'does not exsist'.
    call function 'BALW_BAPIRETURN_GET2'
      exporting
        type   = rs_c_error
        cl     = rsa_c_rsar
        number = '051'
        par1   = l_msgv1
        par2   = l_msgv2
        par3   = l_msgv3
      importing
        return = return
      exceptions
        others = 0.
    exit.
  else.
    call function 'RSD_DTEL_GET'
      exporting
        i_dtelnm       = l_s_dtel-dtelnm
      importing
        e_s_dtel       = l_s_dtel
      exceptions
        dtel_not_found = 1
        doma_not_found = 2
        illegal_input  = 3
        others         = 4.
    .
    if sy-subrc <> 0 and version ne rs_c_objvers-delivery.
      l_msgv1 = 'Data element'.       "#EC NOTEXT
      l_msgv2 = l_s_dtel-dtelnm.
      l_msgv3 = 'does not exsist in DDIC'.    "#EC NOTEXT
      call function 'BALW_BAPIRETURN_GET2'
        exporting
          type   = rs_c_error
          cl     = rsa_c_rsar
          number = '051'
          par1   = l_msgv1
          par2   = l_msgv2
          par3   = l_msgv3
        importing
          return = return
        exceptions
          others = 0.
      exit.
    else.
*-- Due to special logic digits includes value of LENG from DDIC
      details-leng = l_s_dtel-digits.
*     from SP13: deicmals are part of the BAPI-DETAILS structure
      details-decimals = l_s_dtel-decimals.
    endif.
  endif.

  loop at l_t_iobj_cmp into l_s_iobj_cmp.
    clear: l_s_bapi_iobj_cmp.
    move-corresponding l_s_iobj_cmp to l_s_bapi_iobj_cmp.
    l_s_bapi_iobj_cmp-infoobject = l_s_iobj_cmp-iobjnm.
    append l_s_bapi_iobj_cmp to compounds.
  endloop.
  loop at l_t_atr into l_s_atr.
    clear: l_s_bapi_atr.
    move-corresponding l_s_atr to l_s_bapi_atr.
    append l_s_bapi_atr to attributes.
  endloop.
  loop at l_t_atr_nav into l_s_atr_nav.
    clear: l_s_bapi_atr_nav.
    move-corresponding l_s_atr_nav to l_s_bapi_atr_nav.
    append l_s_bapi_atr_nav to navigationattributes.
  endloop.
* navigation attributes InfoProvider
  data: l_s_naip       type  rsd_s_naip.
  data: l_s_bapi_naip  type  bapi6108np.
  l_s_bapi_naip-infoobject = l_s_viobj-iobjnm.
  loop at l_s_viobj-t_naip into l_s_naip.
    move-corresponding l_s_naip to l_s_bapi_naip.
    append l_s_bapi_naip to atrnavinfoprovider.
  endloop.
* hierarchy charact.
  data: l_s_hiecha      type rsd_s_hiecha.
  data: l_s_bapi_hiecha type bapi6108hc.
  l_s_bapi_hiecha-chabasnm = l_s_viobj-chabasnm.
  loop at l_s_viobj-t_hiecha into l_s_hiecha.
    move-corresponding l_s_hiecha to l_s_bapi_hiecha.
    append l_s_bapi_hiecha to hierarchycharacteristics.
  endloop.
* charact for inter charact. elimination
  data: l_s_ice         type rsd_s_ice.
  data: l_s_bapi_ice    type bapi6108ie.
  l_s_bapi_ice-infoobject = l_s_viobj-iobjnm.
  loop at l_s_viobj-t_ice into l_s_ice.
    move-corresponding l_s_ice to l_s_bapi_ice.
    append l_s_bapi_ice to elimination.
  endloop.

* set names of DDIC objects
  call function 'RSD_CHKTAB_GET_FOR_CHA_BAS'
    exporting
      i_chabasnm       = l_s_viobj-chabasnm
      i_s_viobj        = l_s_viobj
      i_t_atr          = l_t_atr
    importing
      e_chktab         = details-chktab
      e_chntab         = details-chntab
      e_chttab         = details-chttab
      e_txttab         = details-txttab
*     E_SIDTAB         =
*     E_SIDVIEW        =
*     E_ASITAB         =
*     E_ASISTR         =
*     E_ASTTAB         =
*     E_CHKNEW         =
    exceptions
      name_error       = 0.
  call function 'RSD_HIETAB_GET_FOR_CHA_BAS'
    exporting
      i_chabasnm       = l_s_viobj-chabasnm
      i_s_viobj        = l_s_viobj
   importing
      e_hietab         = details-hietab
      e_hintab         = details-hintab
*     E_HSITAB         =
*     E_HSIVIEW        =
*     E_INCTAB         =
    exceptions
      name_error       = 0.

endfunction.

check this and let me know how it goes.

Regards

Raja

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question