cancel
Showing results for 
Search instead for 
Did you mean: 

Code in DTP

Former Member
0 Kudos

Hi All,

I have Fiscal Year Characteristic in my DTP and I want to pick the FILTER value for it from a TVARVC variable. I have created a TVARVC variable ZFISCYEAR which has the value for the year. How can i code this in my DTP. This is what i see when i DTP Routine

data: l_idx like sy-tabix.

read table l_t_range with key

fieldname = ' '.

l_idx = sy-tabix.

*....

if l_idx <> 0.

modify l_t_range index l_idx.

else.

append l_t_range.

endif.

p_subrc = 0.

My InfoObject is ZYEAR and TVARVC Variable is ZFISCYEAR, could someone give the exact code to put in the DTP.

Thanks

Rashmi.

Accepted Solutions (1)

Accepted Solutions (1)

shanthi_bhaskar
Active Contributor
0 Kudos

Rashmi,

please put in type 6 in selection and give routine name in the field ZYEAR.

and put below code.


tables: tvarvc.
data: l_sign(1),
      l_opt(2),
      l_low(45),
      l_high(45).

read table l_t_range with key
     fieldname = 'ZYEAR' .

select SINGLE sign opti low high from tvarvc
       into (l_sign,l_opt,l_low,l_high)
       where name = 'ZFISCYEAR'.

l_t_range-sign = l_sign.
l_t_range-option = l_opt.
l_t_range-low = l_low.
l_t_range-high = l_high.

modify l_t_range index sy-tabix.

Answers (0)