<?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: Open SQL access to DAYDATE field in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-access-to-daydate-field/m-p/11100646#M1903166</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexey,&lt;BR /&gt;as the dump mentions, the DB type and the ABAP type are not compatible. Daydate like '2015-01-01' is not compatible to DATS '20150101'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you would have to convert daydate (or to be more precise, the type CS_DAYDATE) to a compatible type for ABAP DATS. As this is hardly possible within Open SQL (at least in the current version), the question is, whether you can already modify the date at DB level, before reading it from the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, why you got a DAYDATE type in zbseg2 (not a copy of BSEG, right?). Because in BSEG I know the DATS are persisted to NVARCHAR(8) fields. You might want to model it the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;&amp;nbsp; Jasmin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jun 2015 09:12:08 GMT</pubDate>
    <dc:creator>jasmin_gruschke</dc:creator>
    <dc:date>2015-06-15T09:12:08Z</dc:date>
    <item>
      <title>Open SQL access to DAYDATE field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-access-to-daydate-field/m-p/11100645#M1903165</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;I have some table in HANA with DAYDATE field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create table zbseg2 (f1 daydate,f2 integer);&lt;/P&gt;&lt;P&gt;insert into zbseg2 values ('2012-03-01', 100);&lt;/P&gt;&lt;P&gt;insert into zbseg2 values ('2012-03-02', 200);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have secondary connection from ABAP application server to HANA named hb1_test. In application server table ZBSEG2 described in data dictionary like this&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="1"&gt;Field name&lt;/TD&gt;&lt;TD colspan="1"&gt;Type&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F1&lt;/TD&gt;&lt;TD&gt;DATS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F2&lt;/TD&gt;&lt;TD&gt;INT4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next code works correct:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;REPORT &lt;/SPAN&gt;zhana_zbseg2_conn&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;DATA &lt;/SPAN&gt;l_str &lt;SPAN class="L0S52"&gt;LIKE &lt;/SPAN&gt;zbseg2&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;SELECT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;SINGLE &lt;/SPAN&gt;* &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;CORRESPONDING &lt;SPAN class="L0S52"&gt;FIELDS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;l_str &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;zbseg2 CONNECTION hb1_test&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;MESSAGE &lt;/SPAN&gt;s000&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;00&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I receive first record from HANA table with correct field F1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But next code has dump as a result&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;REPORT &lt;/SPAN&gt;zhana_zbseg2_conn&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;DATA &lt;/SPAN&gt;l_str &lt;SPAN class="L0S52"&gt;LIKE &lt;/SPAN&gt;zbseg2 &lt;SPAN class="L0S52"&gt;OCCURS &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;SELECT &lt;/SPAN&gt;* &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;CORRESPONDING &lt;SPAN class="L0S52"&gt;FIELDS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;l_str &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;zbseg2 CONNECTION hb1_test&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;MESSAGE &lt;/SPAN&gt;s000&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;00&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Dump is "&lt;/SPAN&gt;Database error text: "SQL message: DB type (14) of selected column (0) and ABAP type TYPDATE (1) of target field (0) are not compatible"&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Is there a workaround for this case? May be I need to use another type in data dictionary description? I try different types but no result.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 06:28:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-access-to-daydate-field/m-p/11100645#M1903165</guid>
      <dc:creator>alexey_tarasov</dc:creator>
      <dc:date>2015-06-15T06:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Open SQL access to DAYDATE field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-access-to-daydate-field/m-p/11100646#M1903166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexey,&lt;BR /&gt;as the dump mentions, the DB type and the ABAP type are not compatible. Daydate like '2015-01-01' is not compatible to DATS '20150101'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you would have to convert daydate (or to be more precise, the type CS_DAYDATE) to a compatible type for ABAP DATS. As this is hardly possible within Open SQL (at least in the current version), the question is, whether you can already modify the date at DB level, before reading it from the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, why you got a DAYDATE type in zbseg2 (not a copy of BSEG, right?). Because in BSEG I know the DATS are persisted to NVARCHAR(8) fields. You might want to model it the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;&amp;nbsp; Jasmin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 09:12:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-access-to-daydate-field/m-p/11100646#M1903166</guid>
      <dc:creator>jasmin_gruschke</dc:creator>
      <dc:date>2015-06-15T09:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Open SQL access to DAYDATE field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-access-to-daydate-field/m-p/11100647#M1903167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jasmin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your reply.&lt;/P&gt;&lt;P&gt;In our system we have all date field for all replicated tables converted to this format DAYDATE (and BSEG too). It is a fait accompli, that I can not do anything.&lt;/P&gt;&lt;P&gt;Can you talk me in which version of ABAP it will be possible? Or may be you know release date for this version?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, Alexey.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 09:51:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-access-to-daydate-field/m-p/11100647#M1903167</guid>
      <dc:creator>alexey_tarasov</dc:creator>
      <dc:date>2015-06-15T09:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Open SQL access to DAYDATE field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-access-to-daydate-field/m-p/11100648#M1903168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexey,&lt;BR /&gt;I don't know about such a requirement (but that doesn't mean it does not exists... I just don't know about it), so I don't have any release information when such a feature will / might be available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, why have BSEG fields been converted to that data type??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;&amp;nbsp; Jasmin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 13:27:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-sql-access-to-daydate-field/m-p/11100648#M1903168</guid>
      <dc:creator>jasmin_gruschke</dc:creator>
      <dc:date>2015-06-18T13:27:00Z</dc:date>
    </item>
  </channel>
</rss>

