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 cursor issue

naresh_bammidi
Contributor
0 Kudos

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:

1 ACCEPTED SOLUTION

Puneet_Gupta
Contributor
0 Kudos

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

2 REPLIES 2

Puneet_Gupta
Contributor
0 Kudos

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

0 Kudos

It's resolved.thanks for your contribution

Thanks

Naresh