‎2007 Apr 03 10:16 AM
Greeting to everyone,
Could I know how to read the data from the input file (Check for Student_ID) and retrieve the data from course table when the student_ID match with student_ID from Course table. My input file (text file) layout is as below. Please kindly provide some guide with sample code. Thank you.
<b>Layout of Input File 1</b>
<u>I_file</u>
Student_ID S_Name S_Age
<u>Internal table</u>
<b>Course</b>
Student_ID C_Detail C_mark
‎2007 Apr 03 11:44 AM
Hi Little,
In this is case you follow the following steps mentioned below
1) Read all the data in the file from the presentation server to internal table
using the function module GUI_UPLOAD..
2) once u receiving the data from file to ur own internal table say i_itab1[], you read it to ur processing internal table say i_itab2[] from i_itab1[] based on your selection conditon..
3) sometime back i used GUI_upload.. so i am searching for tht code if i get i will let u know.. but u can find code for this FM....
But i suggest if u follow the below steps it is not a problem..
if it helps you plz provide reward points,
Regards,
Kali Prasad
‎2007 Apr 03 11:44 AM
Hi Little,
In this is case you follow the following steps mentioned below
1) Read all the data in the file from the presentation server to internal table
using the function module GUI_UPLOAD..
2) once u receiving the data from file to ur own internal table say i_itab1[], you read it to ur processing internal table say i_itab2[] from i_itab1[] based on your selection conditon..
3) sometime back i used GUI_upload.. so i am searching for tht code if i get i will let u know.. but u can find code for this FM....
But i suggest if u follow the below steps it is not a problem..
if it helps you plz provide reward points,
Regards,
Kali Prasad
‎2007 Apr 03 11:54 AM
Hi Little,
First populate all the data from text file to internal table throguh GUI_UPLOAD then select data from data base table into other internal table by using forall entreis on the first internal table. Then you will get proper data.
Hope this helps you, reply for queries, Shall post you the updates.
Regards.
Kumar. .
‎2007 Apr 04 1:59 AM
Hi,
Appreciate if you can provide some sample code related, so that I able to understanding more clearly. Thank you.
‎2007 Apr 04 4:06 AM
Hi
In this case you can use two function modules..First one is simple 'UPLOAD' and the most prefered one is 'GUI_UPLOAD'...This is the easiest way to upload file from presentation server..If your file is a text file give the parameters as shown in the given example...Put field seperator as ' # ' if it is tab delimited..The internal table shold have the same structure of your file....See the example..Reward all the helpful answers....
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\test.txt'
FILETYPE = 'ASC'
has_field_separator = '#'
HEADER =
TABLES
data_tab = it_file
.