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: 

Conversion type X to type C

Former Member
0 Kudos
830

Hi,

It sounds easy but I can't find a solution right now.I have read a pdf document into a variable of type "xstring". Now I want to use "REPLACE" on the XSTRING.

It should look like this:

DATA: v_xstring type xstring,

REPLACE ALL OCCURRENCES OF 'XXXNAME' IN

v_xstring WITH 'myname'.

Hw do I convert a readable string into its related X-type?

Thanks

2 REPLIES 2

Former Member
0 Kudos
94

Hi,

You can try this

DATA: <FS1> TYPE X,
        CHAR(100) TYPE C.
ASSIGN X TO <FS1> CASTING TYPE C. 
MOVE <FS1> TO CHAR. 
REPLACE ALL OCCURRENCES OF 'XXXNAME' IN CHAR WITH 'NAME'.

Regards,

Satish

0 Kudos
94

Sounds genious. I'll try tonight

thanks

hs