Application Development and Automation 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: 
Read only

SELECT OPTIONS DATE.

Former Member
0 Likes
652

Hello , I need your help , to access to every date in an interval of the select option , in order to execute a function module that use date in one of its parameters .

select-options : dat for sy-datum .

CALL FUNCTION 'ZPRUEBA''

EXPORTING

offic =

chdsk =

inicio_periodo =

FIM_PERIODO = dat "but i need here every date of the interval

  • NO_UPDATE =

  • IMPORTING

  • NR_COBRANCAS =

.

ENDSELECT.

How can I do that ? , tnhx.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
616

Hi,

U can write the coding as follows.

APPEND itab FROM date_low.

WHILE date_low LT date_high.

date_low = date_low + 1.

APPEND itab FROM date_low.

ENDWHILE.

Regards,

Jagadish

4 REPLIES 4
Read only

Former Member
0 Likes
617

Hi,

U can write the coding as follows.

APPEND itab FROM date_low.

WHILE date_low LT date_high.

date_low = date_low + 1.

APPEND itab FROM date_low.

ENDWHILE.

Regards,

Jagadish

Read only

0 Likes
616

Jagadish Avidi : excellent copy from my post !!!

Read only

JozsefSzikszai
Active Contributor
0 Likes
616

hi Ali,

you have two dates for the interval (date_low and date_high)

you also need an internal table for the dates day by day (itab)

pls. see this preudo code to get the logic:

APPEND itab FROM date_low.

WHILE date_low LT date_high.

date_low = date_low + 1.

APPEND itab FROM date_low.

ENDWHILE.

hope this helps

ec

Read only

prasanth_kasturi
Active Contributor
0 Likes
616

hi

put the function module in the loop.

data : date like sy-datum.

select-options : s_date for date.

while ( s_date-low LE s_date-high ).

CALL FUNCTION 'ZPRUEBA''

EXPORTING

offic =

chdsk =

inicio_periodo =

FIM_PERIODO = s_date-low

NO_UPDATE =

IMPORTING

NR_COBRANCAS =

.

add 1 to s_date-low.

endwhile.

reward if helpful

prasanth