Add Whse to ALL Parts on a Given Company / Plant

You just have to run a trace on creating a plant and re-create it in code lkike I did the add whse portion.



Jose C Gomez
Software Engineer



T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Tue, Nov 19, 2013 at 2:04 PM, <livingstonmh@...> wrote:

Â
<div>
  
  
  <p></p><p>Do you happen to know how the Plant whse records are created? I used your example and edited it, but I am receiving an error:</p><p> <font size="1"></font></p><p>Invalid Plant. Part not defined as existing in this Plant.</p>

Â

Â

I am not seeing a method that would create this record.Â



---In vantage@yahoogroups.com, <jose@...> wrote:


Morning,



We added a new warehouse and needed to have it enabled for all parts. I

called Epicor and they weren't very helpful (as usual) so I wrote the

following ABL Script feel free to use it.



The script below is Free to use as Is and it is not intended for any

purpose so if it breaks your stuff don't call me :). I take no liability or

responsibility test everything before putting into production









{bo/Part_ds.i}

DEFINE VARIABLE hBO AS HANDLE NO-UNDO.



RUN bo/Part.p PERSISTENT set hBO no-error.

FOR EACH Part WHERE Part.Company='YOUR COMPANY':



RUN GetByID in hBO(INPUT Part.PartNum, {&output_dataset_PartDataSet})

no-error.



RUN GetNewPartWhse in hBO({&input-output_dataset_PartDataSet}, INPUT

Part.PartNum, INPUT 'YOUR PLANT').



FOR EACH ttPartWhse WHERE ttPartWhse.RowMod='A':

Assign ttPartWhse.WarehouseCode='2'

ttPartWhse.WarehouseDescription='10 Maybrook'

ttPartWhse.PartNumPricePerCode='E'.

END.



RUN Update in hBO({&input-output_dataset_PartDataSet}).



END.



DELETE OBJECT hBO.











Jose C Gomez

Software Engineer

*

*

*

*T: 904.469.1524 mobile

E: jose@…

http://www.josecgomez.com

<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>

<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>

<http://www.josecgomez.com/professional-resume/>



<http://www.josecgomez.com/feed/>

<http://www.usdoingstuff.com>



Quis custodiet ipsos custodes?





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

</div>
 


<div style="color:#fff;min-height:0;"></div>

Morning,

We added a new warehouse and needed to have it enabled for all parts. I
called Epicor and they weren't very helpful (as usual) so I wrote the
following ABL Script feel free to use it.

The script below is Free to use as Is and it is not intended for any
purpose so if it breaks your stuff don't call me :). I take no liability or
responsibility test everything before putting into production




{bo/Part_ds.i}
DEFINE VARIABLE hBO AS HANDLE NO-UNDO.

RUN bo/Part.p PERSISTENT set hBO no-error.
FOR EACH Part WHERE Part.Company='YOUR COMPANY':

RUN GetByID in hBO(INPUT Part.PartNum, {&output_dataset_PartDataSet})
no-error.

RUN GetNewPartWhse in hBO({&input-output_dataset_PartDataSet}, INPUT
Part.PartNum, INPUT 'YOUR PLANT').

FOR EACH ttPartWhse WHERE ttPartWhse.RowMod='A':
Assign ttPartWhse.WarehouseCode='2'
ttPartWhse.WarehouseDescription='10 Maybrook'
ttPartWhse.PartNumPricePerCode='E'.
END.

RUN Update in hBO({&input-output_dataset_PartDataSet}).

END.

DELETE OBJECT hBO.





*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


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

I also use the DMT tool for mass uploads to add whse or plant to parts.

Jose

--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> Morning,
>
> We added a new warehouse and needed to have it enabled for all parts. I
> called Epicor and they weren't very helpful (as usual) so I wrote the
> following ABL Script feel free to use it.
>
> The script below is Free to use as Is and it is not intended for any
> purpose so if it breaks your stuff don't call me :). I take no liability or
> responsibility test everything before putting into production
>
>
>
>
> {bo/Part_ds.i}
> DEFINE VARIABLE hBO AS HANDLE NO-UNDO.
>
> RUN bo/Part.p PERSISTENT set hBO no-error.
> FOR EACH Part WHERE Part.Company='YOUR COMPANY':
>
> RUN GetByID in hBO(INPUT Part.PartNum, {&output_dataset_PartDataSet})
> no-error.
>
> RUN GetNewPartWhse in hBO({&input-output_dataset_PartDataSet}, INPUT
> Part.PartNum, INPUT 'YOUR PLANT').
>
> FOR EACH ttPartWhse WHERE ttPartWhse.RowMod='A':
> Assign ttPartWhse.WarehouseCode='2'
> ttPartWhse.WarehouseDescription='10 Maybrook'
> ttPartWhse.PartNumPricePerCode='E'.
> END.
>
> RUN Update in hBO({&input-output_dataset_PartDataSet}).
>
> END.
>
> DELETE OBJECT hBO.
>
>
>
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> [Non-text portions of this message have been removed]
>
Hi JOse yeah DMT is sweet, but we dno't own it.


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Thu, Mar 28, 2013 at 9:39 AM, neverunmacron <neverunmacron@...>wrote:

> **
>
>
> Thanks jose!
>
> I also use the DMT tool for mass uploads to add whse or plant to parts.
>
> Jose
>
>
> --- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
> >
> > Morning,
> >
> > We added a new warehouse and needed to have it enabled for all parts. I
> > called Epicor and they weren't very helpful (as usual) so I wrote the
> > following ABL Script feel free to use it.
> >
> > The script below is Free to use as Is and it is not intended for any
> > purpose so if it breaks your stuff don't call me :). I take no liability
> or
> > responsibility test everything before putting into production
> >
> >
> >
> >
> > {bo/Part_ds.i}
> > DEFINE VARIABLE hBO AS HANDLE NO-UNDO.
> >
> > RUN bo/Part.p PERSISTENT set hBO no-error.
> > FOR EACH Part WHERE Part.Company='YOUR COMPANY':
> >
> > RUN GetByID in hBO(INPUT Part.PartNum, {&output_dataset_PartDataSet})
> > no-error.
> >
> > RUN GetNewPartWhse in hBO({&input-output_dataset_PartDataSet}, INPUT
> > Part.PartNum, INPUT 'YOUR PLANT').
> >
> > FOR EACH ttPartWhse WHERE ttPartWhse.RowMod='A':
> > Assign ttPartWhse.WarehouseCode='2'
> > ttPartWhse.WarehouseDescription='10 Maybrook'
> > ttPartWhse.PartNumPricePerCode='E'.
> > END.
> >
> > RUN Update in hBO({&input-output_dataset_PartDataSet}).
> >
> > END.
> >
> > DELETE OBJECT hBO.
> >
> >
> >
> >
> >
> > *Jose C Gomez*
> > *Software Engineer*
> > *
> > *
> > *
> > *T: 904.469.1524 mobile
> > E: jose@...
> > http://www.josecgomez.com
> > <http://www.linkedin.com/in/josecgomezhttp://www.facebook.com/josegomez>
> > <http://www.google.com/profiles/jose.gomezhttp://www.twitter.com/joc85>
> > <http://www.josecgomez.com/professional-resume/>
> > <http://www.josecgomez.com/feed/>
> > <http://www.usdoingstuff.com>
> >
> > *Quis custodiet ipsos custodes?*
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>


[Non-text portions of this message have been removed]
Are you running this in the Progress Procedure Editor or in Epicor?




________________________________
From: Jose Gomez <jose@...>
To: Vantage <vantage@yahoogroups.com>
Sent: Thursday, March 28, 2013 9:27 AM
Subject: [Vantage] Add Whse to ALL Parts on a Given Company / Plant

Morning,

We added a new warehouse and needed to have it enabled for all parts. I
called Epicor and they weren't very helpful (as usual) so I wrote the
following ABL Script feel free to use it.

The script below is Free to use as Is and it is not intended for any
purpose so if it breaks your stuff don't call me :). I take no liability or
responsibility test everything before putting into production




{bo/Part_ds.i}
DEFINE VARIABLE hBO AS HANDLEÂ NO-UNDO.

RUN bo/Part.p PERSISTENT set hBO no-error.
FOR EACH Part WHERE Part.Company='YOUR COMPANY':

RUN GetByID in hBO(INPUT Part.PartNum, {&output_dataset_PartDataSet})
no-error.

RUN GetNewPartWhse in hBO({&input-output_dataset_PartDataSet}, INPUT
Part.PartNum, INPUT 'YOUR PLANT').

FOR EACH ttPartWhse WHERE ttPartWhse.RowMod='A':
Assign ttPartWhse.WarehouseCode='2'
ttPartWhse.WarehouseDescription='10 Maybrook'
ttPartWhse.PartNumPricePerCode='E'.
END.

RUN Update in hBO({&input-output_dataset_PartDataSet}).

END.

DELETE OBJECT hBO.





*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
 <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
 <http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
 <http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


[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/.%c2%a0
(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



[Non-text portions of this message have been removed]
BPM within Epicor. but you can do either. Although the Progress Editor
requires more Setup. In the BPM you can just save this to a File call
Procedure.P and then run it as

RUN \BPM\Custom\Procedure.p


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


On Thu, Mar 28, 2013 at 10:00 AM, Ted Koch <tkoch77@...> wrote:

> **
>
>
> Are you running this in the Progress Procedure Editor or in Epicor?
>
> ________________________________
> From: Jose Gomez <jose@...>
> To: Vantage <vantage@yahoogroups.com>
> Sent: Thursday, March 28, 2013 9:27 AM
> Subject: [Vantage] Add Whse to ALL Parts on a Given Company / Plant
>
>
> Morning,
>
> We added a new warehouse and needed to have it enabled for all parts. I
> called Epicor and they weren't very helpful (as usual) so I wrote the
> following ABL Script feel free to use it.
>
> The script below is Free to use as Is and it is not intended for any
> purpose so if it breaks your stuff don't call me :). I take no liability or
> responsibility test everything before putting into production
>
> {bo/Part_ds.i}
> DEFINE VARIABLE hBO AS HANDLE NO-UNDO.
>
> RUN bo/Part.p PERSISTENT set hBO no-error.
> FOR EACH Part WHERE Part.Company='YOUR COMPANY':
>
> RUN GetByID in hBO(INPUT Part.PartNum, {&output_dataset_PartDataSet})
> no-error.
>
> RUN GetNewPartWhse in hBO({&input-output_dataset_PartDataSet}, INPUT
> Part.PartNum, INPUT 'YOUR PLANT').
>
> FOR EACH ttPartWhse WHERE ttPartWhse.RowMod='A':
> Assign ttPartWhse.WarehouseCode='2'
> ttPartWhse.WarehouseDescription='10 Maybrook'
> ttPartWhse.PartNumPricePerCode='E'.
> END.
>
> RUN Update in hBO({&input-output_dataset_PartDataSet}).
>
> END.
>
> DELETE OBJECT hBO.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
>
> <http://www.linkedin.com/in/josecgomezhttp://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomezhttp://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/
> http://www.josecgomez.com/feed/>
>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
> [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
>
>
> [Non-text portions of this message have been removed]
>
>
>


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

Do you happen to know how the Plant whse records are created? I used your example and edited it, but I am receiving an error:

 

Invalid Plant. Part not defined as existing in this Plant.

 

 

I am not seeing a method that would create this record. 



---In vantage@yahoogroups.com, <jose@...> wrote:

Morning,

We added a new warehouse and needed to have it enabled for all parts. I
called Epicor and they weren't very helpful (as usual) so I wrote the
following ABL Script feel free to use it.

The script below is Free to use as Is and it is not intended for any
purpose so if it breaks your stuff don't call me :). I take no liability or
responsibility test everything before putting into production




{bo/Part_ds.i}
DEFINE VARIABLE hBO AS HANDLE NO-UNDO.

RUN bo/Part.p PERSISTENT set hBO no-error.
FOR EACH Part WHERE Part.Company='YOUR COMPANY':

RUN GetByID in hBO(INPUT Part.PartNum, {&output_dataset_PartDataSet})
no-error.

RUN GetNewPartWhse in hBO({&input-output_dataset_PartDataSet}, INPUT
Part.PartNum, INPUT 'YOUR PLANT').

FOR EACH ttPartWhse WHERE ttPartWhse.RowMod='A':
Assign ttPartWhse.WarehouseCode='2'
ttPartWhse.WarehouseDescription='10 Maybrook'
ttPartWhse.PartNumPricePerCode='E'.
END.

RUN Update in hBO({&input-output_dataset_PartDataSet}).

END.

DELETE OBJECT hBO.





*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*


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