Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8944

Re: Split Logic in HR ABAP

$
0
0

Hi,

the major advantage of PROVIDE - ENDPROVIDE ist it's greatest disadvantage as well.

The fields fencing the validity (usually BEGDA and ENDDA) for each involved table, will be set according to each resulting split-interval.

If this is, what you're trying to avoid, you'll have to do a nested loop.

Assuming you have two internal table A and B, both having BEGDA and ENDDA.

You then could do something like:

LOOP AT A into wa_a.

     LOOP AT B into wa_b where begda LE wa_a-endda and endda ge wa_a-begda.

*       Do something clever here

     ENDLOOP.

ENDLOOP.

 

Note, how the intervals are built by comparing the fields overcross, thus giving you in the inner loop, all entries that are at least one day valid within the interval set by the outer loop.

 

Hope it helps.

 

Best regards - Jörg


Viewing all articles
Browse latest Browse all 8944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>