07-26-2012 6:51 PM
Dear Experts,
I have been given with a task regarding Module pool programming.I have created one table control ,where i will give input as material number then it should populate other details in remaining fields of the row.What my issue is,for the first record it is giving correct values,but if i enter next value in table control, it is doubling up.After debugging i came to know that,cursor is always pointing to the first record only.so it is taking work area of first record.I tried changing my cursor position useing SET CURSOR FIELD.But no use.Here i have attached my test case screen shots .please help me out.
Flow logic:
PAI module:(process)
Ouput one:
output two:
07-26-2012 7:54 PM
Hi NAresh,
In the PAI, change the blank LOOP..ENDLOOP to
LOOP at LT_MARA into LS_MARA
chain
add all your fields of table control
module process on chain request
endchain
endloop
MODULE PROCESS
MODIFY IT_MARA FROM LS_DISP INDEX TC_DISP-CURRENT_LINE.
IF subrc <> 0 APPEND IT_MARA
Check out the Table control documentation for more details on how the cursor is controlled and other fields to manipulate the behavior.
-Puneet
07-26-2012 7:54 PM
Hi NAresh,
In the PAI, change the blank LOOP..ENDLOOP to
LOOP at LT_MARA into LS_MARA
chain
add all your fields of table control
module process on chain request
endchain
endloop
MODULE PROCESS
MODIFY IT_MARA FROM LS_DISP INDEX TC_DISP-CURRENT_LINE.
IF subrc <> 0 APPEND IT_MARA
Check out the Table control documentation for more details on how the cursor is controlled and other fields to manipulate the behavior.
-Puneet
08-02-2012 3:43 PM