Skip to Content
0
Former Member
Dec 21, 2012 at 11:59 AM

adding multiple records at the end of the internal table

742 Views

HI EXPERTS I AM NEW TO SAP .I AM SUBBAREDDY can u please suggest me how can i add multiple records to at the end of the internal table..

TYPES : BEGIN OF Ty_t001,

Bukrs TYPE bukrs,"company code

butxt TYPE butxt,"company name

ort01 type ort01, " city

land1 TYPE land1,"country key

end OF ty_t001.

"TYPES ty_t_t001 TYPE TABLE OF ty_t001.

DATA : it_t001 TYPE TABLE OF ty_t001,

wa_t001 TYPE ty_t001.

PARAMETERS : p_land1 TYPE land1_gp.

SELECT bukrs butxt ort01 land1 FROM t001 into TABLE it_t001 UP TO 10 rows

where land1 = p_land1.

sort it_t001 aSCENDING by land1.

write :/'display company codes ' COLOR 1.

uline.

CLEAR wa_t001.

wa_t001-bukrs = 'e001'.

wa_t001-butxt = 'emax tech'.

wa_t001-ort01 = 'hyderabad'.

wa_t001-land1 = 'we'.

APPEND wa_t001 to it_t001.

loop at it_t001 INTO wa_t001.

WRITE : / sy-tabix,wa_t001-bukrs,wa_t001-butxt,wa_t001-ort01,wa_t001-land1.

IN THIS PROGRAM I ADDED ON;Y 1RECORD.