2008 Sep 22 8:33 AM
Hi Experts,
Pls post ur comments how to convert my PE51 Form into pdf format.
I've done my HR Remuneration Form via PE51 and it's executing fine through Tcode:PC00_M40_CEDT - Remuneration statement .
Now, the requirement is, My Client wants the same to execute as pdf format and take a print output as similar like PO/Invoice forms.
When I tried with FM:SSF_FUNCTION_MODULE_NAME is shwoing the ouput thru SF:ZHR_ESS_PAYSLIP_TO_PDF_T but the alignment and form size of PE51 form is standard and
This form is a std 132 column length size, so when i tried with FM "CONVERT_OTF", its not converting my form into pdf table format ( otf variable: tab_otf_final).
Pls advise how to resolve it.
Im asking ur help again clearly that I want to convert my PE51 HR Form to pdf convertion format.
>>>>CALL FUNCTION 'CONVERT_OTF'
>>>> EXPORTING
>>>> format = 'PDF'
>>>> max_linewidth = 132
>>>> * ARCHIVE_INDEX = ' '
>>>> * COPYNUMBER = 0
>>>> * ASCII_BIDI_VIS2LOG = ' '
>>>> IMPORTING
>>>> bin_filesize = bin_filesize
>>>> * BIN_FILE =
>>>> TABLES
>>>> otf = tab_otf_final
>>>> lines = pdf_tab
>>>> EXCEPTIONS
>>>> err_max_linewidth = 1
>>>> err_format = 2
>>>> err_conv_not_possible = 3
>>>> err_bad_otf = 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.
thanks & regards
sankar.
Edited by: sankar babu on Sep 22, 2008 10:01 AM
2008 Sep 22 9:22 AM
HI,
You can Use these FMs
CONVERT_ABAPSPOOLJOB_2_PDF
CONVERT_OTF_2_PDF
This Might Help.
Regards
Sumit Agarwal
Hi Experts,
Pls post ur comments how to convert my PE51 Form into pdf format.
I've done my HR Remuneration Form via PE51 and it's executing fine through Tcode:PC00_M40_CEDT - Remuneration statement .
Now, the requirement is, My Client wants the same to execute as pdf format and take a print output as similar like PO/Invoice forms.
When I tried with FM:SSF_FUNCTION_MODULE_NAME is shwoing the ouput thru SF:ZHR_ESS_PAYSLIP_TO_PDF_T but the alignment and form size of PE51 form is standard and
This form is a std 132 column length size, so when i tried with FM "CONVERT_OTF", its not converting my form into pdf table format ( otf variable: tab_otf_final).
Pls advise how to resolve it.
Im asking ur help again clearly that I want to convert my PE51 HR Form to pdf convertion format.
>>>>CALL FUNCTION 'CONVERT_OTF'
>>>> EXPORTING
>>>> format = 'PDF'
>>>> max_linewidth = 132
>>>> * ARCHIVE_INDEX = ' '
>>>> * COPYNUMBER = 0
>>>> * ASCII_BIDI_VIS2LOG = ' '
>>>> IMPORTING
>>>> bin_filesize = bin_filesize
>>>> * BIN_FILE =
>>>> TABLES
>>>> otf = tab_otf_final
>>>> lines = pdf_tab
>>>> EXCEPTIONS
>>>> err_max_linewidth = 1
>>>> err_format = 2
>>>> err_conv_not_possible = 3
>>>> err_bad_otf = 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.
thanks & regards
sankar.
Edited by: sankar babu on Sep 22, 2008 10:01 AM
2008 Sep 22 9:14 AM
Hi Sankar,
It happens because the main window is not sufficient for these details. So goto the form ZHR_ESS_PAYSLIP_TO_PDF and Click on Form painter button present on the Application toolbar. And now increase the main window size. Now take a print and see. This will definitely solve.
Regards,
Swapna.
2008 Sep 22 9:36 AM
Hi Swapna,
thanks for ur prompt reply...
But i've tried it already the way u said.Its not working since the HR form is std upto 132 column length size.
Post me ur advise.
regards
sankar.
2008 Sep 22 9:40 AM
Ok...Try giving different page formats... like portrait or landscape in the form Attributes..
Regards,
Swapna.
2008 Sep 22 9:54 AM
Hi friends...
Im trying to fix it with ur guidances.....
will do and let u know my status...
thanks for ur prompt reply.
sankar.
2008 Sep 22 9:22 AM
HI,
You can Use these FMs
CONVERT_ABAPSPOOLJOB_2_PDF
CONVERT_OTF_2_PDF
This Might Help.
Regards
Sumit Agarwal
2008 Sep 22 9:47 AM
Hi Sankar,
Refer this sample code.
DATA:
form_name TYPE rs38l_fnam,
wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop.
DATA:
t_otfdata TYPE ssfcrescl,
t_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA:
t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
w_filesize TYPE i,
w_bin_filesize TYPE i.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'z_form'
IMPORTING
fm_name = form_name
EXCEPTIONS
no_form = 1
no_function_module = 2.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_outopt-tdnoprev = 'X'.
CALL FUNCTION ' '
EXPORTING
control_parameters = wa_ctrlop
output_options = wa_outopt
user_settings = 'X'
IMPORTING
job_output_info = t_otfdata
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 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.
t_otf[] = t_otfdata-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
* ARCHIVE_INDEX = ' '
* COPYNUMBER = 0
* ASCII_BIDI_VIS2LOG = ' '
* PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = w_bin_filesize
* BIN_FILE = BIN_FILE
TABLES
otf = t_otf
lines = t_pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
.
.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = w_bin_filesize
filename = 'D:\test.PDF'
filetype = 'BIN'
IMPORTING
filelength = w_filesize
TABLES
data_tab = t_pdf_tab
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.
IF sy-subrc NE 0.
MESSAGE 'file is not downloaded' TYPE 'E'.
ELSE.
MESSAGE 'file downloaded' TYPE 'S'.
ENDIF.Regards,
Sravanthi
2009 Sep 25 10:49 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |