MUNDOSAP

Regresar   MUNDOSAP > DESARROLLO > Programación ABAP IV
Nombre de Usuario
Contraseña
Home Descargas Registrar FAQ Miembros Calendario Buscar Temas de Hoy Marcar Foros Como Leídos




 
Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Viejo 05/06/08, 12:36:54
ademiv ademiv is offline
Junior Member
 
Fecha de Ingreso: mar 2008
Mensajes: 1
De SAP a Excel - Como copiar y pegar una fila

Mis estimados, tengo una consulta que me urge y no doy pie con bola, tengo que de SAP levantar un template excel y cargarle datos, este template consiste en una cabecera estatica y un cuerpo dinamico que puede tener uno o mas bloques, cuando cargo la cabecera lo cargo sin problemas, uso lo siguiente:

******************************************************
START-OF-SELECTION.

DATA: o_excel_f30 TYPE ole2_object,
o_worbook_30 TYPE ole2_object,
o_cell_30 TYPE ole2_object.

DATA: lv_linesc(3),
lv_lines_insert(6),
lv_tabix TYPE sy-tabix,
lv_lines LIKE sy-tfill,
lv_add_lines LIKE sy-tfill,
lv_basec(3).

*$ Create object Excel for f30
CREATE OBJECT o_excel_f30 'EXCEL.APPLICATION'.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'ERROR OPENING EXCEL'(021). "&
LEAVE LIST-PROCESSING.
ENDIF.

*$ Create an Excel worbook object
CALL METHOD OF o_excel_f30 'WORKBOOKS' = o_worbook_30.

*$ Open F30 Template
CALL METHOD OF o_worbook_30 'OPEN'
EXPORTING
#1 = p_temp30.
IF sy-subrc NE 0.
MESSAGE s208(00) WITH 'ERROR OPENING TEMPLATE'(011). "&
LEAVE LIST-PROCESSING.
ENDIF.

**********************************
***** Fill document header *******

*$ Position to specific cell
CALL METHOD OF o_excel_f30 'Cells' = o_cell_30
EXPORTING
#1 = 3
#2 = 2.

* Set the value
SET PROPERTY OF o_cell_30 'Value' = '0001 - EMPREDMEI, S.L.'.

*$ Position to specific cell
CALL METHOD OF o_excel_f30 'Cells' = o_cell_30
EXPORTING
#1 = 4
#2 = 2.

* Set the value
SET PROPERTY OF o_cell_30
'Value' = 'Instancia de preparación'.

*$ Position to specific cell
CALL METHOD OF o_excel_f30 'Cells' = o_cell_30
EXPORTING
#1 = 5
#2 = 2.

* Set the value
SET PROPERTY OF o_cell_30
'Value' = 'Información general de ventas'. "Primer dato

*$ Position to specific cell
CALL METHOD OF o_excel_f30 'Cells' = o_cell_30
EXPORTING
#1 = 6
#2 = 2.

* Set the value
SET PROPERTY OF o_cell_30
'Value' = '31/12/08'. "Segundo dato
******************************************************

y lo hace perfecto, el problema es cuando quiero usar algun metodo que copie y pegue una fila, DESCONOZCO EL METODO para hacerlo, calculo que deberia ser algo asi como
CALL METHOD OF algo 'FUNCIO DE COPIAR' = o_cell_30
EXPORTING
#1 = 6 "Aca irian las celdas que copia
#2 = 2.


Resumiendo, necesitaria algun generoso que me indicara como copiar y pagar filas desde excel, el tema de insertar ya se como hacerlo, pero no aun el de copiar y pegar.

GRACIAS !!!!!!!!!!!!!!!!!!!!!
Responder Con Cita
  #2  
Viejo 06/06/08, 10:47:21
ballan ballan is offline
Senior Member
 
Fecha de Ingreso: oct 2006
Mensajes: 671
Mira este post, no resuelve tu duda exactamente pero te puede ayudar

Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Reglas de Mensajes
no puedes crear nuevos temas
no puedes responder temas
no puedes adjuntar archivos
no puedes editar tus mensajes

El código vB está On
Las caritas están On
Código [IMG] está On
Código HTML está Off
Saltar a Foro


Husos Horarios son GMT. La hora en este momento es 01:55:40.


www.mundosap.com 2006 - Spain
software crm, crm on demand, software call center, crm act, crm solutions, crm gratis, crm web