sexta-feira, 1 de fevereiro de 2019

Criar Formula no SAP - Fórmula de Pricing


Um dos desafios em customizar a TAXBRA é criar situações fiscais específicas do cliente (e não previstas no documento da CBT).

A pricing, há como criar funções do tipo:

·      Requerimento 
o    - Indicam que a condição só será executada se, além de selecionada, cumprir certos requerimentos de código. Exemplo: condição com requerimento 160 somente estará presente no cálculo do Pedido de Compras, condição com requerimento 161 somente estará disponível na Verificação de Faturas (MIRO)
·      Cálculo da Condição 
o    Formula que calcula a condição em si. Recebe um valor base e gera o cálculo dessa condição. A fórmula 320, por exemplo, é onde reside o núcleo de lógica da TAXBRA - é onde todos os tributos são calculados.
·      Cálculo de Base

o    Fórmula para alterar a base. Exemplo: 164 para negativar o valor.


A criação de uma fórmula permite flexibilizar como a Pricing funciona. Por exemplo, é possível calcular uma condição multiplicada por outra, o que não está previsto no standard do SAP mas pode ser útil em algumas situações de cálculo.

Criando / Administrando fórmulas.

A Transação VOFN permite criar e administrar fórmulas. 

É necessário informar a classe de fórmulas desejada.

Existem muito mais classes do que as que eu comentei acima, porém vou me ater as seguintes:
PBED          Pricing requirements
PFRA          Pricing formulas: Condition basis
PFRM          Pricing formulas: Condition value


Na lista abaixo apresento as fórmulas existentes para classe de Condition Value:


Na lista abaixo apresento as fórmulas existentes para classe de Condition Value:






sexta-feira, 25 de janeiro de 2019

MM - FV12 – Ativar condição do IVA sem abrir o Ambiente

Segue os passos para este procedimento :

Informe a Condição que deseja ativar nos IVAS


Informar o País e o IVA que deseja ativar ,  caso queira visualizar todos os IVAS deixe em branco na tela de seleção.



Preencher 100% no Montante e para marcar o FLEX na j1btax na tela dos IVAS








quinta-feira, 24 de janeiro de 2019

Trabalhar com Preço Bruto no Pedido de Compra - Standard

Displaying Tax Values in Purchase Order Pricing Conditions
Configuration of the System

This document describes the configuration steps that you must follow to allow your system to display tax values in the pricing conditions of a purchase order.
This function makes use of condition-based formulas, which copy the tax values from the tax calculation schema to the purchase pricing calculation schema, while pricing is being carried out. The function is delivered with SAP Note 1551566.
Note: If you still have a Support Package installed for which SAP Note 1551566 is valid, you first have to manually create new objects as described in SAP Note 1551566. You can find the documentation about the creation of new objects attached to the Note.

Creation of Formulas
Since SAP cannot deliver new standard formulas, the formulas needed for this function have been created in the customer name range (starting above 900). The example below uses formulas 959 and 960. If you have already used these numbers for formulas, you can replace the numbers with any available numbers.

1. Go to transaction VOFM.
2. Choose Formulas Condition Value.
3. Switch to edit mode and add the following two lines for the new formulas at the very end of the table. The following figures show our example formulas, 959 and 960:


Formula 959 is used in the tax calculation procedure to store tax values.
Formula 960 is used in the pricing calculation procedure to insert the previously stored tax values.
4. Double-click formula 959.
5. Enter the following line in the editor: 


6. Activate the code and go back.
7. Double-click formula 960.
8. Enter the following line in the editor: 


9. Activate the code and go back.
10. Save and activate (Choose Edit → Activate) the formulas.

Adding Formulas to Tax Calculation Procedure


1. Go to transaction J1BTAX.
2. In the menu, go to Condition setup → Calc. Procedures → Calc. Procedures MM.
3. In the Procedures group box, select the line with your tax calculation procedure.
4. In the Dialog Structure group box, double-click Control Data to open the overview of your tax calculation procedure.
5. For each tax condition type that you want to carry over to the pricing calculation schema, enter the corresponding formula number for the tax calculation procedure in the CalType column. In our example (see the following figure), “959” is entered as the formula, so that the values for the IPI1 and ICM1 tax conditions appear in pricing:



Creation of Condition Types for Taxes in Purchase Pricing

To enable the system to display the tax values in purchase pricing, you have to create new conditions that correspond to the tax conditions that are to be used for pricing.
Note: The name of the pricing condition type does not have to match the name of the tax condition type. The mapping between the two condition types is done in a database table, which is described in the following documentation.
1. Go to transaction SPRO.
2. In the SAP Customizing Implementation Guide (IMG), choose Materials Management → Purchasing → Conditions → Define Price Determination Process → Define Condition Types.
3. In the Choose Activity dialog box, double-click Define Condition Type.
4. Create a new entry for each condition type that should be carried over from tax calculation.
5. Enter the following values for each condition type:



In our example (see the following figure), the two conditions, ICM1 and IPI1, have been added in the Customizing activity:



Adding Formulas to Pricing Calculation Procedure
1. Go to transaction SPRO.
2. In the SAP Customizing Implementation Guide (IMG), choose Materials Management → Purchasing → Conditions → Define Price Determination Process → Define Calculation Schema.
3. In the Schemas group box, select the line with your pricing calculation procedure.
4. In the Dialog Structure group box, double-click Control Data to open the overview of your pricing calculation procedure.
5. Add a new entry for each tax condition type with the following values (Note that you must leave the columns that are not mentioned here empty):

In the following figure, the two example conditions, ICM1 and IPI1, have been added to the calculation procedure:

Note that in this example, step 20 has “Net value incl. disc.”.


Mapping Between Tax Condition Types and Pricing Condition Types

1. Go to transaction SM30.
2. Enter J_1B_PO_TAX_MAPV as the view name.
3. Switch to edit mode and choose New Entries.
4. Now you can determine on which pricing condition type a specific tax condition type should be mapped:
a. On the left side, select the pricing condition type using the F4-Help for the Condition Type field. The Application field is automatically set to M.
b. On the right side, select the tax condition type using F4-Help for the Condition Type field. The Application field is automatically set to TX.
For this example, the following two entries are needed:


This maps the pricing conditions ICM1 and IPI1 (on the left, marked with green) to the tax conditions ICM1 and IPI1 (on the right, marked with blue).


Displaying Tax Values in Pricing

If you now create a new purchase order with a tax code that makes use of tax condition types ICM1 and/or IPI1, the condition values of these taxes are displayed in the pricing conditions.
Note: The behavior in transactions ME21 and ME21N differs as explained in the following documentation.
Transaction ME21N
1. Go to the Item section.
2. Select the Invoice tab page.
3. Choose the Taxes push button to see the original tax values:


4. Then go back and choose the Conditions tab page. There you see the same tax values, which have been imported to the pricing procedure:



Transaction ME21

1. Choose Item → Conditions to display the pricing conditions of the purchase order. The imported tax conditions appear at the bottom of the table.
Note: The first time that you view the conditions, the condition values have not imported yet and cannot be displayed.



2. To import the condition values for the taxes, choose the Update push button below the table and select pricing type B (Carry out new pricing).
Note: The import is done automatically when the system saves the purchase order.







PT - CKM3 COLETIVA


CKM3 is the collective cost analysis developed to consolidate material values.

It is a amazing tool to detail collectively the actual costs of material in different months and categories after the execution of Material Ledger.

So, In this transaction CKM3N Collective we can see a lot of detail and informations colletively per month or per type of materials. There are many filter of seletions that is a facilitor when we need to check a big range of material every month.

The program CKM3 Collective was developed with standard functions “MLCCS_KEPH_MLCD_READ'', that is used to get the cost  standard stratification , easily! The second one , ''CKMCD_MLCD_READ''  this functions was important to find  the ''multilevel difference'' and ''no allocated'' within two categories ; Receipt and production.

Details:

Tables CKM3 Collective : CKMLHD, CKMLKEPH, MARA,MBEW, TCKH3 ,TCKH1, CKMLCR,MLIT and MLCRF

First function :MLCCS_KEPH_MLCD_READ

  CALL FUNCTION 'MLCCS_KEPH_MLCD_READ'
    
EXPORTING
      i_refresh_buffer 
abap_true
      it_kalnr         
lt_kalnr
      i_from_bdatj     
p_bdatj
      i_from_poper     
p_poper
      i_to_bdatj       
p_bdatj
      i_to_poper       
p_poper
      ir_keart         
lr_keart
      ir_mlcct         
lr_mlcct
      ir_kkzst         
lr_kkzst
      ir_curtp         
lr_curtp
    
IMPORTING
      et_keph_mlcd     
lt_keph_mlcd.



Second function :CKMCD_MLCD_READ


CALL FUNCTION 'CKMCD_MLCD_READ' "
* EXPORTING
*   i_to_poper =                " ckmlpp-poper  Posting Period
*   i_untper =                  " ckmlpp-untper  Value Structure Type
*   i_run_id =                  " ckml_run_id   Number of Costing Runs for Material Ledger
    .  "  CKMCD_MLCD_READ


Obs: There are many others functions in this development .

Categories:
Beginning Inventory, Production, Receipts, Cumulative Inventory, Consumption, Consumption Production, Ending Inventory




First screen ( Data selection)
Second screen 


  1. TMAT( type of material )
  2. Material Code
  3. Short text of material
  4. ArAv( Plant)
  5. Tp.Aval.
  6. Estoque Total =Total inventory quantity 
  7. Unit  ( Kilogram= KG);
  8. Valor Total = Total Value (Standard cost of material  within the month)
  9. Diferença de Preço = Price difference ( Standard value – Actual  value =Price difference  within the month)
  10. Valor Real = Actual Value  (Standard value + Price difference  )



You have opportunity to buy it . 

If you have interest to use this report  for EUR 1000 please , send me an email talking about. After the payment , I will send the``Font``this  fabuloso program . It will be necessary only , a small adjustment on program to run in your enviroment  , but it is quite simple!  Because , every company the cost element stratification is different and because of that It`s necessary a small adjustments on the code.