<?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 how to use object  value in SQL function? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-object-value-in-sql-function/m-p/12583809#M2009489</link>
    <description>&lt;P&gt;I want to query from table ztmm01 the value of column lp plus current month. So I wrote below code but it not work.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;DATA:currmonth type i.
currmonth = sy-datum+4(2).
select matnr, ( lp + currmonth ) as p1 FROM ztmm01 where zorderdate = sy-datum INTO TABLE @DATA(t1) .&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;So can I use an object in SQL function or I have to first put query result to an itab then loop it and add month value? Thx.&lt;/P&gt;</description>
    <pubDate>Wed, 25 May 2022 06:21:33 GMT</pubDate>
    <dc:creator>former_member625844</dc:creator>
    <dc:date>2022-05-25T06:21:33Z</dc:date>
    <item>
      <title>how to use object  value in SQL function?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-object-value-in-sql-function/m-p/12583809#M2009489</link>
      <description>&lt;P&gt;I want to query from table ztmm01 the value of column lp plus current month. So I wrote below code but it not work.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;DATA:currmonth type i.
currmonth = sy-datum+4(2).
select matnr, ( lp + currmonth ) as p1 FROM ztmm01 where zorderdate = sy-datum INTO TABLE @DATA(t1) .&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;So can I use an object in SQL function or I have to first put query result to an itab then loop it and add month value? Thx.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 06:21:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-object-value-in-sql-function/m-p/12583809#M2009489</guid>
      <dc:creator>former_member625844</dc:creator>
      <dc:date>2022-05-25T06:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to use object  value in SQL function?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-object-value-in-sql-function/m-p/12583810#M2009490</link>
      <description>&lt;P&gt;A database object is an artefact such as a database table, an SQL view, or a stored procedure.  As a rule, a database object is defined with the database’s DDL, e.g. with &lt;A href="https://sapabapcentral.blogspot.com/p/sap-abap-certifications.html" target="_blank"&gt;CREATE VIEW&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Read More - &lt;A href="https://blogs.sap.com/2019/02/15/tadir-object-types-and-object-descriptions-via-sql/" target="_blank"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;A href="https://blogs.sap.com/2019/02/15/tadir-object-types-and-object-descriptions-via-sql/" target="test_blank"&gt;https://blogs.sap.com/2019/02/15/tadir-object-types-and-object-descriptions-via-sql/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 09:01:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-object-value-in-sql-function/m-p/12583810#M2009490</guid>
      <dc:creator>alexis_scotts</dc:creator>
      <dc:date>2022-05-25T09:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to use object  value in SQL function?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-object-value-in-sql-function/m-p/12583811#M2009491</link>
      <description>&lt;P&gt;Please don't say "it doesn't work", explain the symptom ("it does a syntax error, whose message is ...")&lt;/P&gt;&lt;P&gt;Also please provide correct code, it seems that you typed it manually directly in the forum with many typos.&lt;/P&gt;&lt;P&gt;If you use  @  (i.e. strict syntax) then use it everywhere (currmonth, sy-datum).&lt;/P&gt;&lt;P&gt;currmonth or currentmonth?&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 09:45:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-object-value-in-sql-function/m-p/12583811#M2009491</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-05-25T09:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to use object  value in SQL function?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-object-value-in-sql-function/m-p/12583812#M2009492</link>
      <description>&lt;P&gt; @&lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt;. Ok. Looks like the reason is I didn't add  @ to the currmonth.  But normally when I miss an  @, the error message is "all hosts must be escaped with  @" but this one the error msg is "unknow column currmonth until runtime"&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 01:25:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-object-value-in-sql-function/m-p/12583812#M2009492</guid>
      <dc:creator>former_member625844</dc:creator>
      <dc:date>2022-05-26T01:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to use object  value in SQL function?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-object-value-in-sql-function/m-p/12583813#M2009493</link>
      <description>&lt;P&gt;In fact, the syntax checker can't know what currmonth can be, here it's guessing that it's merely a typo in the column name. Approximate messages are very common since the Strict SQL Syntax and Constructor Expressions, so you need to guess a lot.&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 09:09:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-object-value-in-sql-function/m-p/12583813#M2009493</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-05-26T09:09:59Z</dc:date>
    </item>
  </channel>
</rss>

