2008 Mar 17 11:49 AM
How to read the data into the report which is stored in the cluster form in the database its urgent please reply me?
How to read the data into the report which is stored in the cluster form in the database its urgent please reply me?
2008 Mar 17 11:53 AM
Hi,
Use the EXPORT TO MEMORY statement to copy any number of ABAP variables with their current values (data cluster) to ABAP memory. The ID addition (maximum 32 characters long) enables you to identify different clusters.
If you use a new EXPORT TO MEMORY statement for an existing data cluster, the new one will overwrite the old.
The IMPORT FROM MEMORY ID statement allows you to copy data from ABAP memory into the corresponding fields of your ABAP program. In the IMPORT statement, you can also restrict the selection to a part of the data cluster.
The variables into which you want to read data from the cluster in ABAP memory must have the same types in both the exporting and the importing programs.
To release a data cluster, use the FREE MEMORY ID statement.
Reward if helpful.
Regards,
Ramya
2008 Mar 17 11:56 AM
WHICH DATA U REQUIRE?
THERE R 3 FUNC.MODULES TO READ THE DATA FROM PCL2 CLUSTER.( WHICH STORESPAYROLL RESULTS)
CU_READ_RGDIR
CU_READ_LAST
PYXX_READ_PAYROLL_RESULT
TRY WITH THIS IF U WANT PAYROLL DATA
2008 Mar 17 12:04 PM
Retrived from a Clustered Table
IMPORT letter = my_table_in
FROM DATABASE zlmetext(lm) ID text_idx.
You'll have to find where the data was EXPORTed to find the values for some of the parms.
IMPORT letter = my_table_in
here, I used
EXPORT letterdesc FROM zlmetext-letterdesc
letteravail FROM zlmetext-letteravail
subject FROM zlmetext-subject
erdat FROM zlmetext-erdat
ernam FROM zlmetext-ernam
aedat FROM zlmetext-aedat
aenam FROM zlmetext-aenam
letter FROM it_ltr_text
TO DATABASE zlmetext(lm) ID text_idx.
In this case, all the fields except letter were stored in the base portion of the table record. Only Letter was stored in the clustered area.
Becaue I used LETTER, the "key" to the clustered area is now LETTER and my import uses LETTER as the key to find the table that i stored using letter.
in this part
FROM DATABASE zlmetext(lm) ID text_idx.
the lm is the cluster and must be the same as the export. This value can NOT be a variable and must be hardcoded as shown.
text_idx is the built key to retrieve and this is the code I used to create it
DATA:
BEGIN OF text_idx,
appl LIKE zlmetext-appl,
letterid LIKE zlmetext-letterid,
srtf2 LIKE zlmetext-srtf2,
END OF text_idx.
,
,
,
text_idx-appl = zlmetext-appl.
text_idx-letterid = zlmetext-letterid.
CLEAR: text_idx-srtf2.
2008 Mar 17 12:08 PM
Hi
Use import statement to read from database clusters. Also make sure that the data you import is in same memory variables as it was exported.
example:
IMPORT itab
FROM DATABASE indx(ZZ)
ID 'ZSD344'.
Check SAP online help for IMPORT statement.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |