2014 Dec 08 12:07 PM
Hi All,
I am executing an ALV report in background and when I check the unit field it is displayed as '******'. But when I execute the report in foreground the unit is appearing correctly. Please could someone let me know why the unit is displayed as '******' in background and how to correct it.
Thanks in advance,
Priya
2014 Dec 08 1:09 PM
Can you post definition of the unit fields in the internal table, actually unit fields are 3 character length internally and externally with conversion-exit CUNIT.
Do you actually fill it with correct data ?
(Sometimes ALV is able to correct such errors as external value in fields that should contain internal values, but not always)
Regards,
Raymond
2014 Dec 08 12:11 PM
Hi Priya,
Are you using the control break statement(AT NEW... ENDAT, AT END OF... ENDAT).
Because Inside the control break statements only the value will be displayed as *****
Regards
Rajkumar Narasimman
2014 Dec 08 12:16 PM
Hi Rajkumar,
No I am not using control break statements. I can see the Unit correctly when executing the report in Foreground. The problem is only if the report is executed in background. Please some one help.
Thanks,
Priya
2014 Dec 08 12:24 PM
Hi,
can please show how you declare this field in your itab
and do you declare this field in fieldcat (ALV).
Do you set SELTEXT_M, or _S or _L ?
Regards, Dieter
2014 Dec 08 12:37 PM
Hi Dieter,
I am declaring unit in the fieldcat as below:
PERFORM set_fieldcat USING 'MEINH' 10 text-o08 '23' 'L' space.
FORM set_fieldcat USING p_field p_length p_text p_pos p_just p_nozero.
CLEAR wa_fcat.
wa_fcat-fieldname = p_field.
wa_fcat-tabname = 'IT_OUTPUT'.
wa_fcat-outputlen = p_length.
wa_fcat-seltext_m = p_text.
wa_fcat-col_pos = p_pos.
wa_fcat-just = p_just.
wa_fcat-no_zero = p_nozero.
APPEND wa_fcat TO it_fcat.
ENDFORM. " SET_FIELDCAT
Please could you help why the unit is not displayed correctly in background?
Thanks,
Priya
2014 Dec 08 12:55 PM
Hi priya,
check that the data type is same for internal table field "ie for IT_OUTPUT" and text-008.
Thanks.
2014 Dec 08 1:09 PM
Can you post definition of the unit fields in the internal table, actually unit fields are 3 character length internally and externally with conversion-exit CUNIT.
Do you actually fill it with correct data ?
(Sometimes ALV is able to correct such errors as external value in fields that should contain internal values, but not always)
Regards,
Raymond
2014 Dec 08 1:33 PM
Hi Raymond,
I am defining the unit as
meinh TYPE mara-meins,
I am using 'CONVERSION_EXIT_CUNIT_OUTPUT' to display unit in ALV report. Is this causing some problem while the report is executed in background?
Thanks,
Priya
2014 Dec 08 1:49 PM
Execute a Consistency Check during interactive display of the grid. Check in field catalog if the unit field carry the conversion-exit, if yes you are asking the ALV to convert some already converted data, and the background version of ALV rely on older code (as of REUSE ALV LIST FM) that was not always able to correct the error.
So don’t convert the data, let SAP do it, also if you reference some quantity with this field, the ALV may get in trouble for some exotic unit (As it currently is often not able to identify the unit attributes to display quantity, hopefully most quantity fields don’t actually need this option)
NB: If you don’t use the unit as a reference for quantity, you can keep on converting the value, but insure that the field catalog will not contain the conversion-exit, do not give any ddic reference in the field definition.
Regards,
Raymond
PS: Also reduce output length to 3 and not 10, Else ALV may consider there is no enough space to display the field...
2014 Dec 13 10:56 AM
Thanks Raymond. I removed the conversion exit and its displaying correctly in background.