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

select options

Former Member
0 Likes
633

hi frends,

i have a requirement where i need to capture the select option fields in my report output. ie in my selection screen i have entered dates from(20/9/2007) and to(20/10/2007). i need to capture these values and display in the output. how can i do that.pls help..

5 REPLIES 5
Read only

Former Member
0 Likes
599

Try function module RS_PRINT_SELECTIONS. This has documentation maintained.

ashish

Read only

gopi_narendra
Active Contributor
0 Likes
599

You can simply use the statements WRITE.

See the ex below

TABLES: vbak.

SELECT-OPTIONS : so_vbeln FOR vbak-vbeln.

START-OF-SELECTION.
  WRITE : so_vbeln-low.
  WRITE : so_vbeln-high.

Regards

Gopi

Read only

Former Member
0 Likes
599

If your select option have value you need to jsu read and display it in output.

check to get values at runtime

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-cprog

dynumb = sy-dynnr

translate_to_upper = 'X'

TABLES

dynpfields = gt_dynfields

EXCEPTIONS

invalid_abapworkarea = 1

invalid_dynprofield = 2

invalid_dynproname = 3

invalid_dynpronummer = 4

invalid_request = 5

no_fielddescription = 6

invalid_parameter = 7

undefind_error = 8

double_conversion = 9

stepl_not_found = 10

OTHERS = 11.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'ctlpc'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 's_bukrs-low'

value_org = 'S'

TABLES

value_tab = gt_t691a

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Read only

Former Member
0 Likes
599

Simplest way is to use low & high values

If u debug n c ull find dat select options is infact a table with fields

SIGN

OPTION

LOW

HIGH

of which LOW n HIGH r the values dat u entered on the screen.

so u get these values using s_date-low and s_date-high

where s_date is ur select option

Reward all helpful answers

Regards

Read only

Former Member
0 Likes
599

Hi Rahul

Internally a select-option behaves like an internal table.

The different fields of the internal table are

SIGN Possible Values: I, E

OPTION Possible values: EQ,NE,CP,NP,GE,LT,LE,GT, BT

LOW

HIGH

So you could write the code as follows:

TABLES: vbak.

SELECT-OPTIONS : so_erdat FOR vbak-erdat.

START-OF-SELECTION.

WRITE : / so_erdat-low,

/ so_erdat-high.

Pls reward if useful.