Application Development and Automation 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: 
Read only

unable to read table control data in module pool

Former Member
0 Likes
2,702

Hi Folks,

I am unable to read table control data in module pool.

I can read table control data by using the fm  'dynp_values read' (only if i manually enter values for 'stepl') but how do I populate 'stepl' values?

Thanks and regards,

Kawish

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,159

Hi Kawish,

In PAI event between loop and endloop. create module and u will get data in wa..

Regards,

Mahesh somanath.

Hi Folks,

I am unable to read table control data in module pool.

I can read table control data by using the fm  'dynp_values read' (only if i manually enter values for 'stepl') but how do I populate 'stepl' values?

Thanks and regards,

Kawish

11 REPLIES 11
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,159

In the POV, use FM DYNP_GET_STEPL.

Regards,

Raymond

Read only

0 Likes
2,159

I am trying to read the values on a user input (In PAI).

Thanks,

Kawish

Read only

0 Likes
2,159

So add some FIELDS statements in PAI before you need the data ?

Can you explain your scenario ?

Regards,

Raymond

Read only

0 Likes
2,159

HI Raymond,

Thanks for your reply.

On pressing save I am  trying to fetch the data from the table control of the screen.

By Looping over the internal table attached to the table control I am not able to fetch the data.

Nor I am able to use dynp_values_read as I am not able able to populate 'stepl' field value.

I suppose that POV can be called only after the PAI block.

Regard,

Kawish

Read only

0 Likes
2,159

By Looping over the internal table attached to the table control I am not able to fetch the data.

That must be done in PAI not in a called form.

Did you put a LOOP AT itab. with a CHAIN/ENDCHAIN and every required FIELD, followed by a MODULE checker ON [CHAIN-]REQUEST to validate data and a MODULE update to modify the internal table, and ise you USER-COMMAND executed after the loop (exception for a  previous call with the AT EXIT-COMMAND option ?


PROCESS AFTER INPUT.

  MODULE user_command AT EXIT-COMMAND.

  CHAIN.

    FIELD field1.

    FIELD field2.

    MODULE check_header_field?

  ENDCHAIN.

  LOOP AT itab.

    MODULE load_current_itab_into_memory.

    CHAIN.

      FIELD itab-field3.

      FIELD itab-field4.

      FIELD itab-field5.

      MODULE check_and_update_itab_values ON CHAIN-REQUEST. " PAI ne PBO values

    ENDCHAIN.

  ENDLOOP.

  MODULE user_command.

NB: (my 2 cents' worth) DYNP_VALUES_READ as DYNP_GET_STEPL are intended to be used in at POV to manage F4, they can be used elsewhere but without warranty of success, and I doubt you can use those to  read multiple lines of a table control, the get stepl only convert the cursor position to an index required by those FM and should not be changed to read multiple records.

Regards,

Raymond

Read only

0 Likes
2,159

Hi Raymond,

I am trying to execute as stated above.(exactly-1).

If I select or mark any records in the table control then I can read them in my module pool.

But my requirement is without marking or selecting any records I want to fetch all the records and save them.

Thanks and Regards,

Kawish

Read only

0 Likes
2,159

hi kawish,

Why it is not working:

Is your code same as this in the PAI.

read table itab into wa index tcontrol-CURRENT_LINE.

    ......................

    modify itab from wa index tcontrol-CURRENT_LINE.

endif.

Read only

0 Likes
2,159

Hi Abdul Raheem,

Yes the code is same.

unable to fetch the data from either of the above statements.

Regards,

Kawish

Read only

0 Likes
2,159

Can you share your source code?

so that it can be checked and advised accordingly.

Read only

0 Likes
2,159

If you remove the ON CHAIN-REQUEST then internal table will always been refreshed from screen (even if not useful at all...°

But insure the FIELDS statements are executed after reading data from screen, else they will be overriden by previous values in the READ TABLE statement if you don't manage two work areas one for READ TABLE and one for FIELDS read from screen.

Regards,

Raymond

Read only

Former Member
0 Likes
2,160

Hi Kawish,

In PAI event between loop and endloop. create module and u will get data in wa..

Regards,

Mahesh somanath.