<?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: problem in code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/4302206#M1025865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;UR passing in_tab-value to v_total .. and U say it's coping &lt;/P&gt;&lt;P&gt;some junk value ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when U multiply some junk value it will give dump ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be giving Unable to interpret '' as a number ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jul 2008 15:33:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-30T15:33:04Z</dc:date>
    <item>
      <title>problem in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/4302205#M1025864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Below given is the code in the perform.&lt;/P&gt;&lt;P&gt;I am calling this perform from the script. It is giving me dump at the below given place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************************************&lt;/P&gt;&lt;P&gt;FORM convert_currency TABLES in_tab STRUCTURE itcsy&lt;/P&gt;&lt;P&gt;out_tab STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_curr LIKE vbdkr-waers,&lt;/P&gt;&lt;P&gt;v_sysdate(10),&lt;/P&gt;&lt;P&gt;v_date(10),&lt;/P&gt;&lt;P&gt;V_TOTAL_CHAR(255) type C,&lt;/P&gt;&lt;P&gt;v_excgrate type P decimals 5,&lt;/P&gt;&lt;P&gt;v_total type P decimals 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delivery date &lt;/P&gt;&lt;P&gt;READ TABLE in_tab WITH KEY 'VBDKR-WAERK'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc IS INITIAL.&lt;/P&gt;&lt;P&gt;i_curr = in_tab-value.&lt;/P&gt;&lt;P&gt;v_sysdate = sy-datum.&lt;/P&gt;&lt;P&gt;CONCATENATE v_sysdate&lt;EM&gt;4(2) '/' v_sysdate&lt;/EM&gt;6(2) '/' v_sysdate+0(4) into&lt;/P&gt;&lt;P&gt;v_date.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PO date &lt;/P&gt;&lt;P&gt;READ TABLE in_tab WITH KEY 'INVOICE_TOTAL'.&lt;/P&gt;&lt;P&gt;IF sy-subrc IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************************************************&lt;/P&gt;&lt;P&gt;Here in_tab- value is char 255. It is having a numerical value passed from script and v_total is type P decimal 5. when I am writing the in_tab-value to v_total it is copying some junk value in v_total.&lt;/P&gt;&lt;P&gt;WRITE in_tab-value to v_total.&lt;/P&gt;&lt;P&gt;*********************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_total = in_tab-value. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'READ_EXCHANGE_RATE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLIENT = SY-MANDT &lt;/P&gt;&lt;P&gt;DATE = SY-DATUM&lt;/P&gt;&lt;P&gt;FOREIGN_CURRENCY = i_curr&lt;/P&gt;&lt;P&gt;LOCAL_CURRENCY = 'SGD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE_OF_RATE = 'M' &lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;EXCHANGE_RATE = v_excgrate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOREIGN_FACTOR = &lt;/P&gt;&lt;P&gt;LOCAL_FACTOR = &lt;/P&gt;&lt;P&gt;VALID_FROM_DATE = &lt;/P&gt;&lt;P&gt;DERIVED_RATE_TYPE = &lt;/P&gt;&lt;P&gt;FIXED_RATE = &lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NO_RATE_FOUND = 1&lt;/P&gt;&lt;P&gt;NO_FACTORS_FOUND = 2&lt;/P&gt;&lt;P&gt;NO_SPREAD_FOUND = 3&lt;/P&gt;&lt;P&gt;DERIVED_2_TIMES = 4&lt;/P&gt;&lt;P&gt;OVERFLOW = 5&lt;/P&gt;&lt;P&gt;OTHERS = 6&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************************************&lt;/P&gt;&lt;P&gt;here proj is giving DUMP. both v_total and v_excgrate are type P decimal 5.&lt;/P&gt;&lt;P&gt;when I am multiplying the total with excahnge rate it is giving dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_total = v_total * v_excgrate.&lt;/P&gt;&lt;P&gt;**********************************************************************************************&lt;/P&gt;&lt;P&gt;WRITE v_total TO v_total_char.&lt;/P&gt;&lt;P&gt;condense v_total_char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT out_tab.&lt;/P&gt;&lt;P&gt;CASE out_tab-name.&lt;/P&gt;&lt;P&gt;WHEN 'CURR'.&lt;/P&gt;&lt;P&gt;MOVE 'SGD' TO out_tab-value.&lt;/P&gt;&lt;P&gt;WHEN 'TOTAL'.&lt;/P&gt;&lt;P&gt;WRITE v_total_char TO out_tab-value.&lt;/P&gt;&lt;P&gt;WHEN 'EXCHRATE'.&lt;/P&gt;&lt;P&gt;MOVE v_excgrate TO out_tab-value.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;MODIFY out_tab.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " FORMAT_DATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Gaurav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 15:29:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/4302205#M1025864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T15:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: problem in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/4302206#M1025865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;UR passing in_tab-value to v_total .. and U say it's coping &lt;/P&gt;&lt;P&gt;some junk value ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when U multiply some junk value it will give dump ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be giving Unable to interpret '' as a number ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 15:33:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/4302206#M1025865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T15:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: problem in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/4302207#M1025866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gaurav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While using WRITE.. TO statement, the target is a text variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are multiplying the text with another number. So you are getting dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using WRITE.. TO, use MOVE.&lt;/P&gt;&lt;P&gt;And see that while multiplication, both are numeric fields with valid values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Indu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 16:10:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/4302207#M1025866</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T16:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: problem in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/4302208#M1025867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaurav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please don't cross-post =&amp;gt; [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rules&lt;EM&gt;of&lt;/EM&gt;Engagement].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 16:44:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/4302208#M1025867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T16:44:05Z</dc:date>
    </item>
  </channel>
</rss>

