domingo, 29 de marzo de 2015

IN - Dynamic Replenish

Hi again!

In my last blog I've shown you how Static Replenishment process works.

Today, let's talk about calculating the Reorder Quantity in a dynamic way.

As I always do, let's see it with a quick example.

1) First of all we have to create a new Replenishment Class.



2) In order to set a dynamic Replenishment Calculation we must set the Item attributes.
For instance,  let's take the ST8000 item in the US008 business unit.

If we check the inventory status of this item, we'll see there are 1284 units available and 204 units reserved. So, we really have 1080 units available.



3) Let's go to Root > Inventory > Replenish Inventory > Setup Item Replenishment
It is in this step where the set-up information must be different from the Static Replenishment.

We should set some additional values:
Reorder Quantity Option: Min/Max
Replenish Class: DYNA (the one we had created)
Replenish Calc Period: 30 days. (meaning how often we will execute the replenishment process.)
Replenish Lead (Days): 5 days (it could be understood as a deadline)
Reorder Point: 4000.
Safety Stock: 50 (the minimum quantity we want to have in stock)



4) Having this configuration set up let's run the calculation process, chossing BU = US008 and replenish class = DYNA. The request option must be "Maximum Stock Qty" since that's the option we chose in the ST8000 item.

 Root > Inventory > Replenish Inventory > Calc Replenishment Parameters



In this case the "Calc Replenishment Parameters" will work by the following way:

a) Looks for the item Total Demand in the last "Replenish Calc Period" days





b) Calculates the Average Demand -> "Total Demand" / "Replenish Calc Period" days
In this case it will be 4020/30 = 134
c) Calculates the maximum quantity as "Average Daily Demand" *  ("Replenish Calc Period" + "Replenish Lead"  ) + Safety Stock.
So, in this case it will be : 134 * (30 + 5 ) + 50 = 4740.
Let's check it.



When we then run the "Create Replenishment Process" we will take this quantity into consideration.

5) Let's run de Create  Replenishment Process chossing BU = US008 and replenish class = DYNA.

 Root > Inventory > Replenish Inventory > Create Replenishment Request



6) We now go to the "Manage Replenishment Request" page and we could see recently created  Replenishment ID.
As we could see in the following screen the item is shown with 3907 units to be bought.



So, How is this number calculated? Here you have a basic explanation:

a) Searchs how many items were bought. ( 0 in this case)


b) Searchs how many  items were properly moved to inventory ( 0 in this case)



c) Searchs how many items were not  moved to inventory yet ( 0 in this case)




d) Searchs how many items were used to create new productions.
For instance, the ST8000 item is used when producing the PRD00126 item.



In this case we have 247 units that are used when producing



As a summary we early saw there were 1080 units available and we only have 247 in production process.
So, we actually have 833 units available for this item.
We need 4740 as a maximum quantity, so we need to buy 3907 units of this item, which matches the result of the Create Replenishment Process.

Once we have the Replenish ID, the PO process continues as explained in the Static Replenishment..

I hope this blog could be so useful to you as it is to me.

Regards.
Facundo Salerno.

domingo, 15 de marzo de 2015

IN - Static Replenish

Hi All,

I'm afraid of boring you with so many technical things, so let's have a functional tutorial today.

Working in BNB I have learnt about Inventory Process.

One of the main process I have seen is the Replenishment Process.

There are different ways of items replenishment. Here you will find a quick explanation about the static one.

1) First of all we have to create a new Replenishment Class.



2) In order to set a static Replenishment we must set the Item attributes.
For instance,  let's take the USA-01 item in the US0003 business unit.

If we check the inventory status of this item, we'll see there are 3000 units available.



Let's go to Root > Inventory > Replenish Inventory > Setup Item Replenishment

We should set some additional values:
Reorder Quantity Option: Static Reorder QTY
Replenish Class: STAT (the one we had created)
Reorder Point: 3001. (meaning when we have less than 3001 units of the item it will be included in the replenishment process)
Reorder Quantity: 4000 (how many units of the item should be ordered). This quantity can't be lower than the Reorder Point.
Why? Think you have 0 items in your inventory and  you set the reorder quantity to 1000.
Once the Replenishment Process is executed, you buy the 1000 units, but this item is still below the reorder point that is 3001. So the system won't let you be at this situation.



3) Now we must set the business unit replenish options: Let's go to  Root > Inventory > Replenish Inventory > Setup Replenishment



4) Having this configuration set up let's run the replenishment process, chossing BU = US003 and replenish class = STAT.

 Root > Inventory > Replenish Inventory > Create Replenishment Request



5) Let's check process status in the Process Monitor Page



6) We now go to the "Manage Replenishment Request" page and we could see recently created  Replenishment ID.
As we could see in the following screen the item is shown with 4000 units to be bought.
If we need to change the quantity we'll be able to do it in this page.




7) We are now able to execute the Requisition Loader, choosing the Replenish ID we have previously created.




8)  If we check the process monitor, we could see the ID of the requisition that was created



9) And, as the final step, we check the requisition was properly created.





I hope this blog could be so useful to you as it is to me.

Regards.
Facundo Salerno.







sábado, 7 de marzo de 2015

Sending Mails through PeopleSoft -> Bye SendMail()

Hi!

Since Tools 8.52 SendMail() has been deprecated. It was replaced by a more powerful application class PT_MCF_MAIL:MCFOutboundEmail 

As I have not seen it used frequently I decided to write this post, both for having it always in mind and for letting anyone know about it.

Here you have a practical way of using it.

1) We import the Application Class

import PT_MCF_MAIL:MCFOutboundEmail ;

2) We instantiate an object of this class

 Local PT_MCF_MAIL:MCFOutboundEmail &eMail = create PT_MCF_MAIL:MCFOutboundEmail();

3) We fill all the mail sections in the following way.

   &eMail.From = "mailFrom@server.com" ;
   &eMail.Recipients = "target1@server.com ;target2@server.com ;target3@server.com" ;
   &eMail.Subject = "This is the subject of the mail";
   &eMail.Text = "This is the content of the mail";
   
4) In case we need to attach any file, we have the AddAttachment method 
And an easy way of using it coudl be:
   &eMail.AddAttachment( &AttachmentPath+  &AttachmentNameWithExtension , %FilePath_Absolute | %FilePath_Relative, &AttachmentNameWithExtension"Attachment Description" , "", "");
   
5) As Send method  has a return value, we have 2 possibly ways of sending the mail.
  • If &eMail.Send() = %ObEmail_Delivered then
  • Local integer &i_ret = &eMail.Send();

If method returns a "1" value, everything works as expected. Otherwise, we should check it!

Numeric Value
Constant Value
Description
0
%ObEmail_ FailedBeforeSending
Email failed before being sent.
1
%ObEmail_Delivered
Email was delivered.
2
%ObEmail_NotDelivered
Email delivery not attempted.
3
%ObEmail_PartiallyDelivered
Email has only been partially delivered. Only some
of the addresses in the list of addresses were delivered to.
-1
%ObEmail_ SentButResultUnknown
Email was sent but whether it was successful or not is not known.
For further details, we can just check PeopleBooks at the following link:
http://docs.oracle.com/cd/E41633_01/pt853pbh1/eng/pt/tpcr/task_MCFOutboundEmailClass-f451c6.html

I hope this blog could be so useful to you as it is to me.

Regards.
Facundo Salerno.

Mandar mails desde PeopleSoft -> Chau SendMail()

Hola!

A partir de las tools 8.52 la función SendMail() ha sido considerada obsoleta, y fue reemplazada por una herramienta mas potente: La clase PT_MCF_MAIL:MCFOutboundEmail 

Como todavía no la encuentro muy utilizada decidí hacer este post, tanto para tenerlo siempre presente, como para cualquier curioso que todavía no la conozca.

Acá va una forma rápida de usarla:

1) Importamos la clase:

import PT_MCF_MAIL:MCFOutboundEmail ;

2) Instanciamos un objeto de la misma

 Local PT_MCF_MAIL:MCFOutboundEmail &eMail = create PT_MCF_MAIL:MCFOutboundEmail();

3) Agregamos los datos necesarios de la siguiente manera

   &eMail.From = "miCorreo@servidor.com" ;
   &eMail.Subject = "Este es el asunto del mail";
   &eMail.Text = "Este sería el texto del cuerpo del mail";
   
4) Si precisamos agregar adjuntos, tenemos el método AddAttachment
Y una breve forma de usarlo sería
   &eMail.AddAttachment( &rutaAdjunto +  &nombreAdjuntoConExtension  , %FilePath_Absolute | %FilePath_Relative, &nombreAdjuntoConExtension, "Descripción del Adjunto" , "", "");
   
5) Enviamos el mail, como nos devuelve un valor de retorno tenemos dos formas de hacerlo.
  • If &eMail.Send() = %ObEmail_Delivered then
  • Local integer &i_ret = &eMail.Send();

Si el retorno del método es 1, salió todo bárbaro... sino... a revisar!

Número
Constante de Retorno
Descripción
0
%ObEmail_ FailedBeforeSending
El correo falló antes de ser enviado
1
%ObEmail_Delivered
El correo se envió correctamente
2
%ObEmail_NotDelivered
No se pudo entregar el correo.
3
%ObEmail_PartiallyDelivered
El correo se entregó pero no a TODOS los destinatarios.
-1
%ObEmail_ SentButResultUnknown
Se envió el correo, pero se desconoce si fue entregado.
Para mas detalles de la clase, pueden simplemente ver los books relacionados al tema en el siguiente link:
http://docs.oracle.com/cd/E41633_01/pt853pbh1/eng/pt/tpcr/task_MCFOutboundEmailClass-f451c6.html

Espero que este simple Paso a Paso les resulte tan útil como a mí.

Saludos.
Facundo Salerno.