cancel
Showing results for 
Search instead for 
Did you mean: 

database PCH

Former Member
0 Kudos

Hi Experts,

with the following macros I can restrict the results on the database PCH.

TABLES: objec.

START-OF-SELECTION.

RH-SET-INDEX-INFTY '1007'.

RH-CONDITION-LINE VACAN EQ 'X' SPACE.

RH-SET-INDEX-INFTY-CONDITION.

GET objec.

Is it possible to repeat the macro RH-CONDITION-LINE? I tried to do it that way and only the last line condition seems to be executed.

Is there a documentation regarding the macros for the database PCH?

Any Helpfull answer?

thanks...

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

no

former_member181966
Active Contributor
0 Kudos

FYI

Logical database PCH is large and can take a while to run.

To improve performance it is possible to restrict the hit on the database by filtering on any field,

for example when retrieving records from infotype P1007 (vacancy) for current vacancies you can

include the following code before the get statement:-

CONSTANTS: $1007 LIKE P1007-INFTY VALUE '1007'.

START-OF-SELECTION.

----


RH-SET-INDEX-INFTY $1007.

RH-CONDITION-LINE VACAN EQ 'X' SPACE.

RH-SET-INDEX-INFTY-CONDITION.

GET objec.

*----


This will retrieve only those records from the logical database where the field p1007-vacan = 'X', otherwise you would need to retrieve all records first and then filter on p1007-vacan (where vacan = 'X')

Cant explain this code as cant find any documentation on it but it is used in SAP standard.

The call sequence of PCH macros facilitates fast object selection using value conditions of infotype fields (infotype index). You must use this call sequence when objects are

selected for sequential evaluations on the basis of whether infotypes exist with specific field values, rather than using the object ID.

The RH-SET-INDEX-INFTY macro specifies the infotype to be indexed.

The parameters of the RH-CONDITION-LINE macro are:

Parameter 1 : Field name (for example, ABTEL)

Parameter 2 : Condition (for example, EQ, BT)

Parameter 3 : Value (for example, "X")

Parameter 4 : Value (for Between)

The RH-SET-INDEX-INFTY-CONDITION macro is used to set the condition as an index.

You can use this method for sequential evaluations, but not for structural evaluations

^ Saquib

.

.