project QadFinancials > class PEDI > method ExecuteEDI


Parameters


bzProDataSetinput-outputdataset-handle
icSubSystemNameinputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BAccountingInterface.GenerateFile
method BDCollection.Export
method BPaymentSelection.GenerateASCII


program code (program3/pedi.p)

/* =========================================================================== */
/* 1. Run the method ?SetQADContextProperty? to set the value of ?SubSystem?   */ 
/*    so that the EDI system can identify which subsystem will be used.        */
/* 2. Run the method ?CallService? to do the MFG/PRO call to EDI eCommerce.    */
/* =========================================================================== */

if oiReturnStatus = 0 
then assign oiReturnStatus = -98.  
<M-1 run SetQadContextProperty
   (input  'Subsystem':U (icPropertyName), 
    input  icSubSystemName (icPropertyValue), 
    output viFcReturnSuper (oiReturnStatus)) in PEDI>
/* <M-3 run SetQadContextProperty
    (input  'Transformation':U (icPropertyName), 
     input  icTransformation (icPropertyValue), 
     output viFcReturnSuper (oiReturnStatus)) in PEDI>*/

if viFcReturnSuper <> 0 
then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.

assign vhIn = ?
       vhOut = ?.

Create Dataset vhIn in widget-pool "non-persistent". 
Create Dataset vhOut in widget-pool "non-persistent".
vhIn:name = "PEDI-in".
vhOut:name = "PEDI-out".

<M-4 run CallService
   (input  '':U (icProgramName), 
    input  'callUnloader':U (icMethodName), 
    input  vhIn by-reference (izInput), 
    input-output bzProDataSet by-reference (bzInputOutput), 
    input-output vhout by-reference (bzOutput), 
    input  ? (icAsyncHandler), 
    output viFcReturnSuper (oiReturnStatus)) in PEDI>

delete object vhIn.
delete object vhOut.

if viFcReturnSuper <> 0 
then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0 then
return.

/* ========================= */
/* Set default return status */
/* ========================= */
if oiReturnStatus = -98 
then assign oiReturnstatus = 0.