10-25-2007 5:50 PM
Hi geeks ,
I want to show a different selection parameters default value depending on sy-date , is there a way to do that ? .
for example : in pseudo code
if sy-date > 01.01.2007
ARCHIVO LIKE RLGRAP-FILENAME DEFAULT 'C:\' OBLIGATORY.
else
ARCHIVO LIKE RLGRAP-FILENAME DEFAULT 'D:\' OBLIGATORY.
Message was edited by:
Ali Sanchez
10-25-2007 6:02 PM
Hi Ali,
if you mean selection parameters on a report selection-screen.
- you can pre-fill them for example at event INITIALIZATION.
- or you can let them fill from variables from table TVARVC.
- and some other possibilities.
hope this helps
Hans
10-25-2007 5:53 PM
if sy-datum gt '20070101'.
ARCHIVO LIKE RLGRAP-FILENAME DEFAULT 'C:\' OBLIGATORY.
else.
ARCHIVO LIKE RLGRAP-FILENAME DEFAULT 'D:\' OBLIGATORY.
endif.
10-25-2007 6:02 PM
Hi Ali,
if you mean selection parameters on a report selection-screen.
- you can pre-fill them for example at event INITIALIZATION.
- or you can let them fill from variables from table TVARVC.
- and some other possibilities.
hope this helps
Hans
10-26-2007 2:57 PM
Thanks , I did the following code , But It doesn´t work very well , for sure, I getting an error :
INITIALIZATION.
SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
PARAMETERS:
if sy-datum gt '20080101'.
moneda LIKE BKPF-WAERS DEFAULT 'VEF' OBLIGATORY.
else.
moneda LIKE BKPF-WAERS DEFAULT 'VEB' OBLIGATORY.
endif.
SELECTION-SCREEN: END OF BLOCK B2.
10-26-2007 3:04 PM
hi,
write like this.
PARAMETERS:moneda LIKE BKPF-WAERS OBLIGATORY.
INITIALIZATION.
if sy-datum gt '20080101'.
moneda = 'VEF'.
else.
moneda = 'VEB'.
endif.
rgds,
bharat.
10-25-2007 6:05 PM
Hi Ali,
Have you tried filling the value in parameter in INITIALIZATION event.
Regards,
Atish
10-26-2007 3:03 PM
Hi,
Use the follwoing code
PARAMETERS: ARCHIVO LIKE RLGRAP-FILENAME.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
if screen-name = 'ARCHIVO'.
if sy-date gt '20070101'
archivo = 'C:\'.
screen-required = 1
MODIFY SCREEN..
else
archivo = 'D:\'.
screen-required = 1.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Regards,
Sesh
10-26-2007 3:05 PM
You can do a initial value check for that field.
initialization.
if p_date is initial.
p_date = sy-datum + 7.
endif.
This way the date will be set to date + 7 only if the date parameter is initially empty.