Advertisement
Guest User

Untitled

a guest
Feb 14th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.75 KB | None | 0 0
  1.  var WSClient = new WSReference.zws_sd_pedidos_mbusiness2Client();
  2.                     WSClient.ClientCredentials.UserName.UserName = WSUser;
  3.                     WSClient.ClientCredentials.UserName.Password = WSPassword;
  4.  
  5.  
  6.                     List<WSReference.ZsdRfcHeader> headers = new List<WSReference.ZsdRfcHeader>();
  7.                     var header = new WSReference.ZsdRfcHeader()
  8.                     {
  9.                         Mandt = "700",
  10.                         Idpedidomdsoft = "10",                      
  11.                         Clase = "R",                    
  12.                         Solicitante = "3000000004",                      
  13.                         Destinatario = "",
  14.                         Vendedor = "00000069",                    
  15.                         Transportista = "",
  16.                         Condpago = "",
  17.                         Fpedido = "20200214",                      
  18.                         Importe = 33.60,
  19.                         Obs = "",
  20.                         Vpago = "",
  21.                         Flete = 0,
  22.                         Fagrup = "",
  23.                         Vbeln = "",
  24.                         Status = "",
  25.                         Tipo = "",
  26.                         Agrup = "",
  27.                         Div = "",
  28.                         Uname = ""
  29.  
  30.                     };
  31.                     headers.Add(header);
  32.  
  33.                     var details = new List<WSReference.ZsdRfcDetail>();
  34.                         var detail = new WSReference.ZsdRfcDetail()
  35.                         {
  36.                             Mandt = "700"
  37.                             Idpedidomdsoft = "10",
  38.                             Idlinea =  "1"
  39.                             Posicion = "",
  40.                             Material = "FMV-0127",
  41.                             Cantidad = 1
  42.                         };
  43.                         details.Add(detail);
  44.  
  45.                         detail = new WSReference.ZsdRfcDetail()
  46.                         {
  47.                             Mandt = "700"
  48.                             Idpedidomdsoft = "10",
  49.                             Idlinea =  "2"
  50.                             Posicion = "",
  51.                             Material = "FPT-0028",
  52.                             Cantidad = 2
  53.                         };
  54.  
  55.                         details.Add(detail);
  56.  
  57.        
  58.                     var sale = new WSReference.ZsdRfcPedidos();
  59.                     sale.Header = headers.ToArray();
  60.                     sale.Detalle = details.ToArray();
  61.                     var rafaga = new WSReference.ZmfSdPedidosMbRafaga()
  62.                     {
  63.                         Opcion = "1",
  64.                         Pedidos = sale,
  65.  
  66.                     };
  67.                     var respond = WSClient.ZmfSdPedidosMbRafaga(rafaga);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement