on 09-24-2008 11:59 AM
hi friends
is any body tried displaying a payslip in BSP page in PDF format.
I have one requirement like that.
Any idea about this. If it's plz tel me....
Regards,
Shankar.
cleared
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shankar,
what do you exactly want to do - upload a pdf from client and show it in browser/save to database or generate a pdf and show it in browser ?
I mean do you have the data in an internal table and you want to show it as PDF?
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi jain,
Thanks for your immediate reply.
My requirement is i have to display employ payslip details in BSP page.
For this i am doing this.
First i am declaring some variables and setting print parameters.
and after this i am submiting the program and keep it's output in spool request.
This spool request i am converting into pdf.
Now this pdf file i want to display in BSP.
Now in Oninitialization Event i am writing this code.
DATA: itab TYPE tline,
witab TYPE TABLE OF tline,
output TYPE string ,
wf_spono TYPE tsp01-rqident ,
wf_params TYPE pri_params,
valid_flag(1) TYPE c ,
lc_rq2name TYPE tsp01-rq2name ,
tsp01_wa TYPE tsp01 .
DATA: cached_response TYPE REF TO cl_http_response.
DATA: l_pdf_len TYPE i,
lv_guid_32 TYPE guid_32.
--- set printer parameters (e.g. for layout) ---
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
copies = 1
expiration = 1
destination = 'locl'
immediately = ' '
release = ' '
new_list_id = 'X'
line_size = 200
line_count = 65
layout = 'X_65_200'
sap_cover_page = 'X'
receiver = 'SAP*'
department = ''
no_dialog = 'X'
user = sy-uname
IMPORTING
out_parameters = wf_params
valid = valid_flag.
IF valid_flag EQ space.
Errorhandling
EXIT.
ENDIF.
*--- create a spool list of the payslip form ---*
submit hincedt0 with PNPPERNR-LOW eq W_PERNR
with PNPXABKR eq PA
with FORMULAR eq 'YRAJ'
TO SAP-SPOOL
SPOOL PARAMETERS wf_params
WITHOUT SPOOL DYNPRO
AND RETURN.
*--- select created spool list number ---
CONCATENATE 'SAPMHTTP'
sy-uname+0(3)
INTO lc_rq2name SEPARATED BY '_'.
SELECT * FROM tsp01 INTO tsp01_wa WHERE rq2name = lc_rq2name AND
rqowner = sy-uname
ORDER BY rqcretime DESCENDING.
wf_spono = tsp01_wa-rqident.
EXIT.
ENDSELECT.
IF sy-subrc NE 0.
CLEAR wf_spono.
ENDIF.
*--- convert spool list to PDF format ---
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = wf_spono
no_dialog = 'X'
TABLES
pdf = witab
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 8
err_btcjob_submit_failed = 9
err_btcjob_close_failed = 10
OTHERS = 11.
IF sy-subrc NE 0.
Errorhandling
ENDIF.
After converting this how to display as pdf in BSP page.
Thanks & Regards,
Shankar.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.