Skip to Content
avatar image
Former Member

How to read data from the navigation attribute name longer than 18

Good afternoon.

I need to read the navigation attributes from the InfoProvider.

I'm using standard FM RSDRI_INFOPROV_READ.

This FM receives a table with a list of characteristics.

This table refers to the type of the RSDRI_TH_SFC table.

In this type of table, the type of the string structure is RSDRI_S_SFC.

In structure RSDRI_S_SFC there are two used fields.

CHANM (char-30) is the technical name of the characteristic.

CHAALIAS (char-18) is the alias of the characteristic.

When I read the data, both these fields must be filled with the technical name of the characteristic.

When I read the data from the symptom does not occur, since the length of the tag is 9 characters, that is, it is less than 18 characters.

When reading the Navigation Attribute, FM returns an error (exception) - TYPE 11. This is a common error.

The following was experimentally established: if the length of the technical name of the Navigation Attribute and the characteristic does not exceed 18 characters (it will be added to the CHAALIAS fields), FM does it without errors. Regulations name the objects in the company for signs 9 by symbol. That is, the length of the navigation attribute will be 9 + 2 special characters ("__") + 9 characters of the navigation attribute itself. As a result, the technical length of the attribute and the navigation attribute that will go into the field CHAALIAS = 20 characters. Reconfigure the data model will take a lot of time. Maybe there are some solutions, ways, tips, who as previously solved this problem? We were looking for a note with colleagues to extend the system to SCN, but they did not find it. The system used is SAPBW 7.3. We looked at the table type SAPBW 7.4 the length of the field CHAALIAS is also 18 characters.

Examples? reading data (source code):

REPORT ztest_atrnav.


* Типыдлятаблицысрезультатомдлякуба
TYPES:
BEGIN OF lts_edo3b553,"<---СТРУКТУРАВОЗВРАТА
ecbem0017 TYPE /bic/oiecbem0017,
ectls0010 TYPE /bic/oiectls0010,
ecbls0017 TYPE /bic/oiecbls0017,

ecbls0094 TYPE /bic/oiecbls0094,
ecbls0018 TYPE /bic/oiecbls0018,
ecbls0006 TYPE /bic/oiecbls0006,
ecbls0016 TYPE /bic/oiecbls0016,
ectls0010__etr1 TYPE /bic/oietr1,

*Показатели
efi00003 TYPE /bic/oiefi00003,
END OF lts_edo3b553 .

TYPES:
BEGIN OF lts_edo3b553_ext, "<---СТРУКТУРАрасширенная + рассчитанныепоказатели
ecbem0017 TYPE /bic/oiecbem0017,
ectls0010 TYPE /bic/oiectls0010,
ecbls0017 TYPE /bic/oiecbls0017,
ecbls0094 TYPE /bic/oiecbls0094,
ecbls0006 TYPE /bic/oiecbls0006,
ecbls0016 TYPE /bic/oiecbls0016,
ectls0010__etr1 TYPE /bic/oietr1,
*Показатели
efi00003 TYPE /bic/oiefi00003,
END OF lts_edo3b553_ext.


* Типдлятаблицысрезультатом
DATA: lt_edo3b553 TYPE STANDARD TABLE OF lts_edo3b553_ext, " длявыводав EXCEL
ls_edo3b553 LIKE LINE OF lt_edo3b553.

DATA: pi_infoprov_edo3b553 TYPE rsinfoprov ,
pi_th_sfc_edo3b553 TYPE rsdri_th_sfc ,
pi_th_sfk_edo3b553 TYPE rsdri_th_sfk,

wa1_edo3b553 LIKE LINE OF pi_th_sfc_edo3b553,
wa2_edo3b553 LIKE LINE OF pi_th_sfk_edo3b553,

g_end_of_data_edo3b553 TYPE rs_bool, "флагокончаниячтения
g_first_call_edo3b553 TYPE rs_bool, "флагначалачтения

"<---ТАБЛИЦАСОЗНАЧЕНИЯМИПЕРЕДАВАЕМЫХПАРАМЕТРОВ
g_t_range_edo3b553 TYPE rsdri_t_range,

"<---ПОЛЕТАБЛИЦЫСОЗНАЧЕНИЯМИПАРАМЕТРОВ
g_s_range_edo3b553 TYPE rsdri_s_range,

"<---ПЕРЕМЕННЫЕДЛЯСУММИРОВАНИЯПРОМЕЖУТОЧНЫХИТОГОВ
l_efi00003 TYPE /bic/oiefi00003,

" Таблицакудабудетвозвращенрезультатизкуба
e_t_all_edo3b553 TYPE TABLE OF lts_edo3b553,
e_t_edo3b553 TYPE TABLE OF lts_edo3b553 .

FIELD-SYMBOLS:
<fs_e_t_edo3b553> TYPE lts_edo3b553, "<---ФСДЛЯЦИКЛАСУММИРОВАНИЯПРОМЕЖУТОЧНЫХИТОГОВ
<ls_ds_edo3b553> LIKE LINE OF e_t_edo3b553,
<ls_ds_edo3b553_ext> LIKE LINE OF lt_edo3b553.

CLEAR pi_th_sfc_edo3b553.
CLEAR pi_th_sfk_edo3b553.
CLEAR g_t_range_edo3b553.
CLEAR: l_efi00003.


pi_infoprov_edo3b553 = 'EDO3B553'.
g_end_of_data_edo3b553 = rs_c_false.
g_first_call_edo3b553 = rs_c_true.


wa1_edo3b553-chanm = 'ECBEM0017'.
wa1_edo3b553-chaalias = 'ECBEM0017'.
wa1_edo3b553-orderby = 0.
INSERT wa1_edo3b553 INTO TABLE pi_th_sfc_edo3b553.

wa1_edo3b553-chanm = 'ECTLS0010'.
wa1_edo3b553-chaalias = 'ECTLS0010'.
wa1_edo3b553-orderby = 0.
INSERT wa1_edo3b553 INTO TABLE pi_th_sfc_edo3b553.


wa1_edo3b553-chanm = 'ECBLS0017'.
wa1_edo3b553-chaalias = 'ECBLS0017'.
wa1_edo3b553-orderby = 0.
INSERT wa1_edo3b553 INTO TABLE pi_th_sfc_edo3b553.


wa1_edo3b553-chanm = 'ECBLS0094'.
wa1_edo3b553-chaalias = 'ECBLS0094'.
wa1_edo3b553-orderby = 0.
INSERT wa1_edo3b553 INTO TABLE pi_th_sfc_edo3b553.


wa1_edo3b553-chanm = 'ECBLS0018'.
wa1_edo3b553-chaalias = 'ECBLS0018'.
wa1_edo3b553-orderby = 0.
INSERT wa1_edo3b553 INTO TABLE pi_th_sfc_edo3b553.

wa1_edo3b553-chanm = 'ECBLS0006'.
wa1_edo3b553-chaalias = 'ECBLS0006'.
wa1_edo3b553-orderby = 0.
INSERT wa1_edo3b553 INTO TABLE pi_th_sfc_edo3b553.


wa1_edo3b553-chanm = 'ECBLS0016'.
wa1_edo3b553-chaalias = 'ECBLS0016'.
wa1_edo3b553-orderby = 0.
INSERT wa1_edo3b553 INTO TABLE pi_th_sfc_edo3b553.


wa1_edo3b553-chanm = 'ECTLS0010__ETR1'.” АТРИБУТНАВИГАЦИИКОТОРЫЕНЕОБХОДИОМПОЛУЧИТЬ
wa1_edo3b553-chaalias = 'ECTLS0010__ETR'.
wa1_edo3b553-orderby = 0.
INSERT wa1_edo3b553 INTO TABLE pi_th_sfc_edo3b553.


**++++++++++ Показатели ++
*

wa2_edo3b553-kyfnm = 'EFI00003'.
wa2_edo3b553-kyfalias = 'EFI00003'.
wa2_edo3b553-aggr = 'SUM'.
INSERT wa2_edo3b553 INTO TABLE pi_th_sfk_edo3b553.


" ФМ
WHILE g_end_of_data_edo3b553 NE 'X'. "<---ПОКАНЕПРИДЕТФЛАГПОСЛЕДНЕГОПАКЕТА
CALL FUNCTION 'RSDRI_INFOPROV_READ'
EXPORTING
i_infoprov = pi_infoprov_edo3b553
i_th_sfc = pi_th_sfc_edo3b553 "признаки
i_th_sfk = pi_th_sfk_edo3b553 "показатели
i_t_range = g_t_range_edo3b553 "ограничения
i_reference_date = sy-datum
i_save_in_table = rs_c_false
i_save_in_file = rs_c_false
i_packagesize = 9999999
i_authority_check = rsdrc_c_authchk-read
i_use_aggregates = rs_c_true
i_use_db_aggregation = rs_c_true
* i_rollup_only = rs_c_false
* i_read_ods_delta = rs_c_false
IMPORTING
e_t_data = e_t_edo3b553
e_end_of_data = g_end_of_data_edo3b553
CHANGING
c_first_call = g_first_call_edo3b553
EXCEPTIONS
ILLEGAL_INPUT = 1
ILLEGAL_INPUT_SFC = 2
ILLEGAL_INPUT_SFK = 3
ILLEGAL_INPUT_RANGE = 4
ILLEGAL_INPUT_TABLESEL = 5
NO_AUTHORIZATION = 6
ILLEGAL_DOWNLOAD = 7
ILLEGAL_TABLENAME = 8
TRANS_NO_WRITE_MODE = 9
INHERITED_ERROR = 10
X_MESSAGE = 11
NO_COMMIT_FREE_READ = 12
OTHERS = 13.

* CHECK SY-SUBRC = 0. "<---ПРОВЕРКА, ЧТО ВСЕ ОК
IF sy-subrc <> 0. "<---ПРОВЕРКА, ЧТОВСЕОК
* CONCATENATE.
MESSAGE e001(zeasez) WITH sy-subrc.
EXIT.
ENDIF.

LOOP AT e_t_edo3b553 ASSIGNING <fs_e_t_edo3b553>. "<---ЦИКЛ СУММИРОВАНИЯ ПРОМЕЖУТОЧНЫХ ИТОГОВ
l_efi00003 = l_efi00003 + <fs_e_t_edo3b553>-efi00003. "EFI00003

ENDLOOP.

APPEND LINES OF e_t_edo3b553 TO e_t_all_edo3b553.
BREAK-POINT.
ENDWHILE.
*
**загрузкаврасширеннуюструктуру
*
"e_t[] = e_t_all[].
*
LOOP AT e_t_edo3b553[] ASSIGNING <ls_ds_edo3b553>.
APPEND INITIAL LINE TO lt_edo3b553 ASSIGNING <ls_ds_edo3b553_ext>.
MOVE-CORRESPONDING <ls_ds_edo3b553> TO <ls_ds_edo3b553_ext>.ENDLOOP.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 13, 2017 at 12:06 PM

    I watched LISTCUBE in debugging. SAP in transaction LISTCUBE uses FM RSDRC_INFOPROV_READ. Can anyone use this FM when reading data from the info provider? Are there examples of reading data from Info-Providers to FM data?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 02, 2017 at 06:54 PM

    Solution:

    ATR1 TYPE /bic/oietr1,

    wa1_edo3b553-chanm = 'ECTLS0010__ETR1'.” Аtribute navigation
    wa1_edo3b553-chaalias = 'ATR1'.
    wa1_edo3b553-orderby = 0.
    INSERT wa1_edo3b553 INTO TABLE pi_th_sfc_edo3b553.

    Add comment
    10|10000 characters needed characters exceeded