#1
|
|||
|
|||
realizar corte en un reporte...
Buenas a todos tengo un pequeñisimo ejemplo de un reporte ( estoy haciendo mis pininos en ABAP4)
Y bueno realizo un listado de campos de una tabla y lo que quiero es que cuando haya un planetype nuevo en el listado haya un salto de linea... de momento lo hace con el carrid y si intento colocar algo adicional me salen mas saltos de linea.... REPORT z_exercise2_jvb. TABLES sflight. DATA: one(2),two(13),three(12),four(1),five(3),six(14),contador TYPE i. TYPES: itt_sflight TYPE TABLE OF sflight. DATA: it_sflight TYPE itt_sflight WITH HEADER LINE. DATA: it_sflight2 TYPE itt_sflight WITH HEADER LINE. FIELD-SYMBOLS: <fs> TYPE LINE OF itt_sflight. WRITE: / 'SFLIGHT-CARRID',one,'SFLIGHT-CONNID',one,'SFLIGHT-FLDATE',five,'SFLIGHT-SEATSMAX',one,'SFLIGHT-PLANETYPE',one,'SFLIGHT-SEATSOCC_B'. SELECT-OPTIONS s_ptype FOR sflight-planetype. SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE it_sflight WHERE planetype IN s_ptype ORDER BY carrid planetype. LOOP AT it_sflight ASSIGNING <fs>. AT NEW carrid. WRITE: /. ENDAT. WRITE: / <fs>-carrid, two, <fs>-connid, three, <fs>-fldate, four, <fs>-seatsmax, six, <fs>-planetype, one, <fs>-seatsocc_b. ENDLOOP. Alguien sabe que puedo hacer para que haga el salto en el planetype y no en el carrid?????? |
#2
|
|||
|
|||
bueno me respondo yo mismo ya que nadie me dijo nada....
REPORT z_exercise2_jvb. TABLES sflight. DATA: one(2),two(13),three(12),four(1),five(3),six(14),contador TYPE i. TYPES: itt_sflight TYPE TABLE OF sflight. DATA: it_sflight TYPE itt_sflight WITH HEADER LINE. DATA: it_sflight2 TYPE itt_sflight WITH HEADER LINE. data: var_aux type sflight-planetype. FIELD-SYMBOLS: <fs> TYPE LINE OF itt_sflight. WRITE: / 'SFLIGHT-CARRID',one,'SFLIGHT-CONNID',one,'SFLIGHT-FLDATE',five,'SFLIGHT-SEATSMAX',one,'SFLIGHT-PLANETYPE',one,'SFLIGHT-SEATSOCC_B'. SELECT-OPTIONS s_ptype FOR sflight-planetype. SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE it_sflight WHERE planetype IN s_ptype ORDER BY carrid planetype. LOOP AT it_sflight ASSIGNING <fs>. AT NEW carrid. WRITE: /. ENDAT. if var_aux NE <fs>-planetype. var_aux = <fs>-planetype. WRITE :/. ENDIF. WRITE: / <fs>-carrid, two, <fs>-connid, three, <fs>-fldate, four, <fs>-seatsmax, six, <fs>-planetype, one, <fs>-seatsocc_b. ENDLOOP. como ven creo un campo del tipo que quiero y hago un condicional.. if var_aux NE <fs>-planetype. si esto es true entonces hago esto var_aux = <fs>-planetype. sino pinto un espacio en blanco en la pantalla. y listo solucionado mi problema |
#3
|
|||
|
|||
Hola Emulation:
Lastima que no te pude responder a tiempo!!! Yo uso algo así: At new campo. NEW PAGE. endat. espero y te sirva Saludos |
#4
|
|||
|
|||
si te fijas ya lo solucione y uso lo mismo que tu jejeje
Gracias de todos modos |
Herramientas | Buscar en Tema |
Desplegado | |
|
|