2006 Jan 25 2:06 PM
hello Mr.Rich i want to display the 2nd field on the same page after the first field.not in secondary list.
and vijay ur program is isplaying both the fields. but the 2nd filed should be displayed only when we click the first field.
if i have internal table with 5 fields like this.
itab-field1 itab-field2
-
-
101
102
103
104
105
when we click on 101 it should display the corresponding field 2 value and so on for 102...105.
hello Mr.Rich i want to display the 2nd field on the same page after the first field.not in secondary list.
and vijay ur program is isplaying both the fields. but the 2nd filed should be displayed only when we click the first field.
if i have internal table with 5 fields like this.
itab-field1 itab-field2
-
-
101
102
103
104
105
when we click on 101 it should display the corresponding field 2 value and so on for 102...105.
2006 Jan 25 2:14 PM
I did post this example on the other post. Please mark one of these post as closed, as you have now duplicated your question. Thanks.
report zrich_0002 no standard page heading.
data: begin of it001 occurs 0,
bukrs type t001-bukrs,
butxt type t001-butxt,
check type c,
end of it001.
start-of-selection.
select * into corresponding fields of table it001 from t001.
perform write_list.
at line-selection.
read table it001 with key bukrs = it001-bukrs.
if sy-subrc = 0.
it001-check = 'X'.
modify it001 index sy-tabix.
endif.
sy-lsind = sy-lsind - 1.
perform write_list.
*&---------------------------------------------------------------------*
*& Form write_list
*&---------------------------------------------------------------------*
form write_list.
loop at it001.
format hotspot on.
write:/ it001-bukrs.
hide: it001-bukrs, it001-butxt.
format hotspot off.
if it001-check = 'X'.
write: it001-butxt.
endif.
endloop.
endform.
Regards,
Rich Heilman
2006 Jan 25 2:29 PM
@Rich..That was slick indeed!!!!!!!:)
@prashant : please close the thread if it solves your problem.(Assign points to Rich's post)
2006 Jan 25 2:20 PM
*&---------------------------------------------------------------------*
*& Report ZTEST_REPORT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
report ztest_report.
data: begin of itab occurs 0,
field1(10),
field2(5),
end of itab.
data: field(20) type c,
value(5).
data: click(1) .
itab-field1 = 'test1'.
itab-field2 = 'abc1'.
append itab.
itab-field1 = 'test2'.
itab-field2 = 'abc2'.
append itab.
itab-field1 = 'test3'.
itab-field2 = 'abc3'.
append itab.
itab-field1 = 'test4'.
itab-field2 = 'abc4'.
append itab.
itab-field1 = 'test5'.
itab-field2 = 'abc5'.
append itab.
data: itab1 like itab occurs 0 with header line.
loop at itab .
clear itab-field2.
move-corresponding itab to itab1.
append itab1.
clear itab1.
endloop.
perform popualate_data.
at line-selection.
click = 'X'.
get cursor field field value value.
if field = 'ITAB1-FIELD1' and not value is initial .
read table itab with key field1 = value.
if sy-subrc = 0.
read table itab1 with key field1 = value.
itab1-field2 = itab-field2.
modify itab1 index sy-tabix.
sy-lsind = 0.
perform popualate_data.
endif.
endif.
*&---------------------------------------------------------------------*
*& Form popualate_data
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form popualate_data .
loop at itab1.
write:/ itab1-field1,
itab1-field2.
endloop.
endform. " popualate_data
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |