05-06-2009 7:30 AM
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.
05-06-2009 10:19 AM
I think you are using Table Controls. Instead of that use ALV, that is the better one for Objects.
05-06-2009 11:07 AM
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.
05-06-2009 11:39 AM
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.
05-06-2009 11:44 AM
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.
05-06-2009 12:22 PM
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?
05-06-2009 2:24 PM
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!
05-11-2009 1:07 AM
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.
05-20-2009 6:04 AM
05-06-2009 10:31 AM
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.