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: 

Update Table control in PAI

oleg_sukharenko
Explorer
0 Kudos
900

Hi, here is my issue:

I populated a table control in PBO with blank records ready for user input.

In PAI I want to implement clipboard functionality, so if a user push "clipboard" button on my screen i populate internal table ITAB(used for table control on the screen); with data from clipboard.

The problem is program does not go inside LOOP AT ITAB-->ENDLOOP in the PAI and it does not recognized that user made an input in my table control. I have tried to use FM  DYNP_VALUES_UPDATE and it successfully competed but still, the program does not go inside LOOP AT ITAB -->. ENDLOOP in PAI. How do I force the system to make believe a user update a table control record?

Your help gratefully appreciated and will be properly rewarded..

5 REPLIES 5

Former Member
0 Kudos
468

Hi Oleg,

You can write your code to populate the internal table after the LOOP..ENDLOOP in the PAI.

Regards,

Santanu.

0 Kudos
468
Re: Update Table control in PAI

Hi Santanu,

Imagine my control table is for the user to enter material and inside the LOOP_ENDLOOP in the PAI I am doing additional data retrieval per user entered material with validations.So if clipboard pressed by user I am coping data from clipboard and populate internal table, instead of user entering it in the control table. I need the PAI go inside of the LOOP_ENDLOOP to perform validations. 

0 Kudos
468

Please

1- Show us your code and image of ypur screen.

2-When you click in any button in screen then the pai is called.

3-Please see the tcod ABAPDOCU and go in leter T (see the image 😞

Former Member
0 Kudos
468

I think you already attached a function code to the clipboard button. The internal table which you are looping contains atleast one row of data.

Arun_Prabhu_K
Active Contributor
0 Kudos
468

Hello Oleg Su.

     Since initially there won't be any record in table control, you need to append that data to itab.

     For instance,

      MODULE TC_MODIFY INPUT.

        MODIFY ITAB INDEX TC-CURRENT_LINE.

        if sy-subrc <> 0.

            APPEND itab.

        endif.

      ENDMODULE.                    "TC_MODIFY INPUT

Regards.