Archives mensuelles : mai 2013

Memo Batch-input

SM35 – Suivi, analyse et relance des batchs-Input.

Le lancement en arrière plan traite le batch sans s’interrompre.

Le lancement à l’écran relance uniquement les transactions en erreur et celles qui n’ont pas été exécutées.

A l’écran, les OK Codes :

  • /bend pour intérrompre le traitement
  • /bdel pour supprimer la transaction en cours
  • /bbeg pour redémarrer la transaction
  • /bda pour passer de affichage vers modif sur l’écran en cours
  • /bde pour passer de modif à affichage

Batch determination made easy /Détermination automatique des lots

Sélection automatique des lots / Détermination automatique des lots

So here is a tutorial on how to select batches during the delivery (but it could be applied to any batch search requirement) for which the shelf life has not expired. It has to be noted that SAP covers all kinds of scenario.

– It might be company practice to ship out the door products with a minimum shelf life of X days
– It might be that a specific customer requires a product with a different, longer minimum remaining shelf life
– It might also be that products that are shipped to a specific country require a yet again different minimum shelf life

It might be that you require all three or a logical combination of all three. SAP will easily cover all those requirements and more.

This tutorial only covers the batch determination process in SD, but once you get the jist of it you should be able to apply this to any other module where that function is covered. I also assume that you have set up your system in such way that you are able to have products batch managed.

Step 1 – Standard SAP characteristics you will import

The first thing you need to do is to check that your SAP client has all the required SAP standard characteristics. To do this go to transaction CT04 and query your system to find all characteristics that are called LOBM*.

If a list of values such as the one below is returned then it means that you are all set to go to Step 2 – Create and assign Batch class to products.

If not it means that you need to copy them from client 000. To do that go to customizing and follow the path indicated: Customizing / Logistics – General / Batch Management / Batch Valuation / Updates Standard Characteristics (or transaction BMSM)

The following messages will be displayed if everything goes well.

Once that is done you might want to go back to transaction CT04 and query for characteristics called LOBM*.

Why do I need to do that do you ask? Well for one thing all the work is done for you. Secondly and more importantly the standard SAP functions that will enable us to dynamically calculate the “Expiration date” based on minimum remaining shelf life, makes use of these standard characteristics – they are hard coded in the ABAP functions.

Moving on to step 2 and getting your basic data right.

Step 2 – Create and assign Batch class to products you will do

In our case we have one product, to which we have assigned one class (of technical type 023 – batches). This class has been conveniently called “EXPIRATION” and contains only one characteristic. That characteristic is one of the standard SAP ones called “LOBM_VFDAT – Expiration date, shelf life”. The system has been set up in such a way that when ever I do a goods receipt on this product, SAP will ask me to input the production date and then based on the shelf life of the product, automatically calculate the expiration date of my batch.

This will update a standard SAP table field (MCHA-VFDAT / MCH1-VFDAT – depending on the validity of your batch across plants). This will in turn update the value of the characteristics LOBM-VFDAT within the batch .

So if we look at the shelf life list report (transaction MB5M) we see that this information concurs with that contained in the classification of our batches.

Step 3 – Create a Batch search class you will do

This is a class that will be used to search and find applicable batches during batch determination. It is not directly assigned to the product – it will be assigned to the batch search strategy of the product.

The question is, what characteristics should we put in this class?

If we go back to basics, what we will want to do, is find batches that have a remaining shelf life of X days. If we view this requirement in a different way, we can say that we will want to find batches that have an expiry date that is equal or greater to “delivery date + X days” . My class will therefore use the following characteristics:
– LOBM-VFDAT : The expiration date of the batch – that value SAP will calculate.
– LOBM-LFDAT : The delivery date – that value will be automatically updated by SAP with the delivery date from the delivery

All we need is a characteristic where we will be able to input the value corresponding to X (minimum remaining shelf life required). Again, we do not need to do anything, SAP provides the characteristic “LOBM_RLZ – Remaining Shelf Life for Batch”, to do just that. We therefore have a class (also of technical type 023 – batches) that looks like this.

Step 4 – Create a sort rule you will do

It’s all good to build a batch search class to find batches, but assuming SAP finds numerous batches, how should they be sorted (i.e which should be the first one used?) ? By batch number? Of course not, we want to sort batches based on the expiration date in ascending order (the batches with the date closest to the present should be the first to go).

To do this, call transaction CU70.

Give your sort sequence a name and in the following screen, give it a description as well.

Then click on the characteristics button and assign the characteristic LOBM-VFDAT to it. Also select/amend the sort order that you want.

Save your sort key.

Step 5 – Create a batch search strategy you will do (VCH1 for SD, MBC1 for PP)

We want to create a search strategy during delivery processing, i.e in SD – Sales and distribution. So call transaction VCH1 – to create it. We’ll create a strategy determined based on the customer and the material (standard strategy type SD01 caters for that).

Enter your customer and product (amend the strategy as required).

Click on the “selection Criteria” button to assign the search class. In this case we indicated our search class, which copied across the characteristics associated with it.
We also indicate the value “>=30″ in the characteristic “Remaining Shelf Life for Batch” – this means that we will only want to select batches that have an expiration date that is greater or equal to delivery date + 30 days.

Now go back to the previous screen and now click on the “sort” button. There you will assign the sort rule you created in the previous step.

Save your work.

Step 5bis – OPJ2 !

Step 6 – Putting it into practice – the fruit of your efforts you will see

Now that we have created all the required basic data, let’s see how it all hangs together.

We have a sales order for which we create a delivery – batch search will be triggered manually to better follow the process.
In the delivery, we go to the batch determination screen and we see that the system has automatically searched, found and proposed batches that have a remaining shelf life that is greater or equal to 30 days only and it has sorted them according to expiration date – just what we wanted.

The system here proposes 3 batches (yet remember that above, it did indicate that we had 5 batches in the system). To get a better idea of what parameters were calculated/used to determine those three batches, click on the “selection criteria button”.

We see the >=30 that we typed in the batch search strategy. We also see that the system took the delivery date “08.09.2008” added 30 days to it and determined that the batch it was going to search for had to have an expiration date greater or equal to 08.10.2008.

We can also change the search parameters here (this is customizable). We’ll change the value of 30 to 4 right there in the batch determination.

This shows even more batches – logical as we have indicated that batches should only have a remaining shelf life of 4 days or more.

Créer une transaction pour lancer un Query en direct

Pour les utilisateurs n’ayant pas d’accès à SQ01 ou si SQ01 est trop complexe.

Transaction SE93

Sélectionner « Transaction de programme » (Programme et écran de sélection)

Code du programme :

AQZZ[Nom du groupe d’utilisateur]====[Nom du Query]=====

Exemple :

AQZZZPZPTI01====ZPZPTI023=====

Attention, le Query doit avoir été lancé une fois sur le mandant et avoir été compilé. Il faut le recompiler à chaque modification/Transport.

  • Note :Vérifier si AQZZ est dépendant du projet.
  • Vérifier si le nombre de « = » dépend de la longueur des code programmes et Groupe utilisateurs

 

Programme Batchs PP

  • MDAB Créer les témoins de planif
  • MDBT MRP en arrière plan (La planification parallele doit être activée
  • SE37 Programme PPIO_ENTRY  : Action en masse sur les OF (après définition de variante de sélection et de mise en forme.

Transactions WM utiles

Flux

  • LT01 Créer un OT
  • LT06 Créer un OT à partir d’un Doc MM
  • LT12 Confirmer un OT

Analyse

  • LT22 Tous les OT passés par un emplacement
  • LT27 Tous les OT passés pour une US
  • LS33 Contenu d’une US
  • LS26 Contenu d’un magasin WM

Circuits Kanbans

Servent de lien entre les Aires d’approvisionnements (définies dans les articles ou dans les postes de travails) et les emplacements WM.

Attention, le circuit Kanban s’appuie sur une aire d’appro. L’aire d’appro est définie par rapport à un magasin MM. Il faut donc éviter dans ce cas les magasins MM définis par type d’article (au risque de devoir définir des aires d’appro différentes par type d’article, donc de perdre l’utilisation par machine.

Le circuit Kanban est un triplet Article, division, Aire de stockage, qui renvoi à l’emplacement WM et au code mise à dispo.

Il permet soit la création d’une DT (Demande de transfert WM) automatiquement lors du lancement de l’OF, soit la consommation direct dans l’emplacement WM par prélèvement rétroactif, suivant le paramétrage du circuit.

Pour les manipuler : LPK1 /2/3 et LPK4 pour la création en masse.

LX43 permet d’en contrôler la cohérence.

 

Liste des tables PP

  • CAUFV – OF – Données générales
  • AFKO – Ordres de process – Entête
  • AFPO – Ordres de process – postes
  • PLKO – Gammes – Entête
  • PLKZ – Gammes – Entête central
  • STKO – BOM nomenclature – Entête
  • STPO – BOM nomenclature – postes

 

 

Rechercher une table de donnée à partir du champ d’une structure

A partir de F1-Infos technique, on retrouve le nom des champs et des tables/Structures.

Dans le cas d’une table, SE16 / SE16N donne directement l’information demandée

Dans le cas d’une structure, il est parfois compliqué de trouver la table associée.

On peut la retrouver en recherchant toutes les tables contenant un certain champ (pour peu que le champ soit caractéristique du processus) .

Pour ça :

SE84, puis Dictionnaire ABAP, puis « Autres objets » puis « Zones » –> Zones de table

Saisir le nom du champ dans « Nom de zone », et lancer la recherche.

Visualisation des Idocs et interfaces

  • Transaction WE02 / WEDI (menu standard Idocs)
  • WE10 : Recherche idoc avec valeur dans un ou plusieurs segments
  • Recherche par date ou par type de base (Nom du programme)
  • Contenu d’un IDOC standard avec WE30
  • Corriger un IDOC en en créant un nouveau WE19
  • Modifier le contenu d’un IDOC en en créant un nouveau WE19
  • Reprocesser un IDOC BD87
  • Change le statut des Idocs en mass : Report RC1_IDOC_SET_STATUS
  • WE11 – Delete Idocs