Ver Mensaje Individual
  #7  
Viejo 17/07/08, 10:35:00
Avatar de Jonathan Barrio Rodriguez
Jonathan Barrio Rodriguez Jonathan Barrio Rodriguez is offline
Senior Member
 
Fecha de Ingreso: oct 2007
Localización: MADRID
Mensajes: 199
Jeancifetola, ¿Podrías concretar cual es tu modificación?
Solo se me ocurre esto...

DATA: BEGIN OF INTAB_FINAL WITH HEADER LINE,
FILA(60) TYPE C.
DATA: END OF INTAB_FINAL.

DATA: INTAB_HEADER TYPE STANDARD TABLE OF TABDB_CABECERA,
INTAB_POSICION TYPE STANDARD TABLE OF TABDB_POSICIONES.

LOOP AT INTAB_HEADER.

CONCATENATE INTAB_HEADER-CAMPO1+0(longitud del campo1)
INTAB_HEADER-CAMPO2+longitud del campo1(longitud campo2) into INTAB_FINAL SEPARATED BY space.

APPEND INTAB_FINAL.

LOOP AT INTAB_POSICIONES WHERE CAMPO1 = INTAB_HEADER-CAMPO1.

CONCATENATE INTAB_POSICIONES-CAMPO1+0(longitud del campo1)
INTAB_POSICIONES-CAMPO2+longitud del campo1(longitud campo2) into INTAB_FINAL SEPARATED BY space.

APPEND INTAB_FINAL.

ENDLOOP. "INTAB_POSICIONES
ENDLOOP. "INTAB_HEADER

No sé si se entiend muy bien... Jeanficetola, pregunta en lo que tengas duda.

Seguramente ya habrías visto esta posibilidad y el inconveniente de después de no poder seleccionar campo... si quieres hacer un loop a la tabla final.

Bisonyé... el problema aquí creo, es que las tablas tienen diferente estructura...

ej.
header
Campo 1 (8 caracteres) Campo 2 (10 numéricos)
Posiction
cmapo1 (4 numéricos) campo2 (3 caracteres) campo 3 (2 caracteres)
cmapo1 (4 numéricos) campo2 (3 caracteres) campo 3 (2 caracteres)

Osea...

________ __________
|1234abcd|1234567890|
|1234|12a|ab|

Alguien sabe si se puede construir tablas internas con estructura diferente en sus filas...??
Responder Con Cita