Application Development 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: 

SAP SCRIPT --- URGENT

Former Member
0 Kudos
79

Dear all,

How to draw a line only in the last page of the script. i.e.,, after diaplaying all the records. Now i am getting the line in all pages. Pls let me know how to come out from this issue.

Thanks in advance

Krishna

1 ACCEPTED SOLUTION

Former Member
0 Kudos
61

HI,

Put the Line in One Separate ELEMENT

and call that element in last page only.

Regards,

Vamshidhar .

5 REPLIES 5

Former Member
0 Kudos
62

HI,

Put the Line in One Separate ELEMENT

and call that element in last page only.

Regards,

Vamshidhar .

0 Kudos
61

o.k.vamsi

But, I need to draw a line only after the last record. May i know how to get the last record pls.

-Krishna

Former Member
0 Kudos
61

Hi,

Check which is the last window called in your script. There you could write the code for drawing the line.

Nayan

Former Member
0 Kudos
61

Hi,

Create a seperate window for drawing the line.So it would automatically be printed after last line.Write the function WRITE_FORM at last.

Former Member
0 Kudos
61

HI,

Just like Vamshi Naini said, you need to put the LINE in ONE separate ELEMENT ( e.g: ITEM_FOOTER ) and call that element in last page only. Please look at code bellow:


  CALL FUNCTION 'WRITE_FORM'
    EXPORTING
      element                  = 'ITEM_FOOTER'
      type                     = 'BOTTOM'
      window                   = 'MAIN'
    EXCEPTIONS
      element                  = 1
      function                 = 2
      type                     = 3
      unopened                 = 4
      unstarted                = 5
      window                   = 6
      bad_pageformat_for_print = 7
      spool_error              = 8
      codepage                 = 9
      OTHERS                   = 10.   	 

Notes: 'MAIN' is your main window.

Regards,