Skip to Content
0
Former Member
Jun 12, 2009 at 10:29 AM

All values in internal table are not displaing in the script print program

13 Views

Hi,

I am calling the script program.In main window all values in the internal table are not displaying. I wrote

write-form statement in loop. But not all the values are getting displayed. Only thel ast values getting dispalyed.

&----


*& Report ZSCRIPT_116719

*&

&----


*&

*&

&----


REPORT ZSCRIPT_116719.

************Table decleration***************

TABLES: mara, mbew, makt.

loop at i_makt into wa_makt.

endloop.

loop at i_MARA into wa_mara.

endloop.

LOOP AT I_MBEW INTO WA_MBEW.

ENDLOOP.

lv_price = 0.

********************Total Price******************

LOOP AT i_mbew INTO wa_mbew.

lv_price = lv_price + wa_mbew-stprs.

ENDLOOP.

end-of-selection.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

  • APPLICATION = 'TX'

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMS =

  • DEVICE = 'PRINTER'

  • DIALOG = 'X'

FORM = 'ZSCRIPT_719'

LANGUAGE = SY-LANGU

  • OPTIONS =

  • MAIL_SENDER =

  • MAIL_RECIPIENT =

  • MAIL_APPL_OBJECT =

  • RAW_DATA_INTERFACE = '*'

  • SPONUMIV =

  • IMPORTING

  • LANGUAGE =

  • NEW_ARCHIVE_PARAMS =

  • RESULT =

EXCEPTIONS

CANCELED = 1

DEVICE = 2

FORM = 3

OPTIONS = 4

UNCLOSED = 5

MAIL_OPTIONS = 6

ARCHIVE_ERROR = 7

INVALID_FAX_NUMBER = 8

MORE_PARAMS_NEEDED_IN_BATCH = 9

SPOOL_ERROR = 10

CODEPAGE = 11

OTHERS = 12

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'START_FORM'

EXPORTING

  • ARCHIVE_INDEX =

FORM = 'ZSCRIPT_719'

LANGUAGE = SY-LANGU

  • STARTPAGE = ' '

PROGRAM = 'ZSCRIPT_116719'

  • MAIL_APPL_OBJECT =

  • IMPORTING

  • LANGUAGE =

  • EXCEPTIONS

  • FORM = 1

  • FORMAT = 2

  • UNENDED = 3

  • UNOPENED = 4

  • UNUSED = 5

  • SPOOL_ERROR = 6

  • CODEPAGE = 7

  • OTHERS = 8

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*

*LOOP AT I_MBEW INTO WA_MBEW.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'DATA'

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

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*ENDLOOP.

If I give only one value it is showing the output. When I am fetching the data for range of values it i sshowing start_form is not there.

Plz let me know how to get the aa internal table values to be displayed