2007 Jul 06 11:29 AM
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
2007 Jul 06 11:44 AM
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
2007 Jul 06 11:34 AM
When u enter some value in parameter and press enter.. <b>AT SELECTION-SCREEN</b> event occurs.
rewards if useful
2007 Jul 06 11:44 AM
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
2007 Jul 06 11:52 AM
<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
2007 Jul 06 11:54 AM
<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.
2007 Jul 09 10:50 AM
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
2007 Jul 06 12:02 PM
You can reward me some points if ur problem has been resolved so that I can open my account.
2007 Jul 06 12:20 PM
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.
2007 Jul 08 12:06 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |