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

SAP SCRIPT --- URGENT

Former Member
0 Likes
722

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
Read only

Former Member
0 Likes
704

HI,

Put the Line in One Separate ELEMENT

and call that element in last page only.

Regards,

Vamshidhar .

5 REPLIES 5
Read only

Former Member
0 Likes
705

HI,

Put the Line in One Separate ELEMENT

and call that element in last page only.

Regards,

Vamshidhar .

Read only

0 Likes
704

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

Read only

Former Member
0 Likes
704

Hi,

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

Nayan

Read only

Former Member
0 Likes
704

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.

Read only

Former Member
0 Likes
704

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,