Skip to Content

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

Extractor Enhancement Program

First i will explain my situation. I am enhancing an extractor for BI and am trying to get a date from an internal table. The date which i am trying to find could be in any 1 of 12 fields. Let me show an the structure.

KEY-DAR01DAT01--


DAR02DAT02.............DAR12 DAT12

1--


Z4
1.21.2008
-Z2--
1.11.2008.........xx
--


xxxxxxx

2--


Z1
2.11.2008
-Z4--
3.11.2009.........xx
--


xxxxxxx

So i need to look for Z4 in the DARxx field, and then take the corresponding date from the DATxx (where 'xx' matches DARxx). In the above example for record 1, i would find Z4 in DAR01 so i would take DAT01 date '1.21.2008'. For record 2, i would find Z4 in DAR02 so i would take DAT02 date '3.11.2009.

Now this in not a hard thing to write but as an ABAP novice, i am looking for a better way to do this besides using 12 IF/ELSE statements. Does anyone have suggestions?

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