Skip to Content
author's profile photo Former Member
Former Member

Error in Select-Option

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> .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Sep 03, 2007 at 06: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 03, 2007 at 06: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 03, 2007 at 07: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.