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

Re: Calculation of date difference

$
0
0

Hi Lars

 

I looked at the WINDOWS functions, It creates different partitions and do the calculations.

But I need to do subtraction between 2 issue date of the same materials.

 

Could you plz let me know how to write the below ABAP pseudo code in Native SQL.

***************************************************************

 

Internal table IT_TAB populated from a Select statement.

 

 

Loop at lt_tab into wa.

 

  if sy-index NE 1.

 

   if wa_copy-material EQ wa-material.

 

     lv_diff = wa_copy-issue_date - wa-issue_date .

 

     lv_add = lv_add + lv_diff.

 

  else.

    append wa_copy-material and lv_add.

  endif.

 

   endif.

 

  wa_copy = wa. 

 

endloop.


Viewing all articles
Browse latest Browse all 8944

Trending Articles



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