2006 Jul 24 7:03 AM
Hi
Q> Why cant we write select query on tables in data clusters? eg. in case of rt, crt (Payroll Result HR-ABAP)
Hi
Q> Why cant we write select query on tables in data clusters? eg. in case of rt, crt (Payroll Result HR-ABAP)
2006 Jul 24 7:06 AM
hi pranesh,
1. Thats bcos
2. The data in the table
is contained in some ENCODED
raw format,
which only sap can understand.
3. So directly writing query,
would make no sense out of the data.
4. Hence, sap provides some standard FMs
for getting the data in such cluster tables
for getting rt, crt etc.
5. eg.
6. Use this logic and FM.
DATA: myseqnr LIKE hrpy_rgdir-seqnr.
DATA : mypy TYPE payin_result.
DATA : myrt LIKE TABLE OF pc207 WITH HEADER LINE.
SELECT SINGLE seqnr FROM hrpy_rgdir
INTO myseqnr
WHERE pernr = mypernr
AND fpper = '200409'
AND srtza = 'A'.
IF sy-subrc = 0.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = 'IN'
employeenumber = mypernr
sequencenumber = myseqnr
CHANGING
payroll_result = mypy
EXCEPTIONS
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
error_reading_archive = 8
error_reading_relid = 9
OTHERS = 10.
myrt[] = mypy-inter-rt.
READ TABLE myrt WITH KEY lgart = '1899'.
7. the internal table myrt
will contain what u require.
regards,
amit m.
2006 Jul 24 7:20 AM
Hi
Thats because rt, crt , wpbp etc are internal tables which are filled by SAP on runtime.</b> The function mentioned in the previous reply is right for reading payroll result.
The information about the payroll ( seqnr, pernr, payroll period, offcycle information etc ) are stored in Dictionary Table HRPY_RGDIR.