rotation of texts in adobe forms

Upload: patelsandeep123

Post on 14-Apr-2018

292 views

Category:

Documents


6 download

TRANSCRIPT

  • 7/27/2019 Rotation of Texts in Adobe Forms

    1/7

    Object Rotation in Adobe FormIntroduction: Sometimes we get the requirement in form printing to display text or field in rotatedmanner. Rotation of object is not easily possible in Smart Forms/SAPscript. It can be achievedeasily through Adobe form.In this case adobe forms get edge over Smart Forms/SAPscript. Objects can be rotated in 90steps.

    Transaction Code: SFPFirst create the interface: ZROTATE_INTF

    Put import parameter VBAP with table type VBAP_T

    Create Form ZROTATE_FORM in SFP.

  • 7/27/2019 Rotation of Texts in Adobe Forms

    2/7

    Drag the import parameter VBAP form interface to context.

    Deactivate the fields of the table, which will not be used in the layout, it adds to theperformance.

    Click on Layout ButtonRename Master Page and change Orientation.

  • 7/27/2019 Rotation of Texts in Adobe Forms

    3/7

    Create Header in Master Page.

    Insert the header in master page. Rename and resize the content area in master page.

    Resize the Header and Set the Font, Paragraph and Layout Property.

  • 7/27/2019 Rotation of Texts in Adobe Forms

    4/7

    Insert table in design page over the content area.

    Two columns with header, but without footer.

  • 7/27/2019 Rotation of Texts in Adobe Forms

    5/7

    Change header name and align properly.

    Bind the Fields of table with Data View fields.

    Do the same for Amount Field. Wrap Table in sub form.Drag material field from data view to design view page, remove caption, resize the object andwrap in sub form.

    Rotate the Material Field and align properly. For 90 rotation click the button in layout tab.

  • 7/27/2019 Rotation of Texts in Adobe Forms

    6/7

    Save and activate the form.

    Driver Program Code*&---------------------------------------------------------------------*

    *& Report ZMATERIAL_SALES*&---------------------------------------------------------------------*REPORT zmaterial_sales.TABLES: vbap.DATA:g_funcname TYPE funcname,wa_outputparams TYPE sfpoutputparams,wa_docparams TYPE sfpdocparams,wa_formoutput TYPE fpformoutput,wa_result TYPE sfpjoboutput.

    PARAMETERS:p_matnr TYPE matnr.

    DATA:

    wa_vbap TYPE vbap,gt_vbap TYPE STANDARD TABLE OF vbap.

    SELECT *FROM vbapINTO TABLE gt_vbapUP TO 5 ROWSWHERE matnr = p_matnr.PERFORM get_fname.*&---------------------------------------------------------------------**& Form get_fname

  • 7/27/2019 Rotation of Texts in Adobe Forms

    7/7

    *&---------------------------------------------------------------------** text*----------------------------------------------------------------------*FORM get_fname .DATA: e_adstrace TYPE string.CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'EXPORTING

    i_name = 'ZROTATE_FORM'IMPORTINGe_funcname = g_funcname.

    wa_outputparams-device = 'PRINTER'.wa_outputparams-preview = 'X'.wa_outputparams-getpdf = space.CALL FUNCTION 'FP_JOB_OPEN'CHANGINGie_outputparams = wa_outputparams

    EXCEPTIONScancel = 1usage_error = 2system_error = 3internal_error = 4OTHERS = 5.

    IF sy-subrc 0.MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgnoWITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    wa_docparams-langu = 'X'.wa_docparams-country = 'US'.wa_docparams-fillable = 'X'.

    CALL FUNCTION g_funcnameEXPORTINGvbap = gt_vbap

    EXCEPTIONSusage_error = 1system_error = 2

    internal_error = 3OTHERS = 4.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 'FP_GET_LAST_ADS_TRACE'IMPORTINGe_adstrace = e_adstrace.

    CALL FUNCTION 'FP_JOB_CLOSE'IMPORTINGe_result = wa_result

    EXCEPTIONSusage_error = 1

    system_error = 2internal_error = 3OTHERS = 4.

    IF sy-subrc 0.MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.ENDIF.

    ENDFORM. " GET_FNAME