Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

uploading the data

Former Member
0 Likes
387

Hello friends,

i am extracting the data from flat file to internable. can I create itab like this?

Data:begin of itab occurs 0,

field(2000) type c,

end of itab.

Here i am taking the field(2000) type c as whole length of flat file record.

it is ok regarding performence issue.

pls let me know asap.

with regards,

srinivasarao

2 REPLIES 2
Read only

Former Member
0 Likes
367

Find out the maximum length of the record in ur flat file and take that as the length of the field in ur itab..

which FM r u using , use GUI_UPLOAd

Read only

Former Member
0 Likes
367

srinivasarao,

You can do like this. see the ex;

DATA : s_filename(400),

I_TEMP(400).

DATA : BEGIN OF I_FINALTAB OCCURS 0,

QMART(3),

QMNUM LIKE VIQMEL-QMNUM,

MNCOD(8),

PSTER TYPE DATUM,

STAT(11),

TXT30 LIKE TJ02T-TXT30,

STRMN(9),

LTRMN LIKE VIQMEL-LTRMN,

URCOD(9),

QMTXT LIKE VIQMEL-QMTXT,

POST_CODE1 LIKE ADRC-POST_CODE1,

BZIRK LIKE VBKD-BZIRK,

KDMAT LIKE VBAP-KDMAT,

END OF I_FINALTAB.

DO.

READ DATASET s_filename INTO I_TEMP.

IF SY-SUBRC <> 0.

EXIT.

ELSE.

move I_TEMP to I_FINALTAB.

append I_FINALTAB.

clear I_FINALTAB.

ENDIF.

ENDDO.

CLOSE DATASET s_filename .

Pls. mark if useful