<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Conversion from LRAW to String in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362171#M806751</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello prosenjit ,&lt;/P&gt;&lt;P&gt;I have tried to research those BAPIs. but i have no idea.&lt;/P&gt;&lt;P&gt;can you give me one example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Feb 2008 14:19:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-01T14:19:09Z</dc:date>
    <item>
      <title>Conversion from LRAW to String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362166#M806746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have met a  problem about conversion LRAW to String.&lt;/P&gt;&lt;P&gt;In BW there are a table &amp;#147;/POSDW/TLOGS&amp;#148;. I will output the field &amp;#147;TRANSACTIONDATA&amp;#148; type LRAW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I output the LRAW data.&lt;/P&gt;&lt;P&gt;Are there some BAPIs? &lt;/P&gt;&lt;P&gt;I try to use WSI_RAW_TO_STRING and SCMS-BINARY_TO_STRING.  But don&amp;#146;t work.&lt;/P&gt;&lt;P&gt;One for RAW, another for binary.&lt;/P&gt;&lt;P&gt;Which for LRAW?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain the difference between LRAW and RAW.&lt;/P&gt;&lt;P&gt;or : how can i convert LRAW to RAW?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yaning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Yaning Liu on Feb 1, 2008 2:23 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 11:53:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362166#M806746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T11:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from LRAW to String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362167#M806747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello experts,&lt;/P&gt;&lt;P&gt;help me.&lt;/P&gt;&lt;P&gt;how can i split the lang LRAW in one short RAW table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;P&gt;yaning&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 13:26:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362167#M806747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T13:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from LRAW to String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362168#M806748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While calling FM 'OPEN_FORM' pass the value of parameter&lt;/P&gt;&lt;P&gt;raw_data_interface = 'X'. You will be getting the raw data in spool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regs,&lt;/P&gt;&lt;P&gt;Hema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 13:28:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362168#M806748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T13:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from LRAW to String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362169#M806749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These Function Modules may come handy to you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From RAW to CHAR: RS_SCRP_FIELDS_RAW_TO_CHAR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From RAW to LRAW: SO_RAW_72_To_255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also refer to SO_RAW_CONVERT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if this provides any lead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 13:58:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362169#M806749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T13:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from LRAW to String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362170#M806750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To split LRAW, please try the following function module,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOTR_SERV_STRING_TO_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prosenjit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 14:14:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362170#M806750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T14:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from LRAW to String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362171#M806751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello prosenjit ,&lt;/P&gt;&lt;P&gt;I have tried to research those BAPIs. but i have no idea.&lt;/P&gt;&lt;P&gt;can you give me one example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 14:19:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362171#M806751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T14:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from LRAW to String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362172#M806752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SOTR_SERV_STRING_TO_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module can process String. For LRAW it doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 11:51:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362172#M806752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T11:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from LRAW to String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362173#M806753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not so simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to sap library [Data Types in the ABAP Dictionary|http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21f2e5446011d189700000e8322d00/frameset.htm]:&lt;/P&gt;&lt;P&gt;1) LRAW is a data dictionary field type with a given length in bytes (minimum of 256), that must be used at the end of a structure or of a table, and it must be immediately preceded by an integer 2 bytes which gives the real used length (from 0 to the field length).&lt;/P&gt;&lt;P&gt;2) LRAW corresponds to a variable of type X in ABAP (X for hexadecimal, which means bytes/binary content).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, an LRAW field has binary content, it means that it can hold image, pdf, music, movie, or even just characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we are sure it contains characters, it can be converted to a string, but we must know what codepage is used to store the characters in the LRAW. For example, if ASCII is used : letter "A" would be stored in 1 byte with hexa value '41'. If UTF16 + little endian is used, it would be stored in 2 bytes with hexa value '4100'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, when you know the codepage, you need to use classes CL_ABAP_CONV_IN_CE to convert it to a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example with utf16 + BE (big endian) which writes "AB" from original LRAW content '00410042'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  Z_UNICODE_ASCII.

  DATA e type ref to cx_root.
  DATA unicode_2_abap TYPE REF TO cl_abap_conv_in_ce.
  DATA lraw_unicode(2886) TYPE x.
  DATA lraw_unicode_length TYPE int2.
  DATA string TYPE string.
  FIELD-SYMBOLS &amp;lt;l_x&amp;gt; TYPE x.

  lraw_unicode = '00410042'. "hex code correspond to AB in UTF16 big endian
  lraw_unicode_length = 4.

  assign lraw_unicode(lraw_unicode_length) to &amp;lt;l_x&amp;gt;.

* Set codepage to be used
  TRY.
      unicode_2_abap = cl_abap_conv_in_ce=&amp;gt;create(
              encoding = '4102' "Unicode 16BE, see table TCP00
              ).
    CATCH cx_root INTO e.
      WRITE 'err1'.
  ENDTRY.

* Determine characters which correspond to utf16 BE X'00410042'
  TRY.
      unicode_2_abap-&amp;gt;convert(
            EXPORTING input = &amp;lt;l_x&amp;gt;
            IMPORTING data  = string ).
    CATCH cx_root INTO e.
      WRITE 'err2'.
  ENDTRY.

  write string.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 14:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/3362173#M806753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T14:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion from LRAW to String</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/14148520#M2042105</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;this moves the LRAW data directly to the itab.&lt;BR /&gt;&lt;BR /&gt;&lt;!--  StartFragment   --&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;DATA&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&amp;nbsp;&lt;/SPAN&gt;rawstring&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;TYPE&amp;nbsp;&lt;/SPAN&gt;/posdw/rawstring&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c_processlog&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;TYPE&amp;nbsp;&lt;/SPAN&gt;/posdw/processlog.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;SELECT&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;FROM&amp;nbsp;&lt;/SPAN&gt;/posdw/plog1s&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;FIELDS&amp;nbsp;&lt;/SPAN&gt;*&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;INTO&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;TABLE&amp;nbsp;&lt;/SPAN&gt;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1407137"&gt;@DATA&lt;/a&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;lt_log&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;LOOP&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;AT&amp;nbsp;&lt;/SPAN&gt;lt_log&amp;nbsp;&lt;SPAN class=""&gt;ASSIGNING&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;FIELD&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN class=""&gt;SYMBOL&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&amp;lt;ls_log&amp;gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;rawstring&amp;nbsp;&lt;SPAN class=""&gt;=&amp;nbsp;&lt;/SPAN&gt;&amp;lt;ls_log&amp;gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;processlogdata&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;IMPORT&amp;nbsp;&lt;/SPAN&gt;p&amp;nbsp;&lt;SPAN class=""&gt;=&amp;nbsp;&lt;/SPAN&gt;c_processlog&lt;SPAN class=""&gt;-&lt;/SPAN&gt;processlog_fd&amp;nbsp;&lt;SPAN class=""&gt;FROM&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;DATA&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;BUFFER&amp;nbsp;&lt;/SPAN&gt;rawstring&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ACCEPTING&amp;nbsp;PADDING&lt;SPAN class=""&gt;.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;endloop.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Br&lt;BR /&gt;SC&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 15:09:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-from-lraw-to-string/m-p/14148520#M2042105</guid>
      <dc:creator>wbsc</dc:creator>
      <dc:date>2025-07-09T15:09:46Z</dc:date>
    </item>
  </channel>
</rss>

