03-02-2005 6:48 AM
hello,
can any one please explain me in detail the following code.
CATCH SYSTEM-EXCEPTIONS import_mismatch_errors = 1 OTHERS = 99.
IMPORT tt_hitl_dbcalls TO hitlist_dbcalls
tt_hitl_respti TO hitlist_respti
FROM DATABASE moni(dd) ID monikey_hitlist.
rc_hitlist = sy-subrc.
ENDCATCH.
tell me what the above code do and where does data came from and which tables does it store.
in advance thanks.....
john
03-02-2005 10:36 PM
Hi John
You'd better post this thread in <a href="https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode2-3&contenttype=url&content=https%3A%2F%2Fforums.sdn.sap.com%2Fforum.jspa%3FforumID%3D50">The ABAP Programming Forum</a>.
As an answer:
i. With "CATCH SYSTEM-EXCEPTIONS..." statement, monitoring is turned on to catch catchable runtime errors. That is; if a runtime error "import_mismatch_errors" occurs between the block "CATCH...ENDCATCH" the value of 'sy-subrc' becomes '1', and '99' for the other catchable runtime errors. The processing goes on with the statement after "ENDCATCH" where it is logical to check the 'sy-subrc' value.
ii. With the "IMPORT...FROM DATABASE" statement, it reads data from the cluster table 'moni' where 'relid' (the special key field for cluster tables) equals 'dd'. Cluster tables differ from usual (i.e. transparent) tables in structure and "IMPORT ... FROM DATABASE ..." and "EXPORT ... TO DATABASE ..." statements are used to read from and write to the cluster table, respectively.
Here it transfers the stored content 'tt_hitl_dbcalls' to 'hitlist_dbcalls' and 'tt_hitl_respti' to 'hitlist_respti'. You can see the content of key fields of a cluster table. Nevertheless, the prime thing, namely the data stored can not be read through SE16 since it is stored in a special format.
You can inspect the F1 help for more information on these statements.
Regards
*--Serdar
ssimsekler@yahoo.com
03-07-2005 6:11 AM
Hi John,
I took the liberty of moving this question to the ABAP programming thread so that others could see it and the respective answer you received.
If the answer was helpful to you, you might want to respond and reward
03-07-2005 6:18 AM
Hi John,
I'd like to give you the following pointers to the documentation where this is very well explained.
1. <a href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/f2bbce142c11d3b93a0000e8353423/content.htm">Catchable Runtime Errors</a>
2. <a href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/content.htm">Cluster Databases</a>
Please do read the documentation and get back with more specific doubts, if any.
Regards,
Anand Mandalika.