Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Reading a file from unix server and save it into custom table.

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

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question