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

Perform statement doubt

Former Member
0 Likes
439

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
418

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

3 REPLIES 3
Read only

Former Member
0 Likes
418
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.
Read only

Former Member
0 Likes
419

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

Read only

Former Member
0 Likes
418

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.