on 06-13-2016 10:24 PM
Buenas tardes foro
quisiera moverme un poco del lado de mis conocimientos y afrontar un nuevo reto para esto estoy revisando la creacion de macros con esprocion de los datos de SAP b1, pero no tengo ni la mas remota idea.
no se si alguien tenga un manual o un curso de introduccion.
espero su ayuda y gracias
Buenos dias, tengo una pregunta realice la siguiente macro para realziar una tarea cotidiana pero me gustaria que me ayuen con una duda, en una parte del cogido yo tengo que realizar un bucle para pegar los datos uno a uno tomando como referencia una hoja de excel, pero me gustaria saber que puedo hacer o como puedo pegar una columna entera sin tener que pasar uno a uno con la intencion de acelerar y optimizar mas dicha herramienta.
CODE:
If m = Workbooks("Script SAP OLP.xlsm").Worksheets("Menu").Cells(j, 2) Then
session.findById("wnd[0]/usr/subSUB_MAIN:/SAPAPO/SAPLMSDP_SDP:0027/cntlSDP_CUSTOM_CONTROL/shellcont/shell/shellcont[0]/shell/shellcont[0]/shell").doubleClickCell 6, 2
session.findById("wnd[1]/tbar[0]/btn[0]").press
session.findById("wnd[0]/usr/subSUB_MAIN:/SAPAPO/SAPLMSDP_SDP:0027/cntlSDP_TLB_CUSTOM_CONTROL/shellcont/shell").pressButton "MSDP_ADVD_4PY84DRISMH_9526UPA726Y_6EOX9BGWXX4SNCKUI798LR9ND"
session.findById("wnd[1]/usr/chkZOLP_INIT_T-BB_INIT").Selected = True
session.findById("wnd[1]/usr/txtZOLP_INIT_T-/BIC/ABANK_BLD").Text = "0"
session.findById("wnd[1]/usr/chkZOLP_INIT_T-BB_INIT").SetFocus
session.findById("wnd[1]/tbar[0]/btn[11]").press
u = Workbooks(myOwnFile).Worksheets("OLP").Cells(f, c).End(xlDown).Row
x = 7
y = 3
'Aqui es donde me interesaria pegar toda la columna
For f = Weekday(Now(), vbMonday = vbSunday) To u
If f = u Then
f = 1
Exit For
End If
session.findById("wnd[0]/usr/subSUB_MAIN:/SAPAPO/SAPLMSDP_SDP:0027/cntlSDP_CUSTOM_CONTROL/shellcont/shell/shellcont[0]/shell/shellcont[0]/shell").setCellValue x, y, Workbooks(myOwnFile).Worksheets("OLP").Cells(f, c).Value
y = y + 1
Next
session.findById("wnd[0]/tbar[0]/btn[11]").press
e = Workbooks("Script SAP OLP.xlsm").Worksheets("Menu").Range("D1048576").End(xlUp).Row + 1
Workbooks("Script SAP OLP.xlsm").Worksheets("Menu").Cells(e, 4) = "OK"
sf = sf + 1
End If
En la linea de For F = Weekday... es donde sustituyo los datos uno a uno pero me gistaria poder seleccionar toda la columna y pegarla en SAP pero no encontre forma, he intentado con sendkeys y con sendvkeys de SPA, la transaccion es SAPAPO/SDP94.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SI POR FAVOR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solo tienes que referenciar a las API de SAP y tener conocimiento de programación. Si gustas puedo compartirte algunos ejemplos.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola Antonio la consulta seria necesitas adquirir conocimiento en cargar documentos a SAP por medio del Excel si es asi necesitas conocer SDK de SAP y si necesitas conocer como realizar un consulta en de SQL en Excel para que te muestre informacion de las tablas de SAP.
Te dejo unos link de SDK igual podrias busca informacion hay bastante en la web
http://www.sapbusinessone.es/blog/item/5-consejos-basicos-de-desarrollo-sobre-el-sdk-de-sap-b1
si es conectar una consulta de SQL a Excel te dejo este otro link te pude ser de ayuda.
https://the4beatech.wordpress.com/2011/08/23/crear-consultas-sql-desde-excel/
Suerte en tu aprendizaje.
Saludos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
12 | |
10 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.