‎2019 Feb 21 9:43 AM
Hello together,
is it possible to fill the time range for a SQ01 seleciton screen with coding in SQ02?
The selection I need is not available in standart variant customization. I need to select LIKP-ERZET values from SYUZEIT-30min until SYUZEIT.
I tried :
SP$00002-LOW = sy-uzeit - 60
SP$00002-HIGH = sy-uzeit
in the SQ02 Coding/Initialization Page.
But since I have no experience in ABAP, this code is obviously not working.
Thanks in advance and best regards
Niklas
‎2019 Feb 21 10:24 AM
Hi Niklas,
If you want to remove 30 min from the current time, try this:
data lv_30min_less type syst-uzeit.
data lv_30min type syst-uzeit value '003000'.
lv_30min_less = sy-uzeit - lv_30min.
I hope it helps.
Cheers,
Rafael
‎2019 Feb 21 10:24 AM
Hi Niklas,
If you want to remove 30 min from the current time, try this:
data lv_30min_less type syst-uzeit.
data lv_30min type syst-uzeit value '003000'.
lv_30min_less = sy-uzeit - lv_30min.
I hope it helps.
Cheers,
Rafael
‎2019 Feb 21 12:26 PM
Hello Rafael,
thanks for your input. But how can I pass this value to my selection field?
SP$00002-LOW =.... is not working
Regards
Niklas
‎2019 Feb 22 10:52 AM
Hi Niklas
To do that, the field should be on the selection screen, and I don't think those fields are assigned in the Initialization section. I have an example that works is the Start-of-selection:
ranges my_opt for kna1-kunnr.
field-symbols <scr_opt> type standard table.
assign ('SP$00001[]') to <scr_opt>.
my_opt-sign = 'I'.
my_opt-option = 'EQ'.
my_opt-low = '0001026868'.
my_opt-high = ''.
append my_opt to <scr_opt>.Regards,
Rafael