Application Development 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: 

Abap query with constante value

Former Member
0 Kudos
87

hello,

I wish to create several abap query since tables MKPF and MSEG for the inventory mouvements. each query for a type of inventory turnover (101, 501,…), but I should not put the code movement in criteria of selection. it is necessary that the code movement should be fixed in the query. should-I declare the MSEG-BWART as a constante? where I can do it?

thank you for your assistance.

cordialy Said

4 REPLIES 4

raymond_giuseppi
Active Contributor
0 Kudos
29

Have you thought to query variant?

Regards

0 Kudos
29

I explain a little more

- create a variant with MSEG-BWART filled with the desired constant

- In variant attribute you protect/hide the select-options

- Put your variant as executed at startup in the query

Regards

Former Member
0 Kudos
29

Hi,

Variant is a good option. Here is one more stable option.

Other option is to use following Code.

RANGES : ran1 FOR MSEG-BWART.

ran1-sign = 'I'.

ran1-option = 'EQ'.

ran1-low = 101.

APPEND ran1.

ran1-sign = 'I'.

ran1-option = 'EQ'.

ran1-low = 501.

APPEND ran1.

Then use ran1 similar to select option.

Hope this will help you.

Darshan

Former Member
0 Kudos
29

Hi,

I addition to above reply. Please feel free to contact me for further info.

    • Lastly don't forget to give points to correct answer