2008 Jun 24 11:04 AM
Hi,
I am working on an alv report.All the data which has to be displayed on the o/p is in gt_output table.
I have declared like this.
DATA: afield TYPE slis_fieldcat_alv,
yfield TYPE slis_t_fieldcat_alv.
DATA: l_count TYPE i.
company code
CLEAR afield.
l_count = l_count + 1.
afield-col_pos = l_count.
afield-tabname = gt_output.
afield-fieldname = 'RBUKRS'.
afield-ref_tabname = 'GLPCA'.
afield-key = 'X'.
APPEND afield TO yfield.
When I try to execute teh program it is giving error as 'The type of "afield-tabname" cannot be converted to the type of "GT_OUTPUT".
Can anyone tell me what would be the reason for this error?
Regards,
Hema
2008 Jun 24 11:06 AM
l_count = l_count + 1.
afield-col_pos = l_count.
afield-tabname = 'GT_OUTPUT'. "gt_output.
afield-fieldname = 'RBUKRS'.
afield-ref_tabname = 'GLPCA'.
afield-key = 'X'.
APPEND afield TO yfield.
Hi,
I am working on an alv report.All the data which has to be displayed on the o/p is in gt_output table.
I have declared like this.
DATA: afield TYPE slis_fieldcat_alv,
yfield TYPE slis_t_fieldcat_alv.
DATA: l_count TYPE i.
company code
CLEAR afield.
l_count = l_count + 1.
afield-col_pos = l_count.
afield-tabname = gt_output.
afield-fieldname = 'RBUKRS'.
afield-ref_tabname = 'GLPCA'.
afield-key = 'X'.
APPEND afield TO yfield.
When I try to execute teh program it is giving error as 'The type of "afield-tabname" cannot be converted to the type of "GT_OUTPUT".
Can anyone tell me what would be the reason for this error?
Regards,
Hema
2008 Jun 24 11:06 AM
l_count = l_count + 1.
afield-col_pos = l_count.
afield-tabname = 'GT_OUTPUT'. "gt_output.
afield-fieldname = 'RBUKRS'.
afield-ref_tabname = 'GLPCA'.
afield-key = 'X'.
APPEND afield TO yfield.
2008 Jun 24 11:06 AM
put gt_output within coutes and with caps letter....
Reward point if helpful
2008 Jun 24 11:06 AM
keep that in Quotes and use CAPS.
afield-tabname = 'GT_OUTPUT'. "gt_output.
2008 Jun 24 11:06 AM
GT_OUTPUT is the internal table. You have to write 'GT_OUTPUT', because you have to specify the table name.
2008 Jun 24 11:08 AM
2008 Jun 24 11:12 AM
Dear Hema,
whatever you declare 'DATA: afield TYPE slis_fieldcat_alv,' this is reffers structureof slis_fieldcat_alv please convert this into internal table.
Thanks & Regards,
Murali..........
2008 Jun 24 11:22 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |