Alankrita Tyagi asked 1 year ago
Title : How can we use PCP_OP_SEARCH to fetch more than one class data?

Question :

How can we use PCP_OP_SEARCH to fetch more than one class data?

1 Answers
Umesh SharmaUmesh Sharma Staff answered 1 year ago

A single search flist to retrieve data from two different objects is created using LINKED_OBJ concept, a typical search flist for this would look like :
0 PIN_FLD_POID POID [0] 0.0.0.1 /search -1 0
0 PIN_FLD_FLAGS INT [0] 768
0 PIN_FLD_TEMPLATE STR [0] ” select X from /account 1, /bill 2 where 1.F1 = 2.F2 and 1.F3 = 100000 ”
0 PIN_FLD_ARGS ARRAY [1] allocated 20, used 1
1 PIN_FLD_POID POID [0] NULL poid pointer
0 PIN_FLD_ARGS ARRAY [2] allocated 20, used 1
1 PIN_FLD_ACCOUNT_OBJ POID [0] NULL poid pointer
0 PIN_FLD_ARGS ARRAY [3] allocated 20, used 1
1 PIN_FLD_POID POID [0] NULL poid pointer
0 PIN_FLD_RESULTS ARRAY [*] allocated 20, used 2
1 PIN_FLD_ACCOUNT_NO STR [0] “”
1 PIN_FLD_LINKED_OBJ ARRAY [2] allocated 20, used 3
2 PIN_FLD_ACCOUNT_OBJ POID [0] NULL poid pointer
2 PIN_FLD_LINK_DIRECTION ENUM [0] 1
2 PIN_FLD_EXTRA_RESULTS ARRAY [*] allocated 20, used 2
3 PIN_FLD_BILL_NO STR [0] “”
Note:
1) PIN_FLD_LINKED_OBJ array index must be 2 only.
2) PIN_FLD_LINK_DIRECTION can take either of the value 1 or –1
1 (DM_LINK_OBJ_RIGHT_TO_LEFT ) – means some field of second class is related to POID_ID0 of the first class.
For example: In the above input flist, PIN_FLD_ACCOUNT_OBJ of second class /bill
Is relate dto POID_ID0 of first class /account.
-1 (DM_LINK_OBJ_LEFT_TO_RIGHT) – means some field of first class is related to POID_ID0 of second class.
Output flist:
0 PIN_FLD_POID POID [0] 0.0.0.1 /search -1 0
0 PIN_FLD_RESULTS ARRAY [0] allocated 3, used 3
1 PIN_FLD_ACCOUNT_NO STR [0] “EXAMPLE”
1 PIN_FLD_POID POID [0] 0.0.0.1 /account 100000 55
1 PIN_FLD_LINKED_OBJS ARRAY [2] allocated 24, used 24
2 PIN_FLD_LINKED_OBJ ARRAY [0] allocated 1, used 1
3 PIN_FLD_POID POID [0] 0.0.0.1 /bill 2157764469 1
2 PIN_FLD_LINKED_OBJ ARRAY [1] allocated 1, used 1
3 PIN_FLD_POID POID [0] 0.0.0.1 /bill 2157639021 3
……………………………………………………………………….
……………………………………………………………………….
0 PIN_FLD_EXTRA_RESULTS ARRAY [1] allocated 2, used 2
1 PIN_FLD_BILL_NO STR [0] “”
1 PIN_FLD_POID POID [0] 0.0.0.1 /bill 2157764469 1
0 PIN_FLD_EXTRA_RESULTS ARRAY [2] allocated 2, used 2
1 PIN_FLD_BILL_NO STR [0] “B1-3294”
1 PIN_FLD_POID POID [0] 0.0.0.1 /bill 2157639021 3
0 PIN_FLD_EXTRA_RESULTS ARRAY [3] allocated 2, used 2
1 PIN_FLD_BILL_NO STR [0] “B1-3312”
1 PIN_FLD_POID POID [0] 0.0.0.1 /bill 2157641837 3
0 PIN_FLD_EXTRA_RESULTS ARRAY [4] allocated 2, used 2
1 PIN_FLD_BILL_NO STR [0] “B1-3311”
1 PIN_FLD_POID POID [0] 0.0.0.1 /bill 2157759772 4
0 PIN_FLD_EXTRA_RESULTS ARRAY [5] allocated 2, used
1 PIN_FLD_BILL_NO STR [0] “B1-3318”
1 PIN_FLD_POID POID [0] 0.0.0.1 /bill 2157758940 4

Cubastion is among a very small number of specialized Siebel CRM Oracle Gold Partners in SME.