Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

I have 4 chart of accounts value from SKA1 table.

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

2 REPLIES 2

girishm
Explorer
0 Kudos

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'.

Former Member
0 Kudos

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