primaverabss – How to name the transaction

How can I name a transaction in ERP PRIMAVERA, for example BSO.IniciaTransacción ("ControlaMOV").

Below the code:

                (In the event of an error in the system).
On Error GoTo TreatErro
Declaration of variables
Dim DocumentStockEntrada The GcpBEDocumentoStock
Dim DocumentStockSaida The GcpBEDocumentoStock
Dim LineDocumentoStockEntradaTALA Las GcpBELLADocumentoStock
Dim LineDocumentStockEntradaTBLB The GcpBELLADocumentoStock
Dim LineDocumentStockSaidaTBLA The GcpBELLADocumentoStock
Dim LineDocumentStockSaidaTALB The GcpBELLADocumentoStock

Start of the variables
Set DocumentStockEntrance = New GcpBEDocumentoStock
Set DocumentStockSaida = New GcpBEDocumentoStock
Set LineDocumentoStockEntradaTALA = New GcpBELLADocumentoStock
Set LineDocumentoStockEntradaTBLB = New GcpBELLADocumentoStock
Set LineDocumentoStockSaidaTBLA = New GcpBELLADocumentoStock
Set LineDocumentoStockSaidaTALB = New GcpBELLADocumentoStock


BSO.IniciaTransaccao

With LíneaDocumentoStockEntradaTALA
.artigo = article
.armazem = Tank_A
.Location = Tank_A + Loc_A
. Unit = "LT20"
.Quantity = Quantity
.SaidaEntrance = "E"
.TypeLine = "10"
.DataStock = Format (Now, "YYYY-MM-DD HH: MM: SS").
End With

With LíneaDocumentoStockEntradaTBLB
.artigo = article
.armazem = tank_B
.Location = tank_B + Loc_B
. Unit = "LT20"
.Quantity = Quantity
.SaidaEntrance = "E"
.TypeLine = "10"
.DataStock = Format (Now, "YYYY-MM-DD HH: MM: SS").
End With

With DocumentStockEntrada
.TypeDoc = "MSTKE"
.Serie = "A"
.DataDoc = Format (Now, "YYYY-MM-DD HH: MM: SS").
.observations = Observations
.UseCampos ("CDU_Estornado") = 0
End With

DocumentoStockEntrada.Las.Insere LíneaDocumentoStockEntradaTALA
DocumentoStockEntrada.Las.Insere LíneaDocumentoStockEntradaTBLB
BSO.Comercial.Stocks.PreencheDatosRelacionados DocumentStockEntrada
BSO.Comercial.Stocks.Actualiza DocumentStockEntrada

With LíneaDocumentoStockSaidaTBLA
.artigo = article
.armazem = tank_B
.Location = tank_B + Loc_A
. Unit = "LT20"
.Quantity = Quantity
.SaidaEntrance = "S"
.TypeLine = "10"
.DataStock = Format (Now, "YYYY-MM-DD HH: MM: SS").
End With

With LíneaDocumentoStockSaidaTALB
.artigo = article
.armazem = Tank_A
.Location = Tank_A + Loc_B
. Unit = "LT20"
.Quantity = Quantity
.SaidaEntrance = "S"
.TypeLine = "10"
.DataStock = Format (Now, "YYYY-MM-DD HH: MM: SS").
End With

With DocumentStockSaida
.TypeDoc = "MSTKS"
.Serie = "A"
.DataDoc = Format (Now, "YYYY-MM-DD HH: MM: SS").
.observations = Observations
.UseCampos ("CDU_Estornado") = 0
End With

DocumentStockSaida.Las.Insere LíneaDocumentoStockSaidaTBLA
DocumentStockSaida.Las.Insere LíneaDocumentoStockSaidaTALB
BSO.Comercial.Stocks.PreencheRelated Data DocumentStockSaida
BSO.Comercial.Stocks.Updates DocumentStockSaida


BSO.TerminaTransaccao

TransferSTK = False

Exit_point:
Set DocumentStockEntrada = Nothing
Set DocumentStockSaida = Nothing
Set LineDocumentoStockEntradaTALA = Nothing
Set LineDocumentoStockEntradaTBLB = Nothing
Set LineDocumentoStockSaidaTBLA = Nothing
Set LineDocumentoStockSaidaTALB = Nothing
Exit Function

TreatRed:
BSO.DesfazTransaccao
TransferSTK = True
PSO.Dialogos.MostraAnnounce "There was an error when doing stock movements between tanks ...", PRI_Exclama, Err.Description
Resume Exit_point
End Function