Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP Query : Selection Screen

tanju_lise3
Participant
0 Likes
696

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

1 ACCEPTED SOLUTION
Read only

Azeemquadri
Contributor
0 Likes
645

You can create your own select options in Infoset.

Please check extras or selections tab in infoset.

3 REPLIES 3
Read only

Azeemquadri
Contributor
0 Likes
646

You can create your own select options in Infoset.

Please check extras or selections tab in infoset.

Read only

0 Likes
645

Thank You Azeem,

Kind Regards

Read only

Former Member
0 Likes
645

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.