Skip to Content
0
Former Member
Aug 15, 2015 at 07:13 AM

How to read period close date from T009B table in SAP BI 7.X

184 Views

Hi All,

I have requirement to display a period close day of the month in my report. I have added 0NUMDAY into Cube KFs list.

I need to read T009B table in transformation while loading data into Cube.

I have delacred my table as below in START ROUTINE

DATA:

IT_T009B TYPE STANDARD TABLE OF T009B,

WA_T009B TYPE IT_T009B.

I am getting the below error when I check the code

E:Type "IT_T009B" is unknown

I need to extract my t009b table into an internal table in start routine. and then need to read that in field level routine to capture period close day

read table into internal table i wrote the code as below

SELECT * FROM T009B INTO CORRESPONDING FIELDS OF TABLE IT_T009B

FOR ALL ENTRIES IN SOURCE_PACKAGE[]

WHERE

PERIV = SOURCE_PACKAGE-FISCVARNT AND

BDATJ = SOURCE_PACKAGE-FISCPER(4).

field level routine i wrote:

READ TABLE IT_T009B INTO WA_T009B WITH TABLE KEY

PERIV = SOURCE_PACKAGE-FISCVARNT

BDATJ = SOURCE_PACKAGE-FISCPER(4)

POPER = SOURCE_PACKAGE-FISCPER+5(2).

IF SY-SUBRC = 0.

RESULT = WA_T009B-BUTAG.

ENDIF.

Please help me where i need to correct my code to achieve my requirement.

thanks

Murali