Skip to Content
0
Former Member
May 30, 2008 at 05:58 PM

How can i read user input value to my User exist

23 Views

Hi Guru's,

I am facing one problem in Variables in BPS.

I am calculating days from Month/year .I have one variable it is for Days,Second variable it is for Month/Year.

First variable is user exist (for calculating the days),Second varible is user defined variable(this is a Input to the first variable).

When i am giving the Month/Year(02/2008)variable i am getting the 29 days from the first variable.again i am changing the value of Month/Yera(03/2008) i am not getting the desired value.

my doubt is my user exist not able to read current value of variable(month/year).how can i pass my value to user exist because this value is user input value based on this value i am calculating the days and dynamically displaying the layout.

Here is the my sample code..

seq = '0000'.

ind = 0.

i_area = 'ZTEST1'.

area_var = 'ZVar2'.

PERFORM instantiate_object USING i_area

area_var

CHANGING lsr_var.

PERFORM get_current_value_of_variable

USING lsr_var

CHANGING lto_value.

READ TABLE lto_value INTO lso_value index 1 .

i_month = lso_value-low.

iv_month = i_month+4(2).

iv_year = i_month(4).

concatenate iv_year iv_month '01' into iv_date.

begindate = iv_date.

below bracket code calculating the leap year

( IF iv_date+4(2) = lc_feb.

lv_hlp_date_year = iv_date+0(4).

lv_hlp_rest = lv_hlp_date_year MOD 4.

IF lv_hlp_rest = 0.

EV_DAYS = lc_days_29.

lv_hlp_rest = lv_hlp_date_year MOD 100.

IF lv_hlp_rest = 0.

lv_hlp_rest = lv_hlp_date_year MOD 400.

IF lv_hlp_rest NE 0.

EV_DAYS = lc_days_28.

ENDIF.

ENDIF.

ELSE.

EV_DAYS = lc_days_28.

ENDIF.)

ELSE.

below bracket code calculating the days

( CASE iv_date+4(2).

WHEN lc_jan. EV_DAYS = lc_days_31.

WHEN lc_mar. EV_DAYS = lc_days_31.

WHEN lc_may. EV_DAYS = lc_days_31.

WHEN lc_jul. EV_DAYS = lc_days_31.

WHEN lc_aug. EV_DAYS = lc_days_31.

WHEN lc_oct. EV_DAYS = lc_days_31.

WHEN lc_dec. EV_DAYS = lc_days_31.

WHEN lc_apr. EV_DAYS = lc_days_30.

WHEN lc_jun. EV_DAYS = lc_days_30.

WHEN lc_sep. EV_DAYS = lc_days_30.

WHEN lc_nov. EV_DAYS = lc_days_30.

WHEN OTHERS. CLEAR EV_DAYS.

ENDCASE.)

ENDIF.

data: st_date(2) type c.

st_date = '01'.

ind = 0.

ind = ind + 1.

here i am passing the low value and high value.

yto_charsel-chanm = '0CALDAY'.

yto_charsel-seqno = 1.

yto_charsel-sign = 'I'.

yto_charsel-opt = 'EQ'.

yto_charsel-LOW = st_date.

yto_charsel-chanm = '0CALDAY'.

yto_charsel-seqno = 1.

yto_charsel-sign = 'I'.

yto_charsel-opt = 'BT'.

yto_charsel-high = ev_days.

INSERT yto_charsel INTO sto_charsel INDEX ind.

ETO_CHARSEL = sto_charsel.

lto_value = sto_charsel.

How can i pass user input value to read this exist ,some where again i have to write code or else??

This is very urgent can you help me..