05-14-2007 3:07 PM
Hi Everybody,
I have table ZZTR00T but there is no KTOPL field. I have created Internal table For ZZTR00t table ( In This table I have Account number Field (Primary Key)) . but i need to fetch the Chart of Accounts value into T_ZZTR00T internal Table .but I have TR10, TR00, XX00 and CATR chart of accounts value in SKA1-KTOPL.
but i want to fetch only TR10 value from SKA1-KTOPL into T_ZZTR00T internal table. Is there any logic for this. please give the advise for this .
Best Regards,
Ram.
05-15-2007 7:27 AM
Hi Rams
Why u hav crearted ZZTR00T custom table. Anyway u having intenal table so ne need of custom table.
Use this SQL Query, to get TR10 value.
SELECT ktopl FROM ska1 INTO CORRESPONDING FIELDS OF TABLE t_zztr00t WHERE ska1-ktopl EQ 'TR10'.
if its useful reward points.
Thanks
senthil
05-14-2007 7:29 PM
Your question is not particularly clear.
What I could infer was:
You have a Custom table ZZTR00T which does not have KTOPL (Chart of Accounts) as one of its fields.
You have an internal table T_ZZTR00T which needs to have only those GL Accounts (SAKNR) that belong to the Chart of Accounts 'TR10' from the SKA1 table.
All GL Accounts in SAP have to lie under one of the Chart of Accounts.
SELECT saknr FROM ska1 INTO CORRESPONDING FIELDS OF TABLE t_zztr00t WHERE ktopl EQ 'TR10'.
05-15-2007 7:27 AM
Hi Rams
Why u hav crearted ZZTR00T custom table. Anyway u having intenal table so ne need of custom table.
Use this SQL Query, to get TR10 value.
SELECT ktopl FROM ska1 INTO CORRESPONDING FIELDS OF TABLE t_zztr00t WHERE ska1-ktopl EQ 'TR10'.
if its useful reward points.
Thanks
senthil