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

Logic needed

Former Member
0 Likes
876

Hi

I created ALV report.

i am moving it_z1log1 data to it_final.

MOVE-CORRESPONDING it_z1log1 TO it_final

.

It_final is my final internal table.

Output coming properly. In Alv output i want to display

it_z1log1 records in red color. how to do thos. Pls help me

1 ACCEPTED SOLUTION
Read only

former_member195383
Active Contributor
0 Likes
859

in both the tables..create another field as wf_flaG. IN THE TABLE it_z1log1 FILL THAT FIELD AS x FOR AL THE RECORDS...

tHEN wen u use MOVE-CORRESPONDING it_z1log1 TO it_final

in the it_final table only the records copied from it_z1log1 , will have the field wf_flaG as x.

Use this as a differentiating factor...and accordingly use a changed colour....

Hope this helps u out....

Reward points if the above ans is useful...

7 REPLIES 7
Read only

Former Member
0 Likes
859

Hi,

Refer to following link.

http://www.sap-img.com/abap/line-color-in-alv-example.htm

Hope its usefull to you.

Reward pts. if helpfull.

Regards,

Dhan

Read only

former_member195383
Active Contributor
0 Likes
860

in both the tables..create another field as wf_flaG. IN THE TABLE it_z1log1 FILL THAT FIELD AS x FOR AL THE RECORDS...

tHEN wen u use MOVE-CORRESPONDING it_z1log1 TO it_final

in the it_final table only the records copied from it_z1log1 , will have the field wf_flaG as x.

Use this as a differentiating factor...and accordingly use a changed colour....

Hope this helps u out....

Reward points if the above ans is useful...

Read only

0 Likes
859

Hi Rudra

How to display this in Alv pls advise me

Read only

0 Likes
859

it_fieldcat-fieldname = 'FIELD'.

it_fieldcat-tabname = 'IT_Z1LOG1'.

it_fieldcat-reptext_ddic = 'desc'.

if (check for the flag that i have alreay stated)

it_fieldcat-emphasize = 'C111'.

endif.

append it_fieldcat .

Read only

0 Likes
859

Hi Rudra

I tried the following. But all fields highlighted in Blue clour. How to highlight Flag = X reccords

gi_fieldcatalog-fieldname = 'MANDT'.

gi_fieldcatalog-tabname = 'it_final'.

gi_fieldcatalog-seltext_m = 'Client'.

if it_final-flag = 'X'.

gi_fieldcatalog-emphasize = 'C111'.

endif.

APPEND gi_fieldcatalog TO gi_fieldcatalog.

CLEAR gi_fieldcatalog.

Read only

Former Member
0 Likes
859

hi do like this ...for the fields of the table it_z1log1 ..

it_fieldcat-fieldname = 'FIELD'.

it_fieldcat-tabname = 'IT_Z1LOG1'.

it_fieldcat-reptext_ddic = 'desc'.

it_fieldcat-emphasize = 'C111'.

append it_fieldcat .

Read only

Former Member
0 Likes
859

hi kumar..

for this you hav to fill the emphasize option in fielcatalog for the correponding fields of t_z1log1..

to show those fields in color