2008 Dec 12 4:09 AM
hi all ,
For 1 object ID the status of the object id which is active is more than 1
For ex:
Object Id Status
A E001
A E002
A E003
In my final outpout (ALV) i need to show status like E001\E002\E003.
Please help me how to get the logic for ths ?
hi all ,
For 1 object ID the status of the object id which is active is more than 1
For ex:
Object Id Status
A E001
A E002
A E003
In my final outpout (ALV) i need to show status like E001\E002\E003.
Please help me how to get the logic for ths ?
2008 Dec 12 4:29 AM
Hi..
In tbl_alv_out declare
status type char4.
Let say tbl_jest-status we have AE001, AE002, AE003.
then appending in to Out_ALV table w_alv_out-status = w_jest-status+1.
Try in this way..
Regards,
sg.
2008 Dec 12 4:29 AM
Hi,
use the following logic :
" in an internal table store the structre of the table
data : begin of itab occurs 0,
object typc c,
statustype string,
end of itab.
data : g_id type itab-object.
loop at itab.
g_id = itab-object.
if itab-object eq g_id.
concatenate itab-status '/' itab-status.
modify itab.
else.
exit.
endif.
endloop.
2008 Dec 12 4:51 AM
Hello,
There are 1 to many status for a object id, best method is to make use of the control breaks. for example
DATA : V_STR(30) TYPE C.
DATA : BEGIN OF ITAB OCCURS 0,
STATUS TYPE JEST-STATUS,
TEST(30) TYPE C,
select * from jest into table <internal table>
where <condition>.
sort <internal table> by <object id>.
loop at <internal Table>.
concatenate <internal Table>-<status> into v_str.
on change object id.
ITAB-OBJECTID = <internal table>-OBJECTID.
ITAB-TEST = v_str.
APPEND ITAB
endloop.
THE ABOVE CODE SHOULD HELP U
REGARDS
SURESH
Edited by: Suresh Krishnan on Dec 12, 2008 5:51 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |