Application Development 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: 

Please Help

Former Member
0 Kudos

I have a code like this:

My purpose is to have a header in my excel summary report.

But there's an error like this:

"Field "gv_HEADING-TEXT" is unknown. It is neither in one of the

specified tables nor defined by a "DATA" statement. "DATA" statement."

sample code in my program:

data: gv_heading(10) type c.

gv_HEADING-TEXT = 'Company Code'.

append IT_HEADING.

gv_HEADING-TEXT = 'RFQ Number'.

append IT_HEADING.

gv_HEADING-TEXT = 'RFQ Line Item'.

append IT_HEADING.

call function 'GUI_DOWNLOAD'

exporting

FILENAME = L_FNAME

FILETYPE = 'DAT'

tables

DATA_TAB = IT_FINAL

FIELDNAMES = gv_HEADING

Please help me in solving this problem.

more points!!

1 ACCEPTED SOLUTION

gopi_narendra
Active Contributor
0 Kudos

Hi Salma,


" i missed the declaration in my previous post.
* Excel fieldname heading
data : begin of IT_HEADING occurs 0,
         TEXT(15),
       end of IT_HEADING.

    IT_HEADING-TEXT = 'Company Code'.
    append IT_HEADING.
    IT_HEADING-TEXT = 'RFQ Number'.
    append IT_HEADING.
    IT_HEADING-TEXT = 'RFQ Line Item'.
    append IT_HEADING.

    call function 'GUI_DOWNLOAD'
      exporting
        FILENAME                = L_FNAME
        FILETYPE                = 'DAT'
      tables
        DATA_TAB                = IT_FINAL
        FIELDNAMES              = IT_HEADING

Regards

Gopi

5 REPLIES 5

Former Member
0 Kudos
data : begin of GV_HEADING occurs 0,
         TEXT(15),
       end of GV_HEADING.

Regards

Pratyusha

gopi_narendra
Active Contributor
0 Kudos

Hi Salma,


" i missed the declaration in my previous post.
* Excel fieldname heading
data : begin of IT_HEADING occurs 0,
         TEXT(15),
       end of IT_HEADING.

    IT_HEADING-TEXT = 'Company Code'.
    append IT_HEADING.
    IT_HEADING-TEXT = 'RFQ Number'.
    append IT_HEADING.
    IT_HEADING-TEXT = 'RFQ Line Item'.
    append IT_HEADING.

    call function 'GUI_DOWNLOAD'
      exporting
        FILENAME                = L_FNAME
        FILETYPE                = 'DAT'
      tables
        DATA_TAB                = IT_FINAL
        FIELDNAMES              = IT_HEADING

Regards

Gopi

0 Kudos

Thanks to all masters!!!

Especially to master gopi!!! It works!!

'till next questions...ehehe

former_member588853
Active Contributor
0 Kudos

Hi,

gv_HEADING is of type C.

and it dont have and components TEXT..

I think your It_heading is having the component TEXT..

Now define.

data gv_heading type <It_heading type> .. I.e you might have it_heading of some type declare thesame for gv_heading..

or

types: begin of ty_heading ,

text(200) type c,

end of ty_heading.

data gv_heading type ty_heading.

rewards if useful,

regards,

nazeer

Former Member
0 Kudos

hi,

declare gv_heading as a workarea and use it as

types: begin of gv_heading1

text(15) type c,

endof gv_heading1.

data: gv_heading type gv_heading1.

gv_HEADING-TEXT = 'Company Code'.

append IT_HEADING.

gv_HEADING-TEXT = 'RFQ Number'.

append IT_HEADING.

gv_HEADING-TEXT = 'RFQ Line Item'.

append IT_HEADING.

call function 'GUI_DOWNLOAD'

exporting

FILENAME = L_FNAME

FILETYPE = 'DAT'

tables

DATA_TAB = IT_FINAL

FIELDNAMES = gv_HEADING

if helpful reward some points.

with regards,

Suresh Aluri.