‎2007 Dec 18 11:33 PM
Hi experts,
Iam working on 4.0B.
I have a data some thing like this in a notepad.
P5ON P5ID P5LI P5PN PLWH
342691 P 1 T351-2032-001 02
342692 P 2 T351-2032-001 02
how can i upload this data using WS_UPLOAD.
Could you pls give me with example??
While iam uploading data i am getting only first column.
Where iam doing wrong??
DATA : BEGIN OF it_dummy OCCURS 0,
DUMMY(1000) TYPE C,
END OF it_dummy.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = it_dummy.
‎2007 Dec 19 12:06 AM
Hi,
Your code is correct only..I am getting all the 3 records...I think, u missed loop..endloop.
REPORT ZM_TEST12.
PARAMETERS: P_File LIKE RLGRAP-FILENAME OBLIGATORY.
DATA : BEGIN OF it_dummy OCCURS 0,
DUMMY(1000) TYPE C,
END OF it_dummy.
Uploading flat file data into the internal tables
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = it_dummy.
loop at it_dummy.
write: it_dummy.
endloop.
Regards,
Maha
‎2007 Dec 19 3:46 AM
Why haven't t you declared your internal table with the same structure as your file???
Rob