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

Conversion type X to type C

Former Member
0 Likes
1,283

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
Read only

Former Member
0 Likes
547

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

Read only

0 Likes
547

Sounds genious. I'll try tonight

thanks

hs