Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

alv ouput in html format

Former Member
0 Likes
486

hai,

i have one req my req is ..

in my report output i sort fields with the options avilable in alv

for example i will show the how the out is

empno phno

1244 987656123232

978348758457

899840385405

1245 782374878438

354566565767

1246 343545646546

354546546577

like this my output is but when i downloaded into html format.

it is showing

1244 987656123232

1244 978348758457

1244 899840385405

1245 782374878438

1245 354566565767

1246 343545646546

1246 354546546577

like this but i want to show the layout as fisrt one .

can it possible ..

iam using alv's..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
462

This code will definately help u.

just define one more internal table and its workarea.

then ....

write code like this.

here my new it is it_disp andits wa is wa_disp.


LOOP AT it_final INTO wa_final.
  flag = 0.
  AT NEW belnr.
    flag = 1.
  ENDAT.
  IF flag NE 1.
    IF wa_final-disp = 'X'.
      MOVE-CORRESPONDING wa_final TO wa_disp.
      CLEAR :wa_disp-coll_amt. -- *clear the field which u wnat to display only once.*
      Clear :wa_disp-tds_amount.
      APPEND wa_disp TO it_disp.
    ENDIF.
  ENDIF.
  IF flag EQ 1.
    IF wa_final-disp = 'X'.
      MOVE-CORRESPONDING wa_final TO wa_disp.
      APPEND wa_disp TO it_disp.
    ENDIF.
  ENDIF.

ENDLOOP.

hai,

i have one req my req is ..

in my report output i sort fields with the options avilable in alv

for example i will show the how the out is

empno phno

1244 987656123232

978348758457

899840385405

1245 782374878438

354566565767

1246 343545646546

354546546577

like this my output is but when i downloaded into html format.

it is showing

1244 987656123232

1244 978348758457

1244 899840385405

1245 782374878438

1245 354566565767

1246 343545646546

1246 354546546577

like this but i want to show the layout as fisrt one .

can it possible ..

iam using alv's..

2 REPLIES 2
Read only

Former Member
0 Likes
463

This code will definately help u.

just define one more internal table and its workarea.

then ....

write code like this.

here my new it is it_disp andits wa is wa_disp.


LOOP AT it_final INTO wa_final.
  flag = 0.
  AT NEW belnr.
    flag = 1.
  ENDAT.
  IF flag NE 1.
    IF wa_final-disp = 'X'.
      MOVE-CORRESPONDING wa_final TO wa_disp.
      CLEAR :wa_disp-coll_amt. -- *clear the field which u wnat to display only once.*
      Clear :wa_disp-tds_amount.
      APPEND wa_disp TO it_disp.
    ENDIF.
  ENDIF.
  IF flag EQ 1.
    IF wa_final-disp = 'X'.
      MOVE-CORRESPONDING wa_final TO wa_disp.
      APPEND wa_disp TO it_disp.
    ENDIF.
  ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
462

ok'