Skip to Content

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

read data from bw cube

hallow

i wont to have an example how to read data from BW CUBE

any sample will help

i reward

Regards

Tags:
Former Member
Former Member replied

REPORT ZTEST_READ_CUBE1.

*2.G_END_OF_DATA – Once the FM is executed successfully, this output

*parameter will hold the value ‘X’, means extraction completed

*successfully.

TYPES:

BEGIN OF ET_LINE,

0G_CWWTER TYPE /BI0/OIG_CWWTER,

ZOCBRDMAJ TYPE /BIC/OIZOCBRDMAJ,

ZOCBTIER TYPE /BIC/OIZOCBTIER,

END OF ET_LINE,

ET_DATA TYPE ET_LINE.

DATA: TAB_ET TYPE STANDARD TABLE OF ET_LINE

WITH DEFAULT KEY INITIAL SIZE 10.

DATA: TAB_SFC TYPE RSDRI_TH_SFC.

DATA: REC_SFC TYPE RSDRI_S_SFC.

REC_SFC-CHANM = '0G_CWWTER'.

INSERT REC_SFC INTO TABLE TAB_SFC.

REC_SFC-CHANM = 'ZOCBRDMAJ'.

INSERT REC_SFC INTO TABLE TAB_SFC.

REC_SFC-CHANM = 'ZOCBTIER'.

INSERT REC_SFC INTO TABLE TAB_SFC.

  • WHAT KEY FIGURES YOU WANT RETURNED

DATA: TAB_SFK TYPE RSDRI_TH_SFK.

DATA: REC_SFK TYPE RSDRI_S_SFK.

*REC_SFK-KYFNM = 'ZOKCOUNT'.

*INSERT REC_SFK INTO TABLE TAB_SFK.

  • WHERE YOU SET THE PARAMETERS/FILTERS.

DATA: REC_RANGE TYPE RSDRI_S_RANGE.

DATA: TAB_RANGE TYPE RSDRI_T_RANGE.

CLEAR REC_RANGE.

REC_RANGE-CHANM = '0G_CWWTER'.

REC_RANGE-SIGN = 'I'.

REC_RANGE-COMPOP = 'EQ'.

REC_RANGE-LOW = '1560'.

*REC_RANGE-HIGH = '1700'.

APPEND REC_RANGE TO TAB_RANGE.

CLEAR REC_RANGE.

REC_RANGE-CHANM = 'ZOCBRDMAJ'.

REC_RANGE-SIGN = 'I'.

REC_RANGE-COMPOP = 'BT'.

REC_RANGE-LOW = '423'.

REC_RANGE-HIGH = '520'.

APPEND REC_RANGE TO TAB_RANGE.

DATA: LIN_COUNT TYPE I.

DATA: FIRST_CALL TYPE RS_BOOL.

FIRST_CALL = 'X'.

CALL FUNCTION 'RSDRI_INFOPROV_READ'

EXPORTING

I_INFOPROV = 'ZCBMDREL'

I_TH_SFC = TAB_SFC

I_TH_SFK = TAB_SFK

I_T_RANGE = TAB_RANGE

  • I_TH_TABLESEL =

  • I_T_RTIME =

  • I_REFERENCE_DATE = SY-DATUM

  • I_ROLLUP_ONLY = RS_C_TRUE

  • I_T_REQUID =

  • I_SAVE_IN_TABLE = ' '

  • I_TABLENAME =

  • I_SAVE_IN_FILE = ' '

  • I_FILENAME =

  • I_PACKAGESIZE = 1000

  • I_MAXROWS = 0

  • I_AUTHORITY_CHECK = RSDRC_C_AUTHCHK-READ

  • I_CURRENCY_CONVERSION = 'X'

  • I_USE_DB_AGGREGATION = RS_C_TRUE

  • I_USE_AGGREGATES = RS_C_TRUE

  • I_READ_ODS_DELTA = RS_C_FALSE

  • I_CALLER = RSDRS_C_CALLER-RSDRI

  • I_DEBUG = RS_C_FALSE

  • I_CLEAR = RS_C_FALSE

IMPORTING

E_T_DATA = TAB_ET

  • E_END_OF_DATA =

  • E_AGGREGATE =

  • E_SPLIT_OCCURRED =

  • E_T_MSG =

CHANGING

C_FIRST_CALL = FIRST_CALL

  • 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

  • OTHERS = 12

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

DESCRIBE TABLE TAB_ET LINES LIN_COUNT.

WRITE : LIN_COUNT.

Thanks

Mahesh

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