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: 

Find all accounts never used

Former Member
0 Kudos

How can I find all accounts of the current Chart of Accounts never used, ie the accounts that have never had a credit or debt during the period prior to when using the chart of accounts?

I think I should develop a small ABAP program. Which tables and fields should I use?

Thanks

Serena

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos

You can query table GLT0. If a G/L account never had a posting, then there will not be entries for this account (if I remember correctly...), or if there is an entry, then all transactional amounts will be zero. Check it via SE16 for a known case of "never used".

Thomas

7 REPLIES 7

ThomasZloch
Active Contributor
0 Kudos

You can query table GLT0. If a G/L account never had a posting, then there will not be entries for this account (if I remember correctly...), or if there is an entry, then all transactional amounts will be zero. Check it via SE16 for a known case of "never used".

Thomas

0 Kudos

I forgot to say that we use New GL accounting. The table GLT0 is empty.

I add another question: Find all of the accounts that have had at least once a credit or a debt.

Perhaps "" SELECT DISTINCT HKONT FROM BSEG ...."? Is there something better, because BSEG is cluster table, very large.

Serena

0 Kudos

Hi,

instead of bseg try to use BSIS, with indexes for better performance.

Regards,

koolspy.

0 Kudos

Then your equivalent is FAGLFLEXT instead of GLT0. For your purpose, querying totals tables is much more efficient than querying tables with single items.

Also look for standard function modules / BAPIs that fit your requirement. Please do some research of your own, there is a lot of information available.

Thomas

0 Kudos

Someone may recommend a FM standard or a BAPI or a simple SELECT statement for my requirement: find all of the accounts that have had at least once a credit or a debt, for new GL accounting.

serena

0 Kudos

Hi Serenaaa

Have you tried doing a look up on SE37 with search term *GLBALANCE** also try FM BKK_RFC_GL_GET_ACCNT_BALANCE

regards

Prince Isaac

0 Kudos

> instead of bseg try to use BSIS, with indexes for better performance.

That will only give open items. BSAS would have to be included as well.

But as Thomas said, it's better to go with totals tables.

Rob