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

break by document no

Former Member
0 Likes
532

Hi Expert

how can I break the report by document no by seeing the below codes .

&----


*& T O P - O F - P A G E *

&----


  • WRITE:/ 'UDATE:' ,SY-DATUM.

  • FORMAT COLOR 4 INTENSIFIED on.

Write: /35 ' DOCUMENT CHANGES REPORT '.

WRITE: /5 'DOCUMENT-NO' NO-GAP.

WRITE: /5 'DATE', 20 'TIME', 40 'CHANGE-NO',55 'OLD-VALUE',70 'NEW-VALUE',90 'USER-NAME'.

uline.

LOOP AT IT_CDHDR INTO WA.

  • Move-corresponding it_cdhdr to wa.

Write: / wa-objectid UNDER'DOCUMENT-NO'. "color col_key .

write: / wa-udate dd/mm/yyyy under'DATE' NO-GAP,wa-utime under'TIME' NO-GAP,wa-changenr under 'CHANGE-NO',

wa-value_old under'OLD-VALUE' NO-GAP,

wa-value_new under'NEW-VALUE' NO-GAP ,wa-username under'USER-NAME' NO-GAP.

ENDLOOP.

ENDLOOP.

4 REPLIES 4
Read only

Former Member
0 Likes
514

Hi,

sorting the internal table table by document number will help u breaking the report by document number. or u can make use of Hierarchial ALV...

Reward points if useful:)..

Read only

0 Likes
514

I am not happy with your answer men, Can you explain in deep

regards

Piroz

Read only

Former Member
0 Likes
514

LOOP AT IT_CDHDR INTO WA.

<b>ON CHANGE OF wa-objectid

Write:/

Write:/

END ON.</b>

  • Move-corresponding it_cdhdr to wa.

Write: / wa-objectid UNDER'DOCUMENT-NO'. "color col_key .

write: / wa-udate dd/mm/yyyy under'DATE' NO-GAP,wa-utime under'TIME' NO-GAP,wa-changenr under 'CHANGE-NO',

wa-value_old under'OLD-VALUE' NO-GAP,

wa-value_new under'NEW-VALUE' NO-GAP ,wa-username under'USER-NAME' NO-GAP.

ENDLOOP.

ENDLOOP.

this code will display 2 blank lines at end of every Object ID

Before looping sort your itab based on object id value

Read only

0 Likes
514

Hi Sharayu Kumartkar

Thanks for your code, It works

regards

Piroz