How to cange sap form into pdf form
hai friends,
we have run payroll got remuneration statement
now the client wants the remuneration form should be in pdf form
how to convert it into pdf form
any clue plz
kumari
Hi,
We are using Software called CutePDF write to print Rem Statement in PDF format.
Search on google you will get that.
Arti
Similar Messages
-
How to convert word doc into pdf - which product of adobe i need to use- what upgrades - am a newbie
How to convert word doc into pdf - which product of adobe i need to use- what upgrades - am a newbie - simple answers please - Thanks in advance.
@Pipeline2007 - which version of Microsoft Office have you got? Older versions of Acrobat aren't compatible with the latest versions of Office, see this link for info:
http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html -
How to assign SAP forms in FB50, F-28 and F-53
Greetings for the day,
Actually my client's business is like retail business so they are accepting daily N no.of payments from their customers. Now my problem is they need a print receipt for each transactions and that to be according to their own format. Not only for the payments but also for all the transactions whatever they are entering in the system. So you tell me how to set SAP script forms to these transaction code like in fb01, f-02, f-28, f-53 etc.
Note : I have already suggested them about T.code : f.62 but they are not ready to go in another T.code for print. They need print option with in the same T.code in which they are posting the transaction.
Regards,
VinodDear:
This can be achieved through SHD0.. You can disable posting button in these t code using SHD0. Please follow the procedure given as
Go to SHD0...In t code write FB50...Transaction Variant..ZFB50...Click create ... Now enter document date as soon as you enter document date just press enter ... A new box will appear .. There will a button at its bottom--Menu Function...Click it...A new screen will appear...In it go to menu Bar...document.. There you will see post click on it and press F2..now it will be deactivated..Exit and save..Give Package that ABAP use and save it again and again until it shows that the changes have been saved.. Now you will see this ZFB50 in Standard Variants tab of SHD0.. Activate it.
Do the same thing for F-02. So you simply have to create Z screen variant and assign them to t code.
It will do the job for you.
Refer to the link i posted earlier regarding disabling parking button in FB50
Re: FB50 - disable PARK icon
Regards -
How to convert raw data into pdf ?
Hi everyone,
I have a requirement where I have to print the document present in application server.
I used below code to do this
* Open the file in binary mode
OPEN DATASET gv_filepath FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
DO.
TRY.
* Since the file is opened in Binary mode, the entire contents of the
* file is read in one go!
READ DATASET gv_filepath INTO gv_filedata.
IF sy-subrc <> 0.
EXIT.
ENDIF.
CATCH cx_sy_conversion_codepage.
ENDTRY.
APPEND gv_filedata TO gt_file_table.
CLEAR gv_filedata.
ENDDO.
CLOSE DATASET gv_filepath.
DESCRIBE TABLE gt_file_table LINES lv_lines.
lv_pages = lv_lines.
lv_dest = 'LP01'.
lv_spoolname = 'LOCW'.
CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
EXPORTING
* NAME = lv_spoolname
DEST = lv_dest
ROWS = lv_lines
STARTROW = 1
PAGES = 99
RQTITLE = 'Print Spool'
RQCOPIES = 1
RQOWNER = sy-uname
IMMEDIATELY = ' '
IMPORTING
RQID = lv_spoolid
TABLES
TEXT_DATA = gt_file_table
EXCEPTIONS
NAME_MISSING = 1
NAME_TWICE = 2
NOT_FOUND = 3
ILLEGAL_LAYOUT = 4
INTERNAL_ERROR = 5
SIZE_MISMATCH = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
Passed the spool id generated to below FM but it is not converting into pdf
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = lv_spoolid
NO_DIALOG = ' '
DST_DEVICE = 'LOCW'
PDF_DESTINATION = 'X'
* NO_BACKGROUND =
* GET_SIZE_FROM_FORMAT =
* USE_CASCADING = ' '
* IMPORTING
* PDF_BYTECOUNT = lv_bytecount
* PDF_SPOOLID = lv_pdf1
* LIST_PAGECOUNT =
* BTC_JOBNAME =
* BTC_JOBCOUNT =
* BIN_FILE = lv_pdf
TABLES
PDF = lt_pdf
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 = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
When I go to SP01 and check the spool generated it is in raw document type.
How can I convert this raw document to pdf type ??
Please help me to resolve this.
Regards,
KrishnaOk, since I can't edit the post anymore, here the new version of code, without the use of SCMS_XSTRING_TO_BINARY for intermediate table. Reasons: effectively doubles the memory use and I don't want to check if the kernel is cutting off the hexdecimal nulls when the last spool line is written, or to relay of that behaviour.
Matthew Billingham, and other mods: it would be really nice if you could hide the old version please (this post here). The number of google results for that FM is scary and I really don't want to contribute to promoting its use...
REPORT zjbtst2.
PARAMETERS: p_file TYPE string
LOWER CASE
DEFAULT '/usr/sap/....'
OBLIGATORY.
PARAMETERS: p_dest TYPE rspopname
DEFAULT 'LP01'
OBLIGATORY .
PERFORM main USING p_file p_dest.
*& Form main
FORM main
USING
i_file TYPE string
i_dest TYPE rspopname.
DATA: lo_handle TYPE REF TO cl_rspo_spool_handle .
DATA: l_spoolid TYPE rspoid.
DATA: l_content TYPE xstring .
DATA: l_message_text TYPE string .
PERFORM get_file USING i_file CHANGING l_content .
PERFORM new_spool USING i_dest CHANGING lo_handle l_spoolid.
PERFORM write_spool USING lo_handle l_spoolid l_content .
l_message_text = |Spool { l_spoolid } created| .
MESSAGE l_message_text TYPE 'I' .
ENDFORM . "main
*& Form get_file
FORM get_file
USING i_file TYPE string
CHANGING c_content TYPE xstring.
DATA: l_message_text TYPE string .
CLEAR c_content .
OPEN DATASET i_file FOR INPUT IN BINARY MODE
MESSAGE l_message_text.
IF sy-subrc NE 0 .
MESSAGE l_message_text TYPE 'E' .
ELSE.
READ DATASET i_file INTO c_content .
CLOSE DATASET i_file.
ENDIF .
ENDFORM . "get_file
*& Form new_spool
FORM new_spool
USING
i_destination TYPE rspopname
CHANGING
co_handle TYPE REF TO cl_rspo_spool_handle
c_spoolid TYPE rspoid .
cl_rspo_spool_handle=>open(
EXPORTING
dest = i_destination
name = 'Test'
layout = 'G_RAW'
doctype = 'BIN'
IMPORTING
ref = co_handle
spoolid = c_spoolid
EXCEPTIONS
device_missing = 1
name_twice = 2
no_such_device = 3
operation_failed = 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.
ENDFORM . "new_spool
*& Form WRITE_SPOOL
FORM write_spool
USING
io_handle TYPE REF TO cl_rspo_spool_handle
i_spoolid TYPE rspoid
i_content TYPE xstring .
DATA: l_buffer(128) TYPE x ."Hmm, 128 does work, 4096 doesn't...
DATA: l_buffer_length TYPE i .
DATA: l_full_buffers_count TYPE i .
DATA: l_part_buffer_length TYPE i .
DATA: l_offset TYPE i .
DATA: l_length TYPE i .
l_buffer_length = xstrlen( l_buffer ) .
l_full_buffers_count = xstrlen( i_content ) DIV l_buffer_length .
l_part_buffer_length = xstrlen( i_content ) MOD l_buffer_length .
DO l_full_buffers_count + 1 TIMES .
IF sy-index LE l_full_buffers_count .
l_length = l_buffer_length .
ELSEIF l_part_buffer_length GT 0 .
l_length = l_part_buffer_length .
ELSE.
EXIT .
ENDIF .
l_buffer = i_content+l_offset(l_length) .
ADD l_length TO l_offset .
io_handle->write_binary(
EXPORTING
data = l_buffer
length = l_length
EXCEPTIONS
not_open = 1
operation_failed = 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.
ENDDO .
io_handle->close(
EXPORTING
final = 'X'
EXCEPTIONS
operation_failed = 1
already_closed = 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.
ENDFORM . "write_spool -
How to convert sap script to pdf and send it as email attachment
hi,
my requirement is to convert a standard sales order form to pdf and send it as email attachment. get me some sample code for the same
thanks in advanceHi
See this sample code and after that use the fun module to send the mail
SO_NEW_DOCUMENT_ATT_SEND_API1
REPORT zzz_jaytest .
Types Declaration
TYPES : BEGIN OF ty_pa0001,
pernr TYPE pa0001-pernr,
bukrs TYPE pa0001-bukrs,
werks TYPE pa0001-werks,
END OF ty_pa0001.
Internal Table Declaration
DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
i_content_txt TYPE soli_tab, "Content
i_content_bin TYPE solix_tab, "Content
i_objhead TYPE soli_tab,
Work Area Declaration
w_pa0001 TYPE ty_pa0001, "For pa0001 Details
w_res TYPE itcpp, "SAPscript output
"parameters
w_otf TYPE itcoo, "For OTF
w_pdf TYPE solisti1, "For PDF
w_transfer_bin TYPE sx_boolean, "Content
w_options TYPE itcpo, "SAPscript output
"interface
Variable Declaration
v_len_in TYPE so_obj_len,
v_size TYPE i.
Constants Declaration
CONSTANTS : c_x TYPE c VALUE 'X', "X
c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
c_otf TYPE sx_format VALUE 'OTF', "OTF
c_pdf TYPE sx_format VALUE 'PDF', "PDF
c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
c_bin TYPE char10 VALUE 'BIN', "BIN
c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
"File Name
c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
START-OF-SELECTION.
Selecting the records from pa0001
SELECT pernr bukrs werks FROM pa0001
INTO TABLE i_pa0001 UP TO 10 ROWS.
Setting the options
w_options-tdcopies = 1 ."Number of copies
w_options-tdnoprev = c_x."No print preview
w_options-tdgetotf = c_x."Return of OTF table
w_options-tddest = c_locl."Spool: Output device
Opening the form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = c_form
device = c_printer
language = sy-langu
OPTIONS = w_options
IMPORTING
RESULT = w_res.
LOOP AT i_pa0001 INTO w_pa0001.
Writting into the form
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
window = 'MAIN'.
ENDLOOP.
Closing the form
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = w_res
TABLES
otfdata = i_otf
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Converting OTF data to single line
LOOP AT i_otf INTO w_otf.
CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
INTO w_pdf.
APPEND w_pdf TO i_content_txt.
ENDLOOP.
Converting to PDF Format
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = c_otf
format_dst = c_pdf
devtype = c_printer
CHANGING
transfer_bin = w_transfer_bin
content_txt = i_content_txt
content_bin = i_content_bin
objhead = i_objhead
len = v_len_in
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
v_size = v_len_in.
Downloading the PDF File
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_size
filename = c_name
filetype = c_bin
TABLES
data_tab = i_content_bin.
If you r using this function module check it once....
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
Fehlerhandling
if sy-subrc <> 0.
endif.
or u can use the standard program RSTXPDFT4 to download the script into PDF format onto a particular location
follow this link for sample program.
http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html
check...
How to send smart form via email
/people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp
Regards
Anji -
Hi Experts,
I have written a classical report with write statements and when i am downloading in excel the format is mismatching and now i want to convert into PDF format.
How to convert into PDF format from Classical report ?
YusufHi yusuf,
please find the below report,,
please make two include programs before executing it,
there codes are pasted below,
INCLUDE zimpr_data_declaration.
INCLUDE zimpr_performs_wrap.
REPORT zimpr_word_wrap NO STANDARD PAGE HEADING LINE-SIZE 115..
INCLUDE for DATA DECLARATION *
INCLUDE zimpr_data_declaration.
INCLUDE for all performs. *
INCLUDE zimpr_performs_wrap.
TOP-OF-PAGE--
TOP-OF-PAGE.
PERFORM f_top_page. "TOP OF THE REPORT PAGE,I.E. HEADER.
START-OF-SELECTION.
SET PF-STATUS 'SEL_SCREEN'. "PF-STATUS OF THE SELECTION SCREEN.
PERFORM f_data_retrieval. "PERFORM FOR ALL SELECT STATEMENTS.
PERFORM f_report_display. "REPORT DISPLAY,WRITE STATEMENTS.
--Define the actions to be performed for pf-status-----
AT USER-COMMAND.
wf_ok_code = sy-ucomm.
wf_save_ok = wf_ok_code.
CLEAR wf_ok_code.
CASE wf_save_ok.
WHEN 'PDF'. "WHEN PDF ICON IS CLICKED,REPORT WILL CONVERT INTO PDF.
loc_repid = sy-repid. "PROGRAM NAME
--THIS FM SETS THE PARAMETERS FOR LAYOUT OF PDF OUTPUT--
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
layout = loc_paart "LANDSCAPE LAYOUT
line_size = loc_linsz "CHARACTER WIDTH OF REPORT
no_dialog = 'X'
user = sy-uname "USERNAME
IMPORTING
out_parameters = loc_print_parms "OUTPUT PARAMETERS WILL BE COLLECTED HERE.
valid = loc_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
--FOR GENERATING THE SPOOL NUMBER--
NEW-PAGE PRINT ON NO DIALOG PARAMETERS loc_print_parms. " This allocates the spool no
"to the screen without the dialog screen.
PERFORM f_top_page.
PERFORM f_report_display.
NEW-PAGE PRINT OFF. "This marks the end of the screen for which the spool no was generated.
wf_id = sy-spono. " This assign the spool no of the screen to the variable.
--PERFORM FOR GETTING THE PDF OUTPUT--
PERFORM f_pdf_display.
--PERFORM FOR DOWLOADING FILE TO A LOCAL DISK--
PERFORM f_download_local.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
include data declaration----
*& Include ZIMPR_DATA_DECLARATION
TYPE-POOLS : shlp.
DATA : wf_ordert TYPE aufk-auart. "ORDER TYPE
DATA : wf_order TYPE aufk-aufnr. "ORDER NUMBER
DATA : wf_bdate TYPE afko-gstrp. "BASIC START DATE
DATA : wf_status(4) TYPE c ."rihea-i_astatin. "STATUS
DATA : wf_objnr TYPE jest-objnr VALUE 'OR%'. "Object number
DATA : wf_aufnr TYPE aufk-aufnr.
DATA : wf_name TYPE thead-tdname. "NAME TO PASS IN FM READ_TEXT
DATA : wf_date1(12) TYPE c. "DATE
DATA : wf_i1(3) TYPE n,wc_i1(3) TYPE n VALUE '1'. "COUNTERS FOR REPORT DISPLAY
DATA : wf_i2(3) TYPE n,wc_i2(3) TYPE n VALUE '1'.
DATA : wf_kopf TYPE tdid VALUE 'KOPF',wf_aufk TYPE tdobject VALUE 'AUFK'.
DATA : wf_save_ok TYPE sy-ucomm ,wf_ok_code TYPE sy-ucomm.
DATA: wf_id TYPE tsp01-rqident , " For storing Spool request number
wf_bytes TYPE i . " For storing the bytes of data to be converted to PDF.
DATA : wf_langu(2) TYPE c VALUE 'EN'.
DATA: wf_pripar TYPE pri_params, " Structure for Passing Print Parameters
wf_rcpar TYPE arc_params. " ImageLink structure
DATA : wf_statu TYPE dfies-fieldname VALUE 'STATUS',
wf_field TYPE help_info-dynprofld VALUE 'S_STATUS'.
&--SELECTION SCREEN--
SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: s_ordert FOR wf_ordert . "ORDER TYPE
SELECT-OPTIONS: s_order FOR wf_order OBLIGATORY. "ORDER NUMBER
SELECT-OPTIONS: s_bdate FOR wf_bdate. "BASIC START DATE
SELECT-OPTIONS: s_status FOR wf_status matchcode object zei_sys . "SYSTEM STATUS
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN END OF BLOCK b_1.
*--INTERNAL TABLES--
TYPES : BEGIN OF ty_aufk,
aufnr TYPE aufk-aufnr, "OREDR NUMBER
auart TYPE aufk-auart, "ORDER TYPE
objnr TYPE aufk-objnr, "OBJECT NUMBER
ktext type aufk-ktext, "SHORT TEXT
gstrp TYPE afko-gstrp, "BASIC START DATE
END OF ty_aufk.
TYPES : BEGIN OF ty_tj02t,
objnr TYPE aufk-objnr, "OBJECT NUMBER
txt04 TYPE tj02t-txt04, "STATUS
istat TYPE tj02t-istat, "Object status
spras TYPE tj02t-spras, "LANGUAGE KEY
END OF ty_tj02t.
TYPES : BEGIN OF ty_temp,
objnr TYPE aufk-objnr,
status(300) TYPE c,
END OF ty_temp.
TYPES : BEGIN OF ty_wrap,
line(54) TYPE c, "LONG TEXT
END OF ty_wrap.
TYPES : BEGIN OF ty_wrap2,
line(25) TYPE c, "STATUS
END OF ty_wrap2.
TYPES : BEGIN OF ty_f4,
txt04 TYPE tj02t-txt04,
txt30 TYPE tj02t-txt30,
END OF ty_f4.
types : begin of ty_sta,
istat type tj02t-istat,
objnr type jest-objnr,
end of ty_sta.
data : int_sta type table of ty_sta with header line.
DATA : int_f4 TYPE TABLE OF ty_f4 WITH HEADER LINE.
DATA: int_pdf TYPE TABLE OF tline WITH HEADER LINE. "TABLE FOR PDF CONVERSION
DATA: int_wrap TYPE TABLE OF ty_wrap WITH HEADER LINE. "TABLE FOR LONGTEXT
DATA: int_wrap2 TYPE TABLE OF ty_wrap2 WITH HEADER LINE. "TABLE FOR STATUS
DATA: int_temp TYPE TABLE OF ty_temp WITH HEADER LINE. "Table for concatenation of system status.
DATA: int_aufk TYPE TABLE OF ty_aufk WITH HEADER LINE.
DATA: int_tj02t TYPE TABLE OF ty_tj02t WITH HEADER LINE.
DATA: int_tline TYPE STANDARD TABLE OF tline WITH HEADER LINE. "TABLE FOR READ_TEXT.
DATA : int_fld TYPE TABLE OF dfies ,wa_fld LIKE LINE OF int_fld. " Field Type for FM for F4 help
DATA :int_return TYPE TABLE OF ddshretval WITH HEADER LINE .
DATA:
loc_print_parms LIKE pri_params, "PRINT PARAMETERS
loc_valid(1) TYPE c,
loc_file type SDOK_CHTRD,
loc_bytecount TYPE i, "NUMBER OF BYTES TRANSFERRED
loc_length TYPE i, "LINE-LENGTH
loc_rqident LIKE tsp01-rqident, "SPOOL NUMBER
loc_rq2name(12) TYPE c.
DATA: loc_filename LIKE rlgrap-filename. "FILENAME
DATA:loc_repid LIKE sy-repid, " Report to execute
loc_linsz LIKE sy-linsz VALUE 115, " Line size
loc_paart LIKE sy-paart VALUE 'X_65_132'. " Paper Format
Include ZIMPR_PERFORMS_WRAP----
*& Include ZIMPR_PERFORMS_WRAP
*& Form f_top_page
top-of the page
--> p1 text
<-- p2 text
FORM f_top_page .
*--HEADER--
FORMAT COLOR 1 .
WRITE : text-010.
FORMAT COLOR 1 OFF.
WRITE : / text-011,sy-datum NO-GAP.
WRITE : / text-012,sy-uzeit NO-GAP,90 text-013,101 sy-uname.
ULINE .
FORMAT COLOR 1 INTENSIFIED OFF .
WRITE : 1 sy-vline, "HEADINGS
2 text-014 NO-GAP,
7 sy-vline,
8 text-015 NO-GAP,
20 sy-vline,
21 text-016 NO-GAP,
76 sy-vline,
77 text-017 NO-GAP,
88 sy-vline,
89 text-018 NO-GAP,
115 sy-vline.
WRITE : /1 sy-vline,
2 text-019 NO-GAP,7 sy-vline,
20 sy-vline,76 sy-vline,77 text-020 NO-GAP,88 sy-vline,115 sy-vline.
ULINE.
FORMAT COLOR 1 OFF.
ENDFORM. " f_top_page
*& Form f_data_retrieval
select statements
--> p1 text
<-- p2 text
FORM f_data_retrieval .
SELECTING ORDER TYPE,ORDER NO.,OBJECT NO. AND BASIC START DATE
SELECT p~aufnr
p~auart
p~objnr
p~ktext
r~gstrp
FROM ( aufk AS p INNER JOIN afko AS r ON raufnr = paufnr )
INTO TABLE int_aufk
WHERE p~aufnr IN s_order AND
p~auart IN s_ordert AND
r~gstrp IN s_bdate AND
p~objnr LIKE wf_objnr.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
SORT int_aufk BY aufnr.
DELETE ADJACENT DUPLICATES FROM int_aufk.
SELECT q~istat
p~objnr
FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
INTO TABLE int_sta
FOR ALL ENTRIES IN int_aufk
WHERE p~objnr = int_aufk-objnr
AND q~txt04 IN s_status and
q~spras = wf_langu and
p~inact = ''.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
SORT int_sta BY objnr.
DELETE ADJACENT DUPLICATES FROM int_sta.
*--SELECTING OBJECT NO.,STATUS AND LANGUAGE--
IF int_sta[] IS NOT INITIAL.
SELECT p~objnr
q~txt04
q~istat
q~spras
FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
INTO TABLE int_tj02t
FOR ALL ENTRIES IN int_sta
WHERE p~inact = '' AND
p~objnr = int_sta-objnr AND
q~spras = wf_langu AND
q~txt04 IN s_status AND
p~objnr LIKE wf_objnr.
IF sy-subrc <> 0.
MESSAGE s101(zipm). "no values found for selection criteria.
STOP.
ENDIF.
ENDIF.
ENDFORM. " f_data_retrieval
*& Form f_report_display
report display
--> p1 text
<-- p2 text
FORM f_report_display .
LOOP AT int_tj02t. "concatenating the status into a internal table
AT NEW objnr.
CLEAR int_temp-status.
ENDAT.
CONCATENATE int_temp-status int_tj02t-txt04 INTO int_temp-status SEPARATED BY space.
AT END OF objnr.
int_temp-objnr = int_tj02t-objnr. "key field.
APPEND int_temp.
CLEAR int_temp.
ENDAT.
CLEAR int_tj02t.
ENDLOOP.
LOOP AT int_aufk.
CONCATENATE sy-mandt int_aufk-aufnr INTO wf_name . "concatenating client number and order number
*--THIS FM CAPTURES THE LONG TEXT AND STORES IT IN INTERNAL TABLE--
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = wf_kopf "TEXT ID
language = sy-langu "LANGUAGE
name = wf_name "TEXT NAME
object = wf_aufk "TEXT OBJECT
TABLES
lines = int_tline "LINES OF LONG TEXT.
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
int_tline-tdline = int_aufk-ktext.
APPEND int_tline.
CLEAR :int_tline.
ENDIF.
LOOP AT int_tline.
*--THIS FM WRAPS THE LONG TEXT INTO 54 CHARACTERS EACH--
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = int_tline-tdline "LONG TEXT LINE
outputlen = 54 "OUTPUT LENGTH
TABLES
out_lines = int_wrap "INTERNAL TABLE
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
IF sy-subrc <> 0.
CLEAR :int_tline.
ENDIF.
ENDLOOP.
*-- THIS FM WRAPS THE STATUS INTO 25 CHARACTERS EACH--
READ TABLE int_temp WITH KEY objnr = int_aufk-objnr.
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
textline = int_temp-status
outputlen = 25
TABLES
out_lines = int_wrap2
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
IF NOT int_wrap2[] IS INITIAL.
ULINE AT (115).
ENDIF.
DESCRIBE TABLE int_wrap LINES wf_i2. "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP
DESCRIBE TABLE int_wrap2 LINES wf_i1. "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP2
WHILE ( wc_i1 LE wf_i1 OR wc_i2 LE wf_i2 ).
IF ( wc_i2 LE wf_i2 ).
READ TABLE int_wrap INDEX wc_i2 . "READING THE INTERNAL TABLE INT_WRAP WITH INDEX
wc_i2 = wc_i2 + 1.
ENDIF.
IF ( wc_i1 LE wf_i1 ).
READ TABLE int_wrap2 INDEX wc_i1 . "READING THE INTERNAL TABLE INT_WRAP2 WITH INDEX
wc_i1 = wc_i1 + 1.
ENDIF.
*--THIS FM CONVERTS THE DATE FROM SYSTEM FORMAT TO OUTPUT FORMAT--
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
input = int_aufk-gstrp
IMPORTING
output = wf_date1.
IF NOT int_wrap2[] IS INITIAL .
*--REPORT DISPLAY--
WRITE : /1 sy-vline, 2 int_aufk-auart COLOR = 4 INTENSIFIED OFF NO-GAP ,
7 sy-vline ,8 int_aufk-aufnr COLOR = 4 INTENSIFIED OFF NO-GAP,
20 sy-vline,21 int_wrap-line,
76 sy-vline ,77 wf_date1 ,
88 sy-vline ,89 int_wrap2-line,
115 sy-vline.
*--CLEARING THE VARIABLES--
wf_date1 = ''.
CLEAR: int_aufk,int_temp,int_wrap2-line,int_wrap-line.
ENDIF.
ENDWHILE.
wc_i1 = 1.
wc_i2 = 1.
CLEAR :int_wrap,int_wrap2.
REFRESH : int_wrap,int_wrap2,int_tline.
ENDLOOP.
ULINE AT (115).
ENDFORM. " f_report_display
*& Form F_PDF_DISPLAY
pdf conversion
--> p1 text
<-- p2 text
FORM f_pdf_display .
*--THIS FM CONVERTS THE SPOOL REQUEST INTO PDF REPORT--
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = wf_id "SPOOL NUMBER
no_dialog = space
pdf_destination = 'X'
IMPORTING
pdf_bytecount = loc_bytecount "NUMBER OF BYTES TRANSFERRED
TABLES
pdf = int_pdf "TABLE FOR PDF REPORT
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 = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
ENDFORM. " F_PDF_DISPLAY
*& Form f_download_local
download to local system
--> p1 text
<-- p2 text
FORM f_download_local .
---------------------THIS FM DOWNLOADS THE PDF REPORT INTO LOCAL MACHINE
data loc_ret TYPE iwerrormsg.
CALL FUNCTION 'IW_C_GET_SAPWORKDIR'
IMPORTING
SAPWORKDIR = loc_file
ERROR_MSG = loc_ret
loc_filename = loc_file.
if loc_ret is initial.
concatenate loc_filename '\work order header long text_ ' sy-timlo '.pdf' into loc_filename.
endif.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
bin_filesize = loc_bytecount "NO. OF BYTES
filename = loc_filename "DEFAULT FILE NAME
filetype = 'BIN'
IMPORTING
act_filename = loc_filename
TABLES
data_tab = int_pdf.
ENDFORM. " f_download_local
if you have any doubts,,
please revert
Regards,
Talwinder -
Do you know how to save Pages file into PDF?
Using Pages on iPad I'd like to save what I write into PDF file in order to share it with my friends. Unfortunately I don't see how to do that.
Even when I send this file via email as a PDF again it is not an attachment but it becomes body of the email itself
Do you heve any suggestion?
Appreciate any help on this
Best Regards and Ciao
RobertoAlso, if you're using VB.NET, this is pretty easy ... something like this would work:
Private Shared Function BitBlt( _
ByVal hdcDest As IntPtr, _
ByVal nXDest As Integer, _
ByVal nYDest As Integer, _
ByVal nWidth As Integer, _
ByVal nHeight As Integer, _
ByVal hdcSrc As IntPtr, _
ByVal nXSrc As Integer, _
ByVal nYSrc As Integer, _
ByVal dwRop As Integer _
) As Boolean
End Function
Private Shared SRCCOPY As Integer = &HCC0020
Private Sub SaveFormToFile(ByVal sourceForm As Form, ByVal filename As String)
Dim formGraphics As Graphics = sourceForm.CreateGraphics()
Dim
bufferRect = sourceForm.ClientRectangle
Dim buffer As Image = New Bitmap(bufferRect.Width, bufferRect.Height, formGraphics)
Dim bufferGraphics As Graphics = Graphics.FromImage(buffer)
Dim formDC As IntPtr = formGraphics.GetHdc()
Dim bufferDC As IntPtr = bufferGraphics.GetHdc()
BitBlt(bufferDC, 0, 0, bufferRect.Width, bufferRect.Height, formDC, 0, 0, SRCCOPY)
bufferGraphics.ReleaseHdc(bufferDC)
formGraphics.ReleaseHdc(formDC)
bufferGraphics.Dispose()
formGraphics.Dispose()
buffer.Save(filename, System.Drawing.Imaging.ImageFormat.Jpeg)
buffer.Dispose()
End Sub
If you copied and pasted this to your form, you could then save the form to a .jpg file anytime you want by passing the Me reference in for this first parameter and the filename that you want to save it to. For example, if you wanted to create a .jpg file in the root directory of your C drive called "Test.jpg":
SaveFormToFile(Me, "Test.jpg")
- Elton -
How to export dynamic images into pdf
Hi,
I need to export a image into PDF which we are getting it from DBase. This returns me the image as BLOB and this we are putting it in between the xml tags. I am passing the xml to xsl-fo. While i tried to export the xml data into pdf using xsl-fo, the content is getting exported into pdf but not the image. I am using FOP, and i have added fop.jar, batik.jar, avalon-xx.jar, jai_codec.jar and jai_core.jar to my class path. I am putting my sample xsl and xml here.
xml:
<RTFDrugReport>
<ImagePath>http://www.thomson-pharma.com/tp/images</ImagePath>
<NewsEdge>
<NewsItem>
<StoryId><![CDATA[200705223600.15_2774000daba43be0]]></StoryId>
<HeadlineText><![CDATA[NeuroLogica's CereTom Supplies On Site Post-Fight Brain CT During De La Hoya-Mayweather Weekend]]></HeadlineText>
<ItemTime><![CDATA[05/23/2007 03:22:24 AM EDT]]></ItemTime>
</NewsItem>
</NewsEdge>
</RTFDrugReport>
xsl:
<fo:static-content flow-name="xsl-region-before">
<fo:block font-family="Helvetica" font-size="14pt" text-align="left" white-space-collapse="false">
<xsl:variable name="imageName" select="concat(//ImagePath,'/logo_thomson_pharma.png')"/>
<fo:external-graphic src="'{$imageName}'"/>first
<fo:external-graphic src="url('{$imageName}')"/>second
<xsl:value-of select="'{$imageName}'"/>thrid
<fo:external-graphic src="'{$imageName}'" content-width="100mm" content-height="100mm"/>fourth
<fo:external-graphic src="'{$imageName}'" content-width="100mm" content-height="100mm"/>fifth
<fo:instream-foreign-object src='url("///file:/D:/Customization/collage.jpg")' height="3cm" width="3cm"/>
</fo:block>
</fo:static-content>
Any help would be appreciated.hi,
all the UI elements in the adobe form are generally connected to your web-dynpro Context.
whatever you type in the online adobe form is reflected in the respective context attributes of the dynpro Context of the view where "ur Interactive form UI element is".
that means you can yourself fill the contents of ur interactive form by working on the get/set methods of the context attributes.
Likewise you can clear the form by setting all context attributes to blank eg ""
<b>interactive form has two imp properties:-</b>
<b>*dataSource</b>
data source points to the node all whose context attributes will be made available in the interactive form
<b>*pdfsource</b>
points to the context attribute which will hold the pdf.
note that the type of this pdfSorce attribute will be binary.
if you still have doubts.
give me your gmail mail id. i 'll send a tutorial.
with regards,
-ag. -
How to convert a workbook into PDF and broadcast as Email attachment
Hello Gurus,
i have installed the ADS (Adobe Document services). I would like to broadcast workbooks as a pdf file to some user.
When i open the workbook and go to Broadcast --> Setup a broadcast setting for this workbook. The distribution type is
Broadcast E-mail; Broadcast E-mail (Bursting); Broadcast Portal; Broadcast Multichannel and Output Format only MS Workbook and Link to current Data. Here i miss the possibility as PDF.
Where can i set up that the workbook should be broadcast as PDF.
Any help appreciated.
Thanks and kind rgerads,
MuratThanks all for your answers,
i also read that with changing the format in Report designer then broadcasting via PDF. Is there no possibility for PDFs for MS Excel Workbooks? How does it work when opening the query in Report designer? What do i have to do there but it is no solution for us because in the workbooks we use GET BEX DATA formulas and just show parts of the analyisis grid. I need a proper solution how to use broadcaster converting workbooks into PDF an send them as email attachment
Thanks,
Murat -
How to convert custom XML into PDF?
Hi all,
With the IBR i found the way to convert the custom XML file into PDF but i need to know if it's possible apply an XSL-Trasformation before using Direct PdfExport.
Is there a way to achieve my goal in one shoot ?
If it's not possible how can I concatenate two conversion ?
I'm looking forward to hearing from you some solution!
Best regards!!!891563 wrote:
With the IBR i found the way to convert the custom XML file into PDF but i need to know if it's possible apply an XSL-Trasformation before using Direct PdfExport.
Is there a way to achieve my goal in one shoot ?
If it's not possible how can I concatenate two conversion ?You can use Apache FOP (http://xmlgraphics.apache.org/fop/) to do this in one shot. it would require a custom IBR converter component.
-ryan -
How can i convert image into pdf file
Hi Friends,
I want to convert image file(i.e. jpeg,bmp,gif) into pdf file using java apis OR is there any tool which can convert it & which we can integrate into our java application
Thanks in adva.Is there any solution to this case.....?
-
How to convert Labview document into PDF format
Hi! can any one tell me, can we convert the Labview document (Labview saved files)into PDF format. I wanted to convert it using a VI. If any one suggest me or send me the example vi i will be very thankful.
Regards
Ramesh.CHi,
We have a brand new PDF library for LabVIEW. Release date is in october. The library can create pdfs, with all kinds of text writing and picture stuff. It works stand alone, so there is no need for other programs. It should also be platform independend.
If your interested, drop me a mail. I can send you mail when it's released. Maybe we can give you a "beta test", if you send use your findings.
Regards,
Wiebe. (email is " my name " @ carya . nl )
"Ramme" <[email protected]> wrote in message news:[email protected]..
Hi! can any one tell me, can we convert the Labview document (Labview saved files)into PDF format. I wanted to convert it using a VI. If any one suggest me or send me the example vi i will be very thankful. RegardsRamesh.C -
How to insert dummy image into PDF
I am trying to insert signatures into our Custom Purchase Order that I am building in Adobe Acrobat 8 Pro. I can find plenty of documentation on how to do this via an RTF in Word Template Builder, but nothing on inserting the dummy image. Currently, we are using Sigfile field in report with a URL link to the jpeg of the signature, at runtime, only the link shows up on the PDF not the picture of the signature, any suggestions would be appreciated.
Thanks,
BarbaraBarbara,
I think what you are asking for is something similiar I have done for a check printing report where you have a voided image of a signature, then place the real signature at run time.
So insert the dummy image into your RTF. Have the path to the real image in the XML file, and then in the properties for the image, there is a Web tab. Put the following there:
url:{CP_SIGNIMAGEPATH}
Where CP_SIGNIMAGEPATH is the path to the image.
Let me know if this works or you.
Regards,
Brett -
How to embed audio clips into pdf document
Hello I have a two-hour lecture I've transcribed. There are about 20 paragraphs. I want to embed the audio of the lecture into the pdf document so that when the reader clicks on a paragraph or on a button/control near the paragraph the audio for that particular paragraph starts up. An ideal version of this would be in pdf format and would allow the reader to click anywhere in the pdf and have the audio start from that point. I've never embedded audio before. I also have InDesign, Lightroom and Photoshop and can use them to embed audio before exporting to pdf.
The exact process will depend on the version of Acrobat you have. In AA7, I just selected TOOLS>Advanced Editing>Sound Tool and added a sound file to the document. There were options for AA5 and AA6 compatibility as well as for embedding the sound file in the PDF.
When you select the sound file, it asks if you want to play the file or accept the file as trusted for future requests. The file then played just fine. When I added the link, I was given a box to use to surround the area of interest on the page. You can set the border color and such (like make it invisible, though that might confuse folks).
I am not sure what more you want. It is possible to add audio to open when you open the page also as well as set timing for the page. That would provide a way for the person to essentially have a lecture presented on your system without having to intervene. For the playing of the pages and timing, you may ahve to have the file open in full-screen, not sure. -
How to convert my .psd into .pdf in cs4
Help! I cannot convert or save my file as a .pdf in adobe photoshop cs4. It wont allow it on the format options in save as. I looked up online and a website said to convert it through the print setup page but it seems as if i cannot even get to the print menu. Please help!
Thanks!It appears your document was in 32-bit per channel mode, which is useful for HDR (High Dynamic Range) images, but not very useful for the image in your screenshot. You really should be working in 8- or 16- bit mode for that sort of artwork. HDR images have a number of restrictions (supported file formats, filters, etc.) that regular images do not have. For example, you cannot save directly to PDF from an HDR image because PDF does not support 32-bit per channel images. So the advice you got was correct; change the image to 8- or 16-bit and then you should be able to save as PDF.
Paul
Maybe you are looking for
-
Generate Insert Statement Script to Extract Data from Table in Oracle 7i
Hi all, I have an old Oracle legacy system that is running for over 15 years.Every now and then we need to extract data from this table@ ORacle 7i to be imported back to Oracle 10G. My thoughts are to create a script of Insert statements in oracle 7
-
How to migrate ADE content to a new computer
At some point, everybody needs to upgrade to a new computer. After reading a great many postings in this forum, it seems obvious to me that many of us would greatly benefit from some specific guidance on how to install Adobe Digital Editions and Sony
-
How to force user to goto another Required Page
Hello, In my application, I have split my forms into 14 pages, my input forms are split up into add New records only and updates only. On the Adding New records form, how do I force the user onto another required screen? The first page is required, o
-
Hi, Is there a way to see job codes (P0001-STELL) and pay scale group (P0008-TRFGR) together in one report? Thanks, William Wilstroth
-
Hi, I am a newbie to labview and currently struggling to in writing VI for controlling Agilent 33521A function generator. Basically, I would like to control the function generator and receive its output from the oscilloscope. I have attached the i