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

date range in function module

Former Member
0 Likes
2,721

Hi guys,

i have a selection screen where i need to give range of date.

say from 01.01.1998 to 01.02.2007.

i need to pass this date range to 'Z' funtion module how can i do it.

do i need to define it in tables declaration. if yes what will be the reference type of this field.

I want this range of dates in function module.

Please explain.

3 REPLIES 3
Read only

former_member225631
Active Contributor
0 Likes
1,282

If you had defined this date selection range, supply the s_option-low s_option-high values to function modules. Otherwise read the name of the low high field names using F1 tehcnical info. Simply supply these names while calling function modlues.

Read only

Former Member
0 Likes
1,282

Hi,

There are some standard structures existing in R/3 with fields low,high,sign,option. For example there is one standard structure existing for MATNR. Right now i am not able to recollect the structure name. Similarly search for 'date'. I am sure some structures does exist. Since your declaration is Date datatype and it is a select-option then you can pass this to the function module in tables parameter by referencing that existing standard structure for Date.

thanks,

sksingh

Read only

Former Member
0 Likes
1,282

Hi ahmed

Let us assume s_date is the select option for the date range defined like

DATA: s_date for p0001-begda.

Now while calling the FM pass the s_date-low and s_date-high as 2 parameters for the FM.In the FM create 2 parameters begda and endda of type begda. Use the low value and high value in the FM to populate the range table and u can use this range table for further processing of the dates in the FM.The range table can be forwarded as follows:

r_date-low = begda.

r_date-high = endda.

also provide the sign and options for the ranges table.