<?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: SAP Script : Debugging ..Where can I find SUBRC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697630#M305985</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max, Naresn, Neil .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your efforts. I got it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did it like this ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form COMPARE_AMOUNT tables int_cond structure itcsy&lt;/P&gt;&lt;P&gt;                     out_cond structure itcsy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data :  W_SWNET type REGUD-SWNET,&lt;/P&gt;&lt;P&gt;         C_SWNET TYPE REGUD-SWNET VALUE 50000,&lt;/P&gt;&lt;P&gt;         compare type regud-swnet,&lt;/P&gt;&lt;P&gt;         FLAG TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  read table int_cond index 1.&lt;/P&gt;&lt;P&gt;  translate INT_COND-VALUE using ', '.&lt;/P&gt;&lt;P&gt;  condense INT_COND-VALUE no-gaps.&lt;/P&gt;&lt;P&gt;  W_SWNET = int_cond-value.&lt;/P&gt;&lt;P&gt;*compare = int_cond-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF w_swnet &amp;gt; C_SWNET.&lt;/P&gt;&lt;P&gt;   FLAG = 'X'.&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;  OUT_COND-NAME = 'FLAG'.&lt;/P&gt;&lt;P&gt;  OUT_COND-VALUE = FLAG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This worked fine ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking you once again. Closing this thread and alloting points to you all..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Nov 2006 18:38:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-02T18:38:44Z</dc:date>
    <item>
      <title>SAP Script : Debugging ..Where can I find SUBRC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697624#M305979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SAP Script Debugging, I would like to know whether my condition is true or false. I mean, I have to know whether my Sy-subrc is 4 or 0. where can I see that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second question : can I compare a amount value to a charecter. I guess SAP Scripts variables are always charecters, if I have variable which reflects amount value, eg var1 value is 50,000.00 ...can I compare with '50,000.00'&lt;/P&gt;&lt;P&gt;I mean can I use lessthan and greater than and compare.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 22:22:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697624#M305979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-01T22:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Script : Debugging ..Where can I find SUBRC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697625#M305980</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;1) use &amp;amp;SAPSCRIPT-SUBRC&amp;amp; for subrc check..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 22:24:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697625#M305980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-01T22:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Script : Debugging ..Where can I find SUBRC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697626#M305981</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;U can check SAPSCRIPT-SUBRC &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the validation IF &amp;amp;AMOUNT&amp;amp; &amp;gt; '50,000.00' doesn't work you can create a routine and do the validation in the routine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: DEFINE &amp;amp;RESULT&amp;amp; = ' '&lt;/P&gt;&lt;P&gt;/: PERFORM CHECK_AMOUNT IN PROGRAM Z....&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;AMOUNT&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;RESULT&amp;amp;&lt;/P&gt;&lt;P&gt;/: ENDPERFORM&lt;/P&gt;&lt;P&gt;/: IF &amp;amp;RESULT&amp;amp; = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway you can do the validation in the program insetad of the sapscript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 22:28:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697626#M305981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-01T22:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Script : Debugging ..Where can I find SUBRC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697627#M305982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. &lt;/P&gt;&lt;P&gt;Can I use formatting options and compare.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mean to say, Can I use &amp;amp;Amount(CT)&amp;amp; &lt;/P&gt;&lt;P&gt;and compare .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg : if &amp;amp;amount(CT)&amp;amp; &amp;gt; '50000'.&lt;/P&gt;&lt;P&gt;As C will condense and T will remove thousands separaters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also want to know. Can I use &lt;/P&gt;&lt;P&gt;&amp;amp;Amount(CT.0)&amp;amp; which gives results without decimals, commas and thousand separators.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know. Thanks you once again. alloting points for your efforts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 22:42:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697627#M305982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-01T22:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Script : Debugging ..Where can I find SUBRC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697628#M305983</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;I tried to do that validation in the form but it doesn't work because it compares them as they was chaar fields, so 10000 is less than 500 because 10000 begin with 1 and 1 is less than 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use a routine like I described in my previous answer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM CHECK_AMOUNT TABLES IN_TAB STRUCTURE ITCSY
                  OUT_TAB STRUCTURE ITCSY.

  DATA AMOUNT TYPE WRBTR.

  READ TABLE IN_TAB WITH KEY NAME = 'BSEG-WRBTR'.
  IF SY-SUBRC = 0.
    DO.
      REPLACE '.' WITH SPACE INTO IN_TAB-VALUE.
      IF SY-SUBRC &amp;lt;&amp;gt; 0. EXIT. ENDIF.
    ENDDO.
    DO.
      REPLACE ',' WITH SPACE INTO IN_TAB-VALUE.
      IF SY-SUBRC &amp;lt;&amp;gt; 0. EXIT. ENDIF.
    ENDDO.

    CONDENSE IN_TAB-VALUE NO-GAPS.
    MOVE IN_TAB-VALUE TO AMOUNT.

    AMOUNT = AMOUNT / 100.

    IF AMOUNT &amp;gt; 5000.
      READ TABLE OUT_TAB WITH KEY NAME = 'RESULT'.
      IF SY-SUBRC = 0.
        MOVE 'X' TO OUT_TAB-VALUE.
        MODIFY OUT_TAB INDEX SY-TABIX.
      ENDIF.
    ENDIF.

  ENDIF.
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2006 03:28:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697628#M305983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-02T03:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Script : Debugging ..Where can I find SUBRC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697629#M305984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can compare to contants and as you suspect you have to get the length correct and include a sign at the end so it is not a good idea. The best way is surely to declare a constant in your abap and use that:&lt;/P&gt;&lt;P&gt;data c_max_wrbtr type bsid-wrbtr value '50000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in sapscript:&lt;/P&gt;&lt;P&gt;/: if &amp;amp;bsid-wrbtr&amp;amp; &amp;gt; &amp;amp;c_max_wrbtr&amp;amp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2006 04:25:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697629#M305984</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-11-02T04:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Script : Debugging ..Where can I find SUBRC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697630#M305985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max, Naresn, Neil .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your efforts. I got it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did it like this ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form COMPARE_AMOUNT tables int_cond structure itcsy&lt;/P&gt;&lt;P&gt;                     out_cond structure itcsy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data :  W_SWNET type REGUD-SWNET,&lt;/P&gt;&lt;P&gt;         C_SWNET TYPE REGUD-SWNET VALUE 50000,&lt;/P&gt;&lt;P&gt;         compare type regud-swnet,&lt;/P&gt;&lt;P&gt;         FLAG TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  read table int_cond index 1.&lt;/P&gt;&lt;P&gt;  translate INT_COND-VALUE using ', '.&lt;/P&gt;&lt;P&gt;  condense INT_COND-VALUE no-gaps.&lt;/P&gt;&lt;P&gt;  W_SWNET = int_cond-value.&lt;/P&gt;&lt;P&gt;*compare = int_cond-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF w_swnet &amp;gt; C_SWNET.&lt;/P&gt;&lt;P&gt;   FLAG = 'X'.&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;  OUT_COND-NAME = 'FLAG'.&lt;/P&gt;&lt;P&gt;  OUT_COND-VALUE = FLAG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This worked fine ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking you once again. Closing this thread and alloting points to you all..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2006 18:38:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-script-debugging-where-can-i-find-subrc/m-p/1697630#M305985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-02T18:38:44Z</dc:date>
    </item>
  </channel>
</rss>

