Application Development 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: 

Unicode into Non-Unicode - Urgent !!!

raja_thangamani
Active Contributor
0 Kudos
158

Hi All,

I'm facing problem with Unicode & non-unicode conversion. I have created the BAPI which takes the Unicode as a input in a structure format.

But i need to convert this data into Non-unicode so that SAP can understand. Could anybody tell me how to convert it to non-unicode struture. Through Class CL_ABAP_CONV_IN_CE, i can convert only one field at at time. i am looking for some input how to convert the whole struture in single step conversion.

And I promise to return and reward the answers.

Raja T

1 ACCEPTED SOLUTION

christian_wohlfahrt
Active Contributor
0 Kudos
73

Hi Raja,

probably there is no structure conversion function - because general conversion is not supported (there might be numbers inside!) and field for field access on structures is a 'higher' function.

If no one finds a function, just do it on your own:


do.
  n = sy-index.
  assign component n of structure l_source to <f1>.
  assign component n of structure l_target to <f2>.
  if sy-subrc ne 0.
    exit.
  endif.
  call conversion... <f1> <f2>.
enddo.

Regards,

Christian

1 REPLY 1

christian_wohlfahrt
Active Contributor
0 Kudos
74

Hi Raja,

probably there is no structure conversion function - because general conversion is not supported (there might be numbers inside!) and field for field access on structures is a 'higher' function.

If no one finds a function, just do it on your own:


do.
  n = sy-index.
  assign component n of structure l_source to <f1>.
  assign component n of structure l_target to <f2>.
  if sy-subrc ne 0.
    exit.
  endif.
  call conversion... <f1> <f2>.
enddo.

Regards,

Christian