Skip to Content
0
Oct 23, 2020 at 05:01 PM

Count the Number of E's before A

128 Views Last edit Oct 24, 2020 at 10:27 AM 7 rev

Hello All, I have a requirement as below to be implement in SAP DS. Below is my input table

KEY CODE

123 E 20200130

123 A 20200120

123 E 20200110

456 E 20200130

456 E 20200120

456 A 20200110

The requirement is like for each KEY, I need to count the number of E's just before the first A in that key record. So my output should look like as below

KEY O/P

123 1

456 2

Thanks in advance.