03-31-2008 6:22 PM
Hi experts,
i use a table control to get data from the dialog.
Both in PBO and in PAI there is a LOOP transfering the datasets from the internal table to the table control and vice versa.
In PBO the "LOOP WITH CONTROL"-statement works fine.
In PAI the "LOOP WITH CONTROL"-statement is execute and sy-stepl/sy-loopc are filled with the correct values.
But in PAI "LOOP WITH CONTROL" skips the source-code inside the loop. The debugger jumps to the ENDLOOP-statement ignoring all statements between LOOP .. and ENDLOOP.
Can anybody help ?
Thanks in advance.
Matt
03-31-2008 7:31 PM
Matthias,
In PAI code that I've written with Table Controls, I do not use the WITH CONTROL option. Here is one example.
loop at WT_ZLMACT.
chain.
field WK_ZLMACT-SEQNO.
field WK_ZLMACT-CONT_TY.
field WK_ZLMACT-CONT_DT.
field WK_ZLMACT-CONT_TM.
field WK_ZLMACT-CONTRE.
field WK_ZLMACT-COMP_DT.
field WK_ZLMACT-COMP_TM.
field WK_ZLMACT-COMP_NM.
field WK_ZLMACT-AEDAT.
field WK_ZLMACT-AETIM.
field WK_ZLMACT-AENAM.
field WK_ZLMACT-ERDAT.
field WK_ZLMACT-ERTIM.
field WK_ZLMACT-ERNAM.
field WK_ZLMACT-DISP_NOTE.
endchain.
field WK_ZLMACT-SEL
module TABCTL_ZLMACT_mark on request.
endloop.
04-01-2008 7:14 AM
I've used this style plenty of times for data entry screens
"[ in PBO ]
loop with control tc_8888_sr.
module d8888_fill_tc. "load data from internal table row
endloop.
"[ in PAI ]
loop with control tc_8888_sr.
chain.
field:
gs_8888_tc-sel,
gs_8888_tc-ltext.
module d8888_line_tc_handler. "line validation / capture into internal table row
endchain.
endloop.
and not had a problem... The symptom you describe sounds more like the module in PAI isn't actually implemented - what happens when you double click on it? (extended check will also show up exceptions).
Jonathan
04-01-2008 6:34 PM
Hi all,
thanks a lot for the advices.
I found the problem. It is rather simple. There are 4 lines displayed in my table control and all of them are initial.
PAI skips initial lines automatically.
I'm so stupid. That took me a long time.