‎2010 Oct 04 8:54 AM
Hi ,
How I can get a flat file using a FM HCM_GET_ORGSTRUCTURE_AS_XML_IN , As I am getting an xml file . and it is giving a dump as the data is too large .
Thanks In ADVANCE
‎2010 Oct 04 11:50 AM
You can try with CALL FUNCTION 'GUI_UPLOAD'.
or
You can use the field separator as 'I' pipe symbol.
or
I am not sure if you really need a function module for this task. You can directly write internal table data in application server.
Please check below code.
upload from application server.
tables : ZDEPARTMENT_TMP.
data : itab like ZDEPARTMENT_TMP occurs 0 with header line.
constants File(30) type C value '/usr/tmp/sri1111.txt'.
open dataset File for input in text mode.
do.
read dataset File into itab.
if sy-subrc 0.
write 😕 'No more records'.
exit.
else.
append itab.
endif.
enddo.
close dataset File.
loop at itab.
write 😕 itab-EMPID,itab-EMP_DEPT,itab-EMP_PROJ,itab-EMP_CUBE,
itab-EMP_PH_NO.
ZDEPARTMENT_TMP-EMPID = itab-EMPID.
ZDEPARTMENT_TMP-EMP_DEPT = itab-EMP_DEPT.
ZDEPARTMENT_TMP-EMP_PROJ = itab-EMP_PROJ.
ZDEPARTMENT_TMP-EMP_CUBE = itab-EMP_CUBE.
insert ZDEPARTMENT_TMP.
endloop
HOPE YOUR PROBLEM IS BEEN SOLVED
REGARDS
ANKIT
Moderator message: do not sell other peoples replies as your own!
Edited by: Thomas Zloch on Oct 6, 2010 1:30 PM