Skip to Content
0
Jun 02, 2008 at 06:18 AM

loop the PAI modules with out chain and endchain ... table controls...

422 Views

Hi... all...

In my screen programs....

Iam having one table control with three fields.... internal table itab.

here one of those fields value change can trigger two PAI modules...

please look at following code...

PROCESS AFTER INPUT.

*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'DLOAN'

LOOP AT ITAB.

CHAIN.

FIELD ITAB-field1.

FIELD ITAB-field2.

FIELD ITAB-field3 Module name1 ON REQUEST.

MODULE name2 ON CHAIN-REQUEST.

endchain.

ENDLOOP.

so i think you can understand that for every new value change of field "field3" of table control there two modules triggering.for example if you change 4th row value of field3 in the table control and press one push botton in that screen.... these two modules can carry some caluclation part....

i modified above code as follows as per my requirement....

PROCESS AFTER INPUT.

*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'CTRL'

LOOP AT ITAB.

CHAIN.

FIELD ITAB-field1.

FIELD ITAB-field2.

FIELD ITAB-field3.

endchain.

ENDLOOP

Module name1 ON REQUEST.

MODULE name2 ON CHAIN-REQUEST.

... so with this code also we can get same output.. but here we have to check condititons like....

if filed3 = 1000( only for example)...

then modules will triggers....no no.... automatically modules triggers.. and they can check this condition and then gives proper output...

under stand?

so my problem is...

in the first situation... we can triggers the modules... more than one time....for the changes any where with in the table control.... and loop...means one after another...

unfortunately... in the second situation we cant do it for the second time... because it was not in the loop....

how to solve this problemmm...

if you want more clarifications..... let me know... i come back you,,,,

thank you,

naveen

Edited by: Naveen Inuganti on Jun 2, 2008 12:12 PM

Edited by: Naveen Inuganti on Jun 2, 2008 12:14 PM

Edited by: Naveen Inuganti on Jun 2, 2008 3:07 PM