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: 

Table Control Loop in PAI - Doesn't Enter the Loop - Why????

Former Member
0 Kudos
306

In PAI, I have the table control loop, with data, and it does the looping but never enters the loop. So it gets to the LOOP AT scroll_tab and goes right to the ENDLOOP. In between there is a MODULE and then a CHAIN statement with FIELDS and MODULES. The screen allows for 3 entries so it goes to LOOP AT ... ENDLOOP 3 times and moves on. Any ideas why it doesn't enter the loop? It falls into the PBO loop no problem.

PROCESS BEFORE OUTPUT.

  MODULE trans_init.

  LOOP AT scroll_tab WITH CONTROL tc_pers

                                             CURSOR  scroll-cursor.

    MODULE lst_sys_col.

    MODULE get_entry_afrud.

    MODULE set_cursor.

  ENDLOOP.

PROCESS AFTER INPUT.

*--------------------- Processing after entering ------------------

  MODULE processing_exit AT EXIT-COMMAND.

  MODULE save_ok_code.

  MODULE get_cursor_line.

  LOOP AT scroll_tab.

* Provide confirmation data from table

    MODULE get_conf_from_table.

    CHAIN.

      FIELD: afru_col-selkz,

                  afrud-pernr,

                  afrud-ismnw_2.

      MODULE get_aufnr_from_cmfu ON CHAIN-REQUEST.

      MODULE afvgd_set.

      FIELD: afrud-ismnw_2

        MODULE request_ismnw ON REQUEST.

      FIELD: afrud-ismnw_2

        MODULE reset_vbkz ON REQUEST. 

      MODULE get_conf_col.

      MODULE check_conf_col ON CHAIN-REQUEST.

      MODULE check_conf_col_save.

    ENDCHAIN.

    CHAIN.

      FIELD: afrud-ismnw_2

         MODULE check_kum_arbeit ON CHAIN-REQUEST.

    ENDCHAIN.

    MODULE reset_request.

  ENDLOOP.

3 REPLIES 3

alex_campbell
Contributor
0 Kudos
57

A few thoughts:

Are you sure that the code in the modules isn't executing? I'm not sure what the standard behavior is but maybe the debugger isn't stepping through the screen loop for some reason.

Are you sure that your modules are included and named correctly? The screen won't give an error if the module doesn't exist, it will just ignore it.

Is there a CONTINUE statement in the first module?

0 Kudos
57

I have worked with table controls before and debugger definitely steps thru the modules.  That is part of the reason I am at such a loss.

I am positive the modules are included and named correctly.  I have gone so far as to leave only 1 module in there to test things.  It is easily found.  I can even double click on the module name and go to the PAI program, directly to the code.

And no, there is no CONTINUE statement in the module.

But thanks for the thoughts.  Keep'im coming!

Former Member
0 Kudos
57

Which values carries the scroll-cursor? is it the current line?

Have you tried to without CURSOR command?