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

Internal Table

Former Member
0 Likes
619

Hi all,

I have an internal table with fields ( Name , age ,place ) . I appended the values to that intrenal table for all the 3 fields . Currently the values are in the internal table .

My doubt is , i want to refresh only one field in the internal table say the field ( Place) befor the record is get displayed .

can anyone suggest me the way how to do it .

Sample Code :

DATA : BEGIN OF structure OCCURS 0,

name(10),

age TYPE i,

place(10),

END OF structure.

DATA structure1 LIKE structure OCCURS 0 WITH HEADER LINE.

DATA itab LIKE structure OCCURS 0 WITH HEADER LINE.

structure1-name = 'RAMESH'. structure1-age = '25'. structure1-place = 'BANGALORE'.

APPEND structure1. CLEAR structure.

structure1-name = 'dinesh'. structure1-age = '25'. structure1-place = 'hyderadad'.

APPEND structure1. CLEAR structure1.

LOOP AT structure1.

write : / structure1-name,

structure1-age.

endloop.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
601

DATA : BEGIN OF structure OCCURS 0,

name(10),

age TYPE i,

place(10),

END OF structure.

DATA structure1 LIKE structure OCCURS 0 WITH HEADER LINE.

DATA itab LIKE structure OCCURS 0 WITH HEADER LINE.

structure1-name = 'RAMESH'. structure1-age = '25'. structure1-place = 'BANGALORE'.

APPEND structure1. CLEAR structure.

structure1-name = 'dinesh'. structure1-age = '25'. structure1-place = 'hyderadad'.

APPEND structure1. CLEAR structure1.

LOOP AT structure1.

write : / structure1-name,

structure1-age.

<b>clear structure1-place.

Modify structure1.</b>

endloop.

5 REPLIES 5
Read only

Former Member
0 Likes
602

DATA : BEGIN OF structure OCCURS 0,

name(10),

age TYPE i,

place(10),

END OF structure.

DATA structure1 LIKE structure OCCURS 0 WITH HEADER LINE.

DATA itab LIKE structure OCCURS 0 WITH HEADER LINE.

structure1-name = 'RAMESH'. structure1-age = '25'. structure1-place = 'BANGALORE'.

APPEND structure1. CLEAR structure.

structure1-name = 'dinesh'. structure1-age = '25'. structure1-place = 'hyderadad'.

APPEND structure1. CLEAR structure1.

LOOP AT structure1.

write : / structure1-name,

structure1-age.

<b>clear structure1-place.

Modify structure1.</b>

endloop.

Read only

0 Likes
601

Hi

use CLEAR statement

Ex:

loop at itab.

clear itab-name.

write 😕 itab-name, itab-age.

endloop.

OR

just use this

loop at itab.

write 😕 itab-age.

endloop.

name will not be displayed

Regards

prajwala.k

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
601

Hi,

Your requirement is not clear, what do you mean by REFRESH one field, you mean you want to REMOVE the data in that field?

Regards,

Sesh

Read only

Former Member
0 Likes
601

Hi Vighnesh,

Make that field blank which you want to refersh.

e.g.

LOOP AT structure1.

structure1-place = ' '.

write : / structure1-name,

structure1-age, structure1-place.

endloop.

Reward points if helpful.

Regards,

Hemant

Read only

Former Member
0 Likes
601

Hope the following code will help you.

*LOOP AT structure1.

*write : / structure1-name,

*structure1-age.

*endloop.

CLEAR STRUCTURE1-PLACE.

MODIFY STRUCTURE1 TRANSPORTING PLACE

WHERE NOT PLACE IS INITIAL.