‎2021 Feb 08 6:16 PM
Hi,
Is it possible to do alpha conversion on Internal table column using |{ variable alpha = in}| ?
‎2021 Feb 08 6:41 PM
Something like this?
converted_table = VALUE #( FOR unconverted
IN unconverted_table
( column_a = |{ unconverted-column_a ALPHA = IN }| )
).
‎2021 Feb 08 6:41 PM
Something like this?
converted_table = VALUE #( FOR unconverted
IN unconverted_table
( column_a = |{ unconverted-column_a ALPHA = IN }| )
).
‎2021 Feb 09 8:41 AM
Thanks Patrick,
I have tried this logic and it worked. But, all other fileds are blank in converted table
‎2021 Feb 09 8:45 AM
You have to add the other columns as well, for columns where the values don't have to be changed, you just map them like "column_b = unconverted-column_b", etc..
‎2021 Feb 09 9:09 AM
Instead of hardcoding the columns, Is that can achievable with Move corresponding between the converted and unconverted tables ?
I added the below statement. It is moveing the records but the converted values are getting blank.
converted_table = CORRESPONDING #( unconverted_table EXCEPT column_a)
‎2021 Feb 09 8:46 AM
‎2021 Feb 09 8:51 AM
In this case you need to go field by field. How else could the logic know that it's a new field and not the ending part of the previous one?
I will remove my answer as it is not relevant.
‎2021 Feb 09 9:40 AM
Hello praveen_channa
Actually, you could try something like this.
FIELD-SYMBOLS:
<lv_field> TYPE ANY.
LOOP AT lt_table REFERENCE INTO DATA(ld_row).
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE ld_row->* TO <lv_field>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = <lv_field>
IMPORTING
output = <lv_field>.
ENDDO.
ENDLOOP.Kind regards,