Simulador(ContactNo : Code[20];ItemNo : Code[20];VAR CustName : Text[50];VAR PmtTermsCode : Code[20];VAR ItemDesc : Text[50];VAR Vas : Integer;VAR Vasi : XMLport Vasilhames) : Text ltBusRel.RESET; ltBusRel.SETRANGE("Contact No.",ContactNo); ltBusRel.SETRANGE("Business Relation Code",'CLI'); IF ltBusRel.FINDFIRST THEN BEGIN ltCustomer.GET(ltBusRel."No."); ltPaymentTerms.GET(ltCustomer."Payment Terms Code"); END; ltitem.RESET; ltitem.SETRANGE("No.",ItemNo); IF ltitem.FINDFIRST THEN BEGIN Descricao:=ltitem."Extended Description"; ItemContainer.RESET; ItemContainer.SETRANGE("Item No.",ItemNo); IF ItemContainer.FINDSET THEN BEGIN REPEAT Vasilhame:=ItemContainer.COUNT; UNTIL ItemContainer.NEXT=0; END; END; Vas:=Vasilhame;
Node Name Prefix Node Type Source Type Data Source XMLComentariosCompra Element Text <XMLComentariosCompra> Vasilhame Element Table <Item Container>(Item Container) No Element Field Item Container::Container No.
Answers
I have codeunit published as webservice. In that codeunit i call other codeunit that calculates some value.
Simulador(ItemNo : Code[20];ItemContainerNo : Code[20];VAR xml : XMLport PricingToolSimulador;VAR Temp : Decimal)
....
Temp:=PricingTool.GetCustoOperacao(ItemNo,Variante);
ItemNo and Variante are parameters. Fine so far.
My final goal is:
I have an xmlport not based in any table. I have a variable CostOp that will export the the same value as show above
CustoOp:=format(PricingTool.GetCustoOperacao(ItemNo,Variante));
My dificulty here is how to pass to xmlport the Itemno and variante in the webservice codeunit??
If i make like this CustoOp:=format(PricingTool.GetCustoOperacao('0000001010','j70-1010')); it will return a tag with
the correct value.
Will apreciate some tips thanks