Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2823

Re: Regarding the Data in Table Control

$
0
0

PROCESS BEFORE OUTPUT.

  MODULE STATUS_9008.

 

LOOP AT it_tab2 WITH CONTROL tc_CUST2 CURSOR

tc_CUST2-current_line.


  MODULE GET_LINES.

 

ENDLOOP.

 

PROCESS AFTER INPUT.


LOOP AT it_tab2.

MODULE modify_it_TAB2 .

ENDLOOP.


MODULE USER_COMMAND_9008.


----------------------------------------------------------------------------------------------------------------------------------------


MODULE get_lines OUTPUT.

 

 

CLEAR IT_TAB2.

 

CLEAR IT_TAB1.

READ TABLE IT_TAB2 INDEX TC_CUST2-CURRENT_LINE.

   IT_TAB2-SR_NO = TC_CUST2-CURRENT_LINE.

 

 

ENDMODULE.                 " GET_LINES  OUTPUT


---------------------------------------------------------------------------------------------------------------------------------------------

MODULE status_9008 OUTPUT.

   SET PF-STATUS 'SDNSTAT1'.

   SET TITLEBAR 'SDN3'.

   DESCRIBE TABLE IT_TAB2 LINES LINECNT.

TC_cust2-LINES = LINECNT.

-------------------------------------------------------------------------------------------------------------------------------------------------



MODULE modify_it_tab2 INPUT.

 

MODIFY IT_TAB2

     INDEX TC_CUST2-CURRENT_LINE.

   if sy-subrc ne 0.

 

append  IT_TAB2.  "

MOVE-CORRESPONDING  IT_TAB2[] TO IT_TAB3[].

 

modify ZPRACTAKIL FROM TABLE IT_TAB3[].  "internal table to database table

 

endif.

 

 

ENDMODULE.         

-------------------------------------------------------------------------------------------------------------------------------------------------

In above code the contents of table control are stored in internal table IT_TAB2.

 

for first time when user runs the transaction and enters value in Table control and presses enter it holds the value.

 

but when he closes the session and runs transaction again the table control gets cleaned.

I want the values to retain in table itself.


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>