2007 Sep 03 7:49 AM
Hi Experts,
In my report i need to declare a select-option . This select-option is a combination of Period and fiscal year i..e the values in the select-option should be like
<b>PPP/YYYY</b> period and year need to be separated by <b>"/".</b>
I had declared in that format. <b>Here the period starts from 001-012</b>.So when ever the User enters <b>010/2005</b> in low and <b>007/2007</b> in high it is giving an error that <b>Lower limit is greater than Higher limit</b> .
2007 Sep 03 7:56 AM
dis is b/c da period entered in lower limit 010 is greater than dat entered in upper limit 007. try giving fiscal year in format first and den period..
i.e define format as YYY/PPP..
plz reward points if it helps
2007 Sep 03 7:54 AM
Hi Raghavendra,
I think you have declared the period as char(7) or char(8). Thus, the string '010/2005' is greater than '007/2007' (because the '1' in second position of first string is greater thatn '0' in the second position of the second string.
You should have declared this select-option as a period-year instead, for example with reference to data elements EVPER, PROTKL_BIS or PROTKL_VON. This will store the period/year as YYYYMMM in internal format, and then the comparison between low-values and high-values will be OK.
I hope it helps. Best regards,
Alvaro
2007 Sep 03 7:56 AM
dis is b/c da period entered in lower limit 010 is greater than dat entered in upper limit 007. try giving fiscal year in format first and den period..
i.e define format as YYY/PPP..
plz reward points if it helps
2007 Sep 03 8:13 AM
Technically, I think you could actually achive this with the use of a custom data domain and on that domain refer to a custom conversion exit...this would mean that the value typed by the user in "PPP/YYYY" format could be converted immediately into "YYYYPPP" or whatever internally before screen validation kicks in... e.g. (logic below needs more work!!):
function conversion_exit_zppyy_input.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(INPUT)
*" EXPORTING
*" REFERENCE(OUTPUT)
*"----------------------------------------------------------------------
*
* Data should be in form PPP/YYYY
*
data:
l_ppp(3) type c,
l_yyyy(4) type c.
output = input.
*" add some validation here...
split output at '/'
into l_ppp l_yyyy.
*" add more validation here
if sy-subrc is initial.
*" make it into YYYYPPP format
concatenate l_yyyy l_ppp into output.
endif.
endfunction.
You'd probably need an equivalent 'conversion_exit_zppyy_output" function too.
The question remaining in my mind is what you are going to do with the values once you have them in the range table...? And what if user inputs wildcards etc?
Jonathan