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

Problem in ALV display

Former Member
0 Likes
714

Hi All,

My problem is little bit strange. I am getting some data from the table USR02 (including user type, USTYP)and dispalying the data in an ALV as well as sending the data as an excel attachment with the email. The attachment I am getting with the email has correct data. Also when I see the final internal table just before calling the FM 'REUSE_ALV_LIST_DISPLAY', I find the correct data but in the ALV dispaly I am getting the value of the field USTYP along with the short text (like A Dialog, B System User, L Reference User) USTYP. Can anybody please tell me why it is happening and how can I avoid that?

Hi All,

My problem is little bit strange. I am getting some data from the table USR02 (including user type, USTYP)and dispalying the data in an ALV as well as sending the data as an excel attachment with the email. The attachment I am getting with the email has correct data. Also when I see the final internal table just before calling the FM 'REUSE_ALV_LIST_DISPLAY', I find the correct data but in the ALV dispaly I am getting the value of the field USTYP along with the short text (like A Dialog, B System User, L Reference User) USTYP. Can anybody please tell me why it is happening and how can I avoid that?

5 REPLIES 5
Read only

Former Member
0 Likes
676

Its supposed to be a feature of ALV as the description of the field will make more sense for the user. If you take out the Reference field for USTYP in the field catalog, that should go off.

Regards,

Ravi

Note : Please mark all the helpful answers

Read only

Former Member
0 Likes
676

Hi hemant,

1. Yes u are right.

2. I just tried, and we can remove like this.

3. Just change one field of the field catalogue,

and then it will show fine.

<b> ALVFCWA-NO_CONVEXT = 'X'.</b>

4. like this.

LOOP AT ALVFC INTO ALVFCWA.

IF ALVFCWA-FIELDNAME = 'USTYP'.

<b> ALVFCWA-NO_CONVEXT = 'X'.

MODIFY ALVFC FROM ALVFCWA.</b>

ENDIF.

regards,

amit m.

Read only

0 Likes
676

Thanks Amit.

Read only

Former Member
0 Likes
676

Hi again,

1. To get a taste of it,

just copy paste in new program.

2.

report abc.

*----


TYPE-POOLS : slis.

DATA : alvfc TYPE slis_t_fieldcat_alv.

DATA : alvfcwa TYPE slis_fieldcat_alv.

*----


data : begin of itab occurs 0.

include structure usr02.

data : end of itab.

*----


START-OF-SELECTION.

select * from usr02

into table itab.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = sy-repid

i_internal_tabname = 'ITAB'

i_inclname = sy-repid

CHANGING

ct_fieldcat = alvfc

EXCEPTIONS

inconsistent_interface = 1

program_error = 2

OTHERS = 3.

*----


IMPORTANT

LOOP AT ALVFC INTO ALVFCWA.

IF ALVFCWA-FIELDNAME = 'USTYP'.

ALVFCWA-NO_CONVEXT = 'X'.

MODIFY ALVFC FROM ALVFCWA.

ENDIF.

ENDLOOP.

*----


Display

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

it_fieldcat = alvfc

TABLES

t_outtab = itab

EXCEPTIONS

program_error = 1

OTHERS = 2.

regards,

amit m.

Read only

Former Member
0 Likes
676

Hi hemant,

can you show your Fieldcat for USTYP and also your ITAB fields.

Regards

vijay