Form smart forms vs pdf
dear experts,
do you have any experience with the forms in GTS. we have to print LTVD (long term vendor declarations) and have to decide wether to go for smart forms or pdf (adobe, incl this java stacks and ads configuration)
appreciate any experience feedback.
many thanks for you time
peter
Hi,
No, there is no technical restriction on using particular layout. u can use whatever u wanna to use. For know more about smartforms go thru,
http://help.sap.com/saphelp_47x200/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm
Smartform have following advantages:
1. Creating and maintaining forms in less time than SAPScript.
2. Adapting forms without any programming knowledge due to entirely graphical user interface. ( ofcourse you need to write driver program for smartforms, but you can write most of your code in smartform itself.. see the above given link for more detail)
3. Integrating input elements into the HTML output, which enables you to use a form in Internet applications as well.
I hope this will help you.
Pratik
Similar Messages
-
Strange Problem with Forms (Smart Forms)
I have lately been experiencing a strange problem with standard forms in the system. We have WebAS640 / ECC5.0 System. Soon after the initial run of patches, most forms in the system are showing the character '#' in place of formatted texts.
I have searched the internet and most forums, but have not found a solution. Since this is the standard forms that i am talking about (unmodified and untouched) so i assumed this had something to do with our patch levels. However that is only an assumption.
In particular i am having problem with the billing invoice type RD00, form name: LB_BIL_INVOICE. I have traced the problem to this much. The form shows the expected text, where no character format is applied to it. And where ever there is some character format, it just shows a string of hashes ('#'). The style being used by this form is LO_STYLE.
I am also listing my patch levels in case that helps.
SAP_BASIS 640 0014
SAP_ABA 640 0014
ST-PI 003C_640 0001
PI_BASIS 2004_1_640 0006
SAP_BW 350 0012
SAP_HR 500 0005
SAP_APPL 500 0006
PI 2004_1_500 0004
EA-IPPE 300 0004
EA-RETAIL 500 0005
EA-PS 500 0005
EA-HR 500 0005
EA-GLTRADE 500 0005
EA-FINSERV 500 0005
EA-DFPS 500 0005
EA-APPL 500 0005
Hope somebody can help in regardHi Ashan!
Interesting problem. You are seeing replacement characters, because assigned font(size) is not installed (somewhere, SAP or printer).
But since this is completely standard, open an OSS-request - maybe it's not as fast as SDN, but I'm sure you will get a qualified answer (and solution).
Regards,
Christian -
PDF Form giving different data compare to smart form
Hi Friends,
There are few scenerion in my system where my application produce a PDF form (Smart Form Convert to PDF through OTF)
In some case when I execute/print the form it shows me all PO form represnt me a differnt PO form althought their smartform is showing up correct PO.
Please help me out what can be a issue.
-RickHi ,
Like I have print of 5-6 PO then I am getting a refrence of some other PO in all print of these 5-6 PO.
for example...I have a print of series 1000000001 to 1000000005 then I am getting the details of other PO 1000000011 into all 5 print of PO starting from 1 to 5.
Note- I have a custom program which convert smartforms to OTF and send a PDF to mail id.
-Ricky -
SAP Interactive Forms and SAP Smart Forms for Human Capital Management
Hi gurus,
pls help me understand what are SAP Interactive Forms by Adobe and SAP Smart Forms for Human Capital Management (HCM)?
regds
jackread here
http://wiki.sdn.sap.com/wiki/display/ABAP/SAPInteractiveFormsbyAdobe#SAPInteractiveFormsbyAdobe-WhatarethedifferencesbetweenSmartFormsandAdobeForms%3F
What are the differences between Smart Forms and Adobe Forms?
For both of them, SAP dynamically creates a function module that must be called from an ABAP program to generate the form
In Smart Forms, it is possible to add ABAP code during generation of the form, that is not possible with Adobe Forms
It is possible to add javascript or FormCalc code in Adobe Forms, which is executed during the generation of the form
Other differences are indicated in Note 1009567 Functional differences SAP Interactive Forms/Smart Forms
Smart forms Vs PDF print forms - pros and cons, by Francois Gendebien, 2007/04/30
Use smartforms compatible interfaces with PDF forms, by Francois Gendebien, 2007/03/16 -
Hi,
Can any one help me with smart forms,if will be appreciating you if you people give me a step by step process,and how to pass the values in the form(smart form)
Regards,
Amit Tejahi amit,
check the below links for the smartform docu
most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
Check these links.In this,I am explaining everything step-by-step.Kindly reward points by clikcing the star on the left of reply,if it is useful.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
Check these links also.
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://sap.niraj.tripod.com/id67.html
http://myweb.dal.ca/hchinni/sap/smartforms_home.htm
Regards,
Naveen -
Transfer Order Printing using smart forms
Hi All
Our requirement is to print Transfer Order ( WM ) for Goods Receipt & Delivery using Smart forms.
Can we change the existing standard format (SAP script ) and use our own form(smart form ) to include some other data & print.
If possible how to replace the SAP script to Smart form.
Request someone could guide in detail.
Thanks in advance.
SamsonHi
When you create Smartform try to replace it in customizing OMLV. Not sure if it will work as it refers to Sap Scirpt in help description.
It is also possible to write Z program for TO printing and hardcode SmartForm there.
Regards
Mariusz -
Personalised mail form Vs Smart Form
Hi..
Is there any difference between personalised mail forms and smart form...
which is advanced one..? In CRM which one do we use..what are the advantages of using it..?
regards,
sanjanaHI
Sanjana Pernolised mail form is marketing concept used to trigger emails to target groups In campaign execution where you can customize the mail according to some attributes like Birthday wise etc.. when a marketing company wants to sned a automised mail to shoot on birth day's of all the customers
you can achive this by personalised mails , you can attachmthe contents and send mails to customers, personalised mail depends up on
1.URL link2.Subject3. Attchments4.delivery date of the mail.
IMG>CRM>Marketing>personalised mail
where as smart forms are
SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).
Smart Forms
Form Printing in the Internet Age
Smart Forms was introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms within SAP solutions, such as mySAP CRM, mySAP SCM, mySAP SRM, and mySAP Healthcare, and is already used by numerous customers. Smart Forms provides an easy-to-use graphical user interface which enables you to carry out the crucial tasks of creating and adjusting forms without any programming skills.
Key Benefits of Smart Forms
Smart Forms allows you to reduce considerably the implementation costs of SAP solutions since forms can be adjusted in minimum time.
The process of designing the form and creating the form logic is completely supported by the Form Builder with integrated graphical user interfaces for page design, table design and text. Furthermore, the Form Builder provides a tree structure to navigate through your form description and to determine the main processing order. Of course, drag-and-drop as well as copy-and-paste functions are also included.
Reward Points
Venkat -
Email PDF smart form Support Desk
Hi SDN,
I'm working on support desk - solution manager, and i need to send the solution of the support message by email to the final user.
There is an standard action (SLF1 -SMSD_SERVICE_ORDER_DNO_OUTPUT) that sends the solution in pdf format by email, but we couldn't set the receivers online.
So, I'm using an "z" action that executes an smart form, and i would like to send the smart form in pdf format by the internet.
I'd like to use fm SO_DYNP_OBJECT_SEND, because the user must fill the receivers on-line
So far i have de OTF, and i know that i can make a conversion to pdf format, but i've the following problem
- the pdf in attach is empty, it may be because of the format, or may be i'm not using correctly this function.
Thanks in advance,
Maria João Rocha
call function 'CONVERT_OTF'
exporting
format = 'PDF'
importing
bin_filesize = w_pdf_size
tables
otf = es_job_output_info-otfdata[]
lines = t_pdf[]
exceptions
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
others = 5.
* header
wa_head-objnam = 'EMAIL'.
wa_head-objdes = ls_output_options-tdtitle.
wa_head-objnam = ls_output_options-tdtitle.
wa_head-objla = sy-langu.
wa_head-objsns = 'O'.
wa_head-file_ext = 'TXT'.
append wa_head to t_head.
wa_packing_list-transf_bin = 'X'.
wa_packing_list-head_start = 1.
wa_packing_list-head_num = 0.
wa_packing_list-body_start = 1.
wa_packing_list-objtp = 'RAW'.
* wa_packing_list-objtp = 'EXT'.
wa_packing_list-objdes = ls_output_options-tdtitle.
wa_packing_list-objla = sy-langu.
wa_packing_list-objlen = w_pdf_size.
wa_packing_list-file_ext = 'PDF'.
append wa_packing_list to t_packing_list.
*---------- enviar o mail
call function 'SO_DYNP_OBJECT_SEND'
exporting
* object_hd_change = ls_output_options-tdtitle
object_type = 'RAW'
* originator_type = 'B'
* originator = sy-uname
outbox_flag = 'S'
tables
* objcont = t_text
* receivers = t_receivers
packing_list = t_packing_list
att_cont = t_cont
att_head = t_head
exceptions
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
folder_not_exist = 4
folder_no_authorization = 5
forwarder_not_exist = 6
note_not_exist = 7
object_not_exist = 8
object_not_sent = 9
object_no_authorization = 10
object_type_not_exist = 11
operation_no_authorization = 12
owner_not_exist = 13
parameter_error = 14
substitute_not_active = 15
substitute_not_defined = 16
system_failure = 17
too_much_receivers = 18
user_not_exist = 19
x_error = 20
others = 21.
endif.Thanks for your reply.
I'm working on it, and Ive seen the SCOT documentation, so I've change my strategy.
Right now I'm using some of the methods of the BOR.
I think I've to code because I want a popup to introduce the list of the receivers and the mail body, and of course I want to attach a smart form on pdf format.
But I cant send the mail because of the error: Erro interno: SO_OBJECT_MIME_GET Exceção: 2
Can you help me on this? What Im doing wrong? What document class I need to use on the AttachmentType?
Thanks in advance.
Best regards,
Maria João Rocha
FUNCTION Z_MAIL_DIALOGO.
*"*"Interface local:
*" IMPORTING
*" REFERENCE(TITULO) TYPE SOOD1-OBJDES OPTIONAL
*" REFERENCE(FILE_SIZE) TYPE SOOD1-OBJLEN OPTIONAL
*" TABLES
*" OTF TYPE TSFOTF OPTIONAL
*" PDF STRUCTURE TLINE OPTIONAL
*" CONTEXT TYPE SOLI_TAB OPTIONAL
* Makros für Zugriff aufs BOR
include <cntn01>.
*parameters: dialog like sonv-flag.
data: dialog like sonv-flag.
* Datendeklaration
data: message type swc_object.
data: recipient type swc_object.
data: recip_tab type swc_object occurs 1 with header line.
data: objkey like swotobjid-objkey.
data: content like soli-line occurs 0 with header line.
data: title(80).
data: persnumber like adcp-persnumber.
data: sent_to_all like sonv-flag,
object_list like sosndinf occurs 1 with header line.
data: t_otf type standard table of ITCOO.
data: itab like soli occurs 0.
* Deklaration eines Containers
swc_container container.
* Message-Objekt anlegen
* * Neues Message-Objekt generieren
swc_create_object message 'Message' space.
swc_clear_container container.
if dialog = space.
* * Create w/o dialog
concatenate 'Mensagem Support Desk' sy-datum sy-uzeit into title
separated by '/'.
swc_set_element container 'DOCUMENTTITLE' title.
swc_set_element container 'DOCUMENTNAME' 'Support Desk'.
* swc_set_element container 'DOCUMENTTYPE' 'INT'.
* swc_set_element container 'DOCUMENTTYPE' 'SCR'.
swc_set_element container 'DOCUMENTTYPE' 'OTF'.
swc_set_element container 'NO_DIALOG' 'X'.
else.
* * Create with dialog
swc_set_element container 'NO_DIALOG' ' '.
endif.
swc_call_method message 'Create' container.
perform error_handling(rssobcitest11).
* Create attachment (RAW document from internal table)
SWC_CLEAR_CONTAINER CONTAINER.
*att_bor_obj-objtype = 'MESSAGE'.
*swc_set_element container 'ATTACHMENT' pdf.
*swc_set_element container 'ATTACHMENT' otf.
swc_set_element container 'ATTACHMENT' context.
swc_set_element container 'ATTACHMENTTITLE' 'Anexo'.
swc_set_element container 'AttachmentType' 'OTF'.
*swc_set_element container 'DocumentSize' 0.
swc_set_element container 'DocumentSize' file_size.
*swc_set_table container 'DocumentContent' itab.
SWC_CALL_METHOD MESSAGE 'Attach' CONTAINER.
PERFORM ERROR_HANDLING(RSSOBCITEST11).
*SWC_CLEAR_CONTAINER CONTAINER.
*SWC_SET_ELEMENT CONTAINER 'EditorSettings' 'D'.
*SWC_SET_ELEMENT CONTAINER 'STARTING_AT_X' '5'.
*SWC_SET_ELEMENT CONTAINER 'STARTING_AT_Y' '5'.
*SWC_SET_ELEMENT CONTAINER 'EnableApplObjAttachments' 'X'.
*SWC_CALL_METHOD MESSAGE 'EditRecipientList' CONTAINER.
*PERFORM ERROR_HANDLING(RSSOBCITEST11).
* Einen Empfänger (interner Benutzer) automatisch hinzufügen
* Recipient-Objekt anlegen
swc_clear_container container.
swc_create_object recipient 'Recipient' space.
swc_set_element container 'AddressString' sy-uname.
swc_set_element container 'TypeId' 'B'.
swc_call_method recipient 'CreateAddress' container.
perform error_handling(rssobcitest11).
* Kopie des Recipient-Objekts anfügen
swc_clear_container container.
swc_set_element container 'NewRecipient' recipient.
swc_call_method message 'AddCopyOfRecipient' container.
perform error_handling(rssobcitest11).
* Outbox-Flag setzen
swc_clear_container container.
swc_set_element container 'OutboxFlag' 'X'.
swc_call_method message 'SetOutboxFlag' container.
perform error_handling(rssobcitest11).
* Empfängerliste editieren
swc_clear_container container.
swc_call_method message 'EditRecipientList' container.
perform error_handling(rssobcitest11).
swc_get_table container 'RecipientsInfo' object_list.
if sy-subrc = 8.
* Kopiertes Message-Objekt versenden
swc_clear_container container.
swc_call_method message 'Submit' container.
perform error_handling(rssobcitest11).
swc_get_table container 'RecipientsInfo' object_list.
endif.
swc_get_element container 'SentToAll' sent_to_all.
* Kopiertes Message-Objekt sichern
swc_clear_container container.
swc_call_method message 'Save' container.
perform error_handling(rssobcitest11).
* Protokollausgabe:
* Key des Message-Objekts ermitteln
*SWC_GET_OBJECT_KEY MESSAGE OBJKEY.
*WRITE: / 'Key des Messageobjekts', OBJKEY.
* Protokollausgabe:
perform write_recipient_info(rssobcitest11) tables object_list
using sent_to_all.
* Freigeben der Referenzen
* MESSAGE-Objekt
swc_free_object message.
* RECIPIENT-Objekt
swc_free_object recipient.
commit work.
ENDFUNCTION. -
To convert Smart Form output to PDF format and send it via email.
Hi Friends,
Could any one please tell me, how to convert the Smart Forms output to PDF format and send it via email to customer. If any one have the code, kindly mail me to [email protected]
Thanks & Regards,
JohnRefer the links -
how to convert smartform into pdf and send through mail
Smartform as PDF attachment to a mail.
smartform pdf and mail
smartform to pdf to mail
Regrads,
Amit
Reward all helpful replies. -
Error in opening the PDF file created from the smart form output.
Hi All,
i have a simple smart form which takes 3 values like customer no, name and no of times customer called and gives an out like
Customer 0001000000 with name Ravi called 5 times today.
I have to send this output to mail as an attachment.
for this i am coding as below.
******Call the SSF Function module
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = Form name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = lv_fmname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
lv_partner_number = '0001000000'.
lv_name_org1 = 'Ravi'.
lv_z_no_calls_day = '5'.
lw_ctrlop-getotf = 'X'.
lw_ctrlop-no_dialog = 'X'.
lw_compop-tdnoprev = 'X'.
lw_compop-tddest = 'LP01'.
*******Call the Form Function module and get the OTF of form output
CALL FUNCTION lv_fmname
EXPORTING
name_org1 = lv_name_org1
partner_number = lv_partner_number
z_no_calls_day = lv_z_no_calls_day
control_parameters = lw_ctrlop
output_options = lw_compop
user_settings = ' '
IMPORTING
job_output_info = w_return
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
i_otf] = w_return-otfdata[.
*********Now here if i look in to the OTF data i got in debug it has the data i aniticipated along with some other data.
the output is in the format
TDPRINTCOM(2) TDPRINTPAR(70)
ST XXXX.. customer 0001000000 with
name.....
i have my data in the above format spread in three lines of the output otf table where XXXX... is some number.
***********To convert to PDF Format
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = lv_len_in
BIN_FILE =
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5
*********For testing purpose i created a file on the desktop with the the data in i_tline. it created PDF file but when i tried to open it it's giving an error.
i_objtxt = 'test with pdf-Attachment!'.
APPEND i_objtxt.
DESCRIBE TABLE i_objtxt LINES v_lines_txt.
READ TABLE i_objtxt INDEX v_lines_txt.
wa_doc_chng-obj_name = 'Smart Form'.
wa_doc_chng-obj_descr = 'Frequent Caller Alert_Day'.
wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + STRLEN( i_objtxt ).
*********Creating the Entry for the document
CLEAR i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
APPEND i_objpack.
i_objbin] = i_tline[.
DESCRIBE TABLE i_objbin LINES v_lines_bin.
READ TABLE i_objbin INDEX v_lines_bin.
i_objhead = 'Frequentcaller list_Day.pdf'.
APPEND i_objhead.
************Creating the entry for the attachment.
CLEAR : i_objpack.
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 1.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'ATTACHMENT'.
i_objpack-obj_descr = 'FCA'.
i_objpack-doc_size = v_lines_bin * 255 .
APPEND i_objpack.
CLEAR i_reclist.
i_reclist-receiver = 'mail id'.
i_reclist-rec_type = 'U'.
APPEND i_reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = i_objpack
object_header = i_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
This is all i am doing.
It is sending a mail with the attachment but we are not able to open the attachment. it's giving an error like file is damaged and couldn't be repaired.
I serched in the forum but i couldn't get the answer.
I suspect there is a problem in getting the OTF data..
Please help me in resolving this issue....
Thanks in advance.
RKCheck the sample , and see where you made the mistake.
REPORT ZPDF_MAIl.
DATA:
w_fm_name TYPE rs38l_fnam,
w_bin_filesize TYPE i,
w_filesize TYPE i,
w_lines_txt TYPE i,
w_lines_bin TYPE i.
DATA:
wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop,
wa_objhead TYPE soli_tab,
wa_buffer TYPE string,
wa_doc_chng TYPE sodocchgi1.
DATA:
BEGIN OF t_mail_ids OCCURS 0,
mailid TYPE ad_smtpadr,
END OF t_mail_ids,
t_otfdata TYPE ssfcrescl,
t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
t_pdf_tab TYPE tline OCCURS 0 WITH HEADER LINE,
t_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z195_TEST'
IMPORTING
fm_name = w_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc EQ 0.
ENDIF. " IF sy-subrc EQ 0.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_outopt-tdnoprev = 'X'.
CALL FUNCTION w_fm_name
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
OTHERS = 5.
IF sy-subrc EQ 0.
ENDIF. " IF sy-subrc EQ 0.
t_otf[] = t_otfdata-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = w_bin_filesize
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
OTHERS = 5.
IF sy-subrc EQ 0.
ENDIF. " IF sy-subrc EQ 0.
LOOP AT t_pdf_tab.
TRANSLATE t_pdf_tab USING '~'.
CONCATENATE wa_buffer t_pdf_tab INTO wa_buffer.
ENDLOOP.
TRANSLATE wa_buffer USING '~'.
DO.
t_record = wa_buffer.
APPEND t_record.
SHIFT wa_buffer LEFT BY 255 PLACES.
IF wa_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
t_objtxt = ' To Change the COR, Use the Transaction ZCOR_CHANGE'.
APPEND t_objtxt.
t_objtxt = ' Check the Attached PDF file for COR'.
APPEND t_objtxt.
DESCRIBE TABLE t_objtxt LINES w_lines_txt.
READ TABLE t_objtxt INDEX w_lines_txt.
READ TABLE t_objtxt INDEX w_lines_txt.
wa_doc_chng-obj_name = 'COR Display'.
wa_doc_chng-expiry_dat = sy-datum + 10.
CONCATENATE 'COR' "w_cornr
'-' "w_stat_descr w_action_desc
INTO wa_doc_chng-obj_descr SEPARATED BY space.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = w_lines_txt * 255.
CLEAR t_objpack-transf_bin.
t_objpack-head_start = 1.
t_objpack-head_num = 0.
t_objpack-body_start = 1.
t_objpack-body_num = w_lines_txt.
t_objpack-doc_type = 'RAW'.
APPEND t_objpack.
t_objpack-transf_bin = 'X'.
t_objpack-head_start = 1.
t_objpack-head_start = 1.
t_objpack-head_num = 0.
t_objpack-body_start = 1.
DESCRIBE TABLE t_objbin LINES w_lines_bin.
READ TABLE t_objbin INDEX w_lines_bin.
t_objpack-doc_size = w_lines_bin * 255 .
t_objpack-body_num = w_lines_bin.
t_objpack-doc_type = 'PDF'.
t_objpack-obj_name = 'COR'.
t_objpack-obj_descr = 'COR Test'.
* concatenate 'COR' w_cornr into t_objpack-obj_descr
* separated by space.
APPEND t_objpack.
*LOOP AT t_mail_ids.
CLEAR t_reclist.
t_reclist-receiver = 'INTENATEMAIL'.
t_reclist-rec_type = 'U'.
APPEND t_reclist.
*ENDLOOP.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = t_objpack
object_header = wa_objhead
contents_bin = t_objbin
contents_txt = t_objtxt
receivers = t_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc EQ 0.
ENDIF. -
Hello All ,
I have created one smart form and provided option to download the same in PDF. My Problem is that is downloaded in PDF but at the same time my end user want to see the print preview and take the print from there itself also.
I am using the following code can some one suggest me the what need to do the change after both option will work at the same time.
Please Note I have also made the use of property
SSFCOMPOP-TDNOPREV
But after this also issue not resolve. Some one Please suggest me the how to resolve the issue.
DATA :
WA_FMNM TYPE TDSFNAME, " Smart Forms: Form Name
WA_CNTL TYPE SSFCTRLOP, " FOR PDF PRINT
WA_POP TYPE SSFCOMPOP, " printer name
T_OTF_FROM_FM TYPE SSFCRESCL,
T_PDF_TAB LIKE TLINE OCCURS 0 WITH HEADER LINE,
T_OTF TYPE SSFCRESCL-OTFDATA,
W_BIN_FILESIZE TYPE I, " BINARY FILE SIZE
W_FILE_NAME TYPE STRING,
WA_FNMD TYPE RS38L_FNAM. " Name of Function Module
DATA:
W_FORM_NAME TYPE TDSFNAME,
W_FMODULE TYPE RS38L_FNAM,
W_CPARAM TYPE SSFCTRLOP,
W_OUTOPTIONS TYPE SSFCOMPOP,
W_FILE_PATH TYPE STRING,
W_FULL_PATH TYPE STRING.
SMART FORM FUNCTION MODULE
WA_FMNM = TEXT-113.
W_FORM_NAME = TEXT-113.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = WA_FMNM
IMPORTING
FM_NAME = WA_FNMD
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
END FORM
WA_CNTL-GETOTF = 'X'.
WA_CNTL-NO_DIALOG = 'X'.
WA_CNTL-PREVIEW = SPACE .
WA_POP-TDDEST = 'LP01'.
CALL FUNCTION WA_FNMD
EXPORTING
CONTROL_PARAMETERS = WA_CNTL
OUTPUT_OPTIONS = WA_POP
V_APPLN_OB = V_APPLN_OB
V_KUNNR_OB = V_KUNNR_OB
V_EBELN = V_EBELN
V_CAT_NAME = V_CAT_NAME
V_VAR_NAME = V_VAR_NAME
IMPORTING
JOB_OUTPUT_INFO = T_OTF_FROM_FM
TABLES
T_ZCNC18 = T_ZCNC18
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
T_OTF[] = T_OTF_FROM_FM-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = W_BIN_FILESIZE
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
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.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
PROMPT_ON_OVERWRITE = 'X'
CHANGING
FILENAME = W_FILE_NAME
PATH = W_FILE_PATH
FULLPATH = W_FULL_PATH
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 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 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_BIN_FILESIZE
FILENAME = W_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ''
HEADER = '00'
TRUNC_TRAILING_BLANKS = ''
WRITE_LF = 'X'
COL_SELECT = ''
COL_SELECT_MASK = ''
DAT_MODE = ''
CONFIRM_OVERWRITE = ''
NO_AUTH_CHECK = ''
CODEPAGE = ''
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ''
TRUNC_TRAILING_BLANKS_EOL = 'X'
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
OTHERS = 22 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Swati NamdevHi Swati,
Pls refer the below code:
TABLES: ekko.
DATA: int_itab TYPE TABLE OF ekko WITH HEADER LINE.
DATA: wf_name TYPE rs38l_fnam.
DATA: wf_so1.
*For PDf Conversions
DATA: int_tab_otf_data TYPE ssfcrescl,
int_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
int_tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
file_size TYPE i,
bin_filesize TYPE i,
file_name TYPE string,
file_path TYPE string,
full_path TYPE string,
cparam TYPE ssfctrlop,
outop TYPE ssfcompop.
**Preview not allowed.
outop-tddest = 'LP01'.
cparam-no_dialog = 'X'.
cparam-preview = ' '.
cparam-getotf = 'X'.
GET PARAMETER ID 'EBLEN' FIELD wf_so1.
SELECT mandt ebeln bukrs bsart ernam ekorg bedat FROM ekko INTO TABLE
int_itab WHERE ebeln = wf_so1.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_SMARTFORM_FINAL2'
IMPORTING
fm_name = wf_name
EXCEPTIONS
no_form = 1
no_function_module = 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.
CALL FUNCTION wf_name
EXPORTING
control_parameters = cparam
output_options = outop
user_settings = space
IMPORTING
job_output_info = int_tab_otf_data
TABLES
int_itab = int_itab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
int_tab_otf_final[] = int_tab_otf_data-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = bin_filesize
TABLES
otf = int_tab_otf_final
lines = int_pdf_tab.
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 METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = file_name
path = file_path
fullpath = full_path.
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 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = full_path
filetype = 'BIN'
IMPORTING
filelength = file_size
TABLES
data_tab = int_pdf_tab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Ramneet Ahuja -
Error in calling/converting smart form from ECC to pdf in portal.
Hi,
We have a requirement in our project where we have to show IT form in portal exactly in the way payslip are shown in ESS
Screen, that is in the pdf form in ess portal screen.
For this my HR abap consultant has made one customize smart form which is being called from a RFC FM.
After the FM lf_fm_name gets executed , the OTF data is being captured and then converted in to PDF.
After that the PDF is then converted into XSTRING format which is then supplied to the portal side through export parameter
of the RFC.
Now when we debugged the RFC, the conversion is taking place perfectly fine in to XSTRING.This is wat we assume.
Portal Side: I have used Iframe ui ELEMENT in my webdynpro java and its property source I have binded with a value attribute
of type string and I am executing above customize RFC given to me by my HR abap consultant and after executing that RFC with
userID and payroll year as its import parameter I am taking export parameter of that RFC with name pdf_string of type XSTRING
of that RFC into my webdynpro java value attribute which i binded to source property of Iframe.
Now when we see the output in portal , first of all pdf is not getting generated and its showing the error message:
file does not begin with '%pdf-' and secondly errored Adobe form getting opened outside Iframe window its not coming within
Iframe window like what payslip comes inside Iframe UI element.
I want to know what mistake we are doing in our ABAP coding or portal coding.
Please help.Hi Satyam,
You can use the existing SAP GRT framework for developing the app.
Its easy and provides more features.
See this wiki:
http://wiki.sdn.sap.com/wiki/display/WDJava/HowtodevelopcustomWebDynproESSapplicationsusingGenericReportingTool%28GRT%29
Regards
Yugandhar Reddy -
Creation of Smart Forms for PDF
Hi All,
I am new to SFP. So, please tell me how to create Smart Forms for PDF.
I already have an SAP standard form of Customer Invoice in this format (SFP) and I need to change the layout and add some additional fields in it as well.
Please guide me through the process. Earliest reponse will be highly appreciated.
Regards,
ShabbarHi,
I take that you meant PDF Forms in SAP.
Refer the following help links.
http://help.sap.com/saphelp_nw04s/helpdata/en/dc/f1783fe3263042e10000000a114084/content.htm
This PDF link (Has got many Pdf files)
https://www.sdn.sap.com/irj/sdn/interactiveforms?rid=/webcontent/uuid/d1088b7e-0c01-0010-c78e-984c0537e3ec [original link is broken]
Also check this Tech-ed 06 session at Amsterdam.
http://www.sapteched.com/emea/edu_sessions/session.htm?sid=317
Check this download from SDN.
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/2dd3dbcd-0401-0010-55b8-b10808ff688e
Is this you are looking for?
Feel free to revert back.
--Ragu -
Display SMART form as PDF in WD ABAP
Hi ,
To display smart form as PDF , I am following the SDN article :
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785?quicklink=index&overridelayout=true
In my component , I have created the view VIEW_PDF, for this . I have created Adobe interactive UI element, and bind the property source to the attribute (XSTRING) where I will get PDF (after OTF conversion).
First of all I am using the FM SSF_FUNCTION_MODULE_NAME and usingf the import parameter fm_name .
Then using this FM
CALL FUNCTION lv_fm_name
EXPORTING
OUTPUT_OPTIONS = lwa_output_options
GW_VENREQDAT = lwa_venreqdat
GW_REQHEADER = lwa_venreqhdr
IMPORTING
JOB_OUTPUT_INFO = lv_ssf_output.
from smart form ZVM_SFM_SUMMARY,I want to get the data in OTF format using the importing parameter JOB_OUTPUT_INFO of the above FM.
But I am not able to retrieve the data .Please direct me , where am I missing?
For converting it to PDF , I am using the FM CONVERT_OTF .
regards,
amitYou may continue like this there after...
call function w_fmodule
exporting
control_parameters = w_cparam
output_options = w_outoptions ":lv_output_options
user_settings = ' '
importing
job_output_info = t_otf_from_fm
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 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.
t_otf[] = t_otf_from_fm-otfdata[].
call function 'SSFCOMP_PDF_PREVIEW'
exporting
i_otf = t_otf
exceptions
convert_otf_to_pdf_error = 1
cntl_error = 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.
data: l_dummy type standard table of tline,
pdf_data type xstring,
pdf_size type i.
clear: pdf_data, pdf_size.
call function 'CONVERT_OTF'
exporting
format = 'PDF'
* max_linewidth = 132
importing
bin_filesize = pdf_size
bin_file = pdf_data
tables
otf = t_otf[]
lines = l_dummy
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.
data lv_source like ls_pdf-source.
* navigate from <CONTEXT> to <PDF> via lead selection
lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
* get element via lead selection
lo_el_pdf = lo_nd_pdf->get_element( ).
* get single attribute
lo_el_pdf->set_attribute(
exporting
name = `SOURCE`
value = pdf_data ).
Regards
Gopi -
Problem in converting smart form into PDF
HI Experts,
I am using a Function Module CONVERT_OTF for converting smart form into pdf file for send it to with attachment.
But i got a error when i am using that FM.
Runtime Errors CONVT_NO_NUMBER
unable to interpret *292 as a no.
Is that because my file size too large about 13 pages of PDF?
and when i run it for other smart forms which have 2 or 3 pages of PDF, its working perfectly.
can anyone tell what is problem with that FM?
Thanks
ShakunHi,
I had the similar issue and after analysis I have that this is the issue by not passing the IMPORTING parameter of the Function Module "BIN_FILESIZE". Please try to pass some variable to this paramter and then this will be completely rectified.
DATA ; v_filesize TYPE i.
*--Convert OTF data to PDF data
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_filesize
TABLES
otf = it_otfdata
lines = it_pdfdata
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
Please verify whether this reolves the problem for you.
Regards,
SRinivas
Maybe you are looking for
-
Question about Merge Statement
Is it possible to use a CASE statement inside the update clause of a merge statement? Also what about a function? I have a string (In Source) that needs to be split into multiple columns (In Target) depending on values in other columns (In Source). I
-
Photos sent through ePrint are washed out - Help
I just ran a test sending 3 photos from my ipad via email to my HP Envy 100 e-Printer and they all appeared washed out. I then sent the same 3 photos directly to the HP Envy 100 e-Printer using the HP iPrint app and they were nice and brilliant -- co
-
Quality-Invoicing for Blocked stock
Hi I did GR for material against PO for 50 pcs, During QA32 stock posting i posted 30 pcs to Unres. stock(101) and 20 pieces to blocked stock(350) storage locations. Now when I am trying to create MIRO invoice verification, I am getting all the 50 pc
-
ITunes Downloading Previously Downloaded Songs
I know that we're all well used to iTunes doing weird things in its attempts to totally take over our computers, but I've never know it do this before. I recently switched to using Windows 7 from XP, and copied my library into my new iTunes. I synced
-
Compoze Groupware integration in WSRP
Hi, Compoze Groupware integration in WSRP. 1) Created a producer with compoze Group ware portlet. (Compoze_Groupware) with Registration Mandatory 2) Created a Consumer portlet in another domain using Producers wsdl file. 3) Added a Weblogic login por