Skip to Content
avatar image
Former Member

Sap script printing redundant lines

Hi All,

I am trying to print many pages of script. Each page contains should contain 1 item, but the script is printing 1 line on 1st page, 1st and second line on second page, 1st 2nd and third line on third page and so on. not able to sort out the problem. could anyone please help me?

regards,

Lavanya

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • May 20, 2015 at 02:51 PM

    Hi Lavanya,

    I think you are using WRITE_FORM_LINES try with WRITE_FORM.

    FM:open_form,

    loop at lt_final.

    FM:start_form.

    FM:write_form

    FM:end_form.

    endloop.

    FM:end_form.

    if it do not work !!

    please show how you have done the code !

    Thanks & Regards.

    K.Manoj.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Lavanya,

      FM:Read_form_lines is used to transfer lines of the form elements to internal table.

      if you used this in the loop then it may be the reason .

      just try commenting the read_form_lines.

      Thanks & Regards,

      manoj.

  • May 21, 2015 at 06:51 AM

    Hi,

    Try,

    Displaying the content in new page by the syntax.

    /: NEW-PAGE

    eg: create a element

    /E PAGE.

    /: NEW-PAGE


    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    ELEMENT = 'PAGE'

    * FUNCTION = 'SET'

    * TYPE = 'BODY'

    * WINDOW = 'MAIN'

    * IMPORTING

    * PENDING_LINES =

    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.


    Call the write form according to logic.


    Hope it helpful,

    Regards,

    Venkat.V

    Add comment
    10|10000 characters needed characters exceeded