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-option

Former Member
0 Likes
1,231

Hi all,

How to use Conversion_Exit for the Select-option input.

Eg :I am using Select-option, in which i'll have to use CONVERSION_EXIT_ALPHA_INPUT before select query.

7 REPLIES 7
Read only

anversha_s
Active Contributor
0 Likes
943

hi,

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = s_option-<b>low</b>

IMPORTING

output = s_option-<b>low.</b>

similary u can put <b>high</b> there

rgds

Anver

Read only

michael-john_turner
Active Participant
0 Likes
943

Hi,

One approach is to loop over the range's internal table and call the conversion exit for the LOW and HIGH fields before you execute your SELECT.

MJ

Read only

Former Member
0 Likes
943

Hi,

Loop at S_FILED " Selection Filed

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = S_FILED-LOW

IMPORTING

output = S_FILED-LOW.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = S_FILED-HIGH

IMPORTING

output = S_FILED-HIGH.

Modify S_FILED index sy-TABIX.

ENDLOOP.

Regards

Sudheer

Read only

Former Member
0 Likes
943

Raga,

like some fields you need not to give conversion at all, in the program they work as conversion values only.

eg : s_matnr FOR mara-matnr. " Material number

-Anu

Read only

Former Member
0 Likes
943

hi RagaRam,

You can either use it in AT SELECTION-SCREEN OUTPUT.

data : v_vbeln like vbrk-vbeln.
 
     v_vbeln = '055'.

AT SELECTION-SCREEN OUTPUT.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      input         = v_vbeln             "055
    IMPORTING
      OUTPUT        = v_vbeln             "0000000055 
            .

Regards,

Santosh

Read only

Former Member
0 Likes
943

Hi,

Since SELECT OPTIONS deal with multiple entries, better way woudl be to:

select-options : s_vbeln for w_vbeln.

start-of-selection.

loop at s_vbeln.

if s_vbeln-low is not initial.

call function 'CONVERSION_EXIT_ALPHA_INPUT'.

endif.

if s_vbeln-low is not initial.

call function 'CONVERSION_EXIT_ALPHA_INPUT'.

endif.

<b>modify s_vbeln.</b>

endloop.

Read only

Former Member
0 Likes
943

Hi,

try this..

<b><b>loop at s_option.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = s_option-low

IMPORTING

output = s_option-low.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = s_option-high

IMPORTING

output = s_option-high.

modify s_option..

endloop.</b></b>

hope this helps you..

reward pts if helpful.

Rgds,

Ajith