‎2006 Sep 07 1:07 PM
Hello,
i am uploading a textfile into an internal table and i have used the 'CALL METHOD cl_gui_frontend_services=>gui_upload' for uploading of the file into the internal table. But instead i am getting sumthing lyke
CTTL#1001#BANK-0014393-PP-LHR#|#2000#112312#CCL00#29.08.2006#|Cash In </b>. I have the following internal table,
[code]
begin of ls_cashrec,
bukrs type char30, " company code
cjnr type char30, " cash journal number
cjtranstxt type char30, " business transaction
cjamount type wrbtr, " amount
dzuonr type char30, " assignment
prctr type char6, " profit center
budat type sy-datum, " posting date
cjpostext type char30, " text
end of ls_cashrec.
and
DATA:
gt_cashrec TYPE STANDARD TABLE OF ls_cashrec.
where am i wrong ?
Regard and Thanks,
Shehryar
‎2006 Sep 07 1:13 PM
HI,
Use the paramter <b>HAS_FIELD_SEPARATOR = 'X'</b> of gui_upload
to get in correct format.
REgards,
Message was edited by: HRA
‎2006 Sep 07 1:09 PM
and the textfile contains sumthing lyke,
CTTL 1001 BANK-1234567-PP-XX 2000 112312 CCL00 29.08.2006 Cash In
‎2006 Sep 07 1:12 PM
Hi shehryar,
1. Date format
2. The date in text file is
dd.mm.yyyy
3. Hence, upload it in a varaiable
of type c and length 10.
4. Then transfer it in your final internal table
with field datum.
regards,
amit m.
‎2006 Sep 07 1:13 PM
HI,
Use the paramter <b>HAS_FIELD_SEPARATOR = 'X'</b> of gui_upload
to get in correct format.
REgards,
Message was edited by: HRA
‎2006 Sep 07 1:14 PM
You have to pass the exporting parameter:
HAS_FIELD_SEPARATOR = 'X'
Regards,
Ravi
‎2006 Sep 07 1:26 PM
‎2006 Sep 08 8:14 AM
Hello,
Should the date in my textfile be like 08.09.2006 or 08.09.06 or 08092006 or 080906
Note: The textfile which i will upload into the internal table..
Thanks,
Shehryar
‎2006 Sep 08 10:07 AM
Hi again,
1. The best thing is that the
data format in text file is
YYYYMMDD (8 characters only)
(Then in that case, we can directly
declare our field in internal table type sy-datum.
)
2. Other wise,
we have to declare the field in internal table
as character format and length
(based upon the text file field length,
including DOTS / etc)
Then we have to finally convert in YYYYMMDD
format in to other field,
which we will finally use as sy-datum field.
regards,
amit m.