How to fill in a form on a website, send it via email, add some information, save data in database?
Hi everybody,
I am new at Acrobat and experiencing some difficulties at the start.
My aim is to generate a PDF file with some fields, which can be filled in by visitors of a website. When the visitor has finished filling in, he should press a button in the PDF file to send it to a specific email-address. The receiver should be able to add little information and save data in a specific (MySQL) database.
My main problems are:
1. The visitor must not see the button for sending the information to the MySQL database.
2. How to send the information to the database (and select the fitting datafields)?
I'm looking forward to reading your replies.
Thanks in advance for your help!
Regards,
KB
You will need someone who knows how to script such things. It can probably be done with PHP or something similar.
Similar Messages
-
How can I embed a form on my website and set up a submit button so that when people fill out and click Submit, the filled form will be emailed to me as an attached pdf file?
Thank you!Hi;
That is not a workflow that is supported by the Adobe forms solutions at this time.
Thanks,
Josh -
How do I upload a form to my website using form central?
How do I upload a form to my website using form central?
Using Form Central you can distribute your form as a web-based HTML form, a fillable PDF form, or both.
You can copy the URL or the embed code for the form and post it on your website. When a respondent clicks the link, the fillable form opens in a browser window.
The only exception: These options don’t apply to fillable PDF forms that you imported into Adobe FormsCentral.
Please refer to the article http://help.adobe.com/en_US/formscentral/using/WSd789abd336388b16-9d277de12da94c8037-8000. html#WS49f7d3dd80da808f7c9fcbc138d00a7399-8000. -
For example on Find-A-Grave when filling in the form to add a memorial there are several blocks that you fill in including location. For some blocks you type in the information and others are pick one of the preset selections. I generally hit the tab key on my keyboard and goes to the next block except when it comes to the preset selection blocks. If I use the tab key to go to the next selection it skips right past the next selection to the selection below that. For example, after I fill in the year I hit the tab key and type u for the United States under the country selection. But in order to get the next block to appear I have to hit tab again (but only when using your browser). Your browser then skips past the state selection to the county selection. Then when I pick the state using the cursor it does it again and drops down to the Bio past the county selection.
When I use Internet Explorer I don't have this problem. I merely hit the tab button on my keyboard and it goes to the next selection rather than as your browser does that is skips to the block below.
Is there some reason you have it set up this way because it is quite annoying to have to go back up each time using the mouse cursor rather than continuing to use the keyboard to fill in everything (typing, tab key or using the arrow keys). To say the least it slows the whole process down a lot. No, it is not my computer. I've had the exact same problem using another computer. No, it is not the find-a-grave website. I just used it as an example. Using your browser forces me to stop using the keyboard to fill in a form and use the mouse and then the keyboard and then the mouse and then the keyboard and then the mouse, etc when it shouldn't be necessary when filling out a form on a website.Are you having the problem with just the one site? Others?
Please post some public linkss.
Start '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Firefox in Safe Mode]''' {web Link} by holding down the '''<Shift><br> ''(Mac Options)'' ''' key, and then starting Firefox. Is the problem still there? -
How to:
1. Submitt form as PDF and not XML
2. Allow user to save to computer
ThanksThanks For the Post!!
Please be advised that this forum is for discussions about
the Acrobat.com online services only. Your best source of questions
and answers for Acrobat would be in the
Acrobat Windows
Forums or the
Acrobat Macintosh
Forums. -
How to Edit the subject of a form that is submitted to me via email?
Is there a way to Edit the subject of a form that is submitted to me via email?
Ex. I've created multiple forms in Dreamweaver. They are submitted to my email address without problem.
When I receive them, the default subject line in my email is "Form posted from Microsoft Internet Explorer"
I want each of my forms to have their own subject line.
ThanksHi
In your form to mail script insert the following just above the actual function to send the mail -
$optional_subject = $_POST['form_subject'];
and $optional_subject in your mail function just before the body info of your email.
Insert an hidden field in your form with the id "form_subject" and the value you wish.
PZ
www.pziecina.com -
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. -
I have finished my FCP X project and in the past I would burn a copy but since I am out of town I need to send it via email. The peron is able to view the project when it comes by email but I am wondering how can they burn a dvd copy of it to display at the Church for our announcements. The person I am sending it to has a Mac too. Thanks
First off, you're not likely to be able to email it. Most email systems limit the size of messages (and their attachments) since email isn't really designed for large transfers. It's not uncommon to see 50MB as a cap. Unless you're working on an especially small project you're likely to exceed this limit.
Instead you should consider creating a disk image of your DVD and using a public file service such as DropBox or YouSendIt.
If you create a disk image (.dmg) file that simulates a full burned DVD, the reciever can burn that to disk using Disk Utility on their machine. They don't need FCP X on their side. -
how do i create a contact list in adobe send from my email contact list and how do avoid typing individual email adresses
Hi [email protected],
The e-mail addresses will not be memorized in Adobe send but will be saved in sent items.
You can use Adobe send outlook plugin to access your email contact list and send.
You can download it here:Send Large Files Online - Share, Control, Track & Manage | Adobe Send
Regards,
Florence -
How come I can't send Numbers via email?
how come I can't send Numbers via email?
Are you trying to send by Gmail? Gmail will not accept Numbers 3 documents as attachments. There is some incompatibility in the format.
Have you considered sharing a link via iCloud?
The recipient can either view online in a browser or download the document via the Tools menu:
SG -
How do I get videos that I recorded off of my iPhone so I can upload them to Facebook? I cannot send them via email nor MMS because it says they're too big.
iTunes is not used to move photos and videos from an iPhone to a computer (it is used to move them the other direction).
Also note that a connected phone or camera does not show in the Finder on a Mac. It should show in Image Capture or iPhoto.
The following has instructions on how to move them: iOS: Import personal photos and videos from iOS devices to your computer
Another option is 3rd party software such as http://www.photosync-app.com -
How can i make an action to send photos via email?
hi
under windows xp
how can i make an action to send photos via email?
i know there is a Export Actions
i tried to copy a link of "C:\Programs\Outlook Express\msimn.exe"
but lightroom export the file & open the client , but doesn't open the dialog to send email
how can i do it?For Outlook Express use MAPIMailer from
Lightroom Extra at Downloads/Other Goodies/MAPIMailer
Don
Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
http://donricklin.blogspot.com/ -
How to fill up pdf forms & sign pdf contracts using digitizer pen & tablet?
Greetings,
I travel a lot and bring tons of documents for clients to sign. As I am trying to cut down on travel weight, i fancied upon the idea of using a digitizer such as the Genius EasyPen i405 to fill up pdf forms and sign contracts so i wouldnt have to scan, save and email the forms back to the office thousands of miles away. I would like to know if it is possble to do that using such a device. If its possible, how? I use acrobat X. Any advise you can give would be greatly appreciated. Hope to hear from you soonest. Thank you.Thanks for your response jallisy. I just thought about this because i read somewhere that the pen acts like a mouse cursor when you move it around the digitizer. I figured the pen could act as a mouse while the digitizer could act as a mouse pad, as such the size doesnt really matter, considering you need to press a button on the pen to engage the digital ink and you use the computer screen as your guide. I havent really tried one but am just starting to explore the idea as tablets like the Ipad are now allowing users to fill up forms and sign pdfs with a finger or a capacitive pen. Youtube offers all these interesting pdf signing and editing with the Ipad. I just really dont want an Ipad. I still think a solution is just around the corner. But i am not willing to buy an expensive tablet with limited storage and productivity features over a real laptop.
The genius site for the pen stated that i can sign microsof office docs but no pdf was mentioned. I guess they have a special software for that but the people at genius havent gotten back to me yet. Another way i was thinking about was converting all the pdfs to word, sign the word document and then save as a pdf again ... the document is prone to be edited though and formats could be accidentally changed so was really thinking about doing this directly with a PDF instead. -
How to covert Spool to HTML and then send it via email
Hi
I have a report that runs in the background and then converts the ALV report to PDF and emails it as attachment. I need it to convert in HTML instead of PDF.
Here is my code...
* CALL_ALV
form call_alv.
perform build_field_catalog using field_tab[].
perform build_eventtab using events[].
perform comment_build using header_alv[].
perform build_sorttab using gt_sort[].
perform build_layout.
* Call ABAP List Viewer
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_repid
i_callback_user_command = 'ALV_USER_COMMAND'
i_structure_name = 'REC'
it_fieldcat = field_tab[]
it_special_groups = gt_sp_group[]
it_sort = gt_sort[]
i_save = v_save
is_variant = v_variant
it_events = events[]
is_layout = gd_layout
tables
t_outtab = REC
exceptions
program_error = 1
others = 2.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
ENDIF.
endform. "call_alv
* FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
* FORM get_job_details *
FORM get_job_details.
* Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
* FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
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.
CHECK sy-subrc = 0.
* Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
* FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
* perform send_email using p_email2.
ENDFORM.
* FORM send_email *
* --> p_email *
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
* Default subject matter
gd_subject = p_Sub.
gd_attachment_desc = p_attNm.
* CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
* it_mess_bod = 'Message Body text, line 1'.
it_mess_bod = P_line1.
APPEND it_mess_bod.
* it_mess_bod = 'Message Body text, line 2...'.
it_mess_bod = P_line2.
APPEND it_mess_bod.
* If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
* Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
using p_email
gd_subject
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
* FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
* Send email
FORM send_file_as_email_attachment tables it_message
it_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
data: t_packing_list like sopcklsti1 occurs 0 with header line,
t_contents like solisti1 occurs 0 with header line,
t_receivers like somlreci1 occurs 0 with header line,
t_attachment like solisti1 occurs 0 with header line,
t_object_header like solisti1 occurs 0 with header line,
w_cnt type i,
w_sent_all(1) type c,
w_doc_data like sodocchgi1.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
* Fill the document data.
w_doc_data-doc_size = 1.
* Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
* Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
* Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
* Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
* Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
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.
* Populate zerror return code
ld_error = sy-subrc.
* Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
Please tell me what's the code for convert_spool_to_HTML. and do i need to do anything on the PERFORM process_email. ..
I always reward points. ThanksI think that if you can get the list back from the spool in regular format, you can then use the WWW_HTML_FROM_LISTOBJECT function module to convert to HTML. HEre is a sample program where I am submitting the program and getting the list back from memory.
* This program works in the background,
report zrich_0003 .
data: maildata like sodocchgi1.
data: mailtxt like solisti1 occurs 10 with header line.
data: mailrec like somlrec90 occurs 0 with header line.
data: list type table of abaplist with header line.
data: ascilines(1024) type c occurs 0 with header line.
data: htmllines type table of w3html with header line.
parameters: p_check.
start-of-selection.
submit zrich_0004 exporting list to memory and return.
call function 'LIST_FROM_MEMORY'
tables
listobject = list
exceptions
not_found = 1
others = 2.
call function 'LIST_TO_ASCI'
tables
listobject = list
listasci = ascilines
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
call function 'WWW_HTML_FROM_LISTOBJECT'
tables
html = htmllines
listobject = list.
clear: maildata, mailtxt, mailrec.
refresh: mailtxt, mailrec.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
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 <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
commit work.
wait up to 2 seconds.
submit rsconn01 with mode = 'INT'
with output = 'X'
and return.
So this works fine, but you have one more step, you need to get the LISTOBJECT from SPOOL. See if you can do it using the functino module RSPO_RETURN_ABAP_SPOOLJOB or RSPO_RETURN_ABAP_SPOOLJOB_RAW.
REgards,
RIch Heilman -
How to send scripts via email(Internet Address)
Dear all,
I want to send scripts/smart forms via email (Internet Address). How can I do that please advice ?
If any one has worked on it please send me sample code for the same.
Thanks in Advance
Thanks and Regards:
M.ManoharHi Manohar,
Check this Program.
REPORT zptpfrm202p_pogr_pr_instr MESSAGE-ID zmm.
TABLES *
Database table made for getting information about PRINTPREVIEW and
PRINT command more than one times
TABLES: zgr_table.
TYPE-POOLS:syscr.
GLOBAL TYPE DECLARATION *
DATA: zdoc_output_info TYPE ssfcrespd, "SF:Return Document Inf.
zjob_output_info TYPE ssfcrescl, "SF:Return value at end of
form printing
i_control TYPE ssfctrlop ,
i_output_options TYPE ssfcompop,
zjob_output_opts TYPE ssfcresop. "SF:Return value at start
of form printing
*This internal table is used for storing Document Segment: Material
DATA: BEGIN OF i_mseg.
INCLUDE STRUCTURE mseg.
DATA: END OF i_mseg.
This internal table is used for storing Header: Material Document
DATA: BEGIN OF i_mkpf.
INCLUDE STRUCTURE mkpf.
DATA: END OF i_mkpf.
*Variables
DATA flag(1) TYPE c.
DATA: vfile TYPE string.
SELECTION-SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
PARAMETERS:p_mblnr TYPE mkpf-mblnr OBLIGATORY MATCHCODE OBJECT zganesh,
p_mjahr TYPE mkpf-mjahr OBLIGATORY MATCHCODE OBJECT zganesh1,
p_zeile TYPE mseg-zeile OBLIGATORY MATCHCODE OBJECT zganesh2.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 10.
PARAMETER:r_disp RADIOBUTTON GROUP g1 USER-COMMAND u1 DEFAULT 'X'.
SELECTION-SCREEN:COMMENT 15(10) text-002 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 10.
PARAMETERS: r_down RADIOBUTTON GROUP g1.
SELECTION-SCREEN:COMMENT 15(10) text-003.
*PARAMETERS: v_file LIKE rlgrap-filename .
*SELECTION-SCREEN:COMMENT 70(50) text-005.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 10.
PARAMETERS: r_print RADIOBUTTON GROUP g1 .
SELECTION-SCREEN:COMMENT 15(10) text-004.
SELECTION-SCREEN END OF LINE.
PARAMETERS: v_file LIKE rlgrap-filename MODIF ID g12.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR v_file.
DATA : wlv_field_name LIKE dynpread-fieldname,
wlv_file_name LIKE ibipparms-path.
wlv_field_name = v_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = wlv_field_name
IMPORTING
file_name = wlv_file_name.
IF sy-subrc EQ 0.
vfile = wlv_file_name.
v_file = wlv_file_name.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'V_FILE'.
IF r_disp EQ 'X' OR r_print EQ 'X'.
screen-input = 0.
ELSE.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION EVENT *
START-OF-SELECTION.
CALLING CONVERSION FUNCTION MODULE 'CONVERSION_EXIT_ALPHA_INPUT' *
*Conversion function module for appending 00 befor MBLNR FIELD
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_mblnr
IMPORTING
output = p_mblnr.
Call subroutine for fetching data from database
PERFORM get_data.
END-OF-SELECTION EVENT *
END-OF-SELECTION.
Call subroutine for calling and processing smartform
PERFORM call_smartform.
*& Form get_data
Subroutine for fetching data from database
FORM get_data .
Fetching data from MKPF table with using parameters MBLNR and MJAHR
SELECT SINGLE * FROM mkpf
INTO i_mkpf
WHERE mblnr = p_mblnr
AND mjahr = p_mjahr.
IF sy-subrc EQ 0.
Fetching data from MSEG with using parameters MBLNR,ZEILE and MJAHR
SELECT SINGLE * FROM mseg
INTO i_mseg
WHERE mblnr = i_mkpf-mblnr
AND mjahr = i_mkpf-mjahr
AND zeile = p_zeile.
IF sy-subrc NE 0.
CLEAR i_mseg.
ENDIF.
ELSE.
MESSAGE i000.
EXIT.
ENDIF.
ENDFORM. " get_data
*& Form call_smartform
Subroutine for calling smartform
FORM call_smartform .
Local template used in the processing output of smartform
TYPES: BEGIN OF lt_ztable,
mandt TYPE sy-mandt,
mblnr TYPE mseg-mblnr,
flag(1) TYPE c,
END OF lt_ztable.
CONSTANTS: c_x(1) TYPE c VALUE 'X'.
Workarea
DATA: lw_ztable TYPE lt_ztable.
*Variable used in the smartform
DATA: lv_form(30) TYPE c,
lv_fm_name(30) TYPE c.
lv_form = 'ZPTPFRM202L_POGR'.
*Calling function module SSF_FUNCTION_MODULE_NAME which gives new name
*to the function module that will generated by smartform.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lv_form
IMPORTING
fm_name = lv_fm_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.
*Calling function module that will be generated by smartform
IF r_disp = c_x.
i_output_options-tdimmed = space.
i_output_options-tdnewid = c_x.
i_output_options-tddest = 'LOCL'.
i_control-no_dialog = 'X'.
i_control-preview = 'X'.
ELSEIF r_print = c_x.
i_output_options-tdimmed = c_x.
i_output_options-tddest = 'LOCL'.
i_control-no_dialog = c_x.
ELSE.
i_output_options-tdimmed = space.
i_output_options-tdnewid = c_x.
i_output_options-tddest = 'LOCL'.
i_control-getotf = 'X'.
i_control-preview = space.
i_control-no_dialog = c_x.
flag = c_x.
ENDIF.
CALL FUNCTION lv_fm_name
EXPORTING
control_parameters = i_control
output_options = i_output_options
user_settings = space
zmkpf = i_mkpf
zmseg = i_mseg
IMPORTING
document_output_info = zdoc_output_info
job_output_info = zjob_output_info
job_output_options = zjob_output_opts
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.
Modify the database table if it found the print command
IF zjob_output_opts-tdpreview NE c_x.
lw_ztable-mandt = sy-mandt.
lw_ztable-mblnr = p_mblnr.
lw_ztable-flag = c_x.
MODIFY zgr_table FROM lw_ztable.
CLEAR lw_ztable.
ENDIF.
IF flag EQ c_x.
DATA: li_lines LIKE tline OCCURS 100 WITH HEADER LINE.
DATA: lv_file TYPE string,
lbin_fsiz TYPE i.
lv_file = v_file.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = lbin_fsiz
TABLES
otf = zjob_output_info-otfdata
lines = li_lines
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 FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = lbin_fsiz
filename = lv_file
filetype = 'BIN'
TABLES
data_tab = li_lines
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.
ENDIF.
ENDFORM. " call_smartform
Hope this resolves your query.
Reward all the helpful answers.
Regards
Maybe you are looking for
-
ICal print preview is not formatted properly for printing
Calender printed fine last month. This month I get this. Naturally, it looks the same when printed. Running version 10.9.2 on iMac. Any ideas what the problem is?
-
Special character no longer works after updates
Hi, I updated my system yesterday and it broke something. My PS1 used to look like: http://imgur.com/a/GboiZ#0 , with a special - character. When I logged in today, my PS1 looked like this: http://imgur.com/a/GboiZ#2, and the line in my .bashrc with
-
Would like project entry on Recurring JEs and Posting Templates
From our customer: Version: SAP 2007A PL 49 Description of requirements: (When setting up recurring entries and Posting Templates there is no place to enter the project code. There is a field to enter the distribution code. For some monthly recurr
-
How do i attach DTF to a mssg so that incident (for the mssg.) fires DTF?
When an error is thrown (business or system), there are cases where incidents are raised explicitly. These incidents are created using seeded error messages. What i've heard is that there is a way to attach a diagnostic test(DTF) to an error message.
-
title says it all...