Send output to gui control
I tried searching for an answer but sometimes forming the question can be an issue...
I want to make a GUI with two controls, say period and frequency. I want it to be possible for the user to specify either one of these two values, and the other value is calculated and shown in the other control. So if I choose a period of 500us, the frequency control is updated to show 2kHz. Or if I choose a frequency of 2kHz, the period control is updated to show 500us. I can enter input into either control and the other is updated with the corresponding result.
Is there a way to do this? If so, how?
You just need to write to a local variable of the control in your value change event.
Similar Messages
-
EA608 EDI: Sender partner number in control record is default
We have created some KU partners in WE20 for sending billing documents to the SD bill-to partner but is running into an output error EA608 (EDI: Sender partner number in control record is default) on the billing document when trying to create IDOC's.
Settings on partner:
Partner: 12345
Partner type: KU
Partner function: BP
Message type: INVOIC
Application: V3 : Billing
Output type: ZEDI : US EDI Invoice
Process code: SD09 : INVOIC: Invoic
EDI Standard X
Message type 810
Version 004010
Any idea to what the problem is?
BR
JoergenHi Joergen,
we also have similar problem to send out ordrsp. Could you tell me how to solve this problem as I saw tht this problem of yours has been answered.
Thanks inadvance for your reply,
Lily -
EDI: Sender partner number in control record is default
Hello!
Another problem... in SUS - MM, Plan Driven Procurement
I try to send PO from MM to SUS. But in the messages I get following
error: "EDI: Sender partner number in control record is default"
Message no. EA608
SAP Note Number: 111342 doesn't help
the logical systems are maintained!
Any idea about this problem?
Kind regards,
BarbaraIf this is in regards to an ASN: Check to see if this customer buys several divisions or is relevant for one division only. In our instance of SAP, we found that it didn’t go to the Customer Master division setup relevant to the division on the ASN to get the ACCT AT CUST field, it went to the first in the sequence of divisions and got that ACCT AT CUST field information. That information was not filled out as it was a new division and that is what kept the output from happening. For example: we had divison 02, 04, 06 and 08. We added division 03 and extended all customers to division 03. Those customers that only bought division 04 just stopped sending ASNS. The ASN was for division 04, but SAP logic was retrieving the ACCT AT CUST information (SALES tab, not CORRESPONDENCE tab) for divison 03, but we didn’t have that filled out.
Hope that helps. -
GUI control panel for console apps
Hi
i need to create a GUI control panel that will execute console applications is any way to execute console commands in java? (I'm interesting only for windows platform)
it will be nice if i can grab (redirect) consol application's output and diplay it in a text area.
any hint?See also:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Process.html#getInputStream()
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Process.html#getErrorStream()
http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html
-Alexis -
To send output of report to the mails ids as an excel attachment
Hi all,
I have a requirement that I have created a report using classes. Now I have to send output of my report to the particular mailids as an excel attachment.
Can anybody help me?
Regards,
Azra.Hi,
Refer Below links.
Re: Formatting Excel Attachment output in SO_DOCUMENT_SEND_API1
Information Broadcasting with Excel Report as attachment
Zip the excel and send as mail attachment
Regards
Md.MaahboobKhan -
How to send output by mail?
Hi Experts,
Current output type in our system:
Document: SD delivey note
Output type: LD00
Medium: 1
Form: Smartforms.
Now we are printing delivery note by LD00 and Medium 1.
In the future, we need to send ducument output to customer by mail, format still as original smartforms.
Would you please give me a guide line to do this?
Thank you.
Richard.Hi Richard,
you need to do following things to send output as an email.
The output type should have medium 5. thats to send an email. Along with this you need to check following two things.
if you are using a copy of a standard program it should have code to send an email. Then you just need to configure following output type with medium '5' to send an email.
If you dont have code to send it as an email you can use FM to send it as an email.
you can use following FM if its an adobe form.
CALL FUNCTION 'SD_PDF_SEND_DATA'
EXPORTING
iv_device = p_w_device
iv_email_subject = w_lv_subject
it_email_text = w_mail_text
is_main_data = p_wa_fp_formoutput
iv_language = w_langu
is_address = w_ls_address
IMPORTING
ev_send_to_all = w_lv_send_to_all
EXCEPTIONS
exc_document = 1
exc_send_request = 2
exc_address = 3
OTHERS = 4.
Else for smart form you need to convert it to PDF format first and send it as an email. Refer below code.
Call Smartform function module.
CALL FUNCTION fm_name
EXPORTING
control_parameters = ssfctrlop
output_options = ssfcompop
IMPORTING
job_output_info = it_otf_data
TABLES
it_nfal = it_nfal.
***********appending the otf data into the final table*********************
it_otf_final[] = it_otf_data-otfdata[].
converting OTF data into pdf data**************************
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = bin_filesize
bin_file =
TABLES
otf = it_otf_final
lines = it_pdfdata[]
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
To send data as email attachment, we need to have a table of SOLISTI1.
This table contains line size of 255 characters. Below function module
does the trick of changing the table from X character sized lines into
any given Y character sized lines.
REFRESH it_pdf[].
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
EXPORTING
line_width_dst = '255'
TABLES
content_in = it_pdfdata[]
content_out = it_pdf[]
EXCEPTIONS
err_line_width_src_too_long = 1
err_line_width_dst_too_long = 2
err_conv_failed = 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.
ELSE.
"Subject of the mail.
w_document_data-obj_name = 'MAIL_TO_HEAD'.
w_document_data-obj_descr = 'Regarding Mail Program by SAP ABAP'.
"Body of the mail
w_body_msg = 'This is body of mail msg.'.
APPEND w_body_msg TO i_body_msg.
CLEAR w_body_msg.
"Write Packing List for Body
DESCRIBE TABLE i_body_msg LINES g_tab_lines.
w_packing_list-head_start = 1.
w_packing_list-head_num = 0.
w_packing_list-body_start = 1.
w_packing_list-body_num = g_tab_lines.
w_packing_list-doc_type = 'RAW'.
APPEND w_packing_list TO i_packing_list.
CLEAR w_packing_list.
"Write Packing List for Attachment
w_packing_list-transf_bin = 'X'.
w_packing_list-head_start = 1.
w_packing_list-head_num = 1.
w_packing_list-body_start = 1.
DESCRIBE TABLE it_pdf LINES w_packing_list-body_num.
w_packing_list-doc_type = 'PDF'.
w_packing_list-obj_descr = 'PDF Attachment'.
w_packing_list-obj_name = 'PDF_ATTACHMENT'.
w_packing_list-doc_size = w_packing_list-body_num * 255.
APPEND w_packing_list TO i_packing_list.
CLEAR w_packing_list.
"Fill the document data and get size of attachment
w_document_data-obj_langu = sy-langu.
READ TABLE it_pdf INTO w_pdf INDEX g_tab_lines.
w_document_data-doc_size = ( g_tab_lines - 1 ) * 255 + STRLEN( w_attachment ).
"Receivers List.
w_receivers-rec_type = 'U'."Internet address
w_receivers-receiver = p_mail.
w_receivers-com_type = 'INT'.
w_receivers-notif_del = 'X'.
w_receivers-notif_ndel = 'X'.
APPEND w_receivers TO i_receivers .
CLEAR:w_receivers.
"Function module to send mail to Recipients
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_document_data
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = g_sent_to_all
TABLES
packing_list = i_packing_list
contents_bin = it_pdf
contents_txt = i_body_msg
receivers = i_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.
IF sy-subrc = 0 .
MESSAGE i303(me) WITH 'Mail has been Successfully Sent.'.
ENDIF.
ENDIF.
Edited by: Sumit Naik on Oct 13, 2010 11:20 PM -
Need help in SQL Queries using GUI controls or variables
Hello, all
I have a big problem (I have already had with Visual Basic a few mounths ago) with Java while writing my SQL Queries.
I would like to know how I must do to use variable data or GUI control data in my SQL Query to select only some records.
Here, my first Query that works without any problem (no WHERE clause !!!) :
Statement requeteBedes = connectBedes.createStatement();
ResultSet resultatSeries = requeteBedes.executeQuery("SELECT * FROM Series");
initComboBoxSeries(resultatSeries);the method "initComboBoxSeries" fills a JComboBox with all the names of the series in my database.
Here comes my problem.I would like to use the value of the selected "series" in the JComboBox to search in another table of the same Database. I made another statement but it returns a Null ResultSet :
ResultSet resultatSearchAlbumsFromSeries = requeteBedes.executeQuery("SELECT * FROM bandes_dess WHERE ser_nom = '" + strComboBoxSeriesSelected + "' "); The variable strComboBoxSeriesSelected contains the value of the selected line in the combobox with all the series, filled after the first query that is here above and that works very well.
Could some one help me and tell me how I must use variables or GUI controls values in my SQL Queries or tell me if there is a place where I could find an explanation of that kind of problems (like more "advanced SQL Queries", as the ones currently used in all the Learning Java 2 books)
Thank you all for your help.
Christian.executeQuery() will never return null. At least that's what the spec says. You are probably catching an exception (probably a syntax error caused by a single quote in strComboBoxSeriesSelected) and ignoring it. Or do you mean the ResultSet contains no rows?
Anyway, to use parameterized queries, take a look at PreparedStatements. Your code should look like this using PreparedStatement:Statement requeteBedes = connectBedes.prepareStatement("SELECT * FROM bandes_dess WHERE ser_nom = ?");
requeteBedes.setString(1, strComboBoxSeriesSelected);
ResultSet resultatSeries = requeteBedes.executeQuery();Alin. -
How do I turn on the GUI controls for the Focus Blur Effect in Final Cut Pro X
I can't find the setting that enables the GUI control overlay to manipulate the parameters of the Focus blur effect in Final Cut Pro X. When I have the clip and the focus effect selected I only get a center element overlay. At one point I had controls for all the other elements of this effect.
anyone know a shortcut or how I can toggle these controls back on?I don't see any other screen controls either.
Maybe there was a change sometime, or maybe you were using a different effect? -
Monitor CPU and send output to file
Hello
I want to monitor my CPU usage and my idea was this:
1. Use Top (/usr/bin/top –n 1|head –n 3| tail –n 1|awk ’{print $2}’)
2. Send output to file
3. crontab it
My problem is now that my top command (see above) works fine in terminal, it will give me a short and clean answer; 10.5%
But when sending this to a file the output looks more like: 10.5%^^8fewfwe[]€]]@£]@£[f9@£[]^^E^Efewfwef23 (Yes i just hit my keyboard but its alot of randoms characters)
How can i fix this?
Do you have any easier solution to monitor my CPU usage, i want it to be quite often, send cpu usage to file for at least every minute, then i can import this to excel and make nice diagram.
I dont want to install any extra program so ill have to work with whats there already. Im using RHEL 4.
Thanks in advance, JohanA better way to do it is using "sar"
man sarIt's already builtin and there are plenty of docs on the net.
kido -
How to send output of smartform in pdf format as an attachment to email
how to send output of smartform in pdf format as an attachment to email
search before posting further and follow Forum rules
Edited by: Vijay Babu Dudla on Jan 15, 2009 4:50 AMDid u check on sdn?
i dont think so or else there are many posts on this topic and good wikis too.
look at one of these code tutorial wiki
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/mail%2bsend%2bthrough%2boutput%2bcontrols
So next time do use the search functionality.
кu03B1ятu03B9к
Edited by: kartik tarla on Jan 15, 2009 12:33 PM -
Urgent :- Sending output to SAP User's inbox as Excel Attachment.
Hi,
This is urgent requirement
Requirement Description in breif :-
1.I have a report and but when run in background, it should create an excel file and should be sent as attachment to sap inbox of the same user who is executing the report.
2.I have tried all most all function modules. the limitations were some of the F.M are not supported in background mode (which the sap it self uses) And I could able to send data to excel excel file only upto 255 chars per record. i.e these F.M's are allowing me to send a internal table but every record of 255 chars only.
3.Which is not sufficient to send my ITAB contents. and contents after 255 are truncating.
Sending output of report in Excel Format ,in BackgroundHi srinivas,
check this thread
Convert output display to Excel file and Email to a set of users
Regards,
Raj -
How to change the attributes of GUI CONTROLS in my own program.
hi all,
i just want to change the attributes of GUI CONTROLS in my own program.
for example `
How to set an ICON on my GUI BUTTON in the program?
so what's the mapping between CONTROL in the SCREEN PAINTER and variable in the program?Hi Chao Liu,
Ya , u first find out the PF-STATUS of the screen and goto that status and now u can modify the ICON u want .
Finding the GUI status of the screen
Goto that TRANSACTION CODE or SCREEN
On the Standard Menu bar Goto ( Menu path) System --> Status
Now u get a pop-up System :status in that in SAP Data block u can find GUI Status. Now Double Click on that Status. It takes u to the Status of that screen.
Now click on the Display --> Change Button on the application tool bar.
If it is a standard GUI-status then it asks for the ACCESS KEY.
if it is a custom defined GUI Status then u can change the status .
reward if helpful
raam -
Urgent ...how to send output of sap through mail
Could you please guide me how to send output of SAP Script through mail in PDF format.
Thanks in Advance....
Regards,
Kumar.*& Report ZSPOOLTOPDF *
*& Converts spool request into PDF document and emails it to *
*& recipicant. *
*& Execution *
*& This program must be run as a background job in-order for the write *
*& commands to create a Spool request rather than be displayed on *
*& screen *
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver,
p_sender LIKE somlreci1-receiver,
p_delspl AS CHECKBOX.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
Write statement to represent report output. Spool request is created
if write statement is executed in background. This could also be an
ALV grid which would be converted to PDF without any extra effort
WRITE 'Hello World'.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
Alternative way could be to submit another program and store spool
id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
to sap-spool
spool parameters %_print
archive parameters %_print
without spool dynpro
and return.
Get spool id from program called above
IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
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.
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 = 'Subject'.
gd_attachment_desc = 'Attachname'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Message Body text, line 1'.
APPEND it_mess_bod.
it_mess_bod = 'Message Body text, line 2...'.
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
'Example .xls documnet attachment'
'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.
regards,
venkat -
Send output of smartforms by mail to a specified e-mail adress.
Dear all ,
How can I send output of smartforms to purchase order pdf format and send this pdf file to a specified e-mail address.
Best regards,
Merryzhang for the pdf you need to put the code as given below..........:-) .This include the complete sequence.
Converting the Smartform into PDF Format
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = C_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
ERR_BAD_OTF = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE 'Error in CONVERT_OTF'(049) TYPE C_MSGTYPE_I.
ENDIF.
Convert PDF from 132 to 255.
LOOP AT I_TLINE INTO W_TLINE.
TRANSLATE W_TLINE USING ' ~'.
CONCATENATE W_BUFFER W_TLINE INTO W_BUFFER.
APPEND W_BUFFER TO I_BUFFER.
ENDLOOP.
LOOP AT I_BUFFER INTO W_BUFFER.
TRANSLATE W_BUFFER USING '~'.
DO.
W_RECORDS = W_BUFFER.
APPEND W_RECORDS TO I_RECORD.
SHIFT W_BUFFER LEFT BY 255 PLACES.
IF W_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDLOOP.
Object with PDF.
I_OBJBIN[] = I_RECORD[].
Content of the email.
W_OBJTXT-LINE = 'Smartform_output is attched'(020).
APPEND W_OBJTXT TO I_OBJTXT.
*I_OBJTXT[] = I_RECORDS[].
DESCRIBE TABLE I_OBJTXT LINES V_LINES_BIN.
Document Data
CLEAR W_DOC_CHNG.
W_DOC_CHNG-OBJ_NAME = 'ZSAS_TRAVAGREE'.
W_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
W_DOC_CHNG-OBJ_DESCR = 'Form for Travel Agreement'(021).
W_DOC_CHNG-PRIORITY = C_HIGH_1.
W_DOC_CHNG-DOC_SIZE = V_LINES_BIN * 255.
Pack to main body as RAW.
Obj. to be transported not in binary form
Start line of object header in transport packet
CLEAR W_OBJPACK.
REFRESH I_OBJPACK.
I_OBJPACK-HEAD_START = 1.
Number of lines of an object header in object packet
I_OBJPACK-HEAD_NUM = 0.
Start line of object contents in an object packet
I_OBJPACK-BODY_START = 1.
Number of lines of the object contents in an object packet
I_OBJPACK-BODY_NUM = V_LINES_TXT.
Code for document class
I_OBJPACK-DOC_TYPE = 'RAW'.
CLEAR I_OBJPACK-TRANSF_BIN.
APPEND I_OBJPACK.
To specify the mail content and subject.
DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
Packing as PDF.
I_OBJPACK-TRANSF_BIN = 'X'.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_BIN.
I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
I_OBJPACK-DOC_TYPE = 'PDF'.
I_OBJPACK-OBJ_NAME = 'ZSAS_TRAVAGREE'.
I_OBJPACK-OBJ_DESCR = 'Form for Travel Agreement'(021).
APPEND I_OBJPACK.
Document information.
REFRESH I_RECLIST.
e-mail receivers.
W_RECVLIST-RECEIVER = G_MAIL_ID.
W_RECVLIST-EXPRESS = C_X.
W_RECVLIST-REC_TYPE = C_EXTERNAL_EMAIL. "Internet address
APPEND W_RECVLIST TO I_RECLIST.
REFRESH I_OBJHEAD.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = W_DOC_CHNG
PUT_IN_OUTBOX = C_X
COMMIT_WORK = C_X
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = W_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
RECEIVERS = I_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 <> 0.
ENDIF.
let me know if you wanna any help ....
Edited by: varghese oommen on Apr 29, 2009 10:16 AM -
Statusrecord 37:Sender partner number in control record is default
Hi all
I am sending MATMAS data from one R/3 to another R/3 in ALE.
when i am testing it from we19..... I'm the data is not sent insted it is being saved in database.
In WE05 I can see the following error.... and the lights are green.
statusrecord 37:Sender partner number in control record is default
Please help me
Thankyou
SIMONHi Joergen,
we also have similar problem to send out ordrsp. Could you tell me how to solve this problem as I saw tht this problem of yours has been answered.
Thanks inadvance for your reply,
Lily
Maybe you are looking for
-
Not able to view text while typing beyond the top edge of the keyboard
I have an iPad mini with updated iOS 8.1.3 ...... Honestly I was very happy with iOS 7 it was perfect. The iPad was working fast and effortlessly. Just like how any apple product should be. Until iOS 8 spoiled the show. There are many problems I'm fa
-
External drive crash.. need to export from ipod to itunes
hi, I was storing my itunes library for an ipod touch on an external drive due to space issue. This external drive crashed this yeek and I would like to restore all my music on itunes by exporting my current ipod library to itunes. Can i do that? how
-
BIG whammy of a problem, code 1418 and folder icon with exclamation mark!!
I think my ipod's gone to ****. A while ago while walking home listening to my ipod, it just stopped. Looked at it and saw the folder+ !. I searched the net and saw that it probably just needed to be restored. So i tried to restore it, it froze. Upda
-
MRKO posting to invoice issuer.
We have a scenario in consignment where the vendor is not created in the company code. The vendor doesn't have FI data so when the MRKO is processed to settle, the system get an error the vendor is not defined in the company code XXXX. In this scenar
-
Running LC ES 8.2.1.3 on MS Server 2003 with MSSQL 2005 and JBoss I have a stored procedure call that I have set up in workbench using the queryMultipleToXml service. I am able to connect fine and can get the data into an XML type output variable ca