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

Jest table status

Former Member
0 Likes
1,841

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 ?

3 REPLIES 3
Read only

Former Member
0 Likes
1,259

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.

Read only

Former Member
0 Likes
1,259

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.

Read only

former_member15255
Active Participant
0 Likes
1,259

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