Skip to Content

Exit Variable to use with 0CALMONTH and 0CALDAY

Hi Experts!

- In the query I have a variable(0CALMONTH) "Manual Input" that the user put the value like interval.

Example: 01.2011 - 03.2011.

- I have a characteristic 0CALDAY "delivery date"(example: 01.02.2011, 27.06.2011...) wich must be restricted into this interval.

How can I do that? Is it the best way to use exit variable?

Tks!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 17, 2011 at 06:39 PM

    To get a range variable for 0CALDAY you do not need an exit variable. You simply need to use an existing one provided by SAP like 0I_DAYIN or create a new one of your own.. Good Luck

    Add a comment
    10|10000 characters needed characters exceeded

    • transaction smod enhancement RSR00001

      CASE I_VNAM.
      
      * Calendar YTD Variable
        WHEN 'Z_VAR_03'.
          CLEAR W_L_S_RANGE.
          W_THIS_DATE = SY-DATUM.
          W_THIS_MONTH = W_THIS_DATE(6).
          W_L_S_RANGE-HIGH = W_THIS_MONTH.
          CONCATENATE W_THIS_MONTH(4) '01' INTO W_LAST_MONTH.
          W_L_S_RANGE-LOW = W_LAST_MONTH.
          W_L_S_RANGE-SIGN = 'I'.
          W_L_S_RANGE-OPT = 'BT'.
          APPEND W_L_S_RANGE TO E_T_RANGE.
      
      
      * Calendar Prior YTD Variable
        WHEN 'Z_VAR_04'.
          CLEAR W_L_S_RANGE.
          W_THIS_DATE = SY-DATUM.
          W_THIS_YEAR = W_THIS_DATE(4).
          W_THIS_MONTHONLY = W_THIS_DATE+
      etc...  etc...
      

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.