Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Single values for a datum range

Former Member
0 Kudos

Hi experts,

I have a range of datum and I want lo convert it into a list of single datum values.

Con someone please help me find a function or method to convert it into single vaues?

Thanks!!!

Artur.

1 ACCEPTED SOLUTION

roberto_vacca2
Active Contributor
0 Kudos

Well in that case we have to study the solution a little much more...

So you can have whatever symbol include, exclude, greater, less, etc...

I don't think there's a function module.

You'll have to create a form , using a distinct code for each case:



LOOP AT S_OPTION.

   CASE S_OPTION-symbol.
        WHEN 'I'. "Include
              * do somthing
        WHEN 'GT'. "Greater than
              * do something.
     ...etc..
   ENDCASE.

ENDLOOP.

3 REPLIES 3

roberto_vacca2
Active Contributor
0 Kudos

HI...

without using Iany function I think you can do a thing like this:


DATA: datum_low TYPE sy-datum,
           datum_high TYPE sy-datum,
           current_date TYPE sy-datum.

DATA: BEGIN tb_datum OCCURS 0,
               fdatum  TYPE sy-datum,
           END OF tb_datum.

REFRESH tb_datum.
current_date = datum_low.


DO.
   MOVE current_date TO tb_datum-fdatum.
   APPEND tb_datum.
   CHECK current_date LE datum_high.
   current_date = current_date + 1.
ENDDO.

You can create a form or what you desire...

Hope to help...

Former Member
0 Kudos

I forgot to tell that the rango can have vaious intervals with exclude/include, not a from-to range.

For a single range I use FM DAY_ATTRIBUTES_GET.

roberto_vacca2
Active Contributor
0 Kudos

Well in that case we have to study the solution a little much more...

So you can have whatever symbol include, exclude, greater, less, etc...

I don't think there's a function module.

You'll have to create a form , using a distinct code for each case:



LOOP AT S_OPTION.

   CASE S_OPTION-symbol.
        WHEN 'I'. "Include
              * do somthing
        WHEN 'GT'. "Greater than
              * do something.
     ...etc..
   ENDCASE.

ENDLOOP.