cancel
Showing results for 
Search instead for 
Did you mean: 

How to read cluster table PCL4

Former Member
0 Kudos

Hello Experts,

Plz tell me how read data from the cluster table PCL4?

Thanks,

Kishore

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Step 1 - Include the following programs into your custom program :

INCLUDE RPPPXD00. "PCL4,

INCLUDE RPARDI00. "error-constants archiving

DATA: BEGIN OF COMMON PART BUFFER.

INCLUDE RPPPXD10.

DATA: END OF COMMON PART.

INCLUDE RPPPXM00.

*Datenstruktur der Belege im Cluster

INCLUDE RPCBLO00.

INCLUDE RPCBSH00.

INCLUDE RPCBDT00.

Step 2 :

RP-LOW-HIGH.

DEFINE RP_IMP_C4.

IMPORT VERSION

FROM DATABASE PCL4(&1)

ID &2

USING PCL4_EXP_IMP.

IF SY-SUBRC NE 0.

CLEAR: VERSION.

CLEAR: HEADER, BELEGE.

REFRESH: HEADER, BELEGE.

SY-SUBRC = 4.

ELSEIF VERSION-VERNR EQ '00'.

IMPORT HEADER

BELEGE TO BELEGE_00

FROM DATABASE PCL4(&1)

ID &2

USING PCL4_EXP_IMP.

IF SY-SUBRC NE 0.

CLEAR: VERSION.

CLEAR: HEADER, BELEGE.

REFRESH: HEADER, BELEGE.

SY-SUBRC = 4.

ELSE.

CLEAR BELEGE. REFRESH BELEGE.

LOOP AT BELEGE_00.

MOVE-CORRESPONDING BELEGE_00 TO BELEGE.

APPEND BELEGE.

ENDLOOP.

ENDIF.

ELSEIF VERSION-VERNR EQ '01'.

IMPORT HEADER

BELEGE

FROM DATABASE PCL4(&1)

ID &2

USING PCL4_EXP_IMP.

IF SY-SUBRC NE 0.

CLEAR: VERSION.

CLEAR: HEADER, BELEGE.

REFRESH: HEADER, BELEGE.

SY-SUBRC = 4.

ENDIF.

ENDIF.

RP-INIT-BUFFER.

MOVE-CORRESPONDING LCL4 TO LO-KEY.

RP_IMP_C4 LA LO-KEY.

MOVE PCL4-SRTFD TO LO-KEY.

TABNA+1(4) = LO-KEY-INFTY.

Message was edited by:

Thirumoorthi Tamilarasan

Former Member
0 Kudos

Hi,

Here i am trying to give a little idea on this.

Declare f1-key of type pc4f1.

Pass the following into the above structure

f1-key-laufd = laufd.

f1-key-laufi = laufi.

f1-key-pernr = pernr.

f1-key-seqno = seqnr.

and then use macro rp-imp-c4-f1.

or check the table TRMAC with input in the NAME field as rp-imp-c4-f1 and see the macro import definition.

also see the macro definition for RP-IMP-C4-SA in TRMAC table.

~Thrilleswar

Former Member
0 Kudos

Go through the Source Code of Report RPUAUD00 . it is based on Cluster PCL4

Former Member
0 Kudos

use import from pcl4(key)

eg. syntax : IMPORT letter FROM DATABASE pcl3(al) ID alkey.

here letter is same sructure with which data was exported to cluster.

check out srtf or key fields in pcl4 .

you require a key filed to retrive data from cluster tables.