Abl Code: Forward to Procedure

Dimitris,

Perfect - exactly what I was looking for!

Kevin Simon

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Dimitris Kavvouras
Sent: Monday, April 25, 2011 3:48 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] abl Code: Forward to Procedure

Hi Kevin,

I don't know if you have found what you were looking for , but here is some
examples on how to succeed that.

So the path starts from the BPMExec\LiveBPM (or PilotBPM or TrainBPM)
There I sugest you create another directory to hold your .p methods. ie
"BPMHelp"

So i.e at the forward to procedure of the desired ABCCode method you
complete

BPMHelp\ABCCodeHelp.p\ABCCodeDoSomething

at the prementioned directory we create a .p file named "ABCCodeHelp.p" and
you complete inside something like


{lib/globals.i} /*To use the cur-comp and global variables */
{manager/Exception.i &TO_LOG}
{bo\ABCCode\ABCCode_ds.i}
{core/CallContext/CallContext.i} /* To use the BPMCallContext variables */



/* ********************** Internal Procedures *********************** */
PROCEDURE ABCCodeDoSomething:
/*--------------------------------------------------------------------------
----
Purpose:
Parameters: <none>
Notes:
----------------------------------------------------------------------------
--*/
define input-output parameter dataset forABCCodeDataSet.

{&TRY_PRIVATE}

/* Code here */

{&CATCH_PRIVATE}
END PROCEDURE.


Be careful sometimes you need to define some input variables as input-output
even if they are defined as only input.

Hope it helps,


________________________________
From: vantage@yahoogroups.com [vantage@yahoogroups.com] on behalf of
ksimon8fw [ksimon@...]
Sent: Thursday, April 21, 2011 10:34 PM
To: vantage@yahoogroups.com
Subject: [Vantage] abl Code: Forward to Procedure



Good day!

I just got off the phone with tech support, and I couldn't get past "that's
a billable service, call custom programming". I bet I have my answer before
the day is out here - why did I ever call there first.

When creating ABL code, there are two options: "Execute Code Below" and
"Forward to Procedure". I typically do the "Execute Code Below", but it has
it's limitations (mainly, not being able to have other procedures, as it's
nested within the .p code it generates).

I would like to use the "Forward to Procedure" option, but I have two
questions:
1. What is the relative path it starts from? I'd prefer not to give it a
full path, but rather something like "CustomCode\Thisproc.p". Where do I
drop that into?
2. Is there code that I need to include at the top of every .p program that
this executes? I assume I don't just start off with my code, but it needs
references that are standard no matter what my code is.

Thanks in advance!

Kevin Simon





[Non-text portions of this message have been removed]



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
Good day!

I just got off the phone with tech support, and I couldn't get past "that's a billable service, call custom programming". I bet I have my answer before the day is out here - why did I ever call there first.

When creating ABL code, there are two options: "Execute Code Below" and "Forward to Procedure". I typically do the "Execute Code Below", but it has it's limitations (mainly, not being able to have other procedures, as it's nested within the .p code it generates).

I would like to use the "Forward to Procedure" option, but I have two questions:
1. What is the relative path it starts from? I'd prefer not to give it a full path, but rather something like "CustomCode\Thisproc.p". Where do I drop that into?
2. Is there code that I need to include at the top of every .p program that this executes? I assume I don't just start off with my code, but it needs references that are standard no matter what my code is.

Thanks in advance!

Kevin Simon
I believe the path is <where veer your epicor lives>\server\bpm. But you
prolly wanna make new folder under there to keep your code segregated from
the built in stuff.

Unfortunately I'm not sure about 'standard code'. I usually write the high
level logic in the 'insert code here' window and then just forward
individual things out to external procedures.

Here is what we use in our external procedures, it may work for you. You'll
likely need to at least adjust the input parameters to accept whatever
epicor is trying to feed it.

Best of luck and let us know if you get it figured out.

{Bpm/Bpm.i &OBJECT_NAME=UD04}
{core/CallContext/CallContext.i}

DEFINE INPUT PARAMETER abc_AbcCode AS CHARACTER.
DEFINE INPUT PARAMETER abc_CalcQty AS LOGICAL.

{&TRY_PRIVATE}

DEFINE VARIABLE hUD04 AS HANDLE.

RUN bo\UD04\UD04.p PERSISTENT SET hUD04.

IF VALID-HANDLE(hUD04) THEN DO:

RUN GetaNewUD04 IN hUD04( {&input-output_dataset_UD04DataSet} )
NO-ERROR.

FOR EACH ttUD04 WHERE ttUD04.RowMod = "A":
ASSIGN ttUD04.key1 = STRING(abc_AbcCode).
ASSIGN ttUD04.key2 = STRING(abc_CalcQty).
ASSIGN ttUD04.Character01 = "APPLE SAUCE".
END.

RUN Update IN hUD04({&input-output_dataset_UD04DataSet}) NO-ERROR.

DELETE OBJECT hUD04.

END.

{&CATCH_PRIVATE}

On Thu, Apr 21, 2011 at 3:34 PM, ksimon8fw <ksimon@...> wrote:

>
>
> Good day!
>
> I just got off the phone with tech support, and I couldn't get past "that's
> a billable service, call custom programming". I bet I have my answer before
> the day is out here - why did I ever call there first.
>
> When creating ABL code, there are two options: "Execute Code Below" and
> "Forward to Procedure". I typically do the "Execute Code Below", but it has
> it's limitations (mainly, not being able to have other procedures, as it's
> nested within the .p code it generates).
>
> I would like to use the "Forward to Procedure" option, but I have two
> questions:
> 1. What is the relative path it starts from? I'd prefer not to give it a
> full path, but rather something like "CustomCode\Thisproc.p". Where do I
> drop that into?
> 2. Is there code that I need to include at the top of every .p program that
> this executes? I assume I don't just start off with my code, but it needs
> references that are standard no matter what my code is.
>
> Thanks in advance!
>
> Kevin Simon
>
>
>


[Non-text portions of this message have been removed]
Hi Kevin,

I don't know if you have found what you were looking for , but here is some examples on how to succeed that.

So the path starts from the BPMExec\LiveBPM (or PilotBPM or TrainBPM)
There I sugest you create another directory to hold your .p methods. ie "BPMHelp"

So i.e at the forward to procedure of the desired ABCCode method you complete

BPMHelp\ABCCodeHelp.p\ABCCodeDoSomething

at the prementioned directory we create a .p file named "ABCCodeHelp.p" and you complete inside something like


{lib/globals.i} /*To use the cur-comp and global variables */
{manager/Exception.i &TO_LOG}
{bo\ABCCode\ABCCode_ds.i}
{core/CallContext/CallContext.i} /* To use the BPMCallContext variables */



/* ********************** Internal Procedures *********************** */
PROCEDURE ABCCodeDoSomething:
/*------------------------------------------------------------------------------
Purpose:
Parameters: <none>
Notes:
------------------------------------------------------------------------------*/
define input-output parameter dataset forABCCodeDataSet.

{&TRY_PRIVATE}

/* Code here */

{&CATCH_PRIVATE}
END PROCEDURE.


Be careful sometimes you need to define some input variables as input-output even if they are defined as only input.

Hope it helps,


________________________________
From: vantage@yahoogroups.com [vantage@yahoogroups.com] on behalf of ksimon8fw [ksimon@...]
Sent: Thursday, April 21, 2011 10:34 PM
To: vantage@yahoogroups.com
Subject: [Vantage] abl Code: Forward to Procedure



Good day!

I just got off the phone with tech support, and I couldn't get past "that's a billable service, call custom programming". I bet I have my answer before the day is out here - why did I ever call there first.

When creating ABL code, there are two options: "Execute Code Below" and "Forward to Procedure". I typically do the "Execute Code Below", but it has it's limitations (mainly, not being able to have other procedures, as it's nested within the .p code it generates).

I would like to use the "Forward to Procedure" option, but I have two questions:
1. What is the relative path it starts from? I'd prefer not to give it a full path, but rather something like "CustomCode\Thisproc.p". Where do I drop that into?
2. Is there code that I need to include at the top of every .p program that this executes? I assume I don't just start off with my code, but it needs references that are standard no matter what my code is.

Thanks in advance!

Kevin Simon





[Non-text portions of this message have been removed]