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

Table Control

Former Member
0 Likes
954

I have created a TABSTRIP. in that there are three tabs and in one of the tabs I have implemented table control.

the problem is when I am entering any data in my table control and switching between the tabs

On coming back to my table control all the data is lost.

what should I do...??

Moderator message : Not enough re-search before posting, discussion locked

Message was edited by: Vinod Kumar

9 REPLIES 9
Read only

Former Member
0 Likes
914

Hello Anuj,

You have to debug to see at what point the data is getting lost.

Then you can take corrective actions from there.

Regards,

Tunwiir

Read only

former_member219162
Contributor
0 Likes
914

Hello Anuj,

Its very hard to tell why the data is getting refreshed. But what I can think of is;

1) Internal Table used to populate table Control is getting refreshed.

2) Check the PBO of the Table control, if you are rightly populating the data over there too in case data in the internal table has any value.

Read only

Former Member
0 Likes
914

Hi,

Your internal table it1 is getting refreshed.

Do like this before switching tabs

Move it1 = it2.

Then wen returning back move it2 to it1, ur data will display.

Thanks

Vijay

Read only

Former Member
0 Likes
914

1) IN PBO MODULE (e.g.STATUS_9005 OUTPUT) check if following statement is there….

DESCRIBE TABLE it_tblname LINES v_lines.(internal table name attached to table control)
tbl_tblcontrol
-lines = v_lines + 1.(tbl_tblcontrol is table control name)
CLEAR it_genloss.

2) IN PAI MODULE WHICH IS INSIDE LOOP…END LOOP OF it_tblname check if following statements are there

  MODIFY it_tblname INDEX tbl_tblcontrol-current_line.
IF sy-subrc NE 0 AND it_tblname IS NOT INITIAL.
APPEND it_tblname.
CLEAR it_tblname.
ENDIF.


Read only

Former Member
0 Likes
914

Debug it.. some where your internal table that you have used for table control is getting cleared. Specially check that part of your code where you have written code for clicking on another tab.. 

Read only

kethanuppalapati
Explorer
0 Likes
914

Hi Anuj,

There could be many reasons why the table control is being refreshed.

1) Internal Table is being refreshed.

2) What is the type you gave to tabstrip control? Type P or 'Space'. If you have given type P then the internal table generally wont be refreshed when you navigate to other tabs as it stores everything in local GUI.

If it is space then you are using Paging on application server technique. Then you have to logic to store the data in internal table and read the table in PBO again to be displayed on screen. If this is not followed then each time you navigate it hits the application server and the data wont be stored and the internal table might get refreshed.

http://help.sap.com/saphelp_nw04/helpdata/en/17/5bf1b52ba211d2954f0000e8353423/content.htm

Regards,

Kethan.

Read only

Former Member
0 Likes
914

Hi Anuj,

You have to create a module in the step loop of PAI write the following statement in that module.

MODIFY <internal_tab_name> INDEX <table_control_name>-current_line.

Thanks and regards,

Ashish Kumar



Read only

hiriyappa_myageri
Participant
0 Likes
914

Hi Anju,

You should use chain end chain statement. then only the editable fields will accept value.

Chain.

wa-f1.

wa-f2.

endchain.

Regards,

Hiriyappa.

Read only

Former Member
0 Likes
914

Hi Anuj,

In the table control, in PAI event there must be LOOP which is validating field inputs using CHAIN ENDCHAIN.

There you will get a module names as

MODULE tbc_9001_modify ON CHAIN-REQUEST.

In this module , check the condition and write the code as :

MODIFY i_tab

    FROM wa_tab

    INDEX tbc_9001-current_line.

Code to be added  :

IF SY-SUBRC NE 0 and wa_tab is not initial.

APPEND wa_tab to I_tab.

ENDIF.

Hope it helps...

Thanks,

Sumit