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: 

field symbol with top of page in reuse_alv_list

former_member186143
Active Contributor
0 Kudos
100

When using the top_of_page in REUSE_ALV_LIST_DISPLAY

I had in the old programm reference to values in the outtab for the header in the new programm I use dynamic tables and I wonder how to add those values in a header.


    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
              i_callback_program       = h_repid
              i_callback_pf_status_set = 'SET_PF_STATUS'
              i_callback_user_command  = 'USER_COMMAND'
*            i_structure_name         = 'ZDOORBEL_ALV'
*            IT_EVENTS                = TEVENTS
              is_layout                = slayout
              it_fieldcat              = it_fieldcat[]
              it_sort                  = tsort[]
              i_save                   = a_save
              is_variant               = variant

         TABLES
              t_outtab                 = <ta_output>
  .

in my top_of_page I try to read the current row of <ta_output> but I have no clue on how to do it. I gives the error that there is no workarea assigned to <ta_output>

anybody knows how to read the current line of <ta_output> in top_of_page ?

kind regards

arthur de smidt

1 ACCEPTED SOLUTION

Former Member
0 Kudos
67

Hi,

ta_output is an internal table without header line.

I think this may be the error it is showing.

And make use of SY-TABIX for your requirement

Regards,

Jagadish

6 REPLIES 6

Former Member
0 Kudos
67

Make use of SY-TABIX.

Former Member
0 Kudos
68

Hi,

ta_output is an internal table without header line.

I think this may be the error it is showing.

And make use of SY-TABIX for your requirement

Regards,

Jagadish

Former Member
0 Kudos
67

Hi,

u can create a fld symbol.... as the line type of <ta_output>.

then use...

read table <ta_output> assigning <WA>.

Amitava

0 Kudos
67

I have


* fieldsymbols voor dynamische ALV tabel
FIELD-SYMBOLS: <ta_output> TYPE table ,
              <ta_color> TYPE table,
              <l_line>  TYPE ANY,
              <wa_output> type any,
              <wa>  TYPE ANY,
               <l_field> TYPE ANY,
               <fs> TYPE ty_pernrs.
.
......................
FORM top_of_page.
.....
  CREATE DATA new_line LIKE LINE OF <ta_output>.
  ASSIGN new_line->* TO <wa_output>.
  read table <ta_output> assigning <wa_output> index sy-tabix.

if ra_pernr = 'X'.
  if <wa_output>-week = space or <wa_output>-pernr = '00000000'.
.............

but still it says that the

The data object "<WA_OUTPUT>" has no structure and therefore no

component called "WEEK" . .

Edited by: A. de Smidt on Jun 26, 2008 11:07 AM

0 Kudos
67

I still had to assign the workarea to specific fields. thought I could skip that step and declare straight away


  CREATE DATA new_line LIKE LINE OF <ta_output>.
  ASSIGN new_line->* TO <wa_output>.
  read table <ta_output> assigning <wa_output>  index sy-tabix.



    ASSIGN COMPONENT 'WEEK' OF STRUCTURE <wa_output>  TO <fs_week>.
    ASSIGN COMPONENT 'PERNR' OF STRUCTURE <wa_output>  TO <fs_pernr>.
    ASSIGN COMPONENT 'ENAME' OF STRUCTURE <wa_output>  TO <fs_ename>.


if ra_pernr = 'X'.
  if <fs_week> = space or <fs_pernr> = '00000000'.
     h_groep = 'totaal van de opgevraagde medewerkers'.
  else.
     write <fs_pernr> to h_tekenreeks no-zero.
     concatenate h_tekenreeks <fs_ename> into h_groep separated by space.
  endif.
endif.

kind regards

arthur

kiran_k8
Active Contributor
0 Kudos
67

Smidt,

In the data declaration part

field-symbols <fs> type LVC_TITLE.

concatenate 'Price Extraction Report' ' ' into title separated by space.

assign title to <fs>.

In the alv grid display function module give as

I_GRID_TITLE = <fs>

K.Kiran.