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

Tabstrip with two tabs

Former Member
0 Likes
924

Hi Experts,

I have a tabstrip with two tabs.

Each tab has one tablecontrol.

At the bottom of table control i have given insert button.

When i enter data in first tab and switch to another tab and enter data and come back to first tab and again go back to second tab, data is lost in second tab.

I have attached the screenshot.

Any inputs will be greatly appreciated.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
889

Insure in the PAI of both subscreen that you saved changed data into program internal tables :

subscreen PAI logic

PROCESS AFTER INPUT.


   LOOP AT itab.

     MODULE tabctrl_old. " Read program itab

     CHAIN.

       FIELD itab-field1. " Now read new values from screen

       FIELD itab-field2.

       MODULE tabctrl_upd ON CHAIN-REQUEST. " If data changed, update itab

     ENDCHAIN.

   ENDLOOP.

Also in main screen logic PAI only execute user_command (exception : exit command) after subscreen logic


PROCESS AFTER INPUT.

   MODULE user_command AT EXIT-COMMAND.

   CALL subscreen subscreenarea.

   MODULE user_command.

Regards,

Raymond

3 REPLIES 3
Read only

former_member210770
Active Participant
0 Likes
889

Hi Kulprakash,

Please make sure that you don't refresh the internal table in which you are fetching data and displaying in tabstrip tab2.

Please refresh it on save event or any necessary event only.

Regards,

Sagar

Read only

RaymondGiuseppi
Active Contributor
0 Likes
890

Insure in the PAI of both subscreen that you saved changed data into program internal tables :

subscreen PAI logic

PROCESS AFTER INPUT.


   LOOP AT itab.

     MODULE tabctrl_old. " Read program itab

     CHAIN.

       FIELD itab-field1. " Now read new values from screen

       FIELD itab-field2.

       MODULE tabctrl_upd ON CHAIN-REQUEST. " If data changed, update itab

     ENDCHAIN.

   ENDLOOP.

Also in main screen logic PAI only execute user_command (exception : exit command) after subscreen logic


PROCESS AFTER INPUT.

   MODULE user_command AT EXIT-COMMAND.

   CALL subscreen subscreenarea.

   MODULE user_command.

Regards,

Raymond

Read only

0 Likes
889

I got my problem solved.

I kept one flag to prevent overwriting of new value by old value.