05-09-2008 10:32 AM
Hi,
What is the difference between Clear Itab and Refresh Itab.
What is the use of this function module BUFFER_SUBSCRIBE_FOR_REFRESH.
Thanks
05-09-2008 10:51 AM
hi
generally if u declared internal table with header line consider itab.
clear itab.
refresh itab.
in this case
clear : (intializes their values) clear the contents of work area only
refresh: deletes the contents of internal table.
supoose consider itab without header line.
In this case
clear & refresh are same means both deletes the contents of internal table
when u use 'free' it clears the memory of table or field
-
h1bold BUFFER_SUBSCRIBE_FOR_REFRESH
At the start of each LUW the buffer must be empty. Any instances that may exist in the buffer, which were updated in an earlier LUW, are no longer blocked and may be older than the versions in the database. If this instance is updated again, inconsistencies would result.
At the end of each LUW, the buffer contents must be deleted by calling the delete module. This can only be done by the BAPIs BapiService.TransactionCommit() and BapiService.TransactionRollback(). To supply these BAPIs with the necessary information, BAPIs with buffering must subscribe their delete module for the BAPI BapiService.TransactionCommit() bzw. BapiService.TransactionRollback().
The delete module is subscribed by calling the central function module BUFFER_SUBSCRIBE_FOR_REFRESH, whereby the parameter NAME_OF_DELETEFUNC must contain the name of the delete module.
No COMMIT WORK or ROLLBACK WORK Command
BAPIs with buffering must not execute COMMIT WORK or ROLLBACK WORK commands.
Documentation
05-09-2008 10:34 AM
Hello!
We use CLEAR when we clear the fields of the header of the itab.
We use REFRESH when we delete all the rows of the itab.
Bye!
05-09-2008 10:35 AM
HI,
clear itab will clear the header line of the table itab.u can not use this for table without header lines.
clear itab[] will clear the body(rows) of the table itab.
refresh itab it is same as clear itab[].
rgds,
bharat.
05-09-2008 10:43 AM
hi,
the use of this function module BUFFER_SUBSCRIBE_FOR_REFRESH is for Transaction control for BAPIs.
CLEAR - removes data from header
FREE - Resets a data object to its original value and releases the resources it occupied
REFRESH - The internal table itab is reset to its initial state, i.e. all table entries are deleted.
reward points if helpful.
05-09-2008 10:45 AM
clear it will clear the varial value or header line of internal table, work area.
Refresh it will delete all the entries of internal table.
BUFFER_SUBSCRIBE_FOR_REFRESH.
This function module is for refreshing the buffer data which has been selected from the data base table.
Regards,
madan.
05-09-2008 10:51 AM
hi
generally if u declared internal table with header line consider itab.
clear itab.
refresh itab.
in this case
clear : (intializes their values) clear the contents of work area only
refresh: deletes the contents of internal table.
supoose consider itab without header line.
In this case
clear & refresh are same means both deletes the contents of internal table
when u use 'free' it clears the memory of table or field
-
h1bold BUFFER_SUBSCRIBE_FOR_REFRESH
At the start of each LUW the buffer must be empty. Any instances that may exist in the buffer, which were updated in an earlier LUW, are no longer blocked and may be older than the versions in the database. If this instance is updated again, inconsistencies would result.
At the end of each LUW, the buffer contents must be deleted by calling the delete module. This can only be done by the BAPIs BapiService.TransactionCommit() and BapiService.TransactionRollback(). To supply these BAPIs with the necessary information, BAPIs with buffering must subscribe their delete module for the BAPI BapiService.TransactionCommit() bzw. BapiService.TransactionRollback().
The delete module is subscribed by calling the central function module BUFFER_SUBSCRIBE_FOR_REFRESH, whereby the parameter NAME_OF_DELETEFUNC must contain the name of the delete module.
No COMMIT WORK or ROLLBACK WORK Command
BAPIs with buffering must not execute COMMIT WORK or ROLLBACK WORK commands.
Documentation
05-09-2008 10:58 AM
hi,
CLEAR - we clear only the fields of the header of the itab.
Syntax
CLEAR dobj [ {WITH val [IN {BYTE|CHARACTER} MODE] }
| {WITH NULL} ].
REFRESH - we delete all the rows of the itab include the header.
Syntax
REFRESH itab.
To delete all rows and free the entire memory space occupied by rows, you can use the statement FREE
[http://abap4beginner.blogspot.com]