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: 

Reg.. Select-options -values

Former Member
0 Kudos

Hi experts,

I have three select-options in a selection-screen like s_vbeln for vbak-vbeln,

s_vkorg for vbak-vkorg,

s_kunnr for vbak-kunnr.....

I want to display the values entered in the select-options of the selection-screen on the report.

eg!..

If user enters the multiple values in the select-options how do we display all the multiple values on the report.

15 REPLIES 15

Former Member
0 Kudos

Hi,

SELECT ....

.....

FROM VBAK

INTO TABLE ITAB

WHERE VBELN IN S_VBELN

AND VKORG IN S_VKORG

AND KUNNR IN S_KUNNR

And to display the select as of enterd in sleection screen .

LOOP AT S_VBELN.

WRITE: S_VBELN-LOW.

ENDLOOP.

As the select options behaves as a internal table or a range table.

Hope this helps.

plz reward if useful.

thanks,

dhanashri.

Edited by: Dhanashri Pawar on Jul 24, 2008 7:29 AM

Edited by: Dhanashri Pawar on Jul 24, 2008 7:31 AM

Former Member
0 Kudos

Hi

Selection options act as an Internal Tables .

Lets say u have entered 5 values in your select options then

Loop at s_kunnr .

write : s_kunnr-low

endloop .

Hope your problem is solved with this

Regards

Hitesh

Former Member
0 Kudos

Each select options is like an internal table with header line.

so do loop and write like below:

loop at s_vbeln.

write:/ s_vbeln-sign, s_vbeln-option, s_vbeln-low, s_vbeln-high.

clear: s_vbeln.

endloop.

do same for remaioning select options .

Former Member
0 Kudos

hi Kumar,

Loop the <s_vbeln>

write <s_vbeln>-sign

<s_vbeln>-option

<s_vbeln>-low

<s_vbeln>-high

endloop.

Select options takes care of all the selection criteria... you need not bother about the multiple values.

regards

padma

sachin_mathapati
Contributor
0 Kudos

Hi ,

For this ..fetch entries into internal table for entries entered on selection screen and display...

Check this..

selection-screen like s_vbeln for vbak-vbeln

If user enters s_vbeln-low = 0. s_vbeln-high = 99999.

select distinct vbeln into table itab_vbeln where vbeln in s_vbeln.

Regards,

Sachin M M

Former Member
0 Kudos

hi,

You have to write select Query for that.

Select distinct Vbeln

from Vabk

into table itab

where vbeln bt s_vbeln-low and s_vbeln-high.

Repeat this for the other two.

Hope this will help.

Regards

Sumit Agarwal

0 Kudos

Hii!

Check this sample code


REPORT z_sdn.
TABLES:
  vbak.

SELECT-OPTIONS:
  s_vbeln for vbak-vbeln,
  s_vkorg for vbak-vkorg,
  s_kunnr for vbak-kunnr.


WRITE:
  / s_vbeln-low,
  / s_vbeln-high,
  / s_vkorg-low,
  / s_vkorg-high,
  / s_kunnr-low,
  / s_kunnr-high.

Regards

Abhijeet

Former Member
0 Kudos

Hi,

Actualy all the select option behave as internal and stores the value entered in them. So here all the three of your select options s_vbeln, s_vkorg, s_kunnr are internal tables.

To display the value Just use LOOP AT to each of them and Write statement to print values.

Regards,

Anirban

former_member195383
Active Contributor
0 Kudos

s_vbeln , s_vkorg and s_kunnr are internal tables..

Once execute ur program in debugging mode and check the fields for this table...

U can loop in to the table and display the data...

Former Member
0 Kudos

Hi Kumar,

Selct-options not only takes care of multiple values but also contains some validations..

for paramter say p_vbeln we write select query as

select * from vbak into t_vbeln where vbeln  = p_vbeln

for select-option say s_vbeln ( as it contains multiple values ) we write select query as

select * from vbak into t_vbeln where vbeln IN s_vbeln

so please observe the difference between two queries..

and if possible check the structure of s_vbeln in debug mode so that you understand the structure of select-options.

Hope this would help you.

Regards

Narin Nandivada

Former Member
0 Kudos

Hi Kumar,

There is no need for specially selecting the values, they will be automatically get selected.

just do the normal select into an internal table and write them on the list.

SELECT s_vbeln

s_vkorg

s_kunnr

FROM vbak

INTO TABLE itab

WHERE vbeln IN s_vbeln

AND vkorg IN s_vkorg

AND kunnr IN s_kunnr.

This will select all the values in the select options.

Hope this helps you.

Regards,

Chandra Sekhar

Former Member
0 Kudos

hiii

For displaying all the values of select options, by using select query you can display that on selection screen.

it will be same as another query..as you are using that values for fetching data from database and you will use internal table also so just need to display that select option field on selection screen from them.

regards

twinkal

Former Member
0 Kudos

hi ..

you can use

Loop at s_kunnr .

write : s_kunnr-low

endloop .

Loop at s_vbeln .

write : s_vbeln-low

endloop .

Loop at s_vkorg .

write : s_vkorg-low

endloop .

hope it will help you.

regards,

Lokesh

Former Member
0 Kudos

Hi experts,

I have three select-options in a selection-screen like s_vbeln for vbak-vbeln,

s_vkorg for vbak-vkorg,

s_kunnr for vbak-kunnr.....

I want to display the values entered in the select-options of the selection-screen on the report.

eg!..

If user enters the multiple values in the select-options, it has to show all the values entered . How do we display all the multiple values on the report.

IF user enter the ranges in the select-options it has to show only the range value(From and To value). How do we display only the range (from and to value) on the report.

Former Member
0 Kudos

hi,

Plz check my earlier code.

Regards

Sumit Agarwal