<?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: type incompatibility between two structures in data type in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125325#M1511696</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas&lt;/P&gt;&lt;P&gt;Please help me, I tried your solution, one of the structure has currency field , another one doesnt.&lt;/P&gt;&lt;P&gt;if I try to equate them still it doesnt work,&lt;/P&gt;&lt;P&gt;What shall I do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Jul 2010 13:14:19 GMT</pubDate>
    <dc:creator>SwarnaliBasu</dc:creator>
    <dc:date>2010-07-02T13:14:19Z</dc:date>
    <item>
      <title>type incompatibility between two structures in data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125315#M1511686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;I have two structures, x_autwr and y_autwr, here the problem is data type of x_autwr is CURR ,15 and y_autwr is DEC, 23.&lt;/P&gt;&lt;P&gt;now when I write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_autwr = y_autwr it gives an errornous data, for eg if the value of Y-autwr is 2000.0000, it transforms to x_autwr and makes it 200000.00,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease note that I cannot change the data type as its from standard, but I have tried taking to local variables of type i, c , or decimal of type 2,or divide by 100, but still no logic works.&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 11:43:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125315#M1511686</guid>
      <dc:creator>SwarnaliBasu</dc:creator>
      <dc:date>2010-07-02T11:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: type incompatibility between two structures in data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125316#M1511687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey , &lt;/P&gt;&lt;P&gt;there is a mismatch in  your query , once u say they are structures , and next u r saying there data types. Please correct the question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what do you need to achieve please specify that. that is the what format the value  you expect in x_autwr  , specify that .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that I can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Uma Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 11:47:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125316#M1511687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T11:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: type incompatibility between two structures in data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125317#M1511688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to convert a variable(y_autwr) of data type decimal, 23 to a variable (x-autwr)of currency,15.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the e.g in my scenario is when&lt;/P&gt;&lt;P&gt;x_autwr = y_autwr, then it should take the correct value, so if y_autwr = 2000 then x_autwr shouldnt be any other value than 2000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note these are just example, so please go by the content.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 11:52:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125317#M1511688</guid>
      <dc:creator>SwarnaliBasu</dc:creator>
      <dc:date>2010-07-02T11:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: type incompatibility between two structures in data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125318#M1511689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey u can do that&lt;/P&gt;&lt;P&gt;by maing use of a intermediate variable of type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str_temp type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str_temp =  y_str.&lt;/P&gt;&lt;P&gt;x_str = str_temp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will resolve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Uma Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 11:57:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125318#M1511689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T11:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: type incompatibility between two structures in data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125319#M1511690</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;Use the local varibales and make use of offsets or use conversion so that source and destination length will be same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pravin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 12:01:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125319#M1511690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T12:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: type incompatibility between two structures in data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125320#M1511691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this assignment is not correct. The CURR fields are always associated with a CUKY, do you have the currency key with you ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, then you can try this logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;x_autwr = y_autwr.

DATA:
 l_corr_factor TYPE i,
 ls_bapi1090_1 TYPE bapi1090_1.
  CALL FUNCTION 'BAPI_CURRENCY_GETDECIMALS'
    EXPORTING
      currency          = v_waers "Your Currency key field
    IMPORTING
      currency_decimals = ls_bapi1090_1.

    l_corr_factor = 10 ** ( lf_bapi1090_1-curdecimals ).

x_autwr = x_autwr / l_corr_factor.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 12:12:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125320#M1511691</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-07-02T12:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: type incompatibility between two structures in data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125321#M1511692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;This problem is because of the decimal places. Try using "write to" instead of '=' with decimals edition. Check how to use it from ABAP keyword documentation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;write y_autwr to x_autwr decimals 4.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Gungor Ozcelebi on Jul 2, 2010 2:22 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 12:22:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125321#M1511692</guid>
      <dc:creator>former_member194416</dc:creator>
      <dc:date>2010-07-02T12:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: type incompatibility between two structures in data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125322#M1511693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No&lt;/P&gt;&lt;P&gt;it doesnt solve my problem, as I said earlier I have use of local variables of type C, D, String. Nothing works.&lt;/P&gt;&lt;P&gt;for everything it gives error data with wrong decimal point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
l_amount_in type string,"p DECIMALS 2,
        l_amount_out TYPE string

l_amount_in = ccaut_save-autwv.
l_amount_out = ccaut_out-autwr.

 xfplt-autwv = ccaut_save-autwv.
 xfplt-autwr = ccaut_out-autwr.
this value in XFPLT comes as 200000.00. when ccaut_save-autwv value is 2000.000&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 12:29:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125322#M1511693</guid>
      <dc:creator>SwarnaliBasu</dc:creator>
      <dc:date>2010-07-02T12:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: type incompatibility between two structures in data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125323#M1511694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try FM like CURRENCY_AMOUNT_DISPLAY_TO_SAP (reverse by CURRENCY_AMOUNT_SAP_TO_DISPLAY) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 12:51:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125323#M1511694</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-07-02T12:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: type incompatibility between two structures in data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125324#M1511695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Raymond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In either case we need to have the currency key defined. Correct ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW i was wondering if we can use the &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;WRITE ... TO ... CURRENCY ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 13:01:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125324#M1511695</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-07-02T13:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: type incompatibility between two structures in data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125325#M1511696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas&lt;/P&gt;&lt;P&gt;Please help me, I tried your solution, one of the structure has currency field , another one doesnt.&lt;/P&gt;&lt;P&gt;if I try to equate them still it doesnt work,&lt;/P&gt;&lt;P&gt;What shall I do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 13:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-incompatibility-between-two-structures-in-data-type/m-p/7125325#M1511696</guid>
      <dc:creator>SwarnaliBasu</dc:creator>
      <dc:date>2010-07-02T13:14:19Z</dc:date>
    </item>
  </channel>
</rss>

