Send output for Changed PO
HI all,
I am unable to re-send purchase order after making changes.
After making changes to a purchase order (ME22N) based on either a custom field = 'X' or po total value > $100,000, i like to re-send the output via email to the vendor. In Nace, i saw this program FM06AEND and routine Change-Flag. What is this FM06AEND for ? Also, do i need to do customization so i can re-send the output ? How does it detect my changes ?
When i put breakpoint in FM06AEND, it does not stop there.
thanks
Joyce
Edited by: Joyce Chan on May 11, 2010 2:29 PM
Edited by: Joyce Chan on May 11, 2010 2:39 PM
For your output type you have to maintiain Print operation - 2
Follow this menu path
OLME -- >messages -->output control -- message types -->Define message type for PO --> Fine tune conterol
maintain print operation - 2 change
For the current PO ,Goto ME22n ,click message , click repeat outpout on further data tab
Similar Messages
-
Output for changes versions in SRM
Hello,
We are currently trying to control when our SRM (server 550)system is to send output to our vendors, but the output is only to be sent if specific elements in an order is changed.
To do this we are using the table BBPD_COMP_FIELDS.
This works very well, there is just one problem that we cant seem to understand why.
If you created an order, then change the order with something that was not suppost to send output (because it is set in the table above) it sends the output. If you then change the same again it will not send out put (which is correct).
So what it does is for changes that shouldent send output when changed:
order --> output (correct)
change1 --> output (Wrong)
change2 --> no output (correct)
it should of been:
order --> output
change1 --> no output
change2 --> no output
Question is why and how do we get it to stop doing this?
Hope someone can help us.
Best Regards
Lisa M SimonsenHi
Use the PO version control BADi to change the version for the PO on identified field changes. In SPRO, out put conditions, trigger the change output when there is a change version of the document. This should work.
BBPD_COMP_FIELDS (with SM30). There is something mentioned about which fields to compare for PO output, you have to scroll some way down to get there.
Re: Changed PO output
Also, Please go through the following pointers, which might help you out.
Re: PO output fields
Re: Control PO output to vendor
Re: No Output Condition on Purchase Orders
Version Details
Do let me know.
Regards
- Atul -
SRM 7.0 Output for changed purchase order documents
Hi all,
if we change purchase orders we like to send a PO output document for changed purchase orders only if we change certain PO fields in header or items.
What is the functionality in PO - Header - Output - Order and Send Immediatelly ? We thought that this function is the solution!
But independent we press the button <Order and Send Immediatelly > or button <Order> the system creates allways an output document in any cases of PO field changes which will be sent to a supplier (fax, email). How we can control that a PO document only will be created in cases we define ?
Kind Regards
Edited by: Hermann-Josef Wessels on Mar 28, 2011 6:53 PMHi Jay,
we like to control the output because PO changes for G/L account, cost centre or change from account assigment order to cost centre are not interesting for the supplier and in this cases a PO document should not be sent to the supplier. This was the main reason why we like to use function <Order and Send Immediatelly>.
So I would like to clarify the requirement:
1. Automatic created output document if a new PO will be created
2. Automatic created output document if a PO will be changed but no output if the following fields will be changed:
e.g. for G/L account, cost centre or change from account assigment order to cost centre
So we come back in our discussion to table: BBPV_COMP_FIELDS. There are entries for POO = PO Output and POR = Version comparison for Purchase Order.
Question: Can I use structure name: BBP_PDS_ACC for our requirement. If yes which field-names I have to maintain in detail in this table. If possible I need the entries in detail.
Kind Regards
Edited by: Hermann-Josef Wessels on Mar 30, 2011 9:20 AM -
Problem with the External send output for Portugal in Smartforms
Hello All,
I am facing an issue with a particular outtype for external send for portugal country.The print priview is of different font than original font of the form.
But When the same output type is assigned with the print output the form is showing the font with the original fonts of the form.
can any one suggest the solution for this?Hello ,
Actually the same external send output type is working fine in the development system.This is having issue only in quality system.
And the condition records are maintained same in both dev system and quality system.
Does the capturing of Font play any Role...
I read some where that sometimes in translations a particular coutry might not hold the fonts.
Regards,
Varun -
Change order date if output for change order
Hi guys,
how do i pull the change order date on to the printout only if the output is for change order.I don't know much about change order.i would really appreciate your help.
Thanks
ChrisHi Cheris,
Assume you mentioned purchase order change date ?
Change document date won't be updated in the purchase order header table(EKKO) or purchase order item table(EKPO).Generally all the changes will updated in the CDHDR (Change doument header table ) with Object value <b>OBJECTID</b>( Doument number ex: purchase order ) , User name of the person responsible in change document <b>USERNAME</b> , Creation date of the change document <b>UDATE</b> and etc,..
In your case consider CDHDR- UDATE filed as change order date. While selecting the updated information from the table make join query bet'n EKKO, EKPO and CDHDR with required combination and show the change order date on the PO printout.
I hope this will helps for you.Thanks.
Regards,
SAP TN. -
WM: Sending output for delivery after changing quantity on TO by shipping control
Dear Experts:
You have to allow user to change quantity of delivery, for all kinds of reasons, for example, they didn't find enough inventory to ship!
There are options: at SPRO WM interface for shipping control, select copy WM quantity (to delivery), you can choose:
------ "1": copy quantity,
------ "2", copy quantity and post goods issue.
I want to choose "2", since after changing quantity at TO confirmation then going back to outbound delivery and Post Goods Issue becomes an extra step, since you are not changing anything there.
Now the problem is the output. Since the delivery quantity has been changed, another output must be sent with the new quantity.
The requirement (in output determination procedure) to trigger the output at Post Goods Issue is "1": Delivery GI posted.
Then for the output condtion, for the "Dispatch time", I tried "4".
In my testing, the delivery was updated with the new quantity and PGI was also completed, output was also created. Perfect, but DAMN, the output just doesn' go, It is yellow "0 Not processed".
I had to use VL02N, open the delivery, then save it, now it went out, "1 Successfully processed", since now the "Dispatch time", "4": Send immediately (When saving application), " is met..
I tried "Dispatch time", "3", and "1", doesn't work too.
So I could just set up shipping control ------ "1": just copy quantity and not to PGI, then get users to PGI with VL02N, it just makes me feel bad, I wanted to automate the last step, PGI and get my output with the new quantity, so Is it possible?
Thank you guys!
Regards
SimonDear Experts:
You have to allow user to change quantity of delivery, for all kinds of reasons, for example, they didn't find enough inventory to ship!
There are options: at SPRO WM interface for shipping control, select copy WM quantity (to delivery), you can choose:
------ "1": copy quantity,
------ "2", copy quantity and post goods issue.
I want to choose "2", since after changing quantity at TO confirmation then going back to outbound delivery and Post Goods Issue becomes an extra step, since you are not changing anything there.
Now the problem is the output. Since the delivery quantity has been changed, another output must be sent with the new quantity.
The requirement (in output determination procedure) to trigger the output at Post Goods Issue is "1": Delivery GI posted.
Then for the output condtion, for the "Dispatch time", I tried "4".
In my testing, the delivery was updated with the new quantity and PGI was also completed, output was also created. Perfect, but DAMN, the output just doesn' go, It is yellow "0 Not processed".
I had to use VL02N, open the delivery, then save it, now it went out, "1 Successfully processed", since now the "Dispatch time", "4": Send immediately (When saving application), " is met..
I tried "Dispatch time", "3", and "1", doesn't work too.
So I could just set up shipping control ------ "1": just copy quantity and not to PGI, then get users to PGI with VL02N, it just makes me feel bad, I wanted to automate the last step, PGI and get my output with the new quantity, so Is it possible?
Thank you guys!
Regards
Simon -
Hi,
How can we send mail for change in cost, budget, date ?
Also give some workflow related with PS.In std SAP internal mail is available for budgets
Please see transaction SWDM for standard workflows available in SAP
Please also read SAP help before posting such questions -
T-code SUIM taking much more time for generating output for profie change.
Hi All
We want to extract report for profile addition and deletion for Users in ECC 6. While executing the the t-code SUIM it is taking much more time (taking more than 20 hrs). This problem is coming after patch application
Please give the solution/Suggest to minimize the time taken in report generation.
Thanks-
Guru Prasad DwivediHello Prasad,
The reason for the performance trouble is a new feature regarding the user change documents. Since note 874850 and 1015043 you will get a more complete overview about the changes regarding a user.
The disadvantage of that new feature is, that in some customer system usage scenario, the performance is very poor. That's the case, if the central change documents are intensivly used also by other applications and the tables CDPOS, CDHDR, ... contains a very big count of rows. Unfortunatly the user change documents can not be searched by the key columns of the central change docs. - so the bad response time can explained.
What now ... ?
There are some work arounds to get the change documents on faster way.
1st. - You can get the former report output and performance if you
would use the report RSUSR100 instead of the new RSUSR100N in
separate mode.
2nd. - If you want to use the new report RSUSR100N directly and only
want to get the information about the traditional topics
(content of USH* tables) you should only mark the search areas
on the tabstrip 'user attributes') to get a better performance.
- furthermore limit the date range, if possible
3rd. - You should regulary (monthly) archive the user relevant documents
for PFCG and IDENTITY from the central change documents.
As per our note 1079207 chapter 3 you can reload that archives
into more selective tables.
The selection for change documents will be rather faster over
reloaded archived documents than the documents in the
central change documents tables.
Best Regards,
Guilherme de Oliveira. -
Hello there .. When I want to change my security question I can't and show me Emil not for me to send the information for change the security question how to fix this problem
Alternatives for Help Resetting Security Questions and/or Rescue Mail
1. If you have a rescue email address or a Security Questions issue, then see:
If you forgot the answers to your Apple ID security questions - Apple Support.
Manage your Apple ID primary, rescue, alternate, and notification email addresses - Apple Support
2. Fill out and submit this form. Select the topic, Account Security. You must
have a Rescue Email to use this option.
3. This is the only option if you do not already have a valid Rescue Email.
These are telephone numbers for contacting Apple Support in your country.
Apple ID- Contacting Apple for help with Apple ID account security. Select
the appropriate country and call. Ask to speak to the Account Security Team.
4. Account security issues almost always require you to speak directly to an
Apple representative to securely establish your identity as the account holder.
You can set it up so that Apple calls you, either immediately or at a time
convenient to you.
1. Go to www.apple.com/support.
2. Choose Contact Support and click Contact Us.
3. Choose Other Apple ID Topics and choose the appropriate topic for
your issue.
4. Follow the onscreen instructions.
Note: If you have already forgotten your security questions, then you cannot
set up a rescue email address in order to reset them. You must set up
the rescue email address beforehand.
Your Apple ID: Manage My Apple ID.
Apple ID- All about Apple ID security questions. -
Changing power output for Airport Extreme Card
How do you change the power output for the Airport Extreme Card? Is there a program that I can download to change airport's settings or the Airport Extreme Card's settings?
i.e. If the default power output for the Airport Extreme Card is 18mW, I would like to increase it to 25mW.There is no way for a user to control the power output of the AirPort Extreme card.
Furthermore if the card was manufactured to output 18mW there is no magical way to increase it's physical ability so it can output more power. -
I have forgotten the answer to one of two My Apple ID security questions. Apple has supplied the solution to that problem online in Edit Your Apple ID. I would be happy to follow those instructions, except......the only email address the Edit Your Apple ID page will allow me is one that has not been functional for over a year. There are no options for changing that recovery email address since I only have two security questions, not three, as Apple specifies. Neither can I find an option for switching to the two-stage verification process---although I would rather not do this. I recently edited my email addresses in My Apple ID on my Sony Vaio laptop in an effort to alleviate the problem, but it didn’t help. I use the Apple ID on an iPad (4th gen Wi-Fi + Cellular MM) and two iPhone 5 (IOS 8). Does anyone have suggestions? Feel that I've read through all the fine print and cannot locate an answer.
You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
(113199) -
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 -
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 -
Email Sender Name not changed as per note-788626
Hi,
We have scenario where WebApplication are posting orders into ECC via SAP XI in the form of IDOC. Once Orders are placed in ECC, we want to send confirmation email back to web customers with Order number. As per note#788626, We have put in the logic for changing the generic sender name as internet address in the driver program calling smartforms and send as attachment. This driver program is atttached to output type via transaction NACE for Transmission Mediom - 5 (External Send). NOW, The program - RBDAPP01 which posts IDOC into ECC is scheduled through a JOB Scheduling tool in ECC.
Surprisingly, the emails are getting triggered with sendername (userid) of Job Scheduling tool. But we want sender name as generic internet address. The custom code as per note - 788626 is not changing the sender name. Am i doing anything wrong here ?
Regards,
SarangSorry, but I don't believe you can do that. I've never heard of it or seen it done.
-
ABAP coding required in order to send Output via External Send (5)
Hi
I require some coding to an ABAP program in order for my SD output to be succesfully sent by 'external send'
I have a shipping output type.
assigned Partner functions and applicable mediums - 1, 2 and 5
however when trying to produce output via comm method 5, external send, i am gettting red error messages/ traffic ligh
processing log is as follows:-
"processing log for program xxxxxxxx routine ENTRY
Please enter an address number
communication type cannot be used"
all outputs for medium types 2 Fax and 1 print are all OK for all Partner functions involved
I have changed to another output which works fine,:- altho as this was written specifically for another outut,and form, so there is a lot of data missing on the form with this program.
we have tried to deciper the coding on the program that does work, but to no avail
Many thanks for your help on this matter
TonyYou need to maintain/fill ADDR_KEY structure in the print program....
Maybe you are looking for
-
Running seeded OAF page in JDeveloper
I'm trying to run a seeded OAF page in Jdeveloper. I get error when i try to run (right click and run on the page). Steps followed to load the page in JDeveloper... 1. zip JAVA_TOP and load in myclasses in JDeveloper 2. zip MDS file (for OKC) and loa
-
Help needed in using POI for manipulating Word files
Hi , I am new to POI. I have to take multiple files as input and write them to an output word file using POI.The input files may be word files, jpg or or any other image files and excel sheets also. Is this possible using POI?Is there any example sou
-
"Copy to this computer" depends on whether the remote user is logged in
I want to gather a file from a client computer with the Spotlight search. The file's name is "polaranimalreport.doc". If the user of the account where the file is saved is logged in, this is what I see: and I am able to copy it to my computer. If the
-
Mac Pro SpeedTest MUCH Slower Than MacBook!?!?!?
I just upgraded my cable modem to a DOCSIS 3.0 model. My Mac Pro consistently gets 4 Kb/sec whereas my MacBook, Mac Mini, and a PC all consistently get 15+ Kb/sec. I've tested the MacPro with the same physical ethernet connection as the MacBook and g
-
I have a new iPhone5 and am getting 4G and 2 bars. When I program in an address and try to get a map, the maps program tells me "Search Results Not Available - Maps cannot connect to the interenet" Or something like "cannot connect to server". I ge