SAPBR Technologies home

SAP in Brazil, explained

STO Intracompany

A stock transport order (STO) moves stock from one plant to another. This guide covers the intracompany STO, where both plants belong to the same company code.

In Brazil, a transfer between plants needs a nota fiscal and tax calculation, just like a sale. With MRP generating the STO, goods issue runs through an SD delivery and goods receipt through MM. With the settings below, that covers the outgoing and incoming nota fiscal, including taxes.

Treat this as guidance. Your requirements may change some settings, and there is more than one valid way to configure several of them. The process is cross-functional between MM and SD, though one strong MM or SD consultant can usually configure all of it.

Process steps

  1. Create the STO (document type UB or equivalent, item category U) in the receiving plant with ME21N or ME27.
  2. Create the delivery with VL10B.
  3. Pick and post goods issue with VL02N.
  4. Send the NF-e for authorization (J1BNFE).
  5. Post goods receipt with MIGO or MB0A, movement type 861.
STO intracompany process flow

How the documents are determined:

  • The supplying and receiving plant combination determines the STO document type (Customizing).
  • The STO type and supplying plant determine the delivery type.
  • Delivery type and the material’s item category group determine the delivery item category.
  • Goods issue posts movement type 862, which is nota fiscal relevant.
  • The delivery item category links to a sales order item category, which Customizing links to the NF type.
  • The receiving plant posts GR with movement type 861, referencing the supplying plant’s NF-e.

Accounting

Example with plant numbers and G/L accounts:

Goods issue at the issuing plant (1440)

  • Debit: stock at receiving plant (5611)
  • Credit: stock at issuing plant (1440)
  • Credit: ICMS payable at issuing plant (1440), 21305401
  • Debit: tax transitory (TXO), 11513410

Goods receipt at the receiving plant (5611)

  • Debit: ICMS recoverable at receiving plant (5611), 11513410
  • Credit: tax transitory (TXO), 11513410

Goods issue from 1440 to 5611

STO goods issue accounting document

Goods receipt at 5611

STO goods receipt accounting document

Movement types

Four Brazil-specific movement types post the STO, because taxes are calculated and the nota fiscal is triggered from the goods movement:

Movement typeUse
861Goods receipt
862Goods issue
863Return of goods receipt
864Return of goods issue

If they’re missing, see SAP Note 323649 – BR/TF: Creation movement types for Stock Transfer.

Then adjust table T156SC. See SAP Note 805584 – M7226 error with movement 645 for a non valuated material. Movement 645 is the non-Brazil equivalent of 862.

Table T156SC entries

Maintain table T156SY. See SAP Note 1876282 – Error M7021 in stock transfer return when post goods receipt.

Table T156SY entries

Maintain table V_156X_VC.

Table V_156X_VC entries

LIS update for the movement types

In SM30, table TMCA, copy all entries:

FromTo
101861
641862
861863
862864
TMCA entries for 861
TMCA entries for 862
TMCA entries for 863
TMCA entries for 864

Save the changes.

Sales order type

IMG > Sales and Distribution > Sales > Sales Documents > Sales Document Header > Define Sales Document Type (VOV8)

Copy DLB to TFST – BR Plant Transf. STO.

Sales document type TFST, part 1
Sales document type TFST, part 2

Sales document item category

IMG > Sales and Distribution > Sales > Sales Documents > Sales Document Item > Define Item Categories

Copy NLNB to TFDP – BR Plant Transf. STO.

Item category TFDP

Delivery type

IMG > Logistics Execution > Shipping > Deliveries > Define Delivery Types (OVLK)

Copy NL to TFDT – BR Transf. STO Dlv. and set default order type TFST.

Delivery type TFDT

Item category determination in deliveries

IMG > Logistics Execution > Shipping > Deliveries > Define Item Category Determination in Deliveries

Add: DlvT = TFDT, Usage = V, ItmCatGrp = blank, ItmC = TFDP. Adjust to the item category group and usage values you use.

Item category determination for TFDT

Schedule line category

IMG > Sales and Distribution > Sales > Sales Documents > Schedule Lines > Define Schedule Line Categories

New entry TF: Item rel. for dlv = X, movement type 862, movement type 1-step 862.

Schedule line category TF

Then, under Assign Schedule Line Categories, item category TFDP gets proposed schedule line category TF.

Schedule line category assignment

Copy control for deliveries

IMG > Logistics Execution > Shipping > Copying Control > Specify Copy Control for Deliveries

Copy NL-DL and change it to TFDT-TFST.

Copy control for deliveries, part 1
Copy control for deliveries, part 2

Nota fiscal sales document item category (J_1BSDICA)

IMG > Sales and Distribution > Billing > Billing Documents > Country-specific Features > Brazil > Maintain Sales Document Item Category (or SM30, J_1BSDICA)

FieldValue
Sales doc typeTFST
Item categoryTFDP
NF rec. type2
Partner IDRE
Tax codeI1
ICMS lawIC0
IPI lawIP2
COFINS lawC08
PIS lawP08

Tax code and tax laws depend on your system.

J_1BSDICA entry

Nota fiscal type by sales document type

IMG > Sales and Distribution > Billing > Billing Documents > Country-specific Features > Brazil > Assign Nota Fiscal Type to Sales Document Types

Assign the outgoing NF-e type.

NF type assignment

Pricing procedure

IMG > Sales and Distribution > Basic Functions > Pricing > Pricing Control > Define and Assign Pricing Procedure

Define document pricing procedure T (Transfer).

Document pricing procedure T

Assign it to order type TFST.

Document pricing procedure by order type

Assign it to the billing type.

Document pricing procedure by billing type

Create pricing procedure ZBRTRA – Brazil STO Price Procedure.

Pricing procedure ZBRTRA

In pricing procedure determination, assign document procedure T to ZBRTRA with condition type VPRS.

Pricing procedure determination

Then assign ZBRTRA to the transfer delivery type: IMG > Logistics Execution > Shipping > Basic Shipping Functions > Pricing > Define Pricing Procedures for Delivery.

Pricing procedure by delivery type

Tax code assignments

IMG > Financial Accounting (New) > Financial Accounting Global Settings (New) > Tax on Sales/Purchases > Calculation > Settings for Tax Calculation in Brazil > Access Tax Manager’s Workplace

Set the GR tax code (MM, e.g. I1) and the billing tax code (SD, e.g. I1), with these PIS and COFINS laws:

Tax codeCOFINS lawPIS law
A0C08P08
A1C08P08
A3C08P08
I0C08P08
I1C08P08
I3C08P08
Tax code assignments, part 1
Tax code assignments, part 2

Special conditions for pricing

IMG > Sales and Distribution > Billing > Billing Documents > Country-specific Features > Brazil > Special Conditions for Pricing

Special conditions for pricing

STO setup in purchasing

IMG > Materials Management > Purchasing > Purchase Order > Set up Stock Transport Order > Assign Delivery Type and Checking Rule

Delivery type and checking rule

IMG > Materials Management > Purchasing > Purchase Order > Set up Stock Transport Order > Assign Document Type, One-Step Procedure, Underdelivery Tolerance

Document type, one-step procedure, underdelivery tolerance

NF category derivation

In the Tax Manager’s Workplace (same path as above), go to Nota Fiscal > Inventory Management > NF Category Derivation.

NF category derivation

CFOP determination

IMG > Cross-Application Components > General Application Functions > Nota Fiscal > CFOP Codes > Define CFOP Determination for Outgoing and Returns (Versioned)

Outgoing CFOP determination

IMG > Cross-Application Components > General Application Functions > Nota Fiscal > CFOP Codes > Define CFOP Determination for Incoming and Returns (Versioned)

Incoming CFOP determination

This guide is based on SAP Notes 199233 and 888805. Read them alongside it when setting up or troubleshooting the intracompany STO.

Stacker cranes in a pallet warehouse

Comments

18 responses to “STO Intracompany”

  1. Rita Timmons Avatar
    Rita Timmons

    Hi Leandropia! This is a great article! I am working thru the configuration in my system as I have a need to do the Intra-Company STO between two plants in Brazil. I am getting stuck in the taxes portion. Would you happen to have a screen shot of what the resulting posting should look like? I am trying to figure out what tax config I am missing.

    Great article though!

    Regards,
    Rita

    Liked by 1 person

    1. leandropia Avatar

      Rita, I do have it! I will do my best to add a screenshot and additional explanation on this subject into the same post still this week!

      Like

    2. leandropia Avatar

      Rita, I added a sections “Accounting” to this post. I hope you find it helpful.

      Like

      1. Rita Timmons Avatar
        Rita Timmons

        Thank you! I think I got stuck on the fact that the Nota Fiscal is generated by the delivery PGI and not an invoice. So I am now trying to figure out what I missed in my setup to make this happen.

        Regards,
        Rita

        Like

      2. leandropia Avatar

        That’s correct. Your 862 movement must be relevant for NF. When you post Goods Issue (via VL02N for example), the NF will be created. You have to check SM30 J_1BIM02V-J_1BNFREL or check the section in my post “NOTA FISCAL CATEGORY DERIVATION”.

        Like

  2. Rita Timmons Avatar
    Rita Timmons

    leandropia: That was it! the movement type 861-864 were configured in my golden client, but missing in my development client. After I retransported it, I am getting further… now I am missing a tax code/jurisdiction setup…

    Thanks for your help! I really appreciate it.

    Regards,
    Rita

    Like

    1. leandropia Avatar

      Glad to help! The Jurisdiction comes from either Plant Setup or Branch (Business Place Setup), check both please… it is in the address details of one of those… check Issuing and Receiving Plant/Branches.

      Like

  3. nilojjal Avatar

    Hi,

    Could you please throw some light on how prices are calculated in the Nota Document(not in the sales order) ?

    Regards,
    Nilojjal

    Like

    1. leandropia Avatar

      Nilojjal, in the Intracompany STO, prices are pulled from VPRS / standard price.The attachment of OSS Note 888805 will have a model pricing procedure that is recommended to be used and there is where VPRS is. There is no price calculation in the MM side (PO), but only in the SD side.

      Like

  4. Feliyanus Gea Avatar
    Feliyanus Gea

    This is golden, I thought in order to generate invoice between STO transaction is done without SD module and it will require enhancement. I wish I read your article earlier as we have a requirement to generate account receivable entries (although I’m not in charge handle the case).
    Again, thank you!

    Liked by 1 person

    1. leandropia Avatar

      Always glad to help! Reach me if you need any help or have any questions around Brazil SAP Processes 😉 I will try my best to help.

      Like

  5. sergio Avatar
    sergio

    Hi Leandropia. In a stock transfer scenario with ICMS and ICST (substituicao tributaria) taxes must be appropriated to stock at receiving plant, so we need to have the following accountIng:

    Goods Issue at issuing Plant (1440)

    Debit – Stock at Receiving Plant (5611) – e. g. 100 BRL
    Credit – Stock at issuing Plant (1440) – e. g. 130 BRL ( ICMS 10 and ICST 20)

    Debit – Tax Transitory (TXO) 11513410 – 30 (ICMS + ICST)

    Do you have some idea what I need to do?

    Thanks a lot for attention,

    Sergio

    Like

  6. Marcelo Avatar
    Marcelo

    Hi Leandro. First of all congrats for the articles you’ve posted about STO process, they really help a lot!
    I’m trying to implement STO process but I’m facing problems concerning the IPI accounting. Only ICMS is correct and b in the brings the accounting documents. Do you have any idea where can I start attacking the problem? Do you believe is something related to the value strings WA04 and TXBR?
    Really appreciate any information that might help me!
    Thank you in advance!

    Like

  7. L.Silva Avatar
    L.Silva

    I can run the program Z_CREATE_STF_MOVEMENT_TYPE that is quoted in Note 323649 – BR / TF: Creation movement types for Stock Transfer to ECC version 6.0, Support Package 28?
    We use TAXBRA and not TAXBRJ.
    Thanks

    Like

    1. leandropia Avatar

      Sure you can… then you will have to recreate the taxes strings changing to TAXBRA on J_1BIM01

      Like

      1. L.Silva Avatar
        L.Silva

        I will do that now.
        Thanks,

        Like

  8. Jn Kim Avatar
    Jn Kim

    Thank you so much !

    Liked by 1 person

  9. Michel Avatar

    Thank you, very helpful

    Like

Leave a Reply