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

about internal tables

Former Member
0 Likes
888

can anybody please tell me

1. Please tell me How to retrieve data into INPUT/OUTPUT field.

For example.When u display a particular row from emp table.I want to display the row number ie SY-TFILL in the INPUT/OUTPUT field.i need it very urgently.?

2. 1. i have two internal tables. both tables which is having 5 records.

itab1 itab2

1 1

3 3

5 7

6 9

8 10.

i want to develop an report which is used to print the same data (1,3) in both tables.

in this only one time we are supposed to compare both internal tables?

tell me logic how we will do that?

2. in selection screen only one parameter field is there. in that i entered data and press enter?at that time what are all the events are supposed to trigger?

3.can we delete data in one internal table with help of another internal table data?

like let us consider this scenerio

itab1 itab2

material no description material no material type

100 some 100 10

101 thing 101 10

103 line 103 13

104 row type 104 15

106 linetype 106 16

can i delete material no (100,101)in itab1 with the help of record material type (10) of itab2

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
870

To delete records with the help of other itab..

have a look at following code...

REPORT zprax_try2.

data: begin of itab1 occurs 0,

fld1(3),

end of itab1,

begin of itab2 occurs 0,

fld1(3),

fld2(2),

end of itab2.

initialization.

append '100' to itab1.

append '101' to itab1.

append '102' to itab1.

append '103' to itab1.

append '104' to itab1.

append '10010' to itab2.

append '10110' to itab2.

append '10011' to itab2.

append '10111' to itab2.

append '10210' to itab2.

start-of-selection.

loop at itab1.

write:/ itab1-fld1.

endloop.

skip.

loop at itab2.

write:/ itab2-fld1, itab2-fld2.

endloop.

loop at itab2.

check itab2-fld2 eq '10'.

delete itab1 where fld1 = itab2-fld1.

endloop.

skip.

loop at itab1.

write:/ itab1-fld1.

endloop.

skip.

loop at itab2.

write:/ itab2-fld1, itab2-fld2.

endloop.

reward if useful

regards

Prax

can anybody please tell me

1. Please tell me How to retrieve data into INPUT/OUTPUT field.

For example.When u display a particular row from emp table.I want to display the row number ie SY-TFILL in the INPUT/OUTPUT field.i need it very urgently.?

2. 1. i have two internal tables. both tables which is having 5 records.

itab1 itab2

1 1

3 3

5 7

6 9

8 10.

i want to develop an report which is used to print the same data (1,3) in both tables.

in this only one time we are supposed to compare both internal tables?

tell me logic how we will do that?

2. in selection screen only one parameter field is there. in that i entered data and press enter?at that time what are all the events are supposed to trigger?

3.can we delete data in one internal table with help of another internal table data?

like let us consider this scenerio

itab1 itab2

material no description material no material type

100 some 100 10

101 thing 101 10

103 line 103 13

104 row type 104 15

106 linetype 106 16

can i delete material no (100,101)in itab1 with the help of record material type (10) of itab2

8 REPLIES 8
Read only

Former Member
0 Likes
870

When u enter some value in parameter and press enter.. <b>AT SELECTION-SCREEN</b> event occurs.

rewards if useful

Read only

Former Member
0 Likes
871

To delete records with the help of other itab..

have a look at following code...

REPORT zprax_try2.

data: begin of itab1 occurs 0,

fld1(3),

end of itab1,

begin of itab2 occurs 0,

fld1(3),

fld2(2),

end of itab2.

initialization.

append '100' to itab1.

append '101' to itab1.

append '102' to itab1.

append '103' to itab1.

append '104' to itab1.

append '10010' to itab2.

append '10110' to itab2.

append '10011' to itab2.

append '10111' to itab2.

append '10210' to itab2.

start-of-selection.

loop at itab1.

write:/ itab1-fld1.

endloop.

skip.

loop at itab2.

write:/ itab2-fld1, itab2-fld2.

endloop.

loop at itab2.

check itab2-fld2 eq '10'.

delete itab1 where fld1 = itab2-fld1.

endloop.

skip.

loop at itab1.

write:/ itab1-fld1.

endloop.

skip.

loop at itab2.

write:/ itab2-fld1, itab2-fld2.

endloop.

reward if useful

regards

Prax

Read only

Former Member
0 Likes
870

<b><i>2. 1. i have two internal tables. both tables which is having 5 records.

itab1 itab2

1 1

3 3

5 7

6 9

8 10.

i want to develop an report which is used to print the same data (1,3) in both tables.

in this only one time we are supposed to compare both internal tables?

tell me logic how we will do that?</i></b>

You can use..

loop at itab1.

read table itab2 with key fld1 = itab1-fld1.

check sy-subrc eq 0.

write:/ itab2-fld1.

endloop.

Reward if useful..

regards

Prax

Read only

Former Member
0 Likes
870

<i><b>1. Please tell me How to retrieve data into INPUT/OUTPUT field.

For example.When u display a particular row from emp table.I want to display the row number ie SY-TFILL in the INPUT/OUTPUT field.i need it very urgently.?</b></i>

You can use SY-TABIX for this purpose.

Read only

0 Likes
870

hi pradeep, this ismohan

many many thanks for u'r help.if u dont mind send u'r mobile no . my mobile no is 9916291202

Read only

Former Member
0 Likes
870

You can reward me some points if ur problem has been resolved so that I can open my account.

Read only

Former Member
0 Likes
870

hi,

chech the below code:

To delete records with the help of other itab..

have a look at following code...

REPORT zprax_try2.

data: begin of itab1 occurs 0,

fld1(3),

end of itab1,

begin of itab2 occurs 0,

fld1(3),

fld2(2),

end of itab2.

initialization.

append '100' to itab1.

append '101' to itab1.

append '102' to itab1.

append '103' to itab1.

append '104' to itab1.

append '10010' to itab2.

append '10110' to itab2.

append '10011' to itab2.

append '10111' to itab2.

append '10210' to itab2.

start-of-selection.

loop at itab1.

write:/ itab1-fld1.

endloop.

skip.

loop at itab2.

write:/ itab2-fld1, itab2-fld2.

endloop.

loop at itab2.

check itab2-fld2 eq '10'.

delete itab1 where fld1 = itab2-fld1.

endloop.

skip.

loop at itab1.

write:/ itab1-fld1.

endloop.

skip.

loop at itab2.

write:/ itab2-fld1, itab2-fld2.

endloop.

Read only

0 Likes
870

why did u copy my code !!!