project QadFinancials > class BSystem > method ApiGetSynchronisationTopics
Description
This method returns a temp-table containing all the possible topics for synchronisation
Parameters
tTopic | output | temp-table | temp-table containing all the possible topics for synchronisation |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program/bsystem.p)
<ANCESTOR-CODE>
/* Fill up the temp-table with the topics. */
/* For QADFin you can use the number 101 - 200. */
create tTopic.
assign tTopic.tiTopicNumber = 101
tTopic.tcTopicName = trim(#T-1'GL Types':30(3764)T-1#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-LIMITED}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 102
tTopic.tcTopicName = trim(#T-2'Daybook Types':30(3765)T-2#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-LIMITED}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 103
tTopic.tcTopicName = trim(#T-3'Profile Types':30(3766)t-3#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-LIMITED}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 104
tTopic.tcTopicName = trim(#T-4'Exchange Rate Types':30(3767)t-4#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-LIMITED}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 106
tTopic.tcTopicName = trim(#T-6'Address Types':30(3769)t-6#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-LIMITED}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 107
tTopic.tcTopicName = trim(#T-7'GL System Types':30(3770)t-7#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-LIMITED}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 108
tTopic.tcTopicName = trim(#T-9'Currencies':30(3772)t-9#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-FULL}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 109
tTopic.tcTopicName = trim(#T-10'Business Relations':30(1551)t-10#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-FULL}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 110
tTopic.tcTopicName = trim(#T-12'SAF Concept':30(42792)T-12#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-LIMITED}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 111
tTopic.tcTopicName = trim(#T-13'Countries':30(43228)T-13#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-FULL}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 112
tTopic.tcTopicName = trim(#T-14'Rounding Methods':20(49013)T-14#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-FULL}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 113
tTopic.tcTopicName = trim(#T-15'Domains':30(53330)T-15#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-FULL}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 114
tTopic.tcTopicName = trim(#T-16'China Accounting Interface Reports':60(62652)T-16#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-FULL}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 115
tTopic.tcTopicName = trim(#T-17'China Accounting Interface Filter':60(62654)T-17#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-FULL}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 116
tTopic.tcTopicName = trim(#T-18'Bank Account Validations':60(62712)T-18#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-LIMITED}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
create tTopic.
assign tTopic.tiTopicNumber = 117
tTopic.tcTopicName = trim(#T-19'Non-Taxable Tax Group':60(65073)t-19#)
tTopic.tcSynchronizeType = {&SYNCHRONIZETYPE-LIMITED}
tTopic.tcUpdateInformation = "":U
tTopic.tlSelected = false.
/* ====================================================== */
/* All topics on true */
/* Factory defaults are included - woa 05.03.2007 */
/* ====================================================== */
for each tTopic:
assign tTopic.tlSelected = true.
end.
Sample code: how to call this method through RPCRequestService (QXtend Inbound)
define temp-table ttContext no-undo
field propertyQualifier as character
field propertyName as character
field propertyValue as character
index entityContext is primary unique
propertyQualifier
propertyName
index propertyQualifier
propertyQualifier.
define dataset dsContext for ttContext.
define variable vhContextDS as handle no-undo.
define variable vhExceptionDS as handle no-undo.
define variable vhServer as handle no-undo.
define variable vhInputDS as handle no-undo.
define variable vhInputOutputDS as handle no-undo.
define variable vhOutputDS as handle no-undo.
define variable vhParameter as handle no-undo.
/* Create context */
create ttContext.
assign ttContext.propertyName = "programName"
ttContext.propertyValue = "BSystem".
create ttContext.
assign ttContext.propertyName = "methodName"
ttContext.propertyValue = "ApiGetSynchronisationTopics".
create ttContext.
assign ttContext.propertyName = "applicationId"
ttContext.propertyValue = "fin".
create ttContext.
assign ttContext.propertyName = "entity"
ttContext.propertyValue = "1000".
create ttContext.
assign ttContext.propertyName = "userName"
ttContext.propertyValue = "mfg".
create ttContext.
assign ttContext.propertyName = "password"
ttContext.propertyValue = "".
/* Connect the AppServer */
create server vhServer.
vhServer:connect("-URL <appserver-url>").
if not vhServer:connected()
then do:
message "Could not connect AppServer" view-as alert-box error title "Error".
return.
end.
/* Run */
assign vhContextDS = dataset dsContext:handle.
run program/rpcrequestservice.p on vhServer
(input-output dataset-handle vhContextDS by-reference,
output dataset-handle vhExceptionDS,
input dataset-handle vhInputDS by-reference,
input-output dataset-handle vhInputOutputDS by-reference,
output dataset-handle vhOutputDS).
/* Handle output however you want, in this example, we dump it to xml */
if valid-handle(vhExceptionDS)
then vhExceptionDS:write-xml("file", "Exceptions.xml", true).
if valid-handle(vhOutputDS)
then vhOutputDS:write-xml("file", "Output.xml", true).
/* Cleanup */
vhServer:disconnect().
assign vhServer = ?.
if valid-handle(vhInputDS)
then delete object vhInputDS.
if valid-handle(vhOutputDS)
then delete object vhOutputDS.
if valid-handle(vhExceptionDS)
then delete object vhExceptionDS.