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

Convert Unicode down to ASCII

bryan_cain
Contributor
0 Likes
1,637

Hi,

I have a need for an oubound interface to convert unicode data (HR master data) down to ASCII128.

Is there a standard FM or class I can use for this?

Thanks in advance.

Bryan

1 ACCEPTED SOLUTION
Read only

rainer_hbenthal
Active Contributor
0 Likes
1,292

Outbound? What kind of outbound? Why not delivering all information needed? There are tons of outbound possibilities at all.

Using idocs: nothing to do but configure the rfc connection

gui_download: nothing to do

open dataset: use legacy mode

Hi,

I have a need for an oubound interface to convert unicode data (HR master data) down to ASCII128.

Is there a standard FM or class I can use for this?

Thanks in advance.

Bryan

6 REPLIES 6
Read only

rainer_hbenthal
Active Contributor
0 Likes
1,293

Outbound? What kind of outbound? Why not delivering all information needed? There are tons of outbound possibilities at all.

Using idocs: nothing to do but configure the rfc connection

gui_download: nothing to do

open dataset: use legacy mode

Read only

0 Likes
1,292

It will be a web-service call via PI. PI will be invoked via a proxy. Unicode is not the issue with the system that will be receiving the data - that system is Unicode compliant. The downstream systems require ASCII, and I've been told that we must handle that in our interface, rather than the outbound ones from the receiving system.

So, the flow will look like this:


SAP -> PI -> Web Service -> IDV System -> Other Systems (not Unicode Compliant)

It's the last bit that is not unicode compliant. However, as mentioned above, we will not be relying on the IDV system to ensure that outbound is ASCII, we need to ensure that from the start.

Thanks for responding.

Read only

0 Likes
1,292

Standard code page conversion API is class CL_ABAP_CONV_X2X_CE (or CL_ABAP_CONV_OUT_CE). It is supplied with documentation. Lots of threads in the forum also.

Read only

0 Likes
1,292

Thank you Sandra, that is exactly what I was looking for.

Read only

0 Likes
1,292

Hi Bryan,

I have a similar requirement. Can you tell me how did you use achieve this functionality? 

Did you convert every field in the interface using the standard classes CL_ABAP_CONV_OUT_CE (for outbound from SAP) and  CL_ABAP_CONV_IN_CE (for inbound into SAP)?

Can that be achieved in PI?

Appreciate your help on this.

Thanks,

SAP HR Guy

Read only

0 Likes
1,292

Wow, this thread is a blast from the past.

I don't remember specifically what we did here (it was 7 years ago and I don't work at the same place any longer), but I am pretty sure we did not do the conversion in PI, we did it in ECC.  On the ECC side, we used CL_ABAP_CONV_OUT_CE to look for non-ascii characters before sending the proxy message to PI. 

Hope that helps.