I’m struggling trying to find the correct syntax to pass a parameter value in some ABL code I have in a BPM. Any help would be greatly appreciated.
What I am trying to do is to take ttFiscalPer.FiscalYear as a string and use it as the input parameter for ParentKey1 to be able to create a new row in UD107A table.
DEFINE VARIABLE hUD107 AS HANDLE.
DEFINE INPUT PARAMETER myInput AS CHARACTER.
RUN bo/UD107/UD107.p PERSISTENT SET hUD107.
IF VALID-HANDLE(hUD107) THEN DO:
FIND FIRST ttFiscalPer.
IF avail ttFiscalPer THEN DO:
ASSIGN myInput = STRING(ttFiscalPer.FiscalYear).
RUN GetaNewUD107a IN hUD107({&input-output_dataset_UD107DataSet}, input "ParentKey1 = '" + STRING(myInput) + "'", input "ParentKey2 = ''", input "ParentKey3 = ''", input "ParentKey4 = ''", input "ParentKey5 = ''") NO-ERROR.
FOR EACH ttUD107A WHERE ttUD107A.RowMod = "A", FIRST ttFiscalPer FIELDS(FiscalYear FiscalPeriod) EXCLUSIVE-LOCK.
IF avail ttFiscalPer THEN DO:
ASSIGN ttUD107A.Key1 = STRING(ttFiscalPer.FiscalYear).
ASSIGN ttUD107A.ChildKey1 = STRING(ttFiscalPer.FiscalPeriod).
END.
END.
END.
RUN Update IN hUD107({&input-output_dataset_UD107DataSet}) NO-ERROR.
DELETE OBJECT hUD107.
END.