We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

Re: [sap-dev] xstring to string

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from R. N. Wilhite on Apr 25 at 1:50 PM
Thanks for the full explanation. That rarely happens here!

Neal

---------------Original Message---------------
From: Stefan Vermeulen
Sent: Thursday, April 25, 2013 11:28 AM
Subject: xstring to string

Finally I managed it, struggling at some additional problems. However, for others to learn from my experiences and problems, I'll try to describe what I did:

transfer from dataset --> into a charx-Array (1Byte/char)
Fn SCMS_BIN_TO_TEXT -> convert in 2-Byte Char-Array (doesn't work with strings)
copy into String (related to previous coding)
do translations within string
copy back into char-Array (still 2 Byte)
Fn SCMS_TEXT_TO_BIN -> Convert into 1-Byte xchar
copy Result (xchar) into xstring (needed in next Fn as xstring)
Fn SCMS_XSTRING_TO_BINARY -> convert xstring into
Result ins a Binarytab with 2-byte-char, but encoded with 2 char in each double-byte. This Table can be concatenated into a string, which can be handled over into the xml conversions.

BUUUUUT: There's one more problem: If it happens (through the translations within the string), that it's an odd number of characters, then the last character in Binarytab is still in a 2-byte-character (for example, a blank, $20, would be represented as $2000). After some carryover and taking care, that the last byte of the file is also appended, I finally made it.

In case somebody likes to have the (a bit chaotical) coding, personal mail me.

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2013 Ziff Davis, Inc. and message author.
Ziff Davis, Inc. 28 E 28th Street New York, NY 10016
R. N. Wilhite  

Senior Project Manager
34 achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language