<?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: print prime numbers using string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-prime-numbers-using-string/m-p/12596694#M2010656</link>
    <description>&lt;P&gt;Welcome to the SAP Community. Thank you for visiting us to get answers to your questions.&lt;/P&gt;&lt;P&gt;Since you're asking a question here for the first time, I'd like to offer some friendly advice on how to get the most out of your community membership and experience.&lt;/P&gt;&lt;P&gt;First, please see &lt;A href="https://community.sap.com/resources/questions-and-answers" target="test_blank"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt;, as this resource page provides tips for preparing questions that draw responses from our members. Second, feel free to take our Q&amp;amp;A tutorial at &lt;A href="https://developers.sap.com/tutorials/community-qa.html" target="test_blank"&gt;https://developers.sap.com/tutorials/community-qa.html&lt;/A&gt;, as that will help you when submitting questions to the community.&lt;/P&gt;&lt;P&gt;I also recommend that you include a profile picture. By personalizing your profile, you encourage readers to respond: &lt;A href="https://developers.sap.com/tutorials/community-profile.html" target="test_blank"&gt;https://developers.sap.com/tutorials/community-profile.html&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Now for some specific suggestions on how you might improve your question:&lt;/P&gt;&lt;P&gt;* Outline what steps you took to find answers (and why they weren't helpful) -- so members don't make suggestions that you've already tried.&lt;/P&gt;&lt;P&gt;* Share screenshots of what you've seen/done (if possible), as images always helps our members better understand your problem.&lt;/P&gt;&lt;P&gt;* Make sure you've applied the appropriate tags -- because if you don't apply the correct tags, the right experts won't see your question to answer it.&lt;/P&gt;&lt;P&gt;Should you wish, you can revise your question by selecting Actions, then Edit. &lt;/P&gt;&lt;P&gt;The more details you provide (in questions tagged correctly), the more likely it is that members will be able to respond. As it stands, I don't know if there is enough information here for members to understand your issue. So please consider revising your question because I'd really like to see you get a solution to your problem!&lt;/P&gt;&lt;P&gt;I hope you find this advice useful, and we're happy to have you as part of SAP Community!&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 17:16:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2022-08-02T17:16:51Z</dc:date>
    <item>
      <title>print prime numbers using string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-prime-numbers-using-string/m-p/12596693#M2010655</link>
      <description>&lt;P&gt;Accept a number and print all the prime numbers up to the number&lt;/P&gt;
  &lt;P&gt;example: &lt;/P&gt;
  &lt;P&gt;P_NO 100&lt;/P&gt;
  &lt;P&gt; 2,3,5,7,11,13.......97&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 17:15:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-prime-numbers-using-string/m-p/12596693#M2010655</guid>
      <dc:creator>former_member1029928</dc:creator>
      <dc:date>2022-08-02T17:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: print prime numbers using string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-prime-numbers-using-string/m-p/12596694#M2010656</link>
      <description>&lt;P&gt;Welcome to the SAP Community. Thank you for visiting us to get answers to your questions.&lt;/P&gt;&lt;P&gt;Since you're asking a question here for the first time, I'd like to offer some friendly advice on how to get the most out of your community membership and experience.&lt;/P&gt;&lt;P&gt;First, please see &lt;A href="https://community.sap.com/resources/questions-and-answers" target="test_blank"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt;, as this resource page provides tips for preparing questions that draw responses from our members. Second, feel free to take our Q&amp;amp;A tutorial at &lt;A href="https://developers.sap.com/tutorials/community-qa.html" target="test_blank"&gt;https://developers.sap.com/tutorials/community-qa.html&lt;/A&gt;, as that will help you when submitting questions to the community.&lt;/P&gt;&lt;P&gt;I also recommend that you include a profile picture. By personalizing your profile, you encourage readers to respond: &lt;A href="https://developers.sap.com/tutorials/community-profile.html" target="test_blank"&gt;https://developers.sap.com/tutorials/community-profile.html&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Now for some specific suggestions on how you might improve your question:&lt;/P&gt;&lt;P&gt;* Outline what steps you took to find answers (and why they weren't helpful) -- so members don't make suggestions that you've already tried.&lt;/P&gt;&lt;P&gt;* Share screenshots of what you've seen/done (if possible), as images always helps our members better understand your problem.&lt;/P&gt;&lt;P&gt;* Make sure you've applied the appropriate tags -- because if you don't apply the correct tags, the right experts won't see your question to answer it.&lt;/P&gt;&lt;P&gt;Should you wish, you can revise your question by selecting Actions, then Edit. &lt;/P&gt;&lt;P&gt;The more details you provide (in questions tagged correctly), the more likely it is that members will be able to respond. As it stands, I don't know if there is enough information here for members to understand your issue. So please consider revising your question because I'd really like to see you get a solution to your problem!&lt;/P&gt;&lt;P&gt;I hope you find this advice useful, and we're happy to have you as part of SAP Community!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 17:16:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-prime-numbers-using-string/m-p/12596694#M2010656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2022-08-02T17:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: print prime numbers using string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-prime-numbers-using-string/m-p/12596695#M2010657</link>
      <description>&lt;P&gt;What could be the algorithm to find out if one number is a PRIME number?&lt;/P&gt;&lt;P&gt;After that, the rest is easy.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 07:06:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-prime-numbers-using-string/m-p/12596695#M2010657</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-08-03T07:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: print prime numbers using string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-prime-numbers-using-string/m-p/12596696#M2010658</link>
      <description>&lt;P&gt;Use the below Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  DATA: p_num TYPE string VALUE 100.&lt;BR /&gt;  TYPES: BEGIN OF ty_int,&lt;BR /&gt;           num TYPE int2,&lt;BR /&gt;         END OF ty_int.&lt;BR /&gt;  DATA: lt_int  TYPE TABLE OF ty_int,&lt;BR /&gt;        lt_int1 TYPE TABLE OF ty_int.&lt;BR /&gt;&lt;BR /&gt;  DATA: lv_flag TYPE int2.&lt;BR /&gt;  DATA: lv_temp TYPE int2 VALUE 1.&lt;BR /&gt;  DATA: text TYPE string VALUE 'Prime Numbers: '.&lt;BR /&gt;&lt;BR /&gt;  lt_int =  VALUE #( FOR i = 2 THEN i + 1 UNTIL i &amp;gt;= p_num&lt;BR /&gt;                                 ( num = i )&lt;BR /&gt;                        ).&lt;BR /&gt;&lt;BR /&gt;  LOOP AT lt_int INTO DATA(ls_int).&lt;BR /&gt;&lt;BR /&gt;    lv_flag = 0.&lt;BR /&gt;&lt;BR /&gt;    LOOP AT lt_int INTO DATA(ls_int1) WHERE num &amp;lt;= ls_int-num.&lt;BR /&gt;&lt;BR /&gt;      lv_temp = ls_int-num MOD ls_int1-num.&lt;BR /&gt;&lt;BR /&gt;      IF lv_temp = 0.&lt;BR /&gt;        lv_flag = lv_flag + 1.&lt;BR /&gt;      ENDIF.&lt;BR /&gt;&lt;BR /&gt;    ENDLOOP.&lt;BR /&gt;&lt;BR /&gt;    IF lv_flag = 1.&lt;BR /&gt;      text = text &amp;amp;&amp;amp; | { ls_int-num }| &amp;amp;&amp;amp; |,| .&lt;BR /&gt;    ENDIF.&lt;BR /&gt;&lt;BR /&gt;  ENDLOOP.&lt;BR /&gt;&lt;BR /&gt;  WRITE:/ text.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This will give you your desired output:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2082768-image.png" /&gt;&lt;/P&gt;&lt;P&gt;You can also try to do this with new ABAP syntaxes using REDUCE and FOR operators.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Nitish Singh.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 09:58:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-prime-numbers-using-string/m-p/12596696#M2010658</guid>
      <dc:creator>Nitish2027</dc:creator>
      <dc:date>2022-08-05T09:58:06Z</dc:date>
    </item>
  </channel>
</rss>

