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

Displaying Selection Options

Former Member
0 Likes
715

hi,

Provide me with a SAP ABAP Report on Displaying Selection Options in your report

thnks.

5 REPLIES 5
Read only

Former Member
0 Likes
694

hi,

REPORT CHAP1109.

  • Work area

TABLES CUSTOMERS.

  • Specifiying a Select-Option

SELECT-OPTIONS SNAME FOR CUSTOMERS-NAME.

  • Internal table for later use

DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100

WITH HEADER LINE.

  • Reading table entries according to a Select-Option

SELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS

WHERE NAME IN SNAME.

  • Displaying the reuslt

LOOP AT ALL_CUSTOMERS.

WRITE: / ALL_CUSTOMERS-CITY,

ALL_CUSTOMERS-NAME.

ENDLOOP.

Hope this helps u,

Regards,

Arunsri

Read only

Former Member
0 Likes
694

HI,

select-options: sel_opt for sy-datum.

.

.

.

loop at sel_opt.

perform describe_select_options using 'Date'

sel_opt-sign

sel_opt-option

sel_opt-low

sel_opt-high

changing datedesc.

write: / datedesc.

endloop.

&----


*& Form DESCRIBE_SELECT_OPTIONS

&----


form describe_select_options using

field_name type c "name to describe field (e.g. "Date")

sel_opt_sign like sel_opt-sign

sel_opt_option like sel_opt-option

sel_opt_low like sel_opt-low

sel_opt_high like sel_opt_high

changing descline type c. "line that will hold the one-line description

if sel_opt_sign = 'i'.

concatenate 'Include' field_name into descline separated by space.

else.

concatenate 'Exclude' field_name into descline separated by space.

endif.

case sel_opt_option.

when 'EQ'.

concatenate descline '=' sel_opt_low into descline

separated by space.

when 'BT'.

concatenate descline 'between' sel_opt_low 'and' sel_opt_high

into descline separated by space.

when 'NB'.

concatenate descline 'not between' sel_opt_low 'and' sel_opt_high

into descline separated by space.

when 'NE'.

concatenate descline '!=' sel_opt_low into descline

separated by space.

when 'GE'.

concatenate descline '>=' sel_opt_low into descline

separated by space.

when 'LE'.

concatenate descline '<=' sel_opt_low into descline

separated by space.

when 'GT'.

concatenate descline '>' sel_opt_low into descline

separated by space.

when 'LT'.

concatenate descline '<' sel_opt_low into descline

separated by space.

endcase.

endform. " describe_select_options

Cheers,

Chandra Sekhar.

Read only

Former Member
0 Likes
694

Hi,

the function module RS_VARIANT_CONTENTS returns a lot of info about variants of a report.

Bye, Antonino

Read only

Former Member
0 Likes
694

Hi

tables:kna1.

types:begin of itab,

kunnr type kunnr,

name1 type name1_gp,

end of itab.

data: wa_itab type itab,

it_itab type standard table of itab.

select-options:so_kunnr for kna1-kunnr.

select kunnr name1 from kna1 into table it_itab

where kunnr in so_kunnr.

loop at it_itab into wa_itab.

write:/ wa_itab-kunnr,

wa_itab-name1.

endloop.

Read only

Former Member
0 Likes
694

Hi Manosh,

Try the function module Print_Selections. You can print the selection criteria on your report using this FM.