10-30-2007 2:52 AM
Hi,
I have a custom table z_test which consits of fields date SY-DATUM, qty QUAN, desc CHAR(2). I need to read a flat file in unix server delimited by tab and store into this table.
I have designed the selection screen and also the code.Snapshot is as follows
Snapshot
-
TYPES : begin of ty_demand.
TYPES : INCLUDE STRUCTURE Z_TEST.
TYPES : end of ty_demand.
DATA : t_demand TYPE STANDARD TABLE OF ty_demand,
wa_demand TYPE ty_demand.
CALL ws_upload
:
tables
data_tab = t_demand
:
Loop at t_demand into wa_demand.
WRITE : / SY_VLINE,
(10) wa_demand-date,
(10) wa_demand-qty,
(10) wa_demand-desc.
APPEND wa_demand to t_demand.
CLEAR wa_demand.
ENDLOOP.
When printing doesnt show any values,and also its reading the contents into MANDT field of the table(which should be avoided, should i use another internal table instead of same structure of custom table. Please suggest.Any code will be welcome too. I shall reward with points.
Thanks- Shawn
10-30-2007 2:57 AM
10-30-2007 2:57 AM
Hi Shawn,
You should use different internal tables for reading the data and to upload the data in the DB table.
Regards,
Atish
10-30-2007 4:48 AM
Hi,
Okay so you say i have to use open dataset,read dataset instead of ws_upload ? Can you provide some code or example codes available in SAP environment please. I definitely dont want to use a internal table with header line, so something without header line and work area. Thanks in advance