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: 

Header line missing in internal table

Former Member
0 Kudos

Hi experts,

I am working on the module pool program with a screen 0100. There is a table called TABL_MATR in screen 0100.

My problem now is whenever I tried to compile the program I got this error.


The program "SAPMZXXX_MYAHSAM_CHECK" has terminated.                                                                                
The following error occurred (short text of cause of error):           
"FX103: Header line missing in internal table."                                                                                
The following elements are affected:                                   
Screen name.............. "SAPMZXXX_MYAHSAM_CHECK"                        
Screen number............ 0100                                                                                
This error is connected to the processing of an internal table with the
field or variable "ITAB_TRAY", and was triggered within in the program.

process before output.
  module status_0100.

  module tabl_change_tc_attr.
  loop at itab_tray" into wa_tray
       with control tabl_matr
       cursor tabl_matr-current_line.
  endloop.

The declaration of ITAB_TRAY


* include MZXXX_MYAHSAM_CHECK_TOP
PROGRAM MZXXX_MYAHSAM_CHECK_TOP

TYPES: LS_TRAY   TYPE ZXXX_TRAY.

DATA: ITAB_TRAY  TYPE STANDARD TABLE OF LS_TRAY,
      ITAB_COVER TYPE STANDARD TABLE OF LS_TRAY,
      WA_TRAY    LIKE LINE OF ITAB_TRAY,
      WA_COVER   LIKE LINE OF ITAB_COVER.

CONTROLS: TABL_MATR TYPE TABLEVIEW USING SCREEN 0100.

I understand that the problem now is the header line is missing in the internal table. If not mistaken, header line is no longer support in OOP (TC SE24).

Therefore, I am doing it in the other way, which is using the workarea. How to resolve this?

Can someone help or guide me how should I continue the next steps?

Thanks in advance.

9 REPLIES 9

Former Member
0 Kudos

I think you are using Table Controls. Instead of that use ALV, that is the better one for Objects.

0 Kudos

Hi Vija,

Thanks for your reply.

I cannot use ALV to replace my module pool table because the table will display data instantly.

I believe ALV is more suitable for reporting purposes. Please correct me if I am wrong.

Hi Vidhi Shah,

I am in the practice of trying to avoid to use the syntax that going to obsolete, and WITH HEADER LINE is not supported in OOP.

That is the reason why I use work area instead of header line.

Any other ideas how to resolve the problem?

Thanks all.

0 Kudos

Hi,

If you are using work area, i guess that it should be :

loop at itab_tray into wa_tray

with control tabl_matr

cursor tabl_matr-current_line.

endloop.

Regards.

0 Kudos

Even in ALV instant data can be shown. There are many event with the gris , which you can use to change the data and display. Have a look in the class CL_GUI_ALV_GRID.

0 Kudos

Hi Dev Parbutteea,

Exactly. But whenever I updated record into ITAB_TRAY, no record show in table tabl_matr in screen 0100.

What is not right?

0 Kudos

loop at itab_tray" into wa_tray

with control tabl_matr

cursor tabl_matr-current_line.

endloop.

In the loop what you showed, there is nothing like saving or updating the tabl_matr...

Only u r opening the table control and placing the cursor at current_line position..

I guess u have to write some code to place the record on screen 0100in table control...

I dont know much about table controls...but I can guess this might be the problem!

0 Kudos

Hello everyone,

Is there any other alternative solution for my query?

I am working on a module pool program with screen 0100 and table tabl_matr.

I need an alternative way to declare the headerline, but as this is not supported in OO way, I need to declare it as workarea.

If I were to do so, the record in table tabl_matr is not updated as expected.

Anyone experience this?

Please help and guide me.

0 Kudos

Hello abap experts,

Any solutions for this?

Please help.

Former Member
0 Kudos

Hi..

Instead of

DATA: ITAB_TRAY TYPE STANDARD TABLE OF LS_TRAY,

Use

DATA: ITAB_TRAY TYPE TABLE OF LS_TRAY WITH HEADER LINE,

Vidhi.