<?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: Fiscal Year - Help needed in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year-help-needed/m-p/4408484#M1047640</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naimesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote a select statement like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE ltext FROM cskt INTO gs_sapgl_to_cim-ktext WHERE spras = 'E'  AND kokrs = gc_kokrs_1000&lt;/P&gt;&lt;P&gt;                 AND kostl = gs_sapgl_to_cim-kostl.&lt;/P&gt;&lt;P&gt;SELECT SINGLE ltext FROM csku INTO gs_sapgl_to_cim-ltext WHERE spras = 'E'  AND kstar = gs_sapgl_to_cim-kstar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I do extended code check, the errors are as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Syntax check warning&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This warning is only displayed in SLIN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;In "SELECT SINGLE ...", the WHERE condition for the key field "DATBI" does not&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;test for equality. Therefore, the single record in question is possibly not&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;unique.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Internal Message Code: MESSAGE GSB&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Syntax check warning&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This warning is only displayed in SLIN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;In "SELECT SINGLE ...", the WHERE condition for the key field "KTOPL" does not&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;test for equality. Therefore, the single record in question is possibly not&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;unique.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Internal Message Code: MESSAGE GSB&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me with this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Sep 2008 16:05:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-05T16:05:07Z</dc:date>
    <item>
      <title>Fiscal Year - Help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year-help-needed/m-p/4408482#M1047638</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;&lt;/P&gt;&lt;P&gt;I am in ECC 6.0. My Company has a 4-4-5 calender. In my selection screen, I have to default the current and previous fiscal year. For that I have called the below function module. Everything is good. But when I do a extended code check  it says &lt;/P&gt;&lt;P&gt;"Current ABAP Command is Obselete. An explicit work area is necessary in the 00 context. use "append wa to s_gjahr [sorted by]"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest me how to write the code so that my error will be solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM set_default_fiscal_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  lv_poper TYPE poper,         "Fiscal Period&lt;/P&gt;&lt;P&gt;           lv_gjahr TYPE gjahr.            "Fiscal Year&lt;/P&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;*Get current fiscal year&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_date         = sy-datum&lt;/P&gt;&lt;P&gt;      i_periv        = gc_fiscal_variant&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      e_buper        = lv_poper&lt;/P&gt;&lt;P&gt;      e_gjahr         = lv_gjahr&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      input_false    = 1&lt;/P&gt;&lt;P&gt;      t009_notfound  = 2&lt;/P&gt;&lt;P&gt;      t009b_notfound = 3&lt;/P&gt;&lt;P&gt;      OTHERS         = 4.&lt;/P&gt;&lt;P&gt;  CHECK sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Get previous fiscal year&lt;/P&gt;&lt;P&gt;  s_gjahr-low = lv_gjahr - 1.&lt;/P&gt;&lt;P&gt;  s_gjahr-high = lv_gjahr.&lt;/P&gt;&lt;P&gt;  s_gjahr-sign = 'I'.&lt;/P&gt;&lt;P&gt;  s_gjahr-option = 'BT'.&lt;/P&gt;&lt;P&gt;  APPEND s_gjahr.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " SET_DEFAULT_FISCAL_YEAR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 15:45:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year-help-needed/m-p/4408482#M1047638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-05T15:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal Year - Help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year-help-needed/m-p/4408483#M1047639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of using the header line of the S_GJAHR, use an explicit workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: la_gjahr like line of s_gjahr.
la_gjahr-low = lv_gjahr - 1.
la_gjahr-high = lv_gjahr.
la_gjahr-sign = 'I'.
la_gjahr-option = 'BT'.
APPEND la_gjahr to s_gjahr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 15:50:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year-help-needed/m-p/4408483#M1047639</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-09-05T15:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal Year - Help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year-help-needed/m-p/4408484#M1047640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naimesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote a select statement like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE ltext FROM cskt INTO gs_sapgl_to_cim-ktext WHERE spras = 'E'  AND kokrs = gc_kokrs_1000&lt;/P&gt;&lt;P&gt;                 AND kostl = gs_sapgl_to_cim-kostl.&lt;/P&gt;&lt;P&gt;SELECT SINGLE ltext FROM csku INTO gs_sapgl_to_cim-ltext WHERE spras = 'E'  AND kstar = gs_sapgl_to_cim-kstar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I do extended code check, the errors are as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Syntax check warning&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This warning is only displayed in SLIN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;In "SELECT SINGLE ...", the WHERE condition for the key field "DATBI" does not&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;test for equality. Therefore, the single record in question is possibly not&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;unique.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Internal Message Code: MESSAGE GSB&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Syntax check warning&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This warning is only displayed in SLIN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;In "SELECT SINGLE ...", the WHERE condition for the key field "KTOPL" does not&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;test for equality. Therefore, the single record in question is possibly not&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;unique.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Internal Message Code: MESSAGE GSB&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me with this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 16:05:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year-help-needed/m-p/4408484#M1047640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-05T16:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal Year - Help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year-help-needed/m-p/4408485#M1047641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both warnings say that you don't have all the primary keys in your Selection. You must have all primary key fields in the where condition to have consistent data because you are using the SELECT SINGLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. Cost Center A could has valid description on 12/31/2007 as "Test Cost Center" and Currently valid description as "Testing Exp Cost Center". Than when you run your report which invovles the Data from 2008 than you must select the description as "Testin Exp Cost Center" So, you must include the Validity date in the Selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Please open a new thread if your question doesn't match to the "Subject". This will help in better search and filter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 16:13:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year-help-needed/m-p/4408485#M1047641</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-09-05T16:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal Year - Help needed</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year-help-needed/m-p/4408486#M1047642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While using select single you need to use full key in the where clause&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here in CSKT  you missed in the primary key field DATBI and in CSKU you missed field KTOPL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the messages from SLIN is are warning and not errors&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2008 16:13:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year-help-needed/m-p/4408486#M1047642</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-09-05T16:13:58Z</dc:date>
    </item>
  </channel>
</rss>

