Skip to Content

ABAP Query : Selection Screen

Hello All,

In my Infoset (ZSD_SEVKIYAT3), I used goto -> Code -> Initialization.

Because, I want to select between today and 3 months earlier.

So I used Initialization like that,

IF lv_monat = '01'.

lv_yil = lv_gjahr - 1.

s_erdat-sign = 'I'.

s_erdat-option = 'BT'.

CONCATENATE lv_yil '11' '01' INTO s_erdat-low.

s_erdat-high = sy-datum.

APPEND s_erdat.

ELSEIF lv_monat = '02'.

lv_yil = lv_gjahr - 1.

s_erdat-sign = 'I'.

s_erdat-option = 'BT'.

CONCATENATE lv_yil '12' '01' INTO s_erdat-low.

s_erdat-high = sy-datum.

APPEND s_erdat.

ELSE.

lv_ilk_monat = lv_monat - 2.

And appended the s_erdat which is my real select,on time.

My problem is, how can I run my query in my selection time ?

What must I do ?

Regards

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on May 23, 2013 at 12:32 AM

    You can create your own select options in Infoset.

    Please check extras or selections tab in infoset.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 23, 2013 at 05:29 AM

    hi tanju ,

    try this code this may be help full.

    DATA :x1(8) TYPE c,

    x2(8) TYPE c,

    x3 TYPE sy-datum.

    RANGES: r_date FOR sy-datum.

    x1 = sy-datum.

    IF x1+4(2) GT 4.

    IF x1+4(2) EQ 5 AND x1+6(2) GT 28.

    x2 = x1 - 300.

    CONCATENATE x2+0(6) '28' INTO x2.

    ELSE.

    x2 = x1 - 300.

    ENDIF.

    ELSE.

    x2 = x1 - 9100.

    ENDIF.

    x3 = x2.

    r_date-sign = 'I'. "Include

    r_date-option = 'BT'. "Between

    r_date-low = x3. "Low Value

    r_date-high = sy-datum. "High Value

    APPEND r_date.

    CLEAR :x1,x2,x3.

    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.