Ajesh
12th July 2019, 13:45
The Main table is tdpur430 and the Fields are Purchase Order,Line Position and Line Sequence.

Have multiple indices. How to achieve it? I have put Document ID,PO Number,Line Position and Line Sequence as Index fields, the latter three protected fields so that they can be part of indices.

While Testing through tlbct3232m000, I am getting message that "Mandatory Protected Attribute is not set"

Ajesh
22nd July 2019, 16:20
Its solved by removing the values passed on by from the Request File for the protected attributes.

Now there are 6 Indices
Document ID
Purchase Order(Protected)
Purchase Order Position(Protected)
Purchase Order Requence(Protected)
Receipt Sequence(Protected)
Payable Receipt Sequence(Protected)

And in the Request file, i just gave the string of Document ID with something like

<DocumentID>NOR000010_10_1_1_1</DocumentID>

Also i gave

io.PPRHeader_PurchaseOrderPrivate.isSet = true

for all the protected attributes in the on set hook. Hope it helps somebody in future

Ajesh
30th July 2019, 18:33
While testing the specific BOD through tlbct3232m000, its working fine but while testing it through tcboddll0001, i am getting an error saying, "Document ID not found".

The code which i am giving is


table ttdpur430


long ret
string doc_id(25),
error.message(150)

select tdpur430.*
from tdpur430
where tdpur430._index1 = {"NOR000004",10,1,1,1}
as set with 1 rows
selectdo
endselect


doc_id = concat$("_",
tdpur430.orno,
tdpur430.pono,
tdpur430.sqnb,
tdpur430.rsqn,
tdpur430.psqn
)
|* Use this hook to perform actions after the
|* command is executed.
ret = tcbod.dll0001.publish.bod(
"PPRBOD", |* noun |Same as interface name
"tdpur430", |*table
"Add", |action
1, |bod.entity.type |3 types of entity
"", |bod.entity.code
doc_id, |Document ID
false, |batch bod true/false
"", |batch id
0, |batch sequence
0, |batch size
"PROC_ONLY_PUBLISH",
tdpur430.orno,
tdpur430.pono,
tdpur430.sqnb,
tdpur430.rsqn,
tdpur430.psqn
)




Any Clue?