MUNDOSAP

Regresar   MUNDOSAP > DESARROLLO > Formularios - SAPScript - Smartforms
Nombre de Usuario
Contraseña
Home Descargas Registrar FAQ Miembros Calendario Buscar Temas de Hoy Marcar Foros Como Leídos




 
 
 
Herramientas Buscar en Tema Desplegado
Prev Mensaje Previo   Próximo Mensaje Próx
  #1  
Viejo 24/03/10, 23:04:48
mitosap mitosap is offline
Member
 
Fecha de Ingreso: sep 2009
Mensajes: 57
Acceder a una Tabla Interna dentro de un Smartforms

Hola a todos.

En definiciones globales (Inicializacion) he creado una tabla resumida que tiene los productos resumidos de una factura generada por VF04 (como son varias entregas de una dia, hay productos repetidos). Logre resumir la tabla interna del MAIN-datos (zgs_it_gen INTO gs_it_gen), solo que al tratar de ir de esta tabla gs_it_gen a otra tabla resumida por producto con sus valores totalizados (T_MARAX) no se como hacerlo.

INICIALIZACION (Datos Globales)
DATA: BEGIN OF t_mara OCCURS 0,
matnr LIKE mara-matnr, " Nro Material
sec_factura LIKE mara-sec_factura, " Secuencia Factura
END OF t_mara.

DATA: BEGIN OF t_maraw OCCURS 0,
material like mara-matnr,
bil_number(10),
item_number(6),
valor(13) type p decimals 2,
END OF t_maraw.

DATA: BEGIN OF t_marax OCCURS 0,
material like mara-matnr,
bil_number(10),
item_number(6),
valor(13) type p decimals 2,
END OF t_marax.

*
break jaarauz.
*Aqui creo una tabla por producto y otras columnas de enlace (bil_number, itm_number)
Loop at IS_BIL_INVOICE-IT_GEN into GS_IT_GEN.

move gs_it_gen-material to t_maraw-material.

move gs_it_gen-bil_number to t_maraw-bil_number.

move gs_it_gen-itm_number to t_maraw-item_number.
collect t_maraw.
Endloop.
****>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Sort t_maraw by material.
*Aqui por cada material obtengo el valor para sumarizarlo despues.
LOOP AT t_maraw.
Read table is_bil_invoice-it_kond INTO GS_IT_KOND_W with key
bil_number = t_maraw-bil_number
itm_number = t_maraw-item_number
binary search.
If sy-subrc eq 0.
t_maraw-valor = GS_IT_KOND_W-kwert.
Else.
t_maraw-valor = 0.
Endif.
Modify t_maraw.
Endloop.
******>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Sort t_maraw by material.
*Aqui luego hago el resumen por producto.
Loop at t_maraw.
move-corresponding t_maraw to t_marax.
move 0 to t_marax-bil_number.
move 0 to t_marax-item_number.
collect t_marax.
Endloop.
Sort t_marax by material.
*Aqui hago resumen por producto en la tabla del MAIN (zgs_it_gen)
Loop at IS_BIL_INVOICE-IT_GEN into GS_IT_GEN.
Read table t_mara with key matnr = gs_it_gen-material binary search.
If sy-subrc ne 0. Clear t_mara. Endif.
gs_it_gen-FPLTR = t_mara-sec_factura.
*
Read table t_maraw with key material = gs_it_gen-material binary search.
If sy-subrc eq 0.
move t_maraw-item_number to gs_it_gen-itm_number.
Else.
move 0 to gs_it_gen-itm_number.
Endif.
*
collect gs_it_gen into zgs_it_gen.
Endloop.
*****>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
MAIN (AreaPrincipal)
****>>>>>
*Justo aqui quiero tomar el valor de esa tabla resumen
Read table t_marax with key material = GS_IT_gen-material
binary search.
If sy-subrc eq 0.
w_kwert = zsde_marax-valor.
ENDif.

El error que me envia es: @8O@ READ_KOND_DATA Field "T_MARAX" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. .
El tema es que no se como debo declarla (t_marax).

Gracias por su ayuda, necesito sacar esto adelante con la ayuda de uds.
Responder Con Cita
 


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 14:54:51.


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