Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Need help in writing the code

Hi,

My table data is as below.

Kunnr BDAT EDAT D1 D2 D3 D4 D5

1111 2001 2002 1 2 1 2 1

1111 2003 2008 1 0 4 1 2

1111 2008 2011 1 1 1 1 1

2222 2003 2008 1 2 2 2

2222 2008 2011 1 2 1 1

Here for kunnr between begin and end date we have to caluclate the dependencies. (I.e if there is any value in D1or D2 or D3orD4 it shoulbe counted as 1. of it is zero or blank then it should not be coutned).

for Ex: for 1111 between 2001 & 2002 tot dependencies are 5.

for 1111 between 2003 & 2008 tot dependencies are 4.

in this scenario what will be the best way of writing the code. Do we need to check each and every field when counting the Sum value or and simple way to improve the performance.

Regards,

Vishnu

Edited by: Vishnuvadhan K on May 13, 2011 10:30 AM

Moderator Message: This is not a forum, where you can get your work done by others.

Edited by: kishan P on May 13, 2011 3:52 PM

Former Member
Not what you were looking for? View more on this topic or Ask a question