<?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: Not mutually convertible in a unicode program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433653#M1998145</link>
    <description>&lt;P&gt;Which line shows the error? &lt;/P&gt;&lt;P&gt;(I don't know where you got this code from but it's very old style ... and not even that well written for then. Global variables should never be addressed directly in a form. They should be passed as parameters. And forms are obsolete anyway).&lt;/P&gt;</description>
    <pubDate>Tue, 17 Aug 2021 11:48:29 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2021-08-17T11:48:29Z</dc:date>
    <item>
      <title>Not mutually convertible in a unicode program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433650#M1998142</link>
      <description>&lt;P&gt;New to SAP and ABAP, getting a unicode error. Below is a snippet of the code that I'm trying to fix. &lt;/P&gt;
  &lt;P&gt;I have tried&lt;/P&gt;
  &lt;P&gt;Data: APRPRV like line of i0025p&lt;/P&gt;
  &lt;P&gt;but I get the message that APRPRV has already been declared. &lt;/P&gt;
  &lt;P&gt;*****************CODE SNIPPET*****************&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;FORM cmp_0025flds.

REFRESH: aprprv, aprcur.

* add prv &amp;amp; cur appraisals by offsets to data flds
w-aproff = 110. "initial offset
DO 6 TIMES. "could be up to 6 sets

* lod prv appraisal set
aprprv = i0025p+w-aproff(8).
APPEND aprprv.

* lod cur appraisal set
aprcur = i0025c+w-aproff(8).
APPEND aprcur.

* increment offset within set
ADD +8 TO w-aproff.

ENDDO.

* for each prv appraisal set having data
LOOP AT aprprv WHERE krt NE space.
w-seq = sy-tabix.

* read prv &amp;amp; cur appraisal data flds using set offsets
READ TABLE aprprv INDEX sy-tabix.
READ TABLE aprcur INDEX sy-tabix.

* compare prv to cur for difference; prt differences
IF aprprv NE aprcur.
w-fldchgmade = on.
WRITE: /08 'PRV' INTENSIFIED NO-GAP, 12 w-seq INTENSIFIED,
14 aprprv-krt, 19 aprprv-pkt, 29 aprprv-ksu,
60 'CUR' INTENSIFIED NO-GAP, w-seq INTENSIFIED,
66 aprcur-krt, 71 aprcur-pkt, 81 aprcur-ksu.
ENDIF.

ENDLOOP.

ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;*****************CODE SNIPPET*****************&lt;/P&gt;
  &lt;P&gt;This is the code in the report that feeds to the previous snippet&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;*  strucs for internal infotyp arrays
DATA:
  BEGIN OF aprcur OCCURS 0,     "to compare prv vs cur
    krt TYPE bukrt,
    pkt TYPE bupkt,
    ksu TYPE buksu,
  END OF   aprcur,
  BEGIN OF aprprv OCCURS 0,     "to compare prv vs cur
    krt TYPE bukrt,
    pkt TYPE bupkt,
    ksu TYPE buksu,
  END OF   aprprv,
  BEGIN OF apr,
    krt TYPE bukrt,
    pkt TYPE bupkt,
    ksu TYPE buksu,
  END OF   apr.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I've gone through many of the previous answered questions, not sure if maybe because the responses are 10 years old, or I just don't have enough knowledge of where to proprely declare. Any help will be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 17:09:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433650#M1998142</guid>
      <dc:creator>former_member1210273</dc:creator>
      <dc:date>2021-08-16T17:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Not mutually convertible in a unicode program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433651#M1998143</link>
      <description>&lt;P&gt;Thank you for formatting the code nicely.&lt;/P&gt;&lt;P&gt;I'm not sure what message is your question about (either "Not mutually convertible in a unicode program" or "APRPRV has already been declared"). I guess you have the first syntax error, and you tried to fix it and got another message.&lt;/P&gt;&lt;P&gt;About the first one, I think it's because of all lines of this kind because i0025p is a structure, so you should access by using its components instead of positioning by offset (difficult to know what position 110 corresponds to...):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;aprprv = i0025p+w-aproff(8).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;By trying to declare again APRPRV, you don't address the syntax error (and you provoke another error).&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 18:59:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433651#M1998143</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-08-16T18:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Not mutually convertible in a unicode program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433652#M1998144</link>
      <description>&lt;P&gt;I'm sorry if I'm not explaining correctly. What I'm trying to solve is the unicode error. I have researched the Q&amp;amp;A here and most of the solutions point to declaring the structure, I tried that, and of course it errored. &lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 10:38:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433652#M1998144</guid>
      <dc:creator>former_member1210273</dc:creator>
      <dc:date>2021-08-17T10:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Not mutually convertible in a unicode program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433653#M1998145</link>
      <description>&lt;P&gt;Which line shows the error? &lt;/P&gt;&lt;P&gt;(I don't know where you got this code from but it's very old style ... and not even that well written for then. Global variables should never be addressed directly in a form. They should be passed as parameters. And forms are obsolete anyway).&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 11:48:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433653#M1998145</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-08-17T11:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Not mutually convertible in a unicode program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433654#M1998146</link>
      <description>&lt;P&gt;Please don't click "Answer", it's reserved to solutions, instead use "Comment" (see texts explaining what they are about).&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 12:08:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433654#M1998146</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-08-17T12:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Not mutually convertible in a unicode program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433655#M1998147</link>
      <description>&lt;P&gt;This code is very old, we are in the mist of an upgrade and need to correct the unicode before moving forward, so rewriting at the moment isn't on the table. &lt;/P&gt;&lt;P&gt;The error is on this line:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;aprcur = i0025c+w-aproff(8).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Aug 2021 12:50:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433655#M1998147</guid>
      <dc:creator>former_member1210273</dc:creator>
      <dc:date>2021-08-17T12:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Not mutually convertible in a unicode program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433656#M1998148</link>
      <description>&lt;P&gt;Also at this line as well:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;aprprv = i0025p+w-aproff(8).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Aug 2021 12:51:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433656#M1998148</guid>
      <dc:creator>former_member1210273</dc:creator>
      <dc:date>2021-08-17T12:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Not mutually convertible in a unicode program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433657#M1998149</link>
      <description>&lt;P&gt;Often HR programs use some dummy field as a parameter referencing any infotype, that can trigger some Unicode errors.
SAP provided a class (CL_HR_PNNNN_TYPE_CAST) to convert those dummy to/from the actual ddic structure (or you can play yourself with assign statement)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;" I suppose the I0025p/c fields refer to Infotype 0025
  DATA: pa0025 TYPE pa0025.
  call method cl_hr_pnnnn_type_cast=&amp;gt;prelp_to_pnnnn
    exporting
      prelp = i0025p
    importing
      pnnnn = pa0025.
  aprprv-krt = pa0025-krt01. " etc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;NB: If you feel confident enough, you can also play with some ASSIGN pa0025-comp1 INCREMENT inc TO &amp;lt;sub&amp;gt; to loop between group of subfield krt/plt/ksu.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 12:55:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-mutually-convertible-in-a-unicode-program/m-p/12433657#M1998149</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2021-08-17T12:55:36Z</dc:date>
    </item>
  </channel>
</rss>

