Вы находитесь на странице: 1из 7

Object Rotation in Adobe Form Introduction: Sometimes we get the requirement in form printing to display text or field in rotated

manner. Rotation of object is not easily possible in Smart Forms/SAPscript. It can be achieved easily through Adobe form. In this case adobe forms get edge over Smart Forms/SAPscript. Objects can be rotated in 90 steps. Transaction Code: SFP First create the interface: ZROTATE_INTF

Put import parameter VBAP with table type VBAP_T

Create Form ZROTATE_FORM in SFP.

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 the performance.

Click on Layout Button Rename Master Page and change Orientation.

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.

Insert table in design page over the content area.

Two columns with header, but without footer.

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 and wrap in sub form.

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

in layout tab.

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 vbap INTO TABLE gt_vbap UP TO 5 ROWS WHERE matnr = p_matnr. PERFORM get_fname. *&---------------------------------------------------------------------* *& Form get_fname

*&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM get_fname . DATA: e_adstrace TYPE string. CALL FUNCTION 'FP_FUNCTION_MODULE_NAME' EXPORTING i_name = 'ZROTATE_FORM' IMPORTING e_funcname = g_funcname. wa_outputparams-device = 'PRINTER'. wa_outputparams-preview = 'X'. wa_outputparams-getpdf = space. CALL FUNCTION 'FP_JOB_OPEN' CHANGING ie_outputparams = wa_outputparams EXCEPTIONS cancel = 1 usage_error = 2 system_error = 3 internal_error = 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. wa_docparams-langu = 'X'. wa_docparams-country = 'US'. wa_docparams-fillable = 'X'. CALL FUNCTION g_funcname EXPORTING vbap = gt_vbap EXCEPTIONS usage_error = 1 system_error = 2 internal_error = 3 OTHERS = 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' IMPORTING e_adstrace = e_adstrace. CALL FUNCTION 'FP_JOB_CLOSE' IMPORTING e_result = wa_result EXCEPTIONS usage_error = 1 system_error = 2 internal_error = 3 OTHERS = 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

Вам также может понравиться