User:Satyajc

Conference ID number: 192389080 Manoj uses ID: 155657230

class ZCL_BPC_GUID definition public final create public.

public section.

types: t_hash160 type table of hash160. types: begin of hash_idx, idx      type syst_tabix, sha1_hash type hash160, end of hash_idx. types: t_hash_idx type table of hash_idx.

constants C_MONTHLY type CURR_INT value 'M' ##NO_TEXT. constants C_DAILY type CURR_INT value '1' ##NO_TEXT. data RTC_DSO_NAME type RSINFOPROV. data STG_CUBE_NAME type RSINFOPROV. data GT_HASH type T_HASH_IDX. data GT_SFC type RSDRI_TH_SFC. data GT_SFK type RSDRI_TH_SFK. data RT_STG_DATA type ref to DATA. "searched staging data data RT_RTC_DATA type ref to DATA . "available retraction data
 * constants C_RATETYP_MONTHLY type RSW0_RTYPE value 'A3' ##NO_TEXT.
 * constants C_RATETYP_DAILY type RSW0_RTYPE value 'B' ##NO_TEXT.
 * constants C_DATE_COMP_DAILY type NAME_KOMP value '/BIC/ZB_DDATE' ##NO_TEXT.
 * constants C_DATE_COMP_MONTHLY type NAME_KOMP value '/BIC/ZB_RDATE' ##NO_TEXT.

methods GET_LINE_HASH importing !SRC_LINE type DATA !I_INFOPROV_NAME type RSINFOPROV exporting !SHA1_HASH type HASH160. methods GUID_HASH_STG changing !RESULT_PACKAGE type STANDARD TABLE. methods RTC_GUID_POPULATE importing !I_INFOPROV_NAME type RSINFOPROV changing !RESULT_PACKAGE type STANDARD TABLE raising CX_RSROUT_ABORT CX_RSBK_ERRORCOUNT. methods TST1_RTC_GUID_POPULATE. methods STG_GUID_SRCH. methods STG_PRP_DTLS. methods TST4_RTC_GUID_POPULATE importing !I_INFOPROV_NAME type RSINFOPROV default 'ZB_STG_M' !IT_HASH type T_HASH_IDX exporting !ET_DATA type STANDARD TABLE. methods TST5_RTC_GUID_POPULATE importing !IDX_RTC_SRC_DATA type SYST_TABIX optional exporting !ET_RTC_DATA type STANDARD TABLE. methods CONSTRUCTOR. protected section. private section. ENDCLASS.

CLASS ZCL_BPC_GUID IMPLEMENTATION.

method constructor. rtc_dso_name = 'ZB_RTC_M'. stg_cube_name = 'ZB_STG_M'. endmethod.
 * ---+
 * | Instance Public Method ZCL_BPC_GUID->CONSTRUCTOR
 * +--
 * +--

method get_line_hash.
 * ---+
 * | Instance Public Method ZCL_BPC_GUID->GET_LINE_HASH
 * | [--->] SRC_LINE                      TYPE        DATA
 * | [--->] I_INFOPROV_NAME               TYPE        RSINFOPROV
 * | [<---] SHA1_HASH                     TYPE        HASH160
 * +--
 * +--

data: begin of ls_hash_fields, zb_accnt  type /bic/oizb_accnt, cs_version type /bi0/oics_version, zb_compco type /bic/oizb_compco, zb_funcid type /bic/oizb_funcid, zc_gaadid type /bic/oizc_gaadid, zc_rgpdty type /bic/oizc_rgpdty, zb_tpart  type /bic/oizb_tpart, zb_movcod type /bic/oizb_movcod, end of ls_hash_fields.

field-symbols  type any. field-symbols  type any. data src_len type i.   data hashlen type i.

case i_infoprov_name. when 'ZB_STG_M' or 'ZB_STG_D'.

assign component 'CS_ITEM' of structure src_line to . call function 'CONVERSION_EXIT_ALPHA_OUTPUT' exporting input =  importing output = ls_hash_fields-zb_accnt.

assign component 'CS_VERSION' of structure src_line to . ls_hash_fields-cs_version = .

assign component 'CS_UNIT' of structure src_line to . call function 'CONVERSION_EXIT_ALPHA_OUTPUT' exporting input =  importing output = ls_hash_fields-zb_compco.

assign component '/BIC/ZC_FUNCID' of structure src_line to . ls_hash_fields-zb_funcid = .

assign component '/BIC/ZC_GAADID' of structure src_line to <fs_val>. ls_hash_fields-zc_gaadid = <fs_val>.

assign component '/BIC/ZC_RGPDTY' of structure src_line to <fs_val>. ls_hash_fields-zc_rgpdty = <fs_val>.

assign component 'CS_PARTNER' of structure src_line to <fs_val>. call function 'CONVERSION_EXIT_ALPHA_OUTPUT' exporting input = <fs_val> importing output = ls_hash_fields-zb_tpart.

assign component 'CS_SITEM' of structure src_line to <fs_val>. ls_hash_fields-zb_movcod = <fs_val>.

when 'ZB_RTC_M' or 'ZB_RTC_D'. assign component '/BIC/ZB_ACCNT' of structure src_line to <fs_val>. ls_hash_fields-zb_accnt = <fs_val>.

assign component 'CS_VERSION' of structure src_line to <fs_val>. ls_hash_fields-cs_version = <fs_val>.

assign component '/BIC/ZB_COMPCO' of structure src_line to <fs_val>. ls_hash_fields-zb_compco = <fs_val>.

assign component '/BIC/ZB_FUNCID' of structure src_line to <fs_val>. ls_hash_fields-zb_funcid = <fs_val>.

assign component '/BIC/ZC_GAADID' of structure src_line to <fs_val>. ls_hash_fields-zc_gaadid = <fs_val>.

assign component '/BIC/ZC_RGPDTY' of structure src_line to <fs_val>. ls_hash_fields-zc_rgpdty = <fs_val>.

assign component '/BIC/ZB_TPART' of structure src_line to <fs_val>. ls_hash_fields-zb_tpart = <fs_val>.

assign component '/BIC/ZB_MOVCOD' of structure src_line to <fs_val>. ls_hash_fields-zb_movcod = <fs_val>.

when others.

endcase.


 * src_len = strlen( ls_hash_fields ).

data str_input type string. str_input = ls_hash_fields.

clear src_len. src_len = strlen( str_input ).

call function 'CALCULATE_HASH_FOR_CHAR' exporting alg           = 'SHA1' data          = str_input length        = src_len importing hash          = sha1_hash hashlen       = hashlen exceptions unknown_alg   = 1 param_error   = 2 internal_error = 3 others        = 4.

endmethod.

method guid_hash_stg.
 * <SIGNATURE>---+
 * | Instance Public Method ZCL_BPC_GUID->GUID_HASH_STG
 * | [<-->] RESULT_PACKAGE                TYPE        STANDARD TABLE
 * +--</SIGNATURE>
 * +--</SIGNATURE>

field-symbols <fs_val> type any. field-symbols <fs_line> type any. field-symbols <fs_sha1_hash> type hash160.

loop at result_package assigning <fs_line>. unassign <fs_sha1_hash>. assign component '/BIC/ZB_HASH' of structure <fs_line> to <fs_sha1_hash>. if <fs_sha1_hash> is assigned. call method get_line_hash exporting src_line       = <fs_line> i_infoprov_name = 'ZB_STG_M' importing sha1_hash      = <fs_sha1_hash>. endif. endloop. endmethod.

method RTC_GUID_POPULATE.
 * <SIGNATURE>---+
 * | Instance Public Method ZCL_BPC_GUID->RTC_GUID_POPULATE
 * | [--->] I_INFOPROV_NAME               TYPE        RSINFOPROV
 * | [<-->] RESULT_PACKAGE                TYPE        STANDARD TABLE
 * | [!CX!] CX_RSROUT_ABORT
 * | [!CX!] CX_RSBK_ERRORCOUNT
 * +--</SIGNATURE>
 * +--</SIGNATURE>

field-symbols <fs_val> type any. field-symbols <fs_line> type any. data lv_sha1_hash type hash160.

data: l_sfc       type rsdri_s_sfc, l_sfk       type rsdri_s_sfk, lt_sfc      type rsdri_th_sfc, lt_sfk      type rsdri_th_sfk, l_sidfieldnm type rs_char30.

data: begin of ls_hash_idx, idx      type syst_tabix, sha1_hash type hash160, end of ls_hash_idx. data lt_hash_idx like table of ls_hash_idx. field-symbols <fs_rsdri_range> type rsdri_s_range. data lt_rsdri_range type rsdri_t_range.

data: lt_data_part type ref to data, l_first_call type rs_bool, l_end_of_data type rs_bool.

field-symbols: <lt_data_part> type standard table, <lt_data>     type standard table, <ls_dta_pro>  type rsd_s_dta_pro. data l_requid type rsrequnr.

loop at result_package assigning <fs_line>. clear lv_sha1_hash. ls_hash_idx-idx = sy-tabix. call method get_line_hash exporting src_line       = <fs_line> i_infoprov_name = i_infoprov_name importing sha1_hash      = ls_hash_idx-sha1_hash. append ls_hash_idx to lt_hash_idx. endloop.

data lt_sha1_hash type table of hash160. constants c_hash_srch_pkgsize type i value 50. data result_package_size type i.   data idx_start type i.    data idx_end type i.

data l_infoprov_struct type struname.

call function 'RSISD_GET_STRUCTURE' exporting i_infoprov_name  = i_infoprov_name i_infoprov_type  = rsis_c_dobjtype-db importing e_infoprov_struct = l_infoprov_struct.


 * read metadata of infoprovider

data: lr_dta     type ref to cl_rsd_dta, lt_dta_pro type rsd_t_dta_pro, lt_dta_dime type rsd_t_dta_dime.

call method cl_rsd_dta=>factory exporting i_infoprov = i_infoprov_name receiving r_r_dta   = lr_dta exceptions not_found = 1 others    = 2. if sy-subrc <> 0. message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2. endif.

call method lr_dta->dta_get_info exporting i_with_atr_nav = rs_c_true importing e_t_dta_pro   = lt_dta_pro e_t_dta_dime  = lt_dta_dime exceptions others        = 1. if sy-subrc <> 0. message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2. endif.

clear: lt_sfc, lt_sfk.
 * create tables for characteristics and keyfigures

loop at lt_dta_pro assigning <ls_dta_pro>. if <ls_dta_pro>-iobjtp <> rsd_c_objtp-keyfigure. clear l_sfc. clear l_sidfieldnm. l_sfc-chanm = <ls_dta_pro>-iobjnm. if <ls_dta_pro>-atrnavfl = rs_c_true. call function 'RSD_SIDNM_GET_FOR_ATRNAV' exporting i_atrnavnm  = <ls_dta_pro>-iobjnm importing e_sidfieldnm = l_sidfieldnm. l_sfc-chaalias = l_sidfieldnm. else. l_sfc-chaalias = <ls_dta_pro>-iobjnm. endif. insert l_sfc into table lt_sfc. else. clear l_sfk. l_sfk-kyfnm = <ls_dta_pro>-iobjnm. l_sfk-kyfalias = <ls_dta_pro>-iobjnm. l_sfk-aggr = rsd_c_aggr-sum. insert l_sfk into table lt_sfk. endif. endloop.

data lr_data type ref to data.
 * data: lt_data_part type ref to data,
 * l_first_call type rs_bool,
 * l_end_of_data type rs_bool.

create data lt_data_part type table of (l_infoprov_struct). create data lr_data type table of (l_infoprov_struct). assign lt_data_part->* to <lt_data_part>. assign lr_data->* to <lt_data>.

describe table result_package lines result_package_size.

idx_start = 1. if result_package_size <= c_hash_srch_pkgsize. idx_end = result_package_size. endif.

do.

clear lt_rsdri_range. loop at lt_hash_idx into ls_hash_idx from idx_start to idx_end. append initial line to lt_rsdri_range assigning <fs_rsdri_range>. <fs_rsdri_range>-chanm = 'ZB_HASH'. <fs_rsdri_range>-sign = 'I'. <fs_rsdri_range>-compop = 'EQ'. <fs_rsdri_range>-low = ls_hash_idx-sha1_hash. <fs_rsdri_range>-high = ''. endloop.

call function 'RSDRI_INFOPROV_READ' exporting i_infoprov          = i_infoprov_name i_th_sfc            = lt_sfc i_th_sfk            = lt_sfk i_t_range           = lt_rsdri_range i_rollup_only       = rs_c_false i_packagesize       = -1 i_use_db_aggregation = rs_c_false importing e_t_data            = <lt_data_part> e_end_of_data       = l_end_of_data changing c_first_call        = l_first_call exceptions no_authorization    = 1 others              = 2. case sy-subrc. when 1. message e130(rsinp). " into l_dummy.         "raise_exception. when 2. message e120(rsinp) with i_infoprov_name. "into l_dummy.         "raise_exception. endcase.

append lines of <lt_data_part> to <lt_data>.

if idx_end < result_package_size. idx_start = idx_start + c_hash_srch_pkgsize. idx_end = idx_end + c_hash_srch_pkgsize. if result_package_size < idx_end. idx_end = result_package_size. endif. else. exit. endif. enddo.

loop at lt_hash_idx into ls_hash_idx from 1 to 100. endloop.

loop at <lt_data> assigning <fs_line>.
 * field-symbols <fs_line> type any.

endloop.

endmethod.

method STG_GUID_SRCH.
 * <SIGNATURE>---+
 * | Instance Public Method ZCL_BPC_GUID->STG_GUID_SRCH
 * +--</SIGNATURE>
 * +--</SIGNATURE>

data: l_first_call type rs_bool, l_end_of_data type rs_bool. data ls_hash_idx type hash_idx. field-symbols <fs_rsdri_range> type rsdri_s_range. data lt_rsdri_range type rsdri_t_range. constants c_hash_srch_pkgsize type i value 4. data result_package_size type i.   data idx_start type i.    data idx_end type i.    field-symbols: <lt_data_part> type standard table, <lt_data>     type standard table.

data: ref_datadescr  type ref to cl_abap_datadescr, ref_tabledescr type ref to cl_abap_tabledescr, " Internal table type ref to RTTS      ref_structdescr type ref to cl_abap_structdescr,      rt_data_part    type ref to data.

ref_datadescr ?= cl_abap_typedescr=>describe_by_data( rt_stg_data ). ref_tabledescr ?= ref_datadescr. create data rt_data_part type handle ref_tabledescr. assign rt_data_part->* to <lt_data_part>. assign rt_stg_data->* to <lt_data>.

describe table gt_hash lines result_package_size. idx_start = 1. if result_package_size <= c_hash_srch_pkgsize. idx_end = result_package_size. else. idx_end = c_hash_srch_pkgsize. endif.

do.

clear lt_rsdri_range. loop at gt_hash into ls_hash_idx from idx_start to idx_end. append initial line to lt_rsdri_range assigning <fs_rsdri_range>. <fs_rsdri_range>-chanm = 'ZB_HASH'. <fs_rsdri_range>-sign = 'I'. <fs_rsdri_range>-compop = 'EQ'. <fs_rsdri_range>-low = ls_hash_idx-sha1_hash. <fs_rsdri_range>-high = ''. endloop.

clear <lt_data_part>. call function 'RSDRI_INFOPROV_READ' exporting i_infoprov          = stg_cube_name i_th_sfc            = gt_sfc i_th_sfk            = gt_sfk i_t_range           = lt_rsdri_range i_rollup_only       = rs_c_false i_packagesize       = -1 i_use_db_aggregation = rs_c_false importing e_t_data            = <lt_data_part> e_end_of_data       = l_end_of_data changing c_first_call        = l_first_call exceptions no_authorization    = 1 others              = 2. case sy-subrc. when 1. message e130(rsinp). " into l_dummy.         "raise_exception. when 2. message e120(rsinp) with stg_cube_name. "into l_dummy.         "raise_exception. endcase.

append lines of <lt_data_part> to <lt_data>. if idx_end < result_package_size. idx_start = idx_start + c_hash_srch_pkgsize. idx_end = idx_end + c_hash_srch_pkgsize. if result_package_size < idx_end. idx_end = result_package_size. endif. else. exit. endif. enddo.

endmethod.

method STG_PRP_DTLS.
 * <SIGNATURE>---+
 * | Instance Public Method ZCL_BPC_GUID->STG_PRP_DTLS
 * +--</SIGNATURE>
 * +--</SIGNATURE>

data: l_sfc       type rsdri_s_sfc, l_sfk       type rsdri_s_sfk, l_sidfieldnm type rs_char30. field-symbols: <ls_dta_pro>  type rsd_s_dta_pro.
 * data l_infoprov_struct type struname.

data: lr_dta     type ref to cl_rsd_dta, lt_dta_pro type rsd_t_dta_pro, lt_dta_dime type rsd_t_dta_dime.


 * call function 'RSISD_GET_STRUCTURE'
 * exporting
 * i_infoprov_name  = i_infoprov_name
 * i_infoprov_type  = rsis_c_dobjtype-db
 * importing
 * e_infoprov_struct = l_infoprov_struct.

call method cl_rsd_dta=>factory exporting i_infoprov = stg_cube_name receiving r_r_dta   = lr_dta exceptions not_found = 1 others    = 2. if sy-subrc <> 0. message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2. endif.
 * read metadata of infoprovider

call method lr_dta->dta_get_info exporting i_with_atr_nav = rs_c_true importing e_t_dta_pro   = lt_dta_pro e_t_dta_dime  = lt_dta_dime exceptions others        = 1. if sy-subrc <> 0. message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2. endif.

clear: gt_sfc, gt_sfk.
 * create tables for characteristics and keyfigures

loop at lt_dta_pro assigning <ls_dta_pro>. if <ls_dta_pro>-iobjtp <> rsd_c_objtp-keyfigure. clear l_sfc. clear l_sidfieldnm. l_sfc-chanm = <ls_dta_pro>-iobjnm. if <ls_dta_pro>-atrnavfl = rs_c_true. call function 'RSD_SIDNM_GET_FOR_ATRNAV' exporting i_atrnavnm  = <ls_dta_pro>-iobjnm importing e_sidfieldnm = l_sidfieldnm. l_sfc-chaalias = l_sidfieldnm. else. l_sfc-chaalias = <ls_dta_pro>-iobjnm. endif. insert l_sfc into table gt_sfc. else. clear l_sfk. l_sfk-kyfnm = <ls_dta_pro>-iobjnm. l_sfk-kyfalias = <ls_dta_pro>-iobjnm. l_sfk-aggr = rsd_c_aggr-sum. insert l_sfk into table gt_sfk. endif. endloop.


 * create data ert_data type table of (l_infoprov_struct).

endmethod.

method tst1_rtc_guid_populate. endmethod.
 * <SIGNATURE>---+
 * | Instance Public Method ZCL_BPC_GUID->TST1_RTC_GUID_POPULATE
 * +--</SIGNATURE>
 * +--</SIGNATURE>
 * field-symbols <fs_val> type any.
 * field-symbols <fs_line> type any.
 * data lv_sha1_hash type hash160.
 * data: l_sfc       type rsdri_s_sfc,
 * l_sfk       type rsdri_s_sfk,
 * lt_sfc      type rsdri_th_sfc,
 * lt_sfk      type rsdri_th_sfk,
 * l_sidfieldnm type rs_char30.
 * data ls_hash_idx type hash_idx.
 * field-symbols <fs_rsdri_range> type rsdri_s_range.
 * data lt_rsdri_range type rsdri_t_range.
 * data: lt_data_part type ref to data,
 * l_first_call type rs_bool,
 * l_end_of_data type rs_bool.
 * field-symbols: <lt_data_part> type standard table,
 * <lt_data>     type standard table,
 * <ls_dta_pro>  type rsd_s_dta_pro.
 * data l_requid type rsrequnr.
 * data lt_sha1_hash type table of hash160.
 * constants c_hash_srch_pkgsize type i value 50.
 * data result_package_size type i.
 * data idx_start type i.
 * data idx_end type i.
 * data l_infoprov_struct type struname.
 * call function 'RSISD_GET_STRUCTURE'
 * exporting
 * i_infoprov_name  = i_infoprov_name
 * i_infoprov_type  = rsis_c_dobjtype-db
 * importing
 * e_infoprov_struct = l_infoprov_struct.
 * read metadata of infoprovider
 * data: lr_dta     type ref to cl_rsd_dta,
 * lt_dta_pro type rsd_t_dta_pro,
 * lt_dta_dime type rsd_t_dta_dime.
 * call method cl_rsd_dta=>factory
 * exporting
 * i_infoprov = i_infoprov_name
 * receiving
 * r_r_dta   = lr_dta
 * exceptions
 * not_found = 1
 * others    = 2.
 * if sy-subrc <> 0.
 * message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2.
 * endif.
 * call method lr_dta->dta_get_info
 * exporting
 * i_with_atr_nav = rs_c_true
 * importing
 * e_t_dta_pro   = lt_dta_pro
 * e_t_dta_dime  = lt_dta_dime
 * exceptions
 * others        = 1.
 * if sy-subrc <> 0.
 * message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2.
 * endif.
 * create tables for characteristics and keyfigures
 * clear: lt_sfc,
 * lt_sfk.
 * loop at lt_dta_pro assigning <ls_dta_pro>.
 * if <ls_dta_pro>-iobjtp <> rsd_c_objtp-keyfigure.
 * clear l_sfc.
 * clear l_sidfieldnm.
 * l_sfc-chanm = <ls_dta_pro>-iobjnm.
 * if <ls_dta_pro>-atrnavfl = rs_c_true.
 * call function 'RSD_SIDNM_GET_FOR_ATRNAV'
 * exporting
 * i_atrnavnm  = <ls_dta_pro>-iobjnm
 * importing
 * e_sidfieldnm = l_sidfieldnm.
 * l_sfc-chaalias = l_sidfieldnm.
 * else.
 * l_sfc-chaalias = <ls_dta_pro>-iobjnm.
 * endif.
 * insert l_sfc into table lt_sfc.
 * else.
 * clear l_sfk.
 * l_sfk-kyfnm = <ls_dta_pro>-iobjnm.
 * l_sfk-kyfalias = <ls_dta_pro>-iobjnm.
 * l_sfk-aggr = rsd_c_aggr-sum.
 * insert l_sfk into table lt_sfk.
 * endif.
 * endloop.
 * create data lt_data_part type table of (l_infoprov_struct).
 * assign lt_data_part->* to <lt_data_part>.
 * describe table it_hash lines result_package_size.
 * idx_start = 1.
 * if result_package_size <= c_hash_srch_pkgsize.
 * idx_end = result_package_size.
 * endif.
 * do.
 * clear lt_rsdri_range.
 * loop at it_hash into ls_hash_idx from idx_start to idx_end.
 * append initial line to lt_rsdri_range assigning <fs_rsdri_range>.
 * <fs_rsdri_range>-chanm = 'ZB_HASH'.
 * <fs_rsdri_range>-sign = 'I'.
 * <fs_rsdri_range>-compop = 'EQ'.
 * <fs_rsdri_range>-low = ls_hash_idx-sha1_hash.
 * <fs_rsdri_range>-high = ''.
 * endloop.
 * call function 'RSDRI_INFOPROV_READ'
 * exporting
 * i_infoprov          = i_infoprov_name
 * i_th_sfc            = lt_sfc
 * i_th_sfk            = lt_sfk
 * i_t_range           = lt_rsdri_range
 * i_rollup_only       = rs_c_false
 * i_packagesize       = -1
 * i_use_db_aggregation = rs_c_false
 * importing
 * e_t_data            = <lt_data_part>
 * e_end_of_data       = l_end_of_data
 * changing
 * c_first_call        = l_first_call
 * exceptions
 * no_authorization    = 1
 * others              = 2.
 * case sy-subrc.
 * when 1.
 * message e130(rsinp). " into l_dummy.
 * "raise_exception.
 * when 2.
 * message e120(rsinp) with i_infoprov_name. "into l_dummy.
 * "raise_exception.
 * endcase.
 * append lines of <lt_data_part> to et_data.
 * if idx_end < result_package_size.
 * idx_start = idx_start + c_hash_srch_pkgsize.
 * idx_end = idx_end + c_hash_srch_pkgsize.
 * if result_package_size < idx_end.
 * idx_end = result_package_size.
 * endif.
 * else.
 * exit.
 * endif.
 * enddo.
 * when 1.
 * message e130(rsinp). " into l_dummy.
 * "raise_exception.
 * when 2.
 * message e120(rsinp) with i_infoprov_name. "into l_dummy.
 * "raise_exception.
 * endcase.
 * append lines of <lt_data_part> to et_data.
 * if idx_end < result_package_size.
 * idx_start = idx_start + c_hash_srch_pkgsize.
 * idx_end = idx_end + c_hash_srch_pkgsize.
 * if result_package_size < idx_end.
 * idx_end = result_package_size.
 * endif.
 * else.
 * exit.
 * endif.
 * enddo.
 * endif.
 * enddo.

method tst4_rtc_guid_populate.
 * <SIGNATURE>---+
 * | Instance Public Method ZCL_BPC_GUID->TST4_RTC_GUID_POPULATE
 * | [--->] I_INFOPROV_NAME               TYPE        RSINFOPROV (default ='ZB_STG_M')
 * | [--->] IT_HASH                       TYPE        T_HASH_IDX
 * | [<---] ET_DATA                       TYPE        STANDARD TABLE
 * +--</SIGNATURE>
 * +--</SIGNATURE>

field-symbols <lt_stg_data> type standard table. data l_infoprov_struct type struname.
 * data rt_data type ref to data.
 * data:
 * lt_sfc type rsdri_th_sfc,
 * lt_sfk type rsdri_th_sfk.

call function 'RSISD_GET_STRUCTURE' exporting i_infoprov_name  = i_infoprov_name i_infoprov_type  = rsis_c_dobjtype-db importing e_infoprov_struct = l_infoprov_struct.

create data rt_stg_data type table of (l_infoprov_struct).

call method stg_prp_dtls.
 * exporting
 * i_infoprov_name = 'ZB_STG_M'.
 * importing
 * et_sfc         = gt_sfc
 * et_sfk         = gt_sfk.

call method stg_guid_srch. break-point. assign rt_stg_data->* to <lt_stg_data>.
 * try.
 * exporting
 * i_infoprov_name = 'ZB_STG_M'
 * it_hash = it_hash
 * it_sfc = gt_sfc
 * it_sfk = gt_sfk
 * changing
 * ct_data = <lt_data>.
 * endtry.

endmethod.

method tst5_rtc_guid_populate.
 * <SIGNATURE>---+
 * | Instance Public Method ZCL_BPC_GUID->TST5_RTC_GUID_POPULATE
 * | [--->] IDX_RTC_SRC_DATA              TYPE        SYST_TABIX(optional)
 * | [<---] ET_RTC_DATA                   TYPE        STANDARD TABLE
 * +--</SIGNATURE>
 * +--</SIGNATURE>

data ls_hash type hash_idx. read table gt_hash index idx_rtc_src_data into ls_hash.

field-symbols <fs_rtc_line> type any. field-symbols <fs_rtc_tab> type standard table.

assign rt_rtc_data->* to <fs_rtc_tab>.

read table <fs_rtc_tab> index idx_rtc_src_data assigning <fs_rtc_line>.

endmethod. ENDCLASS.