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: 

Most-Urgent-Interface _GL balances

Former Member
0 Kudos

Hi ,

I need to extract data from COSS & cosp tables based on the given criteria and write at application server file.What I need to do is I need to Calculate debit balance and credit balance & net amount based on debit credit indicator (BEKNZ).

while calculating debit balance I am getting struck here.

I have some sample data here i am specifying.

c.code fiscal c.center GLA/C i p1 p2 p3 net

1234 2006 40051800 656928 D 1000 2000 500

1234 2006 40051800 656928 C 500 1000 100 400

1234 2006 40056001 656928 D 100 300 50 50

1234 2006 40056001 656929 C 200 400 100 -100

1234 2006 40056001 656929 C 400 600 300

1234 2006 40056001 656929 C 600 300 800

1234 2006 40056001 656929 C 100 500 900

Here I need to calculate debit balance = sum of all periods debit amnt

cridit balance = sum of all peeriods creidit amount

net = debit balance - credit balance

c.center = cost center

i = Debit credit identifier

In above scenario how can i write logic .Please have a look in to above data .

Please reply soon.

Regards

vijaya

2 REPLIES 2

andreas_mann3
Active Contributor
0 Kudos

hi,

try:

ADD COSP-WKG001 THEN COSP-WKG002 UNTIL COSP-WKG016

GIVING Debit.

Andreas

0 Kudos

HI ,

Please have a look in to thosse test data how the cost center and gl account is changing.And please suggest the logic after retrieving data in to internal table ,we will write

loop at itab.

write all the calculation statements.

end loop.

Here I am asking how to write the logic.

I know the solution which is given by you.

Regards

vijaya