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

Please Help

Former Member
0 Likes
678

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
Read only

gopi_narendra
Active Contributor
0 Likes
631

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
Read only

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

Regards

Pratyusha

Read only

gopi_narendra
Active Contributor
0 Likes
632

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

Read only

0 Likes
631

Thanks to all masters!!!

Especially to master gopi!!! It works!!

'till next questions...ehehe

Read only

Former Member
0 Likes
631

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

Read only

Former Member
0 Likes
631

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.