Hi,
In one of my job I have the following rquirement.
Columns I have
COMPANY
COSTCENTER
AMOUNT
DOCUMENT
I have a dataset of few records which has devided into several documents say 950 records of each document. and each document should be in the same SAPCOMAPNY and might have different costcenters.
Suppose in my case i took sample records in 3 documents taken max document size is 2 records
COMPANY COSTCENTER AMOUNT DOCUMENT
SAP1 CC1 -300 1
SAP1 CC2 400 2
SAP2 CC2 -200 3
Now I need to balance each document with COSTCENTER wise
and no document should cross the maxof records and should be balanced at the costcenter level means net of amount on each cost center should result 0.
If any particulor COSTCENTER crosses the limit of the document size. Then those COSTCENTER records should go to the next document.
I am able to do the Balances at the costcenter level.
I need to trace the no of records per cost center of each document and if it is less than max doc size then should add all the corresponding AMOUNT fields. and make sure that AMOUNT is balanced
If COSTCENTER count is more than max size then should take only the maxsize -1 and the rest should populate to the next document and so on....
Can anybody give how to achieve this?
Regds
Aggregating at particulor column
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 82
- Joined: Fri Jun 03, 2005 5:23 am
- Location: Bangalore
- Contact:
Aggregating at particulor column
Rajasekhar
-
- Premium Member
- Posts: 82
- Joined: Fri Jun 03, 2005 5:23 am
- Location: Bangalore
- Contact: