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

Modifying data in select options

ABAPER_P
Participant
0 Likes
6,343

I want to modify the data in the select option

My select option is

SELECT-OPTIONS   :   p_char  FOR  cabn-atnam  NO INTERVALS.

I don’t want to modify the sign option values I want to maodify only the low value.

I am call conversion routine here I am passing p_char-low value to FM it will return internal number output will be stored in lv_atinn1. I want to modify the only p_char-low. Pls look below help me out

Here my modify is now working….

    LOOP AT p_char.
CLEAR lv_atinn1.
CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
EXPORTING
input  = p_char-low
IMPORTING
output = lv_atinn1.
IF sy-subrc EQ 0.
*       MODIFY TABLE p_char ASSIGNING p_char-low  lv_atinn1  INDEX sy-tabix .
MODIFY  p_char FROM lv_atinn1 INDEX sy-tabix TRANSPORTING  p_char.
APPEND lv_atinn1 TO it_characteristics2.
ENDIF.
ENDLOOP. 

7 REPLIES 7
Read only

archanapawar
Contributor
0 Likes
2,384

Why do you want to modify select option? You can populate a range or new internal table with converted value, so you can use it further for your data fetching logic.

Read only

0 Likes
2,384

I want to modify because I am using select query in the logic how to incorporate this logic here

  But there is conversion routine present for input values from the screen

SELECT    objek
atinn
atzhl
mafid
klart
adzhl
atwrt
FROM ausp
INTO TABLE it_ausp
FOR ALL ENTRIES IN it_characteristics1
WHERE objek IN s_matnr  AND atinn EQ it_characteristics1-atinn AND atinn IN p_char.

Read only

0 Likes
2,384

Hi,

MODIFY  p_char FROM lv_atinn1 INDEX sy-tabix.

Read only

0 Likes
2,384

if i put above code both sign and  options are becomes zero.

Read only

0 Likes
2,384

Hi,

Try it as below. It will work.

Loop at p_char.

*- call your FM for conversion

p_char-low = lv_atinn1.

Modify p_char index sy-tabix transporting low.

Endloop.

Read only

Maciej_DomagaBa
Contributor
0 Likes
2,384

I guess you mean this:

IF sy-subrc EQ 0.

  p_char-low = lv_atinn1.

  MODIFY p_char.

ENDIF.

Read only

Former Member
0 Likes
2,384

Hi ABAPER P,

You can use below code.

 

 

LOOP AT p_char.
  CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
   EXPORTING
input = p_char-low
IMPORTING
output = p_char-low.
IF sy-subrc EQ 0.
MODIFY p_char FROM p_char INDEX sy-tabix.
APPEND p_char-low TO it_characteristics2.
ENDIF.
ENDLOOP.

Regards,

Pravin