06-25-2015 8:59 AM
Hi,
I have a entry in the TVARVC table. I need to know how to assign it to the select-option by default.
eg, if i have z_vkorg as type S , low is 1000 and high is 1000 sign is I and opt is bt.
how to assign it to the select-options in the selection screen by default.
Thanks and Regards,
Muthu
06-25-2015 10:32 AM
Hi ,
This can be achieved very easily but creating a dynamic variant. While saving the variant you have an option to enter selection variable. Select the value as 'T' ( TVARVC table ) and then select the TVARVC entry using F4 in 'name of variable'. The values will be populated automatically.
~Tanmay
06-25-2015 9:20 AM
Hi,
Get the data from TVARVC into internal table and pass it to your select option in INITIALIZATION Event. Find below a sample code.
TYPES: BEGIN OF ty_tvarvc,
name TYPE rvari_vnam,
sign TYPE tvarv_sign,
opti TYPE tvarv_opti,
low TYPE tvarv_val,
high TYPE tvarv_val,
END OF ty_tvarvc.
SELECT name
sign
opti
low
high INTO TABLE lt_tvarvc
FROM tvarvc
WHERE name = ' z_vkorg'
AND type = 'S'.
Loop at lt_tvarvc in wa_tvarvc.
s_vkorg-sign = wa_tvarvc-sign.
s_vkorg-option = wa_tvarvc-opti.
s_vkorg-low = wa_tvarvc-low.
s_vkorg-high = wa_tvarvc-high.
append s_vkorg.
clear s_vkorg.
endloop.
06-25-2015 9:26 AM
06-25-2015 9:36 AM
Hi,
Thank you for the answers,
While i execute the report, then the select-options eg., vkorg must be filled with value from tvarvc table.
I tried initialization before but i am getting some RT errorr....
06-25-2015 10:15 AM
Hi,
Can you elaborate what error are you getting.
You can also do as Phillip has mentioned via saving the
Variant and selecting the variant from STVARV.
BR.
06-25-2015 10:06 AM
It depends on how you need to use this. Is it default for everybody? specific user?
You may already know, but you can create a variant that takes the values for a specific parameter or select-option from TVARV. This is done with no programming.
06-25-2015 10:32 AM
Hi ,
This can be achieved very easily but creating a dynamic variant. While saving the variant you have an option to enter selection variable. Select the value as 'T' ( TVARVC table ) and then select the TVARVC entry using F4 in 'name of variable'. The values will be populated automatically.
~Tanmay
06-25-2015 11:05 AM