on 08-15-2015 8:13 AM
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
Hi Murali,
Your data declaration should look like this:
DATA:
IT_T009B TYPE STANDARD TABLE OF T009B,
WA_T009B TYPE T009B. "<<<<<<<<
An alternative solution could be using Function Module LAST_DAY_IN_PERIOD_GET in the Field Routine. You don't need the Start Routine anymore. Table T009B is fully buffered, so it should not cause any performance problems.
Best regards,
Sander
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please define as : IT_TOO9B is no defined as type (it has started with data statement). So you have to use the like clause or refer the table directly using type statement.
DATA:
IT_T009B TYPE STANDARD TABLE OF T009B,
WA_T009B TYPE T009B.
Or
DATA:
IT_T009B TYPE STANDARD TABLE OF T009B.
DATA:
WA_T009B LIKE T009B.
Please define the internal table in the global declaration and clear the work area before the read statement.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.