<?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: need logic  on  internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731216#M898035</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI PLEASE HELP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 May 2008 18:39:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-01T18:39:38Z</dc:date>
    <item>
      <title>need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731210#M898029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gurus,&lt;/P&gt;&lt;P&gt;i am using the function module&lt;/P&gt;&lt;P&gt;CS_BOM_EXPL_MAT_V2&lt;/P&gt;&lt;P&gt;after using this module&lt;/P&gt;&lt;P&gt;i get an internal table which is filled with various materials with different levels,&lt;/P&gt;&lt;P&gt;levels range from 1 to 25 in in which 1 has hieghest value and 25 least,&lt;/P&gt;&lt;P&gt;the levels are not inorder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whenever a lower level appears ie.&lt;/P&gt;&lt;P&gt;after level one if level two comes then the matnr at level 1 is parent and all level 2's become immediate children,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i should be creating an internal table, which contains pairs  of 1 parent and one of its immediate child, so that all teh children immeditatly are covered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once this all level 1's are covered, we should start with level 2's.&lt;/P&gt;&lt;P&gt;level 2 becomes parent and immediate level 3's become child, again all teh 2's and 3's make a pair, so that all the threes are covered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;am i clear, if not please let me know,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i donot understand, whetehr to take top-down or bottom up approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;presently i am thinking this way,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at the internal table , whenever a level 1 appears, right away make a pair of curent matnr and matnr with level 1.&lt;/P&gt;&lt;P&gt;i might be getting 4 or 5 pairs.&lt;/P&gt;&lt;P&gt;then reduce all the levels by 1.&lt;/P&gt;&lt;P&gt;so all the level2's become level 1s and level 1s to 0.&lt;/P&gt;&lt;P&gt;again loop around the itab looking for level 0s, once we get a level 0, we store that in a variable v_matnr, &lt;/P&gt;&lt;P&gt;from that point till we get next level 0, we collect all the level 1's.&lt;/P&gt;&lt;P&gt;so all these ( 0's, 1's) make pairs of BOMs.&lt;/P&gt;&lt;P&gt;inthis way after every loop we reduce the levels by 1, till we run out of levels to 0 or negetive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i know this is worst way of programing, but any ideas friends, any better way of doing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 15:54:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731210#M898029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T15:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731211#M898030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;friend &lt;/P&gt;&lt;P&gt;u r planning to display the material of level 1 first and material of level 2 and then level 3 am i right??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you do like this how will you make out which material is the parent of material in level 1 or 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thats not the right way to dispaly the material&lt;/P&gt;&lt;P&gt;if u have to dipaly level 1 and then its immediate children and then its immediate children so on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex original parent 13568&lt;/P&gt;&lt;P&gt;level   material&lt;/P&gt;&lt;P&gt;.1       12346        immediate child of 13568&lt;/P&gt;&lt;P&gt;..2      36748        immediate child of 12346&lt;/P&gt;&lt;P&gt;...3     89709        immediate child of 36748&lt;/P&gt;&lt;P&gt;.1       67878        immediate child of 13568&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the right way to display the material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u r trying to display &lt;/P&gt;&lt;P&gt;level  material&lt;/P&gt;&lt;P&gt;1       12346&lt;/P&gt;&lt;P&gt;1       67878&lt;/P&gt;&lt;P&gt;2       36748&lt;/P&gt;&lt;P&gt;3       89709&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;think which the best way.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 16:11:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731211#M898030</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T16:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731212#M898031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no waht i am trying to fill is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 has children a,b&lt;/P&gt;&lt;P&gt;b has children x,y,z.&lt;/P&gt;&lt;P&gt;z has children p,q,r.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(1, a )&lt;/P&gt;&lt;P&gt;(1, b )&lt;/P&gt;&lt;P&gt;(b, x)&lt;/P&gt;&lt;P&gt;(b, y)&lt;/P&gt;&lt;P&gt;(b, z)&lt;/P&gt;&lt;P&gt;( z, p)&lt;/P&gt;&lt;P&gt;(z, q )&lt;/P&gt;&lt;P&gt;(z, r )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is something like a tree with pair relations going from  root node till leaves.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 16:26:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731212#M898031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T16:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731213#M898032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;couldn't you simply sort the retuned table (STPOX) by the fields you want ordered?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would think this would include BOM, LEVEL, etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 16:46:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731213#M898032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T16:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731214#M898033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if u want to print only in that way....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then u can try the as follows....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. get the highest number in the column stuff of structure stb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. construct do loop for highest number times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Construct inner do loop &lt;/P&gt;&lt;P&gt;     read the table with stuf with '1' and wegxx with '1'&lt;/P&gt;&lt;P&gt;     keep increase the value for wegxx column(dont increase the value of stuf column.&lt;/P&gt;&lt;P&gt;    if sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    exit (inner loop)&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt; now increase the stuf value by one&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will meet ur requirement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mr A on May 1, 2008 7:09 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 17:04:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731214#M898033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T17:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731215#M898034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;thanks for the replies,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul, &lt;/P&gt;&lt;P&gt;if i sort returned table with stufe column, how will i get to know , who is whos child.&lt;/P&gt;&lt;P&gt;do u mean sorting by any other column.&lt;/P&gt;&lt;P&gt;i appreciate your  help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mr. A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am trying to understand your logic, &lt;/P&gt;&lt;P&gt;what does wegxx store, it says , path with 4 chars, how does this field help us.&lt;/P&gt;&lt;P&gt;i appreciate your  help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 17:27:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731215#M898034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T17:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731216#M898035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI PLEASE HELP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 18:39:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731216#M898035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T18:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731217#M898036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the funtion module&lt;/P&gt;&lt;P&gt;csXXX_12...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;return the BOM material in one table right???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this table contains diff fields like stuf and wegxx, idnrk etc.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me write the logic for you....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. find highest number in the table in column stuf. say that number is 3.&lt;/P&gt;&lt;P&gt;data: gv_level type stb-stuf,&lt;/P&gt;&lt;P&gt;        gv_next type stb-wegxx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do 3 times.&lt;/P&gt;&lt;P&gt;do .&lt;/P&gt;&lt;P&gt;read tabel it_stb into wa_stb with key stuf = gv_level &lt;/P&gt;&lt;P&gt;                                                      wegxx = gv_next.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;..... do ur operations...(like moving etc...)&lt;/P&gt;&lt;P&gt;gv_next = gv_next + 1.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;gv_level  = gv_level  + 1.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope with this u will get what u want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i dont have system to test the program but it should work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mr A on May 1, 2008 9:27 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 19:27:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731217#M898036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T19:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731218#M898037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mr.A,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your logic is excellent.&lt;/P&gt;&lt;P&gt;but i have a question,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is the CS12 output for one material.&lt;/P&gt;&lt;P&gt;first column is level and second level is item&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.....0010&lt;/P&gt;&lt;P&gt;2.....0010&lt;/P&gt;&lt;P&gt;3.....0010&lt;/P&gt;&lt;P&gt;4.....0010&lt;/P&gt;&lt;P&gt;3.....0020&lt;/P&gt;&lt;P&gt;4.....0010&lt;/P&gt;&lt;P&gt;2.....0020&lt;/P&gt;&lt;P&gt;3.....0010&lt;/P&gt;&lt;P&gt;4.....0010&lt;/P&gt;&lt;P&gt;3.....0020&lt;/P&gt;&lt;P&gt;3.....0030&lt;/P&gt;&lt;P&gt;2.....0030&lt;/P&gt;&lt;P&gt;3.....0010&lt;/P&gt;&lt;P&gt;4.....0010&lt;/P&gt;&lt;P&gt;3.....0020&lt;/P&gt;&lt;P&gt;3.....0030&lt;/P&gt;&lt;P&gt;3.....0040&lt;/P&gt;&lt;P&gt;3.....0050&lt;/P&gt;&lt;P&gt;3.....0060&lt;/P&gt;&lt;P&gt;4.....0010&lt;/P&gt;&lt;P&gt;2.....0040&lt;/P&gt;&lt;P&gt;2.....0050&lt;/P&gt;&lt;P&gt;2.....0060&lt;/P&gt;&lt;P&gt;3.....0010&lt;/P&gt;&lt;P&gt;2.....0070&lt;/P&gt;&lt;P&gt;3.....0010&lt;/P&gt;&lt;P&gt;1.....0020&lt;/P&gt;&lt;P&gt;2.....0010&lt;/P&gt;&lt;P&gt;2.....0020&lt;/P&gt;&lt;P&gt;1.....0030&lt;/P&gt;&lt;P&gt;2.....0010&lt;/P&gt;&lt;P&gt;2.....0020&lt;/P&gt;&lt;P&gt;1.....0040&lt;/P&gt;&lt;P&gt;1.....0050&lt;/P&gt;&lt;P&gt;2.....0010&lt;/P&gt;&lt;P&gt;1.....0060&lt;/P&gt;&lt;P&gt;1.....0070&lt;/P&gt;&lt;P&gt;1.....0080&lt;/P&gt;&lt;P&gt;1.....0090&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as u said we use a read stmt, it will work fine for all teh level 1's,&lt;/P&gt;&lt;P&gt;it will also work for level 2's as long as it it under the first level 1.&lt;/P&gt;&lt;P&gt;if u notice in the above data,  there are multiple occurences of same level 2 and item value 0010,&lt;/P&gt;&lt;P&gt;read stmt will only cathch the first occurence,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i have to make some changes or am i wrong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot for your effort.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 20:20:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731218#M898037</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T20:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731219#M898038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.....0010&lt;/P&gt;&lt;P&gt;wht is the 1 and what is the 0010.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i dont understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in stuf &amp;amp; wegxx fields how come the values is 0010, it should be 1 or  2 or 3 .... &lt;/P&gt;&lt;P&gt;i am talking abt first 2 field of the return table stb in the function module&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 20:46:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731219#M898038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T20:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731220#M898039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am sorry, Mr A,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the one i gave above was the display of CS12 tcode, bcos i learnt from this forum that, CS_BOM_EXPL_MAT_V2 was equivalent to that,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but below is the data for a material from first 2 columns, of the stb table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        &lt;/P&gt;&lt;P&gt;1.....1 &lt;/P&gt;&lt;P&gt;2.....1 &lt;/P&gt;&lt;P&gt;3.....1 &lt;/P&gt;&lt;P&gt;4.....1 &lt;/P&gt;&lt;P&gt;3.....2 &lt;/P&gt;&lt;P&gt;4.....2 &lt;/P&gt;&lt;P&gt;2.....2 &lt;/P&gt;&lt;P&gt;3.....3 &lt;/P&gt;&lt;P&gt;4..... 3 &lt;/P&gt;&lt;P&gt;3.....4 &lt;/P&gt;&lt;P&gt;3.....5 &lt;/P&gt;&lt;P&gt;2.....3 &lt;/P&gt;&lt;P&gt;3.....6 &lt;/P&gt;&lt;P&gt;4.....4 &lt;/P&gt;&lt;P&gt;3.....7 &lt;/P&gt;&lt;P&gt;3.....8 &lt;/P&gt;&lt;P&gt;3.....9 &lt;/P&gt;&lt;P&gt;3.....10 &lt;/P&gt;&lt;P&gt;3.....11 &lt;/P&gt;&lt;P&gt;4.....5 &lt;/P&gt;&lt;P&gt;2.....4 &lt;/P&gt;&lt;P&gt;2.....5 &lt;/P&gt;&lt;P&gt;2.....6 &lt;/P&gt;&lt;P&gt;3.....12 &lt;/P&gt;&lt;P&gt;2 .....7 &lt;/P&gt;&lt;P&gt;3.....13 &lt;/P&gt;&lt;P&gt;1.....2 &lt;/P&gt;&lt;P&gt;2..... 8 &lt;/P&gt;&lt;P&gt;2.....9 &lt;/P&gt;&lt;P&gt;1.....3 &lt;/P&gt;&lt;P&gt;2.....10 &lt;/P&gt;&lt;P&gt;2.....11 &lt;/P&gt;&lt;P&gt;1.....4 &lt;/P&gt;&lt;P&gt;1.....5 &lt;/P&gt;&lt;P&gt;2.....12 &lt;/P&gt;&lt;P&gt;1.....6 &lt;/P&gt;&lt;P&gt;1.....7 &lt;/P&gt;&lt;P&gt;1.....8 &lt;/P&gt;&lt;P&gt;1.....9 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i put the dots , so that, we can see the gap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the second column ie. wegxx is showing the number of occurences,&lt;/P&gt;&lt;P&gt;but how do we find the parent child relation pair.&lt;/P&gt;&lt;P&gt;bcos when we run the logic what we get is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1....1&lt;/P&gt;&lt;P&gt;1....2&lt;/P&gt;&lt;P&gt;1....3&lt;/P&gt;&lt;P&gt;2....1&lt;/P&gt;&lt;P&gt;2....2&lt;/P&gt;&lt;P&gt;2....3&lt;/P&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;&lt;P&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;how will i find those pair.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 21:33:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731220#M898039</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T21:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731221#M898040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thats what i am saying from the begining, if you display this way how you will have the parent child relationship.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refer to my first reply....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please explain me ur problem clearly so that i can analys and give u correct answer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you need to send any screen shorts send them to meetganeshamratyahoodotcodotin(replace at with @ and dot with .)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 21:39:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731221#M898040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T21:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731222#M898041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually, my work was that,&lt;/P&gt;&lt;P&gt;my program will be given a set of material numbers,&lt;/P&gt;&lt;P&gt;this program should bring out data as in CS03, that is immediate components of the given materials,&lt;/P&gt;&lt;P&gt;i need to again pass these output material components into CS03 to get their immediate components,&lt;/P&gt;&lt;P&gt;the program has to keep passing as long thaere are no more components for the given materials.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this purpose we can directly use CS12 tcode,&lt;/P&gt;&lt;P&gt;but&lt;/P&gt;&lt;P&gt;we need a file which has explicit two columns, one for material and one for component.&lt;/P&gt;&lt;P&gt;for the given materials we will put theimmediate components, but again if that component has sub components, &lt;/P&gt;&lt;P&gt;we need to put this component in material column and its sub component innext column.&lt;/P&gt;&lt;P&gt;am i clear.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 21:57:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731222#M898041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T21:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731223#M898042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see&lt;/P&gt;&lt;P&gt;What you are doing with CS03.? I dont understand that....&lt;/P&gt;&lt;P&gt;CS03 will display the first level material right.&lt;/P&gt;&lt;P&gt;but with FM module u r getting all level at a time...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;still i dont understand ur requirement clearly.....&lt;/P&gt;&lt;P&gt;tell me what u want to acomplish with ur program, dont give any tcodes for reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 22:08:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731223#M898042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T22:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731224#M898043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes,  exactly, i need to get the first level components of the given material.&lt;/P&gt;&lt;P&gt;place them in two columns, &lt;/P&gt;&lt;P&gt;one is parent column and one is child coumn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAT1       COMPONENT1&lt;/P&gt;&lt;P&gt;MAT1       COMPONENT2&lt;/P&gt;&lt;P&gt;MAT1       COMPONENT3&lt;/P&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;&lt;P&gt;then again, this components have subcomponents, &lt;/P&gt;&lt;P&gt;so for each of those sub components we need first level components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPONENT1     SUBCOMPONENT1&lt;/P&gt;&lt;P&gt;COMPONENT1     SUBCOMPONENT2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left column is parent and right is child.&lt;/P&gt;&lt;P&gt;in this way we keep pasing the components as materials till we get the raw material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this process, we make the list what we are passing and  what we are getting.&lt;/P&gt;&lt;P&gt;as two seperate columns.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 22:24:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731224#M898043</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T22:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731225#M898044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;u r able to solve the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or u want to logic?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 13:33:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731225#M898044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T13:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: need logic  on  internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731226#M898045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanjana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can solve your issue with recursive type of call as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at int_tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate  matnr to string separated by space.&lt;/P&gt;&lt;P&gt;move tab1-matnr to component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform get_next_component using component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endwhile.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_next_component.&lt;/P&gt;&lt;P&gt;loop at int_tab1 where matnr = component.&lt;/P&gt;&lt;P&gt;Concatenate  matnr to string separated by space.&lt;/P&gt;&lt;P&gt;move tab1-matnr to component. ( Here your matnr suppose to be sub-component)&lt;/P&gt;&lt;P&gt;perform get_next_component using component.&lt;/P&gt;&lt;P&gt;&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;You can modify this logic to display in a multi-dimensional way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivasa Rao Varrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 13:50:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-logic-on-internal-table/m-p/3731226#M898045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T13:50:46Z</dc:date>
    </item>
  </channel>
</rss>

