<?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: Recursive function in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function/m-p/2852842#M668593</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;Look at the function module &amp;lt;b&amp;gt;C13C_TREE_IMPORT&amp;lt;/b&amp;gt; and look at the below link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Oct 2007 11:29:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-03T11:29:12Z</dc:date>
    <item>
      <title>Recursive function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function/m-p/2852840#M668591</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; This is my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the user will give a range of cost centre group on the selection screen as input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;take the first parent cost centre group and check whether it has any child cost centre groups and check if those child cost centre groups has any other subchilds. and find all the cost centres that exist for all the parent , child and subchilds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10000--&amp;gt;01&lt;/P&gt;&lt;P&gt;   1000&lt;DEL&gt;&amp;gt;10 1010&lt;/DEL&gt;&amp;gt;11 1011--&amp;gt;12&lt;/P&gt;&lt;P&gt;     1001--&amp;gt;20&lt;/P&gt;&lt;P&gt;        1020--&amp;gt;30.&lt;/P&gt;&lt;P&gt;20000--&amp;gt;40&lt;/P&gt;&lt;P&gt;  2000--&amp;gt;50&lt;/P&gt;&lt;P&gt;    2001--&amp;gt;60&lt;/P&gt;&lt;P&gt;     2020--&amp;gt;70&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here 10000 is the the parent cost centre group it has a child CCG has 1000,1010 and 1011 and 1000 has a child 1001 and 1001 has a child 1020.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All these CCG(Cost centre group) has cost centre like 01 for 10000 and 10 for 1000 and 11 for 1010 and 12 for 1011 and 20 for 1001 and 30 for 1020.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like this hierarchy continues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if the customer gives CCG 10000  alone as the input how can we find out all the child CCG for it and then their corresponding cost centres  of them using a recursive function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone explain me the logic of this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Phyrose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 11:12:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function/m-p/2852840#M668591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-03T11:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function/m-p/2852841#M668592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;use the fun module&lt;/P&gt;&lt;P&gt;G_SET_TREE_IMPORT&lt;/P&gt;&lt;P&gt;pass the setid which is the concatenation of class, subclass and the CC group together&lt;/P&gt;&lt;P&gt;see the tables setnode and setleaf also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 11:22:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function/m-p/2852841#M668592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-03T11:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function/m-p/2852842#M668593</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;Look at the function module &amp;lt;b&amp;gt;C13C_TREE_IMPORT&amp;lt;/b&amp;gt; and look at the below link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 11:29:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function/m-p/2852842#M668593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-03T11:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function/m-p/2852843#M668594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the following function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    CALL FUNCTION 'K_COSTELEM_SELECT'
         EXPORTING
              kokrs           = p-kokrs
              ce_group        = p-kagru
         TABLES
              it_result       = t_cskb_ex
         EXCEPTIONS
              no_record_found = 1
              group_not_found = 2
              OTHERS          = 3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call the module for each group input by user and merge the internal tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: you could also use FM K_COSTELEM_SELECT_TAB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 11:29:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function/m-p/2852843#M668594</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-10-03T11:29:40Z</dc:date>
    </item>
  </channel>
</rss>

