cancel
Showing results for 
Search instead for 
Did you mean: 

smartform dotmatrix printing issue

Former Member
0 Kudos

Hi Experts,

   I have an issue in printing z-smartform through dot matrix printer .

  I am giving invoice number and in the print preview I am getting fine ,but while I am taking print out first page is displaying fine. I created one more template for next page header with space , so two pages are printing fine . So i created another header means another template for 3 rd page with some more space compare to 2 nd page . So 3 rd page is also fine . Now my issue is in print preview it is not fine but print out is fine and also I am printing 50 pages so I have to create 50 templates which is foolishness .

   I have only one main window . Nothing is there means no windows  & one page is there.

  So please help me to solve . It is already late so I am asking your help.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member213851
Active Contributor
0 Kudos

Hi  shek,

The printer is not interpreting A5 page format correctly. Please use INC6 page format and try.

Former Member
0 Kudos

Hi Sachin,

  It is saying Select a valid page format

former_member213851
Active Contributor
0 Kudos

Hi shek,

You need to create that page format using TCODE : SPAD and then assign it.

Use below link for creating page formats:

http://help.sap.com/saphelp_47x200/helpdata/en/d9/4a959551ea11d189570000e829fbbd/content.htm

Former Member
0 Kudos

Hi Sachin,

   They maintained page format & they only gave page format . For LP01 it is working fine but while in dot matrix printer they are adjusting first page ,so first page is ok but printer is continously running, so second page is not printing properly . Header is overlapping.

Is there any setting in our program.

Regards

Shek

former_member213851
Active Contributor
0 Kudos

Hi Shek,

There is no setting in program.You might try to

  • Check the print job properties.
  • Clear the spoolqueue.
  • Restart the printer.

To overcome Header overlapping , use Page protection concept:

http://wiki.sdn.sap.com/wiki/display/ABAP/Page+Break+in+SMARTFORMS

former_member200345
Contributor
0 Kudos

Hi, Create table instead of Template.

I guess this solves your issue.

former_member213851
Active Contributor
0 Kudos

Hi shek,

In the First page , you need to give First page itself in NEXT PAGE inside General attributes.

Former Member
0 Kudos

Hi Sachin,

  I gave like that only

former_member213851
Active Contributor
0 Kudos

Hi Shek,

This  problem might be because of printer setting.

The Page Margin in printer setting is different from the SAP Print preview setting.

Also there is also a logical page and a physical page. There is a small margin needed for the printer to transport the paper through the printer. So this can also lead to difference in Print preview and print-out.

You also need to use same page format in Smartform  as that  of paper type in Printer.

Eg: if page format of the form is DINA4, then the paper in the printer must also be A4 size.

otherwise there can be difference in Print preview and print-out.


For printing N number of pages, In the first page attributes, give next page as First page.

Also, In the driver program, you need to collect all Invoice details into a internal table say gt_itab.

Now, the FM returned by 'SSF_FUNCTION_MODULE_NAME' is to be invoked  as follows inside LOOP-ENDLOOP based on Control parameters .


DATA:LS_CONPARA TYPE SSFCTRLOP,

          FLAG TYPE CHAR1 VALUE 'X'.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

    EXPORTING

      FORMNAME           = formname

    IMPORTING

      FM_NAME            = FM

    EXCEPTIONS

      NO_FORM            = 1

      NO_FUNCTION_MODULE = 2

      OTHERS             = 3.

  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 GT_ITAB INTO WA_ITAB.

*-----Control Parameters

CLEAR LS_CONPARA.

    AT FIRST.

      LS_CONPARA-NO_OPEN  = SPACE.

      LS_CONPARA-NO_CLOSE = 'X'.

    ENDAT.

    IF FLAG = SPACE.

      LS_CONPARA-NO_OPEN  = 'X'.

      LS_CONPARA-NO_CLOSE = 'X'.

    ENDIF.

    AT LAST.

      LS_CONPARA-NO_OPEN  = 'X'.

      LS_CONPARA-NO_CLOSE = SPACE..

    ENDAT.

*-----Control Parameters


CALL FUNCTION FM    *-------FM IS RETURNED BY FM

                                              *-------SSF_FUNCTION_MODULE_NAME

EXPORTING

        CONTROL_PARAMETERS = LS_CONPARA

TABLES

       wa              = WA_ITAB

ENDLOOP.


Best Regards,

Sachin

Message was edited by: Sachin Adak

Former Member
0 Kudos

Hi Sachin,

  I already tried what you said.In this also preview is fine but printout is not fine.

Regards

former_member213851
Active Contributor
0 Kudos

Hi Shek,

Please check your Printer settings with the help of Basis team.

Because there might be case that Page Margin in printer setting is different from the SAP Print preview setting.

Also there is also a logical page and a physical page. There is a small margin needed for the printer to transport the paper through the printer. So this can also lead to difference in Print preview and print-out.

You also need to use same page format in Smartform  as that  of paper type in Printer.

Eg: if page format of the form is DINA4, then the paper in the printer must also be A4 size.

       otherwise there can be difference in Print preview and print-out.

Former Member
0 Kudos

Hi Sachin,

  we r using A5 may be because it is not A4.page format is INCH1.Our basis person also don't have any knoledge in this.

Regards

Former Member
0 Kudos

Hi Sachin,

  What do u mean by logical & physical page.

Regards

former_member213851
Active Contributor
0 Kudos

Hi  shek,

The printer is not interpreting A5 page format correctly. Please use INC6 page format and try.