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

Table control problem ...

Former Member
0 Likes
1,770

Hi all,

I did that a lot of times before, but it's the first time I can't get it to work and can't find why ...

I've a Dynpro (8000) with 2 tables controls in it (nothing else yet).

The dynpro flowlogic looks like this ;


PROCESS BEFORE OUTPUT.

  MODULE status_8000.

  LOOP AT t_kpi_servi WITH CONTROL tc_kpi_servi.
  ENDLOOP.

  LOOP AT t_kpi_dia WITH CONTROL tc_kpi_dia.
  ENDLOOP.

PROCESS AFTER INPUT.

  LOOP AT t_kpi_servi.
  ENDLOOP.

  LOOP AT t_kpi_dia.
  ENDLOOP.

The controls are defined like this ;


CONTROLS: tc_kpi_dia TYPE TABLEVIEW USING SCREEN 8000,
          tc_kpi_servi TYPE TABLEVIEW USING SCREEN 8000.

But when I syntax check I keep getting this error:


The first field (key word) in LOOP must have a field name; a "LOOP... ENDLOOP" may   
be missing in PBO or PAI.                                                     

Would be nice if someone got an idea .... thanks in advance

19 REPLIES 19
Read only

Former Member
0 Likes
1,734

hi,

the loop statment must be same in PBO and PAI like

either pBO you make like this

LOOP AT t_kpi_servi

ENDLOOP.

LOOP AT t_kpi_dia .

ENDLOOP.

or in PAI

LOOP AT t_kpi_servi WITH CONTROL tc_kpi_servi. ENDLOOP. LOOP AT t_kpi_dia WITH CONTROL tc_kpi_dia. ENDLOOP.

cheers,

sasi

Read only

Former Member
0 Likes
1,734

Delete all text from screen and type in the code again.

( Done do a cut paste ).

Read only

0 Likes
1,734

> Delete all text from screen and type in the code

> again.

> ( Done do a cut paste ).

Already tried that

Read only

Former Member
0 Likes
1,734

Hi Sasi,

I got the same problem with this code:


PROCESS BEFORE OUTPUT.

  MODULE status_8000.

  LOOP AT t_kpi_servi WITH CONTROL tc_kpi_servi.
  ENDLOOP.

  LOOP AT t_kpi_dia WITH CONTROL tc_kpi_dia.
  ENDLOOP.


PROCESS AFTER INPUT.

  LOOP AT t_kpi_servi WITH CONTROL tc_kpi_servi.
  ENDLOOP.

  LOOP AT t_kpi_dia WITH CONTROL tc_kpi_dia.
  ENDLOOP.

Read only

Former Member
0 Likes
1,734

Do your table controls have at least one column.

Read only

0 Likes
1,734

> Do your table controls have at least one column.

Yes, they got two columns.

Read only

Former Member
0 Likes
1,734

Hi Erik,

Where does the double clicking on the syntax error takes you? Also try changing the order of the table controls once in the screen and see..

Sri

Read only

0 Likes
1,734

> Where does the double clicking on the syntax error

> takes you? Also try changing the order of the table

> controls once in the screen and see..

Hi Sri,

The double click takes me to "PROCESS AFTER INPUT."

Yes, I tried to change the order and same problem.

Read only

0 Likes
1,734

................deleted...........

Message was edited by: Surpreet Singh Bal

Read only

0 Likes
1,734

> a small suggestion

> enter /h and then ctrl+F2

> keep clicking F5

> do debugging

> regards

Yeah I see most of your answers to the questions in the forum looks like this (and press F1 too) ...

Anyway thanks for the "suggestion".

Read only

0 Likes
1,734

Hi Erik

Your statament:

PROCESS BEFORE OUTPUT.

MODULE status_8000.

LOOP AT t_kpi_servi WITH CONTROL tc_kpi_servi.

ENDLOOP.

LOOP AT t_kpi_dia WITH CONTROL tc_kpi_dia.

ENDLOOP.

PROCESS AFTER INPUT.

LOOP AT t_kpi_servi.

ENDLOOP.

LOOP AT t_kpi_dia.

ENDLOOP.

is ok. I tried it in my system and I didn't have any error, so check your table control in screen painter or try to create a new program like that.

Max

Read only

0 Likes
1,734

Hi Max,

I just tried to create "test" program with only the two TC and I still have the error.

The main programm looks like this (code = char2 , designation = char30)


REPORT Z_TEST_DYNPRO .

TABLES: zsav_kpi_dia,
        zsav_kpi_servi.

DATA: BEGIN OF t_kpi_dia OCCURS 0,
  code LIKE zsav_kpi_dia-code,
  desi LIKE zsav_kpi_dia-designation.
DATA: END OF t_kpi_dia.

DATA: BEGIN OF t_kpi_ser OCCURS 0,
  code LIKE zsav_kpi_servi-code,
  desi LIKE zsav_kpi_servi-designation.
DATA: END OF t_kpi_ser.

CONTROLS: tc_kpi_dia TYPE TABLEVIEW USING SCREEN 8000,
          tc_kpi_ser TYPE TABLEVIEW USING SCREEN 8000.

The dynpro :


PROCESS BEFORE OUTPUT.
* MODULE STATUS_8000.
*
  LOOP AT t_kpi_ser WITH CONTROL tc_kpi_ser.
  ENDLOOP.

  LOOP AT t_kpi_dia WITH CONTROL tc_kpi_dia.
  ENDLOOP.

PROCESS AFTER INPUT.
* MODULE USER_COMMAND_8000.

  LOOP AT t_kpi_ser.
  ENDLOOP.

  LOOP AT t_kpi_dia.
  ENDLOOP.

It's very strange ... I can't see what can be wrong in the screenpainter either.

Read only

0 Likes
1,734

I'm very sorry, but I can't have your error....

I created a test program as your:

DATA: BEGIN OF T_KPI_DIA OCCURS 0,

CODE(3),

DESI(30),

END OF T_KPI_DIA.

DATA: BEGIN OF T_KPI_SER OCCURS 0,

CODE(3),

DESI(30),

END OF T_KPI_SER.

CONTROLS: TC_KPI_DIA TYPE TABLEVIEW USING SCREEN 8000,

TC_KPI_SER TYPE TABLEVIEW USING SCREEN 8000.

CALL SCREEN 8000.

And then drew the screen with 2 TC in which I put fields called like fields of internal table.

When I check prgram, it's all ok, any error occur.

Max

Read only

0 Likes
1,734

hi,

try with this, change the loop statement like below in both pBO and PAI

loop with control tc_kpi_ser.

Read only

0 Likes
1,734

try with this

PROCESS BEFORE OUTPUT.

MODULE STATUS_1001.

*

loop with control gt_1.

endloop.

loop with control gt_2.

endloop.

PROCESS AFTER INPUT.

loop with control gt_1.

endloop.

loop with control gt_2.

endloop.

or try with this also

PROCESS BEFORE OUTPUT.

MODULE STATUS_1001.

*

loop.

endloop.

loop.

endloop.

PROCESS AFTER INPUT.

loop.

endloop.

loop.

endloop.

Read only

Former Member
0 Likes
1,734

Hi Erik,

If you are still geting the same error, then try removing the first TC and then do syntax check. Repeat the same process with the second TC.

I assume that the structure of both internal tables is proper.

Interesting error though..

Sri

Read only

0 Likes
1,734

Hi Sri,

> If you are still geting the same error, then try

> ry removing the first TC and then do syntax check.

> Repeat the same process with the second TC.

Yes I tried already, if I put one TC it works.

Yes very very "interesting" error

Read only

Former Member
0 Likes
1,734

deleted

Message was edited by: Erik Gugliandolo

Read only

0 Likes
1,734

Thanks all for your answers

But, I got it to work now ...

I've the two TC in the screenpainter if I remove all header column text it works! ...

Now if I name one of the header column with '#' in the first TC it still works, but if then I name a column '#' in the second TC it crash.

Message was edited by: Erik Gugliandolo