‎2008 Dec 17 11:16 AM
Hi Experts,
I am using describe statement to find the number of records between my selection screen parameters and displaying in alv grid format, and in alv report i am using
perform fcat using '1' 'kunnr' 'customernumber' 'X'.
FORM FCAT USING FP_COL_POS
FP_FIELDNAME
FP_SELTEXT_M
fp_hotspot..
wa_fcat-col_pos = fp_col_pos.
wa_fcat-fieldname = fp_fieldname.
wa_fcat-seletxt_m = fp_seltext_m.
wa_fcat-hotspot = fp_hotspot.
append wa_fcat to it_fcat.
endform.
my requirement is when there is no data in the describe statement that is 0 the hotspt has to be disabled how to perform this...
Thanks and Regards,
Thirukumaran. R
‎2008 Dec 17 11:33 AM
hi as u r passin hard coded value sto perform stmt, before callin the perform stmt check teh line count, no. of records, in the internal table used for passing the data contains to alv grid, if tht line count is less than 1 pass the hotspot flag as balnk else pass it as X
sumthin liek this,
data: l_count type i.
describe it_data lines l_count.
if l_count lt 1.
call the perform with hotspot flag as space
else
call the perform with hotspot flag as 'X'
endif
Edited by: Ashwinee on Dec 17, 2008 5:04 PM
‎2008 Dec 17 11:30 AM
describe table itab lines lv_lines.
if lv_lines gt 0.
perform fcat using '1' 'kunnr' 'customernumber' 'X'.
else.
perform fcat using '1' 'kunnr' 'customernumber' ' '.
endif.
FORM FCAT USING FP_COL_POS
FP_FIELDNAME
FP_SELTEXT_M
fp_hotspot..
wa_fcat-col_pos = fp_col_pos.
wa_fcat-fieldname = fp_fieldname.
wa_fcat-seletxt_m = fp_seltext_m.
wa_fcat-hotspot = fp_hotspot.
append wa_fcat to it_fcat.
endform.
‎2008 Dec 17 11:33 AM
hi as u r passin hard coded value sto perform stmt, before callin the perform stmt check teh line count, no. of records, in the internal table used for passing the data contains to alv grid, if tht line count is less than 1 pass the hotspot flag as balnk else pass it as X
sumthin liek this,
data: l_count type i.
describe it_data lines l_count.
if l_count lt 1.
call the perform with hotspot flag as space
else
call the perform with hotspot flag as 'X'
endif
Edited by: Ashwinee on Dec 17, 2008 5:04 PM
‎2008 Dec 17 11:38 AM
data g_hotspot.
data g_lines type i.
clear g_hotspot.
describe table itab lines g_lines.
if not g_lines is inital.
g_hotspot = 'X'.
endif.
perform fcat using '1' 'kunnr' 'customernumber' g_hotspot.
FORM FCAT USING FP_COL_POS
FP_FIELDNAME
FP_SELTEXT_M
fp_hotspot.
wa_fcat-col_pos = fp_col_pos.
wa_fcat-fieldname = fp_fieldname.
wa_fcat-seletxt_m = fp_seltext_m.
wa_fcat-hotspot = fp_hotspot.
append wa_fcat to it_fcat.
endform.