<?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 format change for amount in sapscript in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146928#M452946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i've written a perform statement in sapscript to calculate:&lt;/P&gt;&lt;P&gt;1.)  substraction of two amount values .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the perform statement the amount is in format   20.000,00 (for 20 thousand)&lt;/P&gt;&lt;P&gt;and hence it doesnot allow me to substract the two amounts and gives a dump stating not a number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please tell me how can i convert the amount, substract the values and again send it back to sapscript for display.&lt;/P&gt;&lt;P&gt;also how can i print the sl. No. (Serial Number) which should get incremented everytime the line items r printed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can't change the program as it is standard so i've to do it through the sapscript only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Apr 2007 07:28:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-07T07:28:14Z</dc:date>
    <item>
      <title>format change for amount in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146928#M452946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i've written a perform statement in sapscript to calculate:&lt;/P&gt;&lt;P&gt;1.)  substraction of two amount values .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the perform statement the amount is in format   20.000,00 (for 20 thousand)&lt;/P&gt;&lt;P&gt;and hence it doesnot allow me to substract the two amounts and gives a dump stating not a number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please tell me how can i convert the amount, substract the values and again send it back to sapscript for display.&lt;/P&gt;&lt;P&gt;also how can i print the sl. No. (Serial Number) which should get incremented everytime the line items r printed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can't change the program as it is standard so i've to do it through the sapscript only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 07:28:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146928#M452946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-07T07:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: format change for amount in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146929#M452947</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;  Do all the computation in the Zprogram you have associated to your script using Perform statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Convert characters to packed values using Unpack and Pack statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this sample code for reference&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: v_char1(13) type c value '1.613,000',
      v_char2(13) type c value '8.240,000'.
 
data: v_res type p decimals 0,
      v_flag1 type p decimals 0,
      v_flag2 type p decimals 0.
 
translate v_char1 using '. '.
translate v_char1 using ',.'.
condense v_char1 no-gaps.
 
translate v_char2 using '. '.
translate v_char2 using ',.'.
condense v_char2 no-gaps.
 
pack v_char1 to v_flag1.
pack v_char2 to v_flag2.
 
v_res = v_char1 + v_char2.
 
write v_res. "This contains packed value

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can unpack the packed value to character format again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sailaja.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Sailaja N.L.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 07:31:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146929#M452947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-07T07:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: format change for amount in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146930#M452948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have one doubt that is print format it is not at all related to processing&lt;/P&gt;&lt;P&gt; please give ur script here i can solve ur problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;send ur subroutine code.&lt;/P&gt;&lt;P&gt;i hope that u are not converting it into integer format .&lt;/P&gt;&lt;P&gt;if u send any thing to perform it come in to character format.&lt;/P&gt;&lt;P&gt;you move in to integer format and do calculations and sent to script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        sunil kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 07:38:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146930#M452948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-07T07:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: format change for amount in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146931#M452949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my code in sapscript is :&lt;/P&gt;&lt;P&gt;/:	 	DEFINE &amp;amp;V1&amp;amp; = &amp;amp;REGUP-WRBTR&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	DEFINE &amp;amp;V2&amp;amp; = &amp;amp;REGUP-WSKTO&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	DEFINE &amp;amp;V3&amp;amp; = ''&lt;/P&gt;&lt;P&gt;/:	 	PERFORM GET_DEDUCTION_VAL IN PROGRAM ZT_CHK&lt;/P&gt;&lt;P&gt;/:	 	USING &amp;amp;V1&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	USING &amp;amp;V2&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	CHANGING &amp;amp;V3&amp;amp;&lt;/P&gt;&lt;P&gt;/:	 	ENDPERFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the code that i've written in program zt_chk is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables: REGUP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_deduction_val 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 : w_amt1  LIKE REGUP-WRBTR,&lt;/P&gt;&lt;P&gt;         w_amt2  LIKE REGUP-WSKTO,&lt;/P&gt;&lt;P&gt;         w_total LIKE REGUP-DMBTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE in_tab WITH KEY 'V1'.&lt;/P&gt;&lt;P&gt;  w_amt1 = in_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE in_tab WITH KEY 'V2'.&lt;/P&gt;&lt;P&gt;  w_amt2 = in_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  w_total = w_amt1 - w_amt2.  " -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;&amp;gt;Gives Dump Here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE out_tab WITH KEY 'V3'.&lt;/P&gt;&lt;P&gt;  out_tab-value = w_amt1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODIFY out_tab INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also i wld like to know how to print serial Number? is it possible through this perform. this perform gets called in loop and the next statement in sapscript prints the values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 08:40:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146931#M452949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-07T08:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: format change for amount in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146932#M452950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;pack in_tab-value to w_amt1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;w_amt1 = in_tab-value.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 08:43:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146932#M452950</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-04-07T08:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: format change for amount in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146933#M452951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Annie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change your User profile settings and see....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From any screen in SAP...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click on Menu System-&amp;gt;User Profile-&amp;gt;Own Data, In that go to tab Own Data and change the decimal notation and save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now execute your script and see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct me if I am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh S&lt;/P&gt;&lt;P&gt;*Award points if reply is helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 09:12:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146933#M452951</guid>
      <dc:creator>learnsap</dc:creator>
      <dc:date>2007-04-07T09:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: format change for amount in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146934#M452952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;May be this might solve your problem. Move the variables in which you have the amounts to be computed to new variables declared as type compatible to amounts (i.e. BSEG-WRBTR o VBAP-NETWR). You have to use the 'MOVE' command with the extension 'Currency' i guess. This will automatically change the decimal notations of the amount variables in compatible to that of User settings. Then you can compute the values as you required and can use the same to display in the form / Script.&lt;/P&gt;&lt;P&gt;In this way you will not have to change the user settings all the time.&lt;/P&gt;&lt;P&gt;Hope this solves your issue.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Apr 2007 14:18:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146934#M452952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-07T14:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: format change for amount in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146935#M452953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i've tried all your suggestion but it doesnot work and every time a dump comes. in my user setting already the format 1,234,567.89 is maintained. &lt;/P&gt;&lt;P&gt;And i didn't find any move command with currency extension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 05:18:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/format-change-for-amount-in-sapscript/m-p/2146935#M452953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T05:18:50Z</dc:date>
    </item>
  </channel>
</rss>

