Retain the alignment of print preview in download of smartform

Hi ABAPers,
I need to retain the alignment of the smartform print preview when I download the smartform as PDF.
The text alignment is ok but the issue is with character "-".
In print preview
Shift Date Qty.Kgs Qty.Lts ST Fat% CLR SNF% Fat(Kg) Rate UOM Pay Farmer
AM 29 42.00 40.77 G 7.00 23.80 7.78 2.94 17.50 KG 735.00
Total Buf : 42.00 40.77 7.00 7.79 2.94 18.03 735.00
Net Amount Payable Rs 735.00
In downloaded PDF
Shift Date Qty.Kgs Qty.Lts ST Fat% CLR SNF% Fat(Kg) Rate UOM Pay Farmer
AM 29 42.00 40.77 G 7.00 23.80 7.78 2.94 17.50 KG 735.00
Total Buf : 42.00 40.77 7.00 7.79 2.94 18.03 735.00
Net Amount Payable Rs 735.00
so how to retain the exact format in PDF as in print preview.
-Dep
Edited by: DeepakNandikanti on Dec 16, 2010 7:01 AM

Hi friend,
There are many questions posted in Forum saying printout is coming correct in PDF but not in print.
The main reason for that is PDF accepts all kind of input its an universally accepted format Portable Device Format.
So see whether you system supports both the languages. Check with your basis team about it. Also try using other languages which your system supports so that you will get to know where your problem exists.
I think this will solve your issue please revert back to me if you have any issues i will help you.
Thanks,
Sri Hari

Similar Messages

  • Help reqd to display the form without print preview call

    Hi all,
    I did one gate pass form and i want to view the form in my selection screen or output screen(just in monitor) as a display by giving one Z-code.
    i.e, we can view the form thru Print preview...the same preview, i want to display after i give my parameter in the selection screen.
    For example.ZGPOUT if i enter as a t-code.
    it should ask my Gate Pass number in the Selection screen...if its right then my Form will come out to the display screen. (instead of going by Print method).,
    Pls post ur comment and reply me with examples of code,if possible.
    thanks & regards
    sankar.

    the following code are suitable for SMARTFORMS print,please refer to the BOLD section:
    call function 'SSF_FUNCTION_MODULE_NAME'
        exporting
          formname                 = v_form_name
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
        importing
          fm_name                  = v_fm_name
       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.
    *Call Smart form
      <b>data: t_control like ssfctrlop.</b>
      if not p_fax is initial.
        t_control-device = 'TELEFAX'.
      endif.
    <b>  t_control-PREVIEW = ' '.    "space means no print preview.</b>
      call function v_fm_name
      exporting
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
        <b>control_parameters          = t_control</b>
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
        tables
          l_xcredit                = icredit
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.

  • Problem in alv grid display (it is not filtering the data in print preview)

    Hi Every One,
    Its very urgent for me to deliver this report ....
    I applied sort criteria on my final internal table which is pupulated and then i passed to the function module...
    when i execute the program it is showing me the perfect output..when i take a print preview it is not filtering the data instead it is showing me the normal uotput i.e..,without sort criteria...
    here is the code plz go thru it and tell me were i am doing wrong...
    i thank u one and all ...and plz debub the code on the system and let me know....
    REPORT  tracking-quotation NO STANDARD PAGE HEADING MESSAGE-ID zrv_message LINE-COUNT 65 LINE-SIZE 110.
                          Includes
    This include contains declarations
      INCLUDE ZMM_TRACKING_QUOTATION_T.
    This include contains code for the performs
      INCLUDE ZMM_TRACKING_QUOTATION_F.
    AT SELECTION SCREEN                                                  *
    AT SELECTION-SCREEN.
    This perform will validate the fields
      PERFORM f_validate_sel_screen.
                         Start-Of-Selection
    START-OF-SELECTION.
    This perform will read the values from the database.
      PERFORM selection.
    This perform will build the field catalogue
      PERFORM f_build_catalogue.
    This perform will build the sort
      PERFORM f_event_sort.
    This perform will build the layout
      PERFORM f_build_layout.
    This perform will build the event
      PERFORM f_event_build.
    This perform will build the comment
      PERFORM f_comment_build.
    This perform will display the list
      PERFORM f_list_display.
              End-Of-Selection
    END-OF-SELECTION.
    *&  Include           ZMM_TRACKING_QUOTATION_T                         *
               T a b l e s   D e c l a r a t i o n s                     *
    TABLES: eban,
            ebkn,
            ekko,
            eket,
            lfa1,
            ekpo.
          Selection Screen Declaration
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-100.
    SELECT-OPTIONS: bednr  FOR eban-bednr,
                    ps_psp FOR ebkn-ps_psp_pnr,
                    kostl  FOR ebkn-kostl,
                    erdat  FOR ebkn-erdat.
    SELECTION-SCREEN END OF BLOCK b1.
               Type Pools  D e c l a r a t i o n s                        *
    TYPE-POOLS: slis.
               V a r i  a b l e s                                        *
    DATA : rt_fieldcat  TYPE slis_t_fieldcat_alv,
           i_layout     TYPE slis_layout_alv,
           i_event      TYPE slis_t_event,
           i_listheader TYPE slis_t_listheader,
           l_sort       TYPE slis_t_sortinfo_alv,
           wa_sort      TYPE slis_sortinfo_alv.
               I n t e r n a l  T a b l e s                               *
    DATA: BEGIN OF i_final_tab OCCURS 0,
          name1      LIKE lfa1-name1,
          banfn      LIKE eban-banfn,
          badat      LIKE eban-badat,
          bnfpo      LIKE eban-bnfpo,
          txz01      LIKE eban-txz01,
          menge      LIKE eban-menge,
          bednr      LIKE eban-bednr,
          frgdt      LIKE eban-frgdt,
          lfdat      LIKE eban-lfdat,
          ps_psp_pnr LIKE ebkn-ps_psp_pnr,
          bwbdt      LIKE ekko-bwbdt,
          aedat      LIKE ekko-aedat,
          lifnr      LIKE ekko-lifnr,
          ihran      LIKE ekko-ihran,
          ebeln      LIKE ekpo-ebeln,
          ebelp      LIKE ekpo-ebelp,
          plifz      LIKE ekpo-plifz,
          eindt      LIKE eket-eindt,
          END OF i_final_tab.
    DATA: BEGIN OF itab OCCURS 0,
          name1      LIKE lfa1-name1,
          banfn      LIKE eban-banfn,
          badat      LIKE eban-badat,
          bnfpo      LIKE eban-bnfpo,
          txz01      LIKE eban-txz01,
          menge(17),
          bednr      LIKE eban-bednr,
          frgdt      LIKE eban-frgdt,
          lfdat      LIKE eban-lfdat,
          ps_psp_pnr LIKE ebkn-ps_psp_pnr,
          bwbdt      LIKE ekko-bwbdt,
          aedat      LIKE ekko-aedat,
          lifnr      LIKE ekko-lifnr,
          ihran      LIKE ekko-ihran,
          ebeln      LIKE ekpo-ebeln,
          ebelp      LIKE ekpo-ebelp,
          plifz      LIKE ekpo-plifz,
          eindt      LIKE eket-eindt,
          END OF itab.
    *&  Include           ZMM_TRACKING_QUOTATION_F                         *
    **&      Form  FIELDCAT_INIT
          text
         -->P_GT_FIELDCAT[]  text
    FORM f_build_catalogue.
      DATA : ls_fieldcat TYPE slis_fieldcat_alv.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname     = 'BANFN'.
      ls_fieldcat-tabname       = 'itab'.
      ls_fieldcat-seltext_m   = 'PR Number'.
    ls_fieldcat-ref_tabname   = 'EBAN'.
      ls_fieldcat-fix_column  = ''.
      ls_fieldcat-emphasize   = ''.
      APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'BNFPO'.
    ls_fieldcat-ref_tabname   = 'EBAN'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'BADAT'.
    ls_fieldcat-ref_tabname   = 'EBAN'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'TXZ01'.
    ls_fieldcat-ref_tabname   = 'EBAN'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'MENGE'.
    ls_fieldcat-ref_tabname   = 'ITAB'.
    ls_fieldcat-seltext_l     = 'Quantity'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'PS_PSP_PNR'.
    ls_fieldcat-ref_tabname   = 'EBKN'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'BEDNR'.
    ls_fieldcat-ref_tabname   = 'EBAN'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'FRGDT'.
    ls_fieldcat-ref_tabname   = 'EBAN'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'LFDAT'.
    ls_fieldcat-ref_tabname   = 'EBAN'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'EBELN'.
    ls_fieldcat-ref_tabname   = 'EKPO'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'EBELP'.
    ls_fieldcat-ref_tabname   = 'EKPO'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'AEDAT'.
    ls_fieldcat-ref_tabname   = 'EKKO'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'LIFNR'.
    ls_fieldcat-ref_tabname   = 'EKKO'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'NAME1'.
    ls_fieldcat-ref_tabname   = 'LFA1'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'IHRAN'.
    ls_fieldcat-ref_tabname   = 'EKKO'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'EINDT'.
    ls_fieldcat-ref_tabname   = 'EKET'.
    APPEND ls_fieldcat TO rt_fieldcat.
    CLEAR ls_fieldcat.
    ls_fieldcat-tabname       = 'ITAB'.
    ls_fieldcat-fieldname     = 'PLIFZ'.
    ls_fieldcat-ref_tabname   = 'EKPO'.
    APPEND ls_fieldcat TO rt_fieldcat.
    ENDFORM.                    " FIELDCAT_INIT
    *&      Form  selection
          text
    -->  p1        text
    <--  p2        text
    FORM selection .
      SELECT
                lfa1~name1
                eban~banfn
                eban~badat
                eban~bnfpo
                eban~txz01
                eban~menge
                eban~bednr
                eban~frgdt
                eban~lfdat
                ebkn~ps_psp_pnr
                ekko~bwbdt
                ekko~aedat
                ekko~lifnr
                ekko~ihran
                ekpo~ebeln
                ekpo~ebelp
                ekpo~plifz
                eket~eindt
                                    FROM lfa1 INNER JOIN ekko ON ( lfa1lifnr = ekkolifnr )
                                              INNER JOIN ekpo ON ( ekkoebeln = ekpoebeln )
                                              INNER JOIN eket ON ( ekpoebeln = eketebeln
                                                                             AND
                                                                   ekpoebelp = eketebelp )
                                              INNER JOIN eban ON ( ebanbanfn =  eketbanfn
                                                                            AND
                                                                  ebanbnfpo =  eketbnfpo )
                                              INNER JOIN ebkn ON ( ebanbanfn =  ebknbanfn
                                                                                 AND
                                                                  ebanbnfpo =  ebknbnfpo )
                                    INTO TABLE i_final_tab WHERE eban~bednr      IN bednr  AND
                                                           ebkn~ps_psp_pnr IN ps_psp AND
                                                           ebkn~kostl      IN kostl  AND
                                                           ebkn~erdat      IN erdat AND
                                                           ekko~bstyp <> 'F'.
      LOOP AT i_final_tab.
        itab-name1      = i_final_tab-name1.
        itab-banfn      = i_final_tab-banfn.
        itab-badat      = i_final_tab-badat.
        itab-bnfpo      = i_final_tab-bnfpo.
        itab-txz01      = i_final_tab-txz01.
        itab-menge      = i_final_tab-menge.
        itab-bednr      = i_final_tab-bednr.
        itab-frgdt      = i_final_tab-frgdt.
        itab-lfdat      = i_final_tab-lfdat.
        itab-ps_psp_pnr = i_final_tab-ps_psp_pnr.
        itab-aedat      = i_final_tab-aedat.
        itab-lifnr      = i_final_tab-lifnr.
        itab-ihran      = i_final_tab-ihran.
        itab-ebeln      = i_final_tab-ebeln.
        itab-ebelp      = i_final_tab-ebelp.
        itab-plifz      = i_final_tab-plifz.
        itab-eindt      = i_final_tab-eindt.
        APPEND itab.
        CLEAR itab.
      ENDLOOP.
    ENDFORM.                    " selection
    *&      Form  f_event_build
          text
    -->  p1        text
    <--  p2        text
    FORM f_event_build .
      DATA wa_event TYPE slis_alv_event.
      CLEAR: wa_event,
             i_event.
    *read event top-of-page
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = i_event.
      IF sy-subrc <> 0.
      ENDIF.
    *Prepare event table
      READ TABLE i_event WITH KEY name = 'TOP_OF_PAGE' INTO wa_event.
      IF sy-subrc EQ 0.
        MOVE 'TOP_OF_PAGE' TO wa_event-form.
        APPEND wa_event TO i_event.
      ENDIF.
    ENDFORM.                    " f_event_build
    *&      Form  f_comment_build
          text
    -->  p1        text
    <--  p2        text
    FORM f_comment_build .
      DATA: wa_listheader TYPE slis_listheader.
      CLEAR wa_listheader.
      wa_listheader-typ = 'H'.
      wa_listheader-info = 'Tracking Of Quotation For Purchase Requisition'.
      APPEND wa_listheader TO i_listheader.
      CLEAR wa_listheader.
      wa_listheader-typ = 'S'.
      wa_listheader-info = 'SMS-DEMAG Pvt. Ltd.'.
      APPEND wa_listheader TO i_listheader.
      CLEAR wa_listheader.
      wa_listheader-typ = 'S'.
      wa_listheader-info = 'R1- Nehru Enclave'.
      APPEND wa_listheader TO i_listheader.
      CLEAR wa_listheader.
      wa_listheader-typ = 'S'.
      wa_listheader-info = 'New Delhi - '.
      APPEND wa_listheader TO i_listheader.
    ENDFORM.                    " f_comment_build
    *&      Form  f_build_layout
          text
    -->  p1        text
    <--  p2        text
    FORM f_build_layout .
      CLEAR i_layout.
      i_layout-colwidth_optimize = 'X'.
      i_layout-zebra = 'X'.
      i_layout-totals_text = 'Total'.
    ENDFORM.                    " f_build_layout
    *&      Form  f_list_display
          text
    -->  p1        text
    <--  p2        text
    FORM f_list_display .
    *sort itab by name1
                banfn
                badat
                bnfpo
                txz01
                menge
                bednr
                frgdt
                lfdat
                ps_psp_pnr
                bwbdt
                aedat
                lifnr
                ihran
                ebeln
                ebelp
                plifz
                eindt.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          is_layout          = i_layout
          it_fieldcat        = rt_fieldcat
          it_events          = i_event
          it_sort            = l_sort
        TABLES
          t_outtab           = itab.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " f_list_display
    *&      Form  TOP_OF_PAGE
          text
    -->  p1        text
    <--  p2        text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = i_listheader
          i_logo             = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  f_event_sort
          text
    -->  p1        text
    <--  p2        text
    FORM f_event_sort .
    wa_sort-spos = 1.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-fieldname = 'BANFN'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    CLEAR WA_SORT.
    wa_sort-spos = 5.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-fieldname = 'MENGE'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 2.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-fieldname = 'BNFPO'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 3.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-fieldname = 'BADAT'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 4.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-fieldname = 'TXZ01'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 7.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-fieldname = 'BEDNR'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 6.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-fieldname = 'PS_PSP_PNR'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 8.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-fieldname = 'FRGDT'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 9.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-fieldname = 'LFDAT'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-spos = 10.
    wa_sort-fieldname = 'EBELN'.
    wa_sort-subtot = 'X'.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-spos = 11.
    wa_sort-fieldname = 'EBELP'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-spos = 12.
    wa_sort-fieldname = 'AEDAT'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-spos = 13.
    wa_sort-fieldname = 'LIFNR'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-spos = 14.
    wa_sort-fieldname = 'NAME1'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-spos = 15.
    wa_sort-fieldname = 'IHRAN'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-up = 'X'.
    wa_sort-tabname = 'i_final_tab'.
    wa_sort-spos = 16.
    wa_sort-fieldname = 'EINDT'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    *sort l_sort by spos.
      CLEAR wa_sort.
      wa_sort-spos = 1.
      wa_sort-fieldname = 'BANFN'.
      wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-subtot = ' '.
      APPEND wa_sort TO l_sort.
    wa_sort-spos = 5.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-fieldname = 'MENGE'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-spos = 2.
    wa_sort-fieldname = 'BNFPO'.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    wa_sort-spos = 3.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-fieldname = 'BADAT'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 4.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-fieldname = 'TXZ01'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 7.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-fieldname = 'BEDNR'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 6.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-fieldname = 'PS_PSP_PNR'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 8.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-fieldname = 'FRGDT'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    wa_sort-spos = 9.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-fieldname = 'LFDAT'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-spos = 10.
    wa_sort-fieldname = 'EBELN'.
    wa_sort-subtot = 'X'.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-spos = 11.
    wa_sort-fieldname = 'EBELP'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-spos = 12.
    wa_sort-fieldname = 'AEDAT'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-spos = 13.
    wa_sort-fieldname = 'LIFNR'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-spos = 14.
    wa_sort-fieldname = 'NAME1'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-down = 'X'.
    wa_sort-tabname = 'itab'.
    wa_sort-spos = 15.
    wa_sort-fieldname = 'IHRAN'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    CLEAR wa_sort.
    wa_sort-spos = 16.
    wa_sort-fieldname = 'EINDT'.
    wa_sort-tabname = 'itab'.
    wa_sort-down = 'X'.
    wa_sort-subtot = ' '.
    APPEND wa_sort TO l_sort.
    *CLEAR WA_SORT.
    *sort l_sort by spos.
    ENDFORM.                    " f_event_sort
    *&      Form  f_validate_sel_screen
          text
    -->  p1        text
    <--  p2        text
    FORM f_validate_sel_screen .
    *Tracking number
      SELECT SINGLE * FROM eban WHERE bednr IN bednr.
      IF sy-subrc NE 0.
        MESSAGE e013.
      ENDIF.
    *Wbs Element
      SELECT SINGLE * FROM ebkn WHERE ps_psp_pnr IN ps_psp.
      IF sy-subrc NE 0.
        MESSAGE e014.
      ENDIF.
    *Cost center
      SELECT SINGLE * FROM ebkn WHERE kostl IN kostl.
      IF sy-subrc NE 0.
        MESSAGE e015.
      ENDIF.
    *Date
      SELECT SINGLE * FROM ebkn WHERE erdat IN erdat.
      IF sy-subrc NE 0.
        MESSAGE e012.
      ENDIF.
    ENDFORM.                    " f_validate_sel_screen

    Hey Ravi,
    As you said it is urgent to deliver the report, i will suggest you temporary solution while i debug the program.
    In the FM "REUSE_ALV_GRID_DISPLAY", use layout to generate your sorted report for now as shown following:
    <b>DATA:   G_VARIANT LIKE DISVARIANT.</b>
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
         I_CALLBACK_PROGRAM = SY-REPID
         IS_LAYOUT = I_LAYOUT
         IT_FIELDCAT = RT_FIELDCAT
         IT_EVENTS = I_EVENT
         IT_SORT = L_SORT
         <b>is_variant = g_variant</b>
      TABLES
         T_OUTTAB = ITAB.
      IF SY-SUBRC <> 0.
      ENDIF.
    Where g_variant is your custom layout which you will make as default for output.
    Hope this helps and let me know if you need more details.
    In the mean time, i will look in to the program.
    Regards,
    Vicky
    PS: Award points if helpful

  • In Smartform able to see the logo in print preview but logo not printing.

    Hi All,
            In Smart form there is a logo which i am able to see through Print Preview but when trying to print that form the logo is not printing. What might be the reason for this problem, please suggest a solution for this problem.
    Regards,
    Siva.

    Hi,
         I am able to see the logo for all other smart forms i have developed using the same printer. But the problem is only with this Form. If the printer settings are not correct  i should not be able to get the output for any form using that printer.
    Regards,
    Siva.

  • Print Preview is missing from print dialog. It shows "Show Details" where the documentation shows Print Preview. How do I preview the printout?

    Print Preview works in all other apps, including Safari. Running a Cannon PIXMA MG5220 with up-to-date printer drivers installed.

    It's moved to the PDF dropdown, "Open PDF in Preview"

  • Activate in Print Preview (PO) Download and archiving button and Download

    Hi
    I need to activate download and archiving button and Download  button because the user need to send PO as PDF format, what do I check on system to do it?
    Thanks in advance!!!

    Hi,
       In your requirement you do one condition check like the following. Write the below code in driver program.
    If sy-ucomm = 'PROC'.
    PDF Convertion code & saving to the location.
    elseif sy-ucomm = 'VIEW'.
    call the smartform function module.
    endif.
    PROC  --> function code of print button in VF31
    VIEW  -->  function code of preview button in VF31
    But while you are seeing preview , you have to set the control parameter of smart form function module.
    i.e.,    wa_ctrl-preview = 'X'.
    This control parameter you have to pass to smart form function module call.
    Thanks and regards,
    Venkat

  • How to remove suppressed items in the group tree from the crystal report print preview screen

    I am removing items in report using group selection formula. Although the removed items are not available in the report, they are still available in the group navigation tree on the left pane. Is there a way to overcome this ?

    Hi All,
    How can i use the below group selection code in record selection.
    TotalQuantity := sum({ICIVAL.QUANTITY},{ICIVAL.ITEMNO});
    TotalCost := sum({ICIVAL.TRANSCOST},{ICIVAL.ITEMNO});
    iIncludeQty := TONUMBER({?INCLUDEQTY});
    iIncludeCost := TONUMBER({?INCLUDECOST});
    bIncludeQty := FALSE;
    bIncludeCost := FALSE;
    SELECT iIncludeQty
        CASE 0:
            bIncludeQty := TRUE
        CASE 1:
            If TotalQuantity > 0 THEN
                bIncludeQty := TRUE
        CASE 2:
            If TotalQuantity = 0 Then
                bIncludeQty := TRUE
        CASE 3:
            If TotalQuantity < 0 THEN
                bIncludeQty := TRUE
        CASE 4:
            If TotalQuantity <> 0 THEN
                bIncludeQty := TRUE
    SELECT iIncludeCost
        CASE 0:
            bIncludeCost := TRUE
        CASE 1:
            If TotalCost > 0 THEN
                bIncludeCost := TRUE
        CASE 2:
            If TotalCost = 0 Then
                bIncludeCost := TRUE
        CASE 3:
            If TotalCost < 0 THEN
                bIncludeCost := TRUE
        CASE 4:
            If TotalCost <> 0 THEN
                bIncludeCost := TRUE
    bIncludeQty AND bIncludeCost

  • Download smartform as PDF, suppress Print/Preview dialog

    Hi Experts,
    Facing some issues in downloading PDF converted from Smartform.
    In the program I am trying directly download a smartform converted into PDF format and save it in local system.
    When ever I am trying to execute the program it shows up the Print/Preview dialog before showing the Save As dialog.
    I have passed control_parameters-getotf = 'X' to the smartform runtime FM, which ideally should have suppressed the Print/Preview dialog and return the otfdata.
    Here the entire code is...
    Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
    The program other wise works absolutly fine .
    Please advise.
    Thanks
    Jahan
    Edited by: Rob Burbank on Apr 8, 2010 11:10 AM

    Helloo Guyz...
    I am exactly trying the same, but the Print Dialog is still coming ...
    See here is my code ..
    cont_param-getotf = 'X'.
    cont_param-no_dialog = 'X'.
    cont_param-preview = 'X' .
      CALL FUNCTION fm_name
        EXPORTING
          control_parameters = cont_param
        IMPORTING
          job_output_info  = otfdata
        TABLES
          s_bukrs             = s_bukrs[]
          s_gjahr              = s_gjahr[]
          s_rebzg             = s_rebzg[]
          s_kunnr             = s_kunnr[]
        EXCEPTIONS
          formatting_error  = 1
          internal_error      = 2
          send_error          = 3
          user_canceled    = 4
          OTHERS              = 5.
    even after this ..during execution the the Print Dialog is coming..
    I have no idea what esle I am missing..
    Thanks

  • How to print the report directly without previewing (report viewer) using c# windows application

    Hi,
    Currently, we are using crystal report to all of our reporting applications, but since I/users have encountered some issues about CR's speed to load only a simple report, maybe it is now time for us to adopt a new reporting environment in which I think SSRS
    can fill this problem.
    To start with, I have here a sample code, that uses the crystal report to print the report directly without previewing:
    csCashInvoiceCal csCashCal; --Crystal report name .rpt
    dsCsReceipt dsCs; --created dataset
    DataTable u;
    DataRow s;
    private System.Drawing.Printing.PrintDocument printDocument1;
    private System.Windows.Forms.PrintDialog printDialog1;
    ParameterValues paramValue;
    ParameterDiscreteValue discreteValue;
    ParameterFieldDefinition fieldDefinition;
    private void btnPrint_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt2();
    print2();
    csCashCal.Close();
    this.Cursor = Cursors.Default;
    private void loadReceipt2()
    dsCs = new dsCsReceipt(); --created dataset
    u = dsCs.Tables.Add("DtCsReceipt");
    u.Columns.Add("Qty", Type.GetType("System.String"));
    u.Columns.Add("UOM", Type.GetType("System.String"));
    u.Columns.Add("Description", Type.GetType("System.String"));
    u.Columns.Add("UnitPrice", Type.GetType("System.String"));
    u.Columns.Add("Discount", Type.GetType("System.String"));
    u.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    s = u.NewRow(); double.TryParse(dgvDesc.Rows[i].Cells[Discount2.Name].Value.ToString(), out discount);
    s["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    s["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    s["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    s["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    s["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    s["Discount"] = "";
    s["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    u.Rows.Add(s);
    catch (Exception) { }
    csCashCal = new csCashInvoiceCal();
    csCashCal.SetDataSource(dsCs.Tables[1]);
    //csCashCal.Refresh();
    loadParameter2();
    private void loadParameter2()
    ParameterFieldDefinitions paramFieldDefinitions;
    paramValue = new ParameterValues();
    discreteValue = new ParameterDiscreteValue();
    paramFieldDefinitions = csCashCal.DataDefinition.ParameterFields;
    discreteValue.Value = date;
    fieldDefinition = paramFieldDefinitions["Date"];
    commonParam();
    discreteValue.Value = txtcsno.Text;
    fieldDefinition = paramFieldDefinitions["InvoiceNo"];
    commonParam();
    discreteValue.Value = txtNameTo.Text;
    fieldDefinition = paramFieldDefinitions["CustomerName"];
    commonParam();
    discreteValue.Value = txtAdd.Text;
    fieldDefinition = paramFieldDefinitions["CustomerAddress"];
    commonParam();
    ------other parameters----
    private void commonParam()
    paramValue.Clear();
    paramValue.Add(discreteValue);
    fieldDefinition.ApplyCurrentValues(paramValue);
    private void print2()
    using (printDocument1 = new System.Drawing.Printing.PrintDocument())
    using (this.printDialog1 = new PrintDialog())
    //this.printDialog1.UseEXDialog = true;
    this.printDialog1.Document = this.printDocument1;
    DialogResult dr = this.printDialog1.ShowDialog();
    if (dr == DialogResult.OK)
    int nCopy = this.printDocument1.PrinterSettings.Copies;
    int sPage = this.printDocument1.PrinterSettings.FromPage;
    int ePage = this.printDocument1.PrinterSettings.ToPage;
    string PrinterName = this.printDocument1.PrinterSettings.PrinterName;
    try
    csCashCal.PrintOptions.PrinterName = PrinterName;
    csCashCal.PrintToPrinter(nCopy, false, sPage, ePage);
    printcount++;
    //saveCountPrint();
    catch (Exception err)
    MessageBox.Show(err.ToString());
    This is only a simple sales receipt application that uses dgv and textboxes to push its data to dataset to the crystal report, a simple one but there are instances that it is very slow.
    But I'm having trouble implementing this using SSRS, since I'm only new to this one, wherein I created the report using report wizard, with two button options inside the form for print preview or direct print selection. Actually, it is very easy to implement
    with print preview because it uses reportviewer. My problem is that how can I print the report directly without using a reportviewer?
    So here is my code so far which I don't know what's next:
    private void button2_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt3();
    //print3();
    this.Cursor = Cursors.Default;
    ReportParameter[] parameter = new ReportParameter[11];
    private void loadParameter3()
    parameter[0] = new ReportParameter("InvoiceNo", txtcsno.Text);
    parameter[1] = new ReportParameter("Date", date);
    parameter[2] = new ReportParameter("CustomerTin", txtTin.Text);
    parameter[3] = new ReportParameter("CustomerName", txtNameTo.Text);
    parameter[4] = new ReportParameter("CustomerAddress", txtAdd.Text);
    parameter[5] = new ReportParameter("Agent", agent);
    parameter[6] = new ReportParameter("Discount", "Discount: ");
    parameter[7] = new ReportParameter("TotalDiscount", lblDiscount.Text + "%");
    parameter[8] = new ReportParameter("TotalSales", rdtotal);
    parameter[9] = new ReportParameter("Tax", rdtax);
    parameter[10] = new ReportParameter("TotalAmount", rdnet);
    private void loadReceipt3()
    DataSet dsrs = new DataSet();
    DataTable dtrs = new DataTable();
    DataRow drs;
    dtrs.Columns.Add("Qty", Type.GetType("System.String"));
    dtrs.Columns.Add("UOM", Type.GetType("System.String"));
    dtrs.Columns.Add("Description", Type.GetType("System.String"));
    dtrs.Columns.Add("UnitPrice", Type.GetType("System.String"));
    dtrs.Columns.Add("Discount", Type.GetType("System.String"));
    dtrs.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    drs = dtrs.NewRow();
    drs["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    drs["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    drs["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    drs["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    drs["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    drs["Discount"] = "";
    drs["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    dtrs.Rows.Add(s);
    catch (Exception) { }
    int addtlRow = 7;
    if (addtlRow > (count - 1))
    addtlRow = addtlRow - (count - 1);
    for (int i = 0; i < addtlRow; i++)
    dtrs.Rows.Add();
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    localreport.Refresh();
    //what's next....
    So what's next after local..refresh()? Actually, I have googled a lot but I didn't found the exact solution that I'm looking for which confuses me a lot.
    Anyway I'm using VS 2010 with sql server 2012 express.
    You're help will be greatly appreciated.
    Thank you,
    Hardz

    After some further studies with ReportViewer controls and with the use of this tutorial @ : http://msdn.microsoft.com/en-us/library/ms252091.aspx, which helps me a lot on how to print a report without using a report viewer, I found out what is missing
    with my code above and helps solve my question.
    Here's the continuation of the code above:
    private void loadReceipt3()
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.ReportPath = @"..\..\SsrsCashReceipt.rdlc";
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    Export(localreport);
    print4();
    private IList<Stream> m_streams;
    private int m_currentPageIndex;
    private void Export(LocalReport report)
    string deviceInfo =
    @"<DeviceInfo>
    <OutputFormat>EMF</OutputFormat>
    <PageWidth>8.5in</PageWidth>
    <PageHeight>11in</PageHeight>
    <MarginTop>0.25in</MarginTop>
    <MarginLeft>0.25in</MarginLeft>
    <MarginRight>0.25in</MarginRight>
    <MarginBottom>0.25in</MarginBottom>
    </DeviceInfo>";
    Warning[] warnings;
    m_streams = new List<Stream>();
    report.Render("Image", deviceInfo, CreateStream,
    out warnings);
    foreach (Stream stream in m_streams)
    stream.Position = 0;
    private void print4()
    if (m_streams == null || m_streams.Count == 0)
    throw new Exception("Error: no stream to print.");
    PrintDocument printDoc = new PrintDocument();
    PrintDialog printDlg = new PrintDialog();
    printDlg.Document = printDoc;
    DialogResult dr = printDlg.ShowDialog();
    if (dr == DialogResult.OK)
    if (!printDoc.PrinterSettings.IsValid)
    throw new Exception("Error: cannot find the default printer.");
    else
    printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
    m_currentPageIndex = 0;
    printDoc.Print();
    Dispose();
    public void Dispose()
    if (m_streams != null)
    foreach (Stream stream in m_streams)
    stream.Close();
    m_streams = null;
    private Stream CreateStream(string name, string fileNameExtension, Encoding encoding, string mimeType, bool willSeek)
    Stream stream = new FileStream(name + "." + fileNameExtension,
    FileMode.Create);
    m_streams.Add(stream);
    return stream;
    private void PrintPage(object sender, PrintPageEventArgs ev)
    Metafile pageImage = new
    Metafile(m_streams[m_currentPageIndex]);
    // Adjust rectangular area with printer margins.
    Rectangle adjustedRect = new Rectangle(
    ev.PageBounds.Left - (int)ev.PageSettings.HardMarginX,
    ev.PageBounds.Top - (int)ev.PageSettings.HardMarginY,
    ev.PageBounds.Width,
    ev.PageBounds.Height);
    // Draw a white background for the report
    ev.Graphics.FillRectangle(Brushes.White, adjustedRect);
    // Draw the report content
    ev.Graphics.DrawImage(pageImage, adjustedRect);
    // Prepare for the next page. Make sure we haven't hit the end.
    m_currentPageIndex++;
    ev.HasMorePages = (m_currentPageIndex < m_streams.Count);
    Thank you very much for this wonderful tutorial. :)

  • Help reqd to display the form output  without print preview

    Hi all,
    I did one gate pass form and i want to view the form in my selection screen or output screen(just in monitor) as a display by giving one t-code.
    i.e, we can view the form thru Print preview...the same preview, i want to display after i give my parameter in the selection screen.
    For example.ZGPOUT if i enter as a t-code.
    it should ask my Gate Pass number in the Selection screen...if its right then my Form will come out to the display screen. (instead of going by Print method).,
    Pls post ur comment and reply me with examples,if possible.
    thanks & regards
    sankar.

    Hi Sankar,
    Simply put a parameter statement .
    for example.
    parameters : vbeln type vbrk-vbeln .
    when u ll execute.U ll get the selection screen asking u for the perticular parameter,U input that and execute.U ll get the output as print preview.In the above  query i ll input vbeln and ll get the o/p.Similarly u enter Ur getpass no and u ll get the printpreiview as o/p.
    Reward if useful.
    Regards
    Rudra

  • Multiple print for pdf form retains the value from previous!

    Hello All,
    We have developed Adobe Print Forms for our business requirements.
    When we try to print these forms from the direct transaction, it prints fine. But when we try to select multiple forms to be printed with one transaction, the pdf form generated has data from all the selection!
    Eg: Form printed properly for Delivery Note through transaction VL02N.
    The same form when we try to print for multiple deliveries from transaction VL71, i retains the data and prints one huge form having all delivery data!!
    Please help us out in this issue and let us know what is tha we are missing in this process!
    Thanks a lot for your time and help.
    Gaurav

    Hi ,
    i think that the problems comes form the data you give to the form, do you make a refresh of internal table before populated them ...
    regards

  • ME21N User Exit to automatically display the print preview

    Hi All
    Does anyone know of way to invoke the Purchase Order Print Preview Option <u>automatically</u> once the user selects the save button as part of the ME21N transaction ?
    This is required so that the end user must perform a visual check on the PO just before the purchase order is saved.
    We are already the standard print preview button working in ME21N. 
    Thanks
    Donnacha

    Hi Donnacha!
    Pravat pinned out the main problem: when you want to display something before saving, then it's anything else but not the printout of the PO. The printout goes for the saved values - but you require a display before saving. So you have to develop a complete own display (which can be done of course).
    Regards,
    Christian

  • My printer will not detect the alignment page and prints out poorly?

    My printers scanner will not detect the alignment and prints our poorly? Help!

    Please read this post then provide some details.  What printer model? What operating system? Are black and color properly printing on the alignment page?
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Smartform to PDF, how to suppres Print/Preview dialog

    Hi Experts,
    Facing some issues in downloading PDF converted from Smartform.
    In the program I am trying directly download a smartform converted into PDF format and save it in local system.
    When ever I am trying to execute the program it shows up the Print/Preview dialog before showing the Save As dialog.
    I have passed control_parameters-getotf = 'X' to the smartform runtime FM, which ideally should have suppressed the Print/Preview dialog and return the otfdata.
    Here the entire code is...
    REPORT  yfr_invoice.
    TABLES :  t001, bsad, bsid, kna1,sscrfields .
    DATA : fm_name TYPE rs38l_fnam.
    DATA : it_bsad TYPE STANDARD TABLE OF bsad.
    DATA : BEGIN OF it_bseg OCCURS 0,
            belnr TYPE belnr_d,
           END OF it_bseg.
    DATA : error_flag.
    DATA: 
           cont_param TYPE ssfctrlop,
           out_param  TYPE ssfcompop,
           otfdata    TYPE ssfcrescl,
           t_tline    TYPE TABLE OF tline INITIAL SIZE 0,
           t_docs     TYPE STANDARD TABLE OF docs,
           v_filesize TYPE i,
           v_name     TYPE string,
           v_path     TYPE string,
           v_fullpath TYPE string,
           v_filename TYPE string,
           v_filter   TYPE string.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS : s_bukrs FOR t001-bukrs NO-EXTENSION NO INTERVALS OBLIGATORY.
    SELECT-OPTIONS : s_gjahr FOR bsid-gjahr NO-EXTENSION NO INTERVALS OBLIGATORY.
    SELECT-OPTIONS : s_rebzg FOR bsid-rebzg OBLIGATORY.
    SELECT-OPTIONS : s_kunnr FOR kna1-kunnr.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
    START-OF-SELECTION.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = 'YFF_INVOICE'
        IMPORTING
          fm_name            = fm_name
        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.
    cont_param-getotf = 'X'.
    cont_param-no_dialog = 'X'.
    cont_param-preview = 'X' .
      CALL FUNCTION fm_name
        EXPORTING
          control_parameters = cont_param  "Passing getotf = 'X'
        IMPORTING
          job_output_info    = otfdata
        TABLES
          s_bukrs            = s_bukrs[]
          s_gjahr            = s_gjahr[]
          s_rebzg            = s_rebzg[]
          s_kunnr            = s_kunnr[]
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
        IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ELSE.
          CALL FUNCTION 'CONVERT_OTF_2_PDF'
            IMPORTING
              bin_filesize           = v_filesize
            TABLES
              otf                    = otfdata-otfdata
              doctab_archive         = t_docs
              lines                  = t_tline
            EXCEPTIONS
              err_conv_not_possible  = 1
              err_otf_mc_noendmarker = 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.
          CONCATENATE 'filename' '.pdf' INTO v_name.
          CALL METHOD cl_gui_frontend_services=>file_save_dialog
            EXPORTING
              default_extension = 'PDF'
              default_file_name = v_name
              file_filter       = v_filter
            CHANGING
              filename          = v_name
              path              = v_path
              fullpath          = v_fullpath.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              bin_filesize            = v_filesize
              filename                = v_fullpath "'C:\Test.pdf'
              filetype                = 'BIN'
            TABLES
              data_tab                = t_tline
            EXCEPTIONS
              file_write_error        = 1
              no_batch                = 2
              gui_refuse_filetransfer = 3
              invalid_type            = 4
              no_authority            = 5
              unknown_error           = 6
              header_not_allowed      = 7
              separator_not_allowed   = 8
              filesize_not_allowed    = 9
              header_too_long         = 10
              dp_error_create         = 11
              dp_error_send           = 12
              dp_error_write          = 13
              unknown_dp_error        = 14
              access_denied           = 15
              dp_out_of_memory        = 16
              disk_full               = 17
              dp_timeout              = 18
              file_not_found          = 19
              dataprovider_exception  = 20
              control_flush_error     = 21
              OTHERS                  = 22.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
        ENDIF.
      ENDIF.
    The program other wise works absolutly fine .
    Please advise.
    Thanks
    Jahan

    Moderator message - Cross post locked
    Rob

  • Issue While printing / Previewing a Adobe form in Web Dynpro ABAP application

    Dear All,
    We have designed 4 different adobe forms using SFP transaction for 4 different countries in SAP system.
    Every country have different terms and conditions and therefore we have placed static texts (Hardcoded text) with text in different styles. Some text is in bold, some in different font (Bold, Italic). Font and Paragraph settings of the text was done as per expected. All the forms have same font and paragraph settings.
    When we Launch Web Dynpro ABAP application to open the form in Print preview or to take print, form is not getting displayed / printed as it is designed in SFP. But if you open the form in SFP, everything looks fine.
    It is working fine for 3 different forms but problem with only 1 form.
    Kindly guide what is the reason for this strange issue when previewed or taken print. It is very urgent.
    Thanks,
    Bharath.K

    Dear All,
    Thanks for your responses.
    We had identified the reason.
    Customer has provided terms and conditions for all 4 countries in PDF document. Along with PDF, for 3 out of 4 countries customer has shared pre-prepared word document with pre aligned and justified terms and conditions as per expected outcome. We copied this text from word to Adobe form layout. It worked fine. For 1 country, customer have not shared terms and conditions in word document. Therefore we had copied text directly from adobe PDF document in to Form layout. Then this issue happened.
    Solution for this issue is to, prepared a word document with expected alignment and justification of terms and conditions text . Then copied from word to adobe livecycle designer form layout. It worked fine.
    Thanks,
    Bharath.

Maybe you are looking for

  • Trying to convert a date in text format to date or numeric

    I've been given an excel file of members of a group, which includes listing of members' birthdays.  These are in the format "26-Jul" in text characters.  In order to sort by date for a birthday listing, I'm stuck trying to set up a calculation that w

  • How to develop a simple plugin for adobe illustrator cs2 using xcode on mac os

    I would like to know the steps to develop a simple plug-in for adobe illustrator cs2 using xcode on mac OS...anything like a dialog box displaying "hello World"... I m new to MAC OS...Please help... Thanks in advance

  • Finder is not displaying some folders and files

    Most folders and files are displaying properly, but some are missing.  I can find them by typing their names into the search window, but they are not displaying automatically in Finder.

  • Putting Javascript in report template

    See Swapping columns on reports In order to be able to use that "move columns" feature in any report region, I put the necessary Javascript functions in the report template. This way, if any report region on the page needs that feature, it can just s

  • Add drop shadow curled page like default photo boxes in books.

    When I pick a theme in Books in Aperture, I see the photo boxes have rotation and a shawdowed, buttom edge curled effect to the photo plaeholder boxes. I figured out how to add photo boxes and even size and rotate them, but cannot see how to add the