|
#1
|
|||
|
|||
collect
Buena tarde,
estoy tratando de sumar con collect, pero no suma como debe, anexo codigo, podrian decirme que hago mal. LOOP AT pt_mara into ls_mara. ls_inventario-matnr = ls_mara-matnr. ls_inventario-labst = ls_mara-labst. ls_inventario-insme = ls_mara-insme. ls_inventario-umlme = ls_mara-umlme. ls_inventario-speme = ls_mara-speme. ls_inventario-retme = ls_mara-retme. READ TABLE pt_makt INTO ls_makt WITH KEY matnr = ls_mara-matnr. if sy-subrc IS INITIAL. ls_inventario-maktx = ls_makt-maktx. ENDIF. CLEAR ls_makt. READ TABLE pt_mdpb INTO ls_mdpb WITH KEY matnr = ls_mara-matnr. if sy-subrc IS INITIAL. ls_inventario-plnmg = ls_mdpb-plnmg. ENDIF. CLEAR ls_mdpb. READ TABLE pt_mdpb1 INTO ls_mdpb1 WITH KEY matnr = ls_mara-matnr. if sy-subrc IS INITIAL. ls_inventario-forem1 = ls_mdpb1-plnmg. ENDIF. CLEAR ls_mdpb. if ls_inventario-plnmg = 0. ls_inventario-cobertura = 0. else. ls_inventario-cobertura = ( ls_inventario-labst / ls_inventario-plnmg ) * 20. ENDIF. READ TABLE pt_vbrk INTO ls_vbrk WITH KEY matnr = ls_mara-matnr. if sy-subrc IS INITIAL. LOOP AT pt_vbrk into ls_vbrk." INTO ls_vbrk. COLLECT ls_vbrk into pt_vbrk1. ENDLOOP. gracias. |
#2
|
|||
|
|||
collect
Recuerda que en el collect todos los campos de texto a agrupar deberian ser iguales, por ahí alguno debe estar diferente
Saludos! |
Herramientas | Buscar en Tema |
Desplegado | |
|
|