<?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: Bit Array ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045763#M1968293</link>
    <description>&lt;P&gt;I'd say that sending bits/bytes to a serial port is not a common task performed in ABAP, which is a business application language. It'd be beneficial if you've explained what exactly are you trying to achieve with this. Why is this needed in SAP? &lt;/P&gt;&lt;P&gt;As Sandra noted, please use Comments instead of Answer, just like on StackOverflow.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2019 18:10:15 GMT</pubDate>
    <dc:creator>Jelena_Perfiljeva</dc:creator>
    <dc:date>2019-10-28T18:10:15Z</dc:date>
    <item>
      <title>Bit Array ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045757#M1968287</link>
      <description>&lt;P&gt;Dear Experts,&lt;/P&gt;
  &lt;P&gt;I have a requirement to send bytes array to serial port, but the legacy source code is using c# like this.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;static byte[] SOH = new byte[] { 0x01 }; 
static byte[] STX = new byte[] { 0x02 }; 
static byte[] ETX = new byte[] { 0x03 }; 
static byte[] FS = new byte[] { 0x1C }; 
static byte[] US = new byte[] { 0x1F }; 
static byte[] ESC = new byte[] { 0x1B }; 
static byte[] P = new byte[] { 0x50 };

        byte[] bytes = System.Text.Encoding.ASCII.GetBytes(msgtxt);
        _serialPort.Write(STX, 0, 1);
        _serialPort.Write(SOH, 0, 1);
        _serialPort.Write(P, 0, 1);
        _serialPort.Write(SOH, 0, 1);
        _serialPort.Write(bytes, 0, bytes.Length);
        _serialPort.Write(ETX, 0, 1);

        intValue = Int32.Parse(fourthargument);
        byte[] intBytes = BitConverter.GetBytes(intValue);
        _serialPort.Write(intBytes, 0, 1);

How do you translate this code into abap?
Thanks

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Oct 2019 05:45:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045757#M1968287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-10-28T05:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Bit Array ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045758#M1968288</link>
      <description>&lt;P&gt;You assume we can understand C#  &lt;/P&gt;&lt;P&gt;Maybe if you could read it, explain line by line the objective &lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 06:35:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045758#M1968288</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2019-10-28T06:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Bit Array ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045759#M1968289</link>
      <description>&lt;P&gt;Read the ABAP documentation, data types are explained.&lt;/P&gt;&lt;P&gt;Byte = type X of length 1&lt;/P&gt;&lt;P&gt;Bytes = type X of any fixed length or type XSTRING&lt;/P&gt;&lt;P&gt;Table of bytes = TABLE OF "type X of length 1"&lt;/P&gt;&lt;P&gt;What is your problem with that?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 06:48:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045759#M1968289</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-10-28T06:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Bit Array ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045760#M1968290</link>
      <description>&lt;P&gt;Why don't you call the C# program from ABAP?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 06:49:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045760#M1968290</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-10-28T06:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Bit Array ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045761#M1968291</link>
      <description>&lt;P&gt;the reason the data is not sent to serialport is because it's failed when trying to open the serial port&lt;/P&gt;&lt;P&gt;where I get sy-subrc = 3.&lt;/P&gt;&lt;P&gt;but when using dot net I can send the data with no problem.&lt;/P&gt;&lt;P&gt;what seems to be the problem, did you ever succussfuly open a commport using abap?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 
SET PROPERTY OF O_OBJ 'commport' =  COMMPORT.

SET PROPERTY OF O_OBJ 'settings' =  SETTINGS.

SET PROPERTY OF O_OBJ 'inputlen' = 0.

SET PROPERTY OF O_OBJ 'portopen' = 1.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Oct 2019 08:52:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045761#M1968291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-10-28T08:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Bit Array ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045762#M1968292</link>
      <description>&lt;P&gt;Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 10:24:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045762#M1968292</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-10-28T10:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Bit Array ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045763#M1968293</link>
      <description>&lt;P&gt;I'd say that sending bits/bytes to a serial port is not a common task performed in ABAP, which is a business application language. It'd be beneficial if you've explained what exactly are you trying to achieve with this. Why is this needed in SAP? &lt;/P&gt;&lt;P&gt;As Sandra noted, please use Comments instead of Answer, just like on StackOverflow.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 18:10:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bit-array-abap/m-p/12045763#M1968293</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2019-10-28T18:10:15Z</dc:date>
    </item>
  </channel>
</rss>

