Hi,
I have the following problem, I haven't yet figured out the possible solution.
I have a report from SAP with a lot of customers, in columns there are credit control area, company code, customer number, name etc. and then financial values like Outstanding, Credit Limit etc. The issue is that some of the customers are duplicated in the report as a result of not accurate Master Data. My task is to code a solution that will make a new row with the same information from A to G as in the first time of appearance of the given customer and then to sum the values for each remaining column. Then repeat until there won't be any duplicate. I am thinking about a loop of some kind, first filtering out the duplicate creating the new row and then going to the next but I am not sure if it will prove accurate.
Thanks for any help,
It's structured like that from A to S columns, example of filtered out duplicate:
[TABLE="width: 1824"]
<tbody>[TR]
[TD]CCC:Credit Cntl Area
[/TD]
[TD]ORG: Company code
[/TD]
[TD]Customer (Main)
[/TD]
[TD]Customer Name
[/TD]
[TD]Region
[/TD]
[TD]Customer (Cred.Mgmt)
[/TD]
[TD]Rep. group
[/TD]
[TD]Due
[/TD]
[TD]Outstanding
[/TD]
[TD]Credit Limit
[/TD]
[TD]Not Due
[/TD]
[TD]Overdue 1-30 days
[/TD]
[TD]Overdue 31-60 days
[/TD]
[TD]Overdue 61-90 days
[/TD]
[TD]Overdue 91-120 days
[/TD]
[TD]Overdue > 120 days
[/TD]
[TD]Bad Debt 91 - 120 (>0 x 50%)
[/TD]
[TD]Bad Debt > 120 (>0 x 100%)
[/TD]
[TD]Bad Debt
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]1000000
[/TD]
[TD]Same name
[/TD]
[TD]1
[/TD]
[TD]AAAAAAAAAAAAA
[/TD]
[TD]XXXXXXXXXXXXXXX
[/TD]
[TD]$ 0.00
[/TD]
[TD]$ 0.00
[/TD]
[TD]$ 100.00
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]$ 0.00
[/TD]
[TD][/TD]
[TD]$ 100
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]1
[/TD]
[TD]1000000
[/TD]
[TD]Same name
[/TD]
[TD]1
[/TD]
[TD]BBBBBBBBBB
[/TD]
[TD]YYYYYYY
[/TD]
[TD]$ 0.00
[/TD]
[TD]$ 0.00
[/TD]
[TD]0.00
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]$ 100.00
[/TD]
[TD][/TD]
[TD]$ 0
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have the following problem, I haven't yet figured out the possible solution.
I have a report from SAP with a lot of customers, in columns there are credit control area, company code, customer number, name etc. and then financial values like Outstanding, Credit Limit etc. The issue is that some of the customers are duplicated in the report as a result of not accurate Master Data. My task is to code a solution that will make a new row with the same information from A to G as in the first time of appearance of the given customer and then to sum the values for each remaining column. Then repeat until there won't be any duplicate. I am thinking about a loop of some kind, first filtering out the duplicate creating the new row and then going to the next but I am not sure if it will prove accurate.
Thanks for any help,
It's structured like that from A to S columns, example of filtered out duplicate:
[TABLE="width: 1824"]
<tbody>[TR]
[TD]CCC:Credit Cntl Area
[/TD]
[TD]ORG: Company code
[/TD]
[TD]Customer (Main)
[/TD]
[TD]Customer Name
[/TD]
[TD]Region
[/TD]
[TD]Customer (Cred.Mgmt)
[/TD]
[TD]Rep. group
[/TD]
[TD]Due
[/TD]
[TD]Outstanding
[/TD]
[TD]Credit Limit
[/TD]
[TD]Not Due
[/TD]
[TD]Overdue 1-30 days
[/TD]
[TD]Overdue 31-60 days
[/TD]
[TD]Overdue 61-90 days
[/TD]
[TD]Overdue 91-120 days
[/TD]
[TD]Overdue > 120 days
[/TD]
[TD]Bad Debt 91 - 120 (>0 x 50%)
[/TD]
[TD]Bad Debt > 120 (>0 x 100%)
[/TD]
[TD]Bad Debt
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]1000000
[/TD]
[TD]Same name
[/TD]
[TD]1
[/TD]
[TD]AAAAAAAAAAAAA
[/TD]
[TD]XXXXXXXXXXXXXXX
[/TD]
[TD]$ 0.00
[/TD]
[TD]$ 0.00
[/TD]
[TD]$ 100.00
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]$ 0.00
[/TD]
[TD][/TD]
[TD]$ 100
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]1
[/TD]
[TD]1000000
[/TD]
[TD]Same name
[/TD]
[TD]1
[/TD]
[TD]BBBBBBBBBB
[/TD]
[TD]YYYYYYY
[/TD]
[TD]$ 0.00
[/TD]
[TD]$ 0.00
[/TD]
[TD]0.00
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]$ 100.00
[/TD]
[TD][/TD]
[TD]$ 0
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]