<?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: Question in ABAP syntax, read &amp; insert data from internal table, while loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632564#M1090921</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;why do not you use a simple recursion for your task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

form add_line using i_user type ZEMPMGRTAB-EmployeeID
                    changing t_result type XXX "table with line EXPTAB.

data: ls_row type ZEMPMGRTAB.

* Get record for i_user
select single * into ls_row from  ZEMPMGRTAB
 where EmployeeID = i_user.

if sy-subrc NE 0.
* Do nothing, there is not manager for this employee
else.
* Store result 
   append ls_row into t_result.
* Call recursion
 perform add_line using ls_row-ManagerID
                          changing t_result.
endif.

endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q2 - check documentation for ABAP commands READ TABLE and LOOP.&lt;/P&gt;&lt;P&gt;Q3 - NOT xxx IS  INITIAL.&lt;/P&gt;&lt;P&gt;Q4 - check documentation for LOOP command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Oct 2008 03:23:59 GMT</pubDate>
    <dc:creator>mvoros</dc:creator>
    <dc:date>2008-10-24T03:23:59Z</dc:date>
    <item>
      <title>Question in ABAP syntax, read &amp; insert data from internal table, while loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632563#M1090920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, SDN Fellow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am from Java background and learnt ABAP, I don't usually write much ABAP code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to implement the following logic in a RFC now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one z-custom database table, the structure as the following:&lt;/P&gt;&lt;P&gt;It has two columns, with these sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Says datable table is &lt;STRONG&gt;ZEMPMGRTAB&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EmployeeID,ManagerID
--------------------
user10,user1
user9,user1
user8,user1
user7,user2
user6,user2
user5,user2
user4,user2
user2,user1&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a &lt;STRONG&gt;input parameter, userid.&lt;/STRONG&gt; I am using this parameter to have a select statement to query the record into &lt;STRONG&gt;export table,EXPTAB 'LIKE' table ZEMPMGRTAB.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM  ZEMPMGRTAB
        
  into table EXPTAB
   WHERE  EMPLOYEEID  = USERID.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say, my parameter value, &lt;STRONG&gt;USERID ='USER4'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Referring to the sample data above, I can get the record of this in my &lt;STRONG&gt;EXPTAB,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EmployeeID,ManagerID
--------------------
user4,user2&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I want to &lt;STRONG&gt;iterately use the EXPTABLE-ManagerID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; as the USERID input in SELECT statement, until it has no return result. Then, &lt;STRONG&gt;insert the new records in&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EXPTAB.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In above new loop case, we will get this table content in EXPTAB,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EmployeeID,ManagerID
--------------------
user4,user2
user2,user1&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I kind of think of the pseudocode logic as below:&lt;/P&gt;&lt;P&gt;(These may not be a valid ABAP code, so I need help to convert/correct them)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: 
IWA TYEP ZZEMPMGRTAB, 
ITAB 
HASHED TABLE OF ZZEMPMGRTAB 
WITH UNIQUE KEY EMPLOYEEID. 


SELECT * FROM  ZEMPMGRTAB
        
  into table ITAB
   WHERE  EMPLOYEEID  = USERID.

*Question 1: I cannot insert a internal table to export table, it is *incompatible type, what is the alternative way fo this?
*Question 2: How can I access the&amp;#127;data of the internal table like this,ITAB-MANAGERID? As if I can, I would do this:
 

* IWA-EMPLOYEEE = ITAB-EMPLOYEEID. IWA-MANAGERID = IWA-MANAGERID. INSERT IWA INTO TABLE EXPTAB.

* Question 3: Is the 'NE NULL' - 'not equal to NULL' is right syntax?
IF ITAB NE NULL.
INSERT ITAB INTO EXPTAB.
ENDIF

* Question 4: Is my WHILE loop setup right here? And are the syntax right?

WHILE ITAB NE NULL.

SELECT * FROM  ZEMPMGRTAB
        
  into table ITAB 
   WHERE  EMPLOYEEID  = ITAB-MANAGERID.

IF ITAB NE NULL.
INSERT ITAB INTO EXPTAB.
ENDIF

REFRESH ITAB.

ENDWHILE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume all the syntax and logic are right, I should get this result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EmployeeID,ManagerID
--------------------
user4,user2
user2,user1&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have a new entry in datable table,ZEMPMGRTAB like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;user1,user0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My pseudocode logic will get this result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;EmployeeID,ManagerID
--------------------
user4,user2
user2,user1
user1,user0&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I truly appreciate if you can help me to validate the above syntax and pseudocode logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 03:01:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632563#M1090920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-24T03:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Question in ABAP syntax, read &amp; insert data from internal table, while loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632564#M1090921</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;why do not you use a simple recursion for your task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

form add_line using i_user type ZEMPMGRTAB-EmployeeID
                    changing t_result type XXX "table with line EXPTAB.

data: ls_row type ZEMPMGRTAB.

* Get record for i_user
select single * into ls_row from  ZEMPMGRTAB
 where EmployeeID = i_user.

if sy-subrc NE 0.
* Do nothing, there is not manager for this employee
else.
* Store result 
   append ls_row into t_result.
* Call recursion
 perform add_line using ls_row-ManagerID
                          changing t_result.
endif.

endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q2 - check documentation for ABAP commands READ TABLE and LOOP.&lt;/P&gt;&lt;P&gt;Q3 - NOT xxx IS  INITIAL.&lt;/P&gt;&lt;P&gt;Q4 - check documentation for LOOP command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 03:23:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632564#M1090921</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2008-10-24T03:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Question in ABAP syntax, read &amp; insert data from internal table, while loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632565#M1090922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;What are the primary key fields in table ZEMPMGRTAB.&lt;/P&gt;&lt;P&gt;Based on that, it will easy to write the logic.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Madhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 04:55:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632565#M1090922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-24T04:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Question in ABAP syntax, read &amp; insert data from internal table, while loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632566#M1090923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Madhan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The primary key is the EMPLOYEEID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The database table only consists of two columns, EMPLOYEEID &amp;amp; MANAGERID as shown from my first post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 15:55:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632566#M1090923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-24T15:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Question in ABAP syntax, read &amp; insert data from internal table, while loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632567#M1090924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me try to understand your suggestion, and try out your suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will get back to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your constructive suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 15:56:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632567#M1090924</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-24T15:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Question in ABAP syntax, read &amp; insert data from internal table, while loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632568#M1090925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Martin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I converted your suggested code snippet to my RFC code. Here, I have couple more questions on the errors  I got.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION ZGETSOMEINFO3.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(USERID) TYPE  AWTXT
*"  EXPORTING
*"     VALUE(RETURN) TYPE  BAPIRETURN
*"  TABLES
*"      APPROVERT STRUCTURE  ZTAB_FMAPPROVER
*"----------------------------------------------------------------------

** Question 1: How do I call the form function?*
add_line(USERID).

ENDFUNCTION.

**Question 2: Is the form-endform block should be inside function-endfunction? As I got an error if I put it inside.*
 
form add_line using i_user type ZTAB_FMAPPROVER-EmployeeID
                    changing t_result type ZTAB_FMAPPROVER.

data: ls_row type ZTAB_FMAPPROVER.

* Get record for i_user
select single * into ls_row from ZTAB_FMAPPROVER
 where EmployeeID = i_user.

if sy-subrc NE 0.
* Do nothing, there is not manager for this employee
else.


* Store result
**Question 3: I got this error message,"T_RESULT" is not an internal table "OCCURS n" specification is missing. How do I fix this?*
   append ls_row to t_result.
* Call recursion
 perform add_line using ls_row-ManagerID
                          changing t_result.
endif.

endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 17:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632568#M1090925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-24T17:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Question in ABAP syntax, read &amp; insert data from internal table, while loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632569#M1090926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi KC,&lt;/P&gt;&lt;P&gt;For your Question 1.   add_line(USERID).&lt;/P&gt;&lt;P&gt;Reply: You need to call this function module like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  perform add_line(USERID)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;*&lt;STRONG&gt;Question 2: Is the form-endform block should be inside function-endfunction? As I got an error if I put it inside.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Reply: No the Form Endform shouldnot be in Function EndFunction. It should be in some other Include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   So you need to write your Form EndForm in another Include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;Question 3: I got this error message,"T_RESULT" is not an internal table "OCCURS n" specification is missing. How do I fix this?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Reply: For RFC You  sholuld not use the Header. Instead of this what you need to create a workarea like thins.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: T_RESULT TYPE STANDARD TABLE OF &amp;lt;ZZCUSTOM&amp;gt;  "--&amp;gt; zzcustom table is your z table.
  DATA: WA_RESULT TYPE &amp;lt;ZZCUSTOM&amp;gt;.             "WA_RESULT is your workarea

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 18:04:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632569#M1090926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-24T18:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Question in ABAP syntax, read &amp; insert data from internal table, while loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632570#M1090927</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;PRE&gt;&lt;CODE&gt;FUNCTION ZGETSOMEINFO3.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(USERID) TYPE  AWTXT
*"     VALUE(FMTYPEID) TYPE  AWTXT
*"  EXPORTING
*"     VALUE(RETURN) TYPE  BAPIRETURN
*"  TABLES
*"      APPROVERT STRUCTURE  ZTAB_FMAPPROVER
*"      ACTOWNERT STRUCTURE  ZTAB_FMACTOWNER
*"----------------------------------------------------------------------
DATA: T_RESULT TYPE STANDARD TABLE OF ZTAB_FMAPPROVER.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Question 1: For this line, I got an error says "Program ''USERID" *not found. Is the syntax right, as the USERID is a parameter for &lt;STRONG&gt;the function.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;perform add_line(USERID).

  ENDFUNCTION.

form add_line using i_user type ZTAB_FMAPPROVER.EMPLOYEEID
                    changing T_RESULT TYPE ZTAB_FMAPPROVER.

data: ls_row type ZTAB_FMAPPROVER.

* Get record for i_user
select single * into ls_row from ZTAB_FMAPPROVER
 where EmployeeID = i_user.

if sy-subrc NE 0.
* Do nothing, there is not manager for this employee
else.


* Store result&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;QUESTION 2: I am still got stuck on this line of code. It still *says that "T_RESULT" is not an internal table "OCCURS n" *specification is missing. I thought the line: "T_RESULT TYPE *ZTAB_FMAPPROVER" means declare internal table, T_RESULT &lt;STRONG&gt;as type of ZTAB_FMAPPROVER". Am I understand it wrongly?&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;append ls_row to t_result.


* Call recursion
 perform add_line using ls_row-ManagerID
                          changing t_result.
endif.

endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Oct 2008 03:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632570#M1090927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-25T03:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Question in ABAP syntax, read &amp; insert data from internal table, while loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632571#M1090928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 21:50:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-in-abap-syntax-read-insert-data-from-internal-table-while-loop/m-p/4632571#M1090928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-26T21:50:19Z</dc:date>
    </item>
  </channel>
</rss>

