2006 Jul 06 8:44 AM
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?
2006 Jul 06 8:46 AM
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
2006 Jul 06 8:56 AM
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.
2006 Jul 06 10:11 AM
2006 Jul 06 8:58 AM
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.
2006 Jul 06 9:02 AM
Hi hemant,
can you show your Fieldcat for USTYP and also your ITAB fields.
Regards
vijay
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |