Send External email only when PR's created
Hi
i need help in the following workflow scenario
I need to send the external Email (outlook,gmail etc) from workflow on a daily basis..
The body of email should contain the purchase requisitions created for a particular day
if there are no PR's Created ..we should not send an email.
Approve and Reject are not necessary for now...
Please let me know how to approach this scenario..
Thanks
Madhusudhan
Hi Madhu,
You need to identify the BO to be used for PR (for Overall PR its BUS2105, Item wise PR its BUS2009).
Check if you can use the existing events else, create a Z-BO, delegate it to std BO and add an event CREATED.
Trigger this event when ever the PR is created.
Use this event as the triggering event of the workflow.
In the workflow add a send mail step to send mail to the desired user email address.
You can also use Action profiles to achieve the same.
Hope this helps!
Regards,
Saumya
Similar Messages
-
Serv. Desk: Action: send an email only when a value in a field has changed
Hello,
In Soution Manager 4.0, Sevice Desk, I would like to create an action which creates an email only when a value of a certain field has changed.
- only in change mode relevant
- only when a value of one field has changed (e.g. Message Processort has changed from Buss. Partner 4 to 5. Than a mail should be sent to BP 5).
- it should only send this kind of email when the field value has changed in change mode. In other words: it should not sent the email e.g. when the status has changed.
I tried all kinds of things but I do not know on how to define the COnditions for an Action, so I can compare e.g.
if <old value> <> <new value>
Any ideas or experience on how to implement this without major modifications ?
Thanks
ChristianHi Christian,
check out my question on SDN.
Email on Status Change
it has details on how to send an email when the status changes. I believe you are going to have to do something like this for each of the fields you want to create an Action Starting Condition for.
regards,
Jason -
Please help in senplease help in smartform send external email send.
hii all,
pleaseeeeeeeee help in sending external email in smartform print program.
i need for RLB_INVOICE order confirmation to send thru email.
what to code in ZRLN_INVOICE . i copied RLB_INVOICE in zprog.
so what rthe changes i need to code in driver program?
pleaseeeeeeee help with sample coding..Here is the code to send the Smartform to mail as PDF attachment.
*& Report ZTEST_PDF_MAIL
REPORT ZTEST_PDF_MAIL.
Internal Table declarations
DATA: I_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
I_RECEIVERS TYPE TABLE OF SOMLRECI1 WITH HEADER LINE,
I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
Objects to send mail.
I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
Work Area declarations
WA_OBJHEAD TYPE SOLI_TAB,
W_CTRLOP TYPE SSFCTRLOP,
W_COMPOP TYPE SSFCOMPOP,
W_RETURN TYPE SSFCRESCL,
WA_DOC_CHNG TYPE SODOCCHGI1,
W_DATA TYPE SODOCCHGI1,
WA_BUFFER TYPE STRING, "To convert from 132 to 255
Variables declarations
V_FORM_NAME TYPE RS38L_FNAM,
V_LEN_IN LIKE SOOD-OBJLEN,
V_LEN_OUT LIKE SOOD-OBJLEN,
V_LEN_OUTN TYPE I,
V_LINES_TXT TYPE I,
V_LINES_BIN TYPE I.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZTEST'
IMPORTING
FM_NAME = V_FORM_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.
W_CTRLOP-GETOTF = 'X'.
W_CTRLOP-NO_DIALOG = 'X'.
W_COMPOP-TDNOPREV = 'X'.
CALL FUNCTION V_FORM_NAME
EXPORTING
CONTROL_PARAMETERS = W_CTRLOP
OUTPUT_OPTIONS = W_COMPOP
USER_SETTINGS = 'X'
IMPORTING
JOB_OUTPUT_INFO = W_RETURN
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.
I_OTF[] = W_RETURN-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = V_LEN_IN
TABLES
OTF = I_OTF
LINES = I_TLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
ENDIF.
LOOP AT I_TLINE.
TRANSLATE I_TLINE USING '~'.
CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
ENDLOOP.
TRANSLATE WA_BUFFER USING '~'.
DO.
I_RECORD = WA_BUFFER.
APPEND I_RECORD.
SHIFT WA_BUFFER LEFT BY 255 PLACES.
IF WA_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Attachment
REFRESH: I_RECLIST,
I_OBJTXT,
I_OBJBIN,
I_OBJPACK.
CLEAR WA_OBJHEAD.
I_OBJBIN[] = I_RECORD[].
Create Message Body Title and Description
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 = 'smartform'.
WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
WA_DOC_CHNG-SENSITIVTY = 'F'.
WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
Main Text
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.
Attachment (pdf-Attachment)
I_OBJPACK-TRANSF_BIN = 'X'.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
READ TABLE I_OBJBIN INDEX V_LINES_BIN.
I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
I_OBJPACK-BODY_NUM = V_LINES_BIN.
I_OBJPACK-DOC_TYPE = 'PDF'.
I_OBJPACK-OBJ_NAME = 'smart'.
I_OBJPACK-OBJ_DESCR = 'test'.
APPEND I_OBJPACK.
CLEAR I_RECLIST.
I_RECLIST-RECEIVER = '[email protected]'.
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 = WA_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.
WRITE:/ 'Error When Sending the File', SY-SUBRC.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.
If you want to send some text as Body of the Mail then follow this once
when u r callin the FM'SO_NEW_DOCUMENT_ATT_SEND_API1'.. points to remember
1.u have to pass the body of content in table CONTENTS_TXT(ia m using I_OBJBIN) (each line a record) then. suppose i have appended 11 records to the table CONTENTS_TXT .
2.PACKING_LIST(iam usign I_OBJPACK) table u ahve to append a redord as follows
I_OBJPACK-TRANSF_BIN = ' '.
I_OBJPACK-HEAD_START = 000000000000001.
I_OBJPACK-HEAD_NUM = 000000000000001.
I_OBJPACK-BODY_START = 000000000000002
I_OBJPACK-BODY_NUM = 000000000000010.
I_OBJPACK-DOC_TYPE = 'RAW'.
append I_OBJPACK-.
by the above code system treat the first line in table I_OBJBIN as header and the 2nd line to 10 lines tread as body.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_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.
regards,
srinivas -
I am unable to send an email with an attachment I created in Pages version 5.0.1. It also prevented me from sending out any other emails with or without an attachment. I finally fixed my email so I could send out again but when I tried to send an attachment created in Pages it wouldn't allow it. Can someone help me, please! Thanks!
Pages 5 is having problems with GMail, Google and Yahoo. Dropbox may have fixed their problem with an update.
Along with this problem and others, Apple has removed over 90 features from Pages 5.
http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
Pages '09 should still be in your Applications/iWork folder.
Archive/trash Pages 5 and rate/review it in the App Store, then get back to work.
Peter -
Need to send external email with attachment for workflow 20000075
Hello Everyone,
I am new to W/F, I Need to send external email with attachment for PO Release W/F 20000075. Currently Work item is being sent to SAP inbox of required user based on PO Release strategy configuration in SPRO. I tried to create Send mail step after PO release event but I am not sure how to arrive at Recipient type in send mail step(the mail should be sent to person in the release strategy). Everything looks fine all I need to do is to send external email with attachment instead of sending work item into SAP inbox.
Your help will be highly appreciated.
Thanks.You can use extended notifications to send an e-mail message with a link to the workitem. Search for extended notifications in SDN.
Regards,
Martin -
Sending external email from SAP with following requirements...
Hi All,
I need to send external emails from SAP by meeting following requirements.
1) With subject line more than 100 characters.
2) No attachments, only body which has specific format (blueprint/layout) and would be amended often, hence code shouldn't be touched during amendments.
3) Should be able to know the success/failure of mail sending at program level.Hi,
The code below demonstrates how to send an email to an external email address
*& Report ZSENDEMAIL *
*& Example of sending external email via SAPCONNECT *
REPORT zsendemail .
PARAMETERS: psubject(40) type c default 'Hello',
p_email(40) type c default '[email protected]' .
data: it_packing_list like sopcklsti1 occurs 0 with header line,
it_contents like solisti1 occurs 0 with header line,
it_receivers like somlreci1 occurs 0 with header line,
it_attachment like solisti1 occurs 0 with header line,
gd_cnt type i,
gd_sent_all(1) type c,
gd_doc_data like sodocchgi1,
gd_error type sy-subrc.
data: it_message type standard table of SOLISTI1 initial size 0
with header line.
*START-OF-SELECTION.
START-OF-SELECTION.
Perform populate_message_table.
*Send email message, although is not sent from SAP until mail send
*program has been executed(rsconn01)
PERFORM send_email_message.
*Instructs mail send program for SAPCONNECT to send email(rsconn01)
perform initiate_mail_execute_program.
*& Form POPULATE_MESSAGE_TABLE
Adds text to email text table
form populate_message_table.
Append 'Email line 1' to it_message.
Append 'Email line 2' to it_message.
Append 'Email line 3' to it_message.
Append 'Email line 4' to it_message.
endform. " POPULATE_MESSAGE_TABLE
*& Form SEND_EMAIL_MESSAGE
Send email message
form send_email_message.
Fill the document data.
gd_doc_data-doc_size = 1.
Populate the subject/generic message attributes
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SAPRPT'.
gd_doc_data-obj_descr = psubject.
gd_doc_data-sensitivty = 'F'.
Describe the body of the message
clear it_packing_list.
refresh it_packing_list.
it_packing_list-transf_bin = space.
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
describe table it_message lines it_packing_list-body_num.
it_packing_list-doc_type = 'RAW'.
append it_packing_list.
Add the recipients email address
clear it_receivers.
refresh it_receivers.
it_receivers-receiver = p_email.
it_receivers-rec_type = 'U'.
it_receivers-com_type = 'INT'.
it_receivers-notif_del = 'X'.
it_receivers-notif_ndel = 'X'.
append it_receivers.
Call the FM to post the message to SAPMAIL
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = gd_doc_data
put_in_outbox = 'X'
importing
sent_to_all = gd_sent_all
tables
packing_list = it_packing_list
contents_txt = it_message
receivers = it_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.
Store function module return code
gd_error = sy-subrc.
Get it_receivers return code
loop at it_receivers.
endloop.
endform. " SEND_EMAIL_MESSAGE
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
form initiate_mail_execute_program.
wait up to 2 seconds.
if gd_error eq 0.
submit rsconn01 with mode = 'INT'
with output = 'X'
and return.
endif.
endform. " INITIATE_MAIL_EXECUTE_PROGRAM
Hope this helps.
Reward if helpful.
Regards,
Sipra -
To send external email from ABAP
How to send external email from ABAP Program and what are the settings to be done for the same ?
Please check..
Sending External email through SAP
What is the FM for sending the external email through SAP by attaching layout set to it?
These are the FM for sending external email :-
SO_DOCUMENT_SEND_API1
SAPoffice: Send new document with attachments via RFC
SO_NEW_DOCUMENT_ATT_SEND_API1
(In 4.6C only, You can go to SE37 and click the documentation on how to use it. A sample program is provided there.)
SAPoffice: Send new document with attachments via RFC
Note : If you are using FM SO_NEW_DOCUMENT_ATT_SEND_API1 then Export Parameter DOCUMENT_DATA-OBJ_DESCR contains the Subject.
SO_NEW_DOCUMENT_SEND_API1
SAPoffice: Send new document
How to send a report to an external mail-id?
Try this sample code :-
REPORT ZREPORT_TO_EMAIL NO STANDARD PAGE HEADING LINE-SIZE 200.
DATA : BEGIN OF ITAB OCCURS 0,
PERNR LIKE PA0001-PERNR,
ENAME LIKE PA0001-ENAME,
END OF ITAB.
DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
listobject LIKE abaplist OCCURS 10,
compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
w_object_hd_change LIKE sood1,
compressed_size LIKE sy-index.
START-OF-SELECTION.
SELECT PERNR ENAME
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM PA0001
WHERE PERNR < 50.
LOOP AT ITAB.
WRITE :/02 SY-VLINE , ITAB-PERNR, 15 SY-VLINE , ITAB-ENAME, 50
SY-VLINE.
ENDLOOP.
Receivers
receiver_list-recextnam = '[email protected]'. "-->
EMAIL ADDRESS
RECEIVER_list-RECESC = 'E'. "<-
RECEIVER_list-SNDART = 'INT'."<-
RECEIVER_list-SNDPRI = '1'."<-
APPEND receiver_list.
General data
w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Object name'.
w_object_hd_change-objsns = 'P'.
Mail subject
w_object_hd_change-objdes = 'Message subject'.
Mail body
APPEND 'Message content' TO message_content.
Attachment
CALL FUNCTION 'SAVE_LIST'
EXPORTING
list_index = '0'
TABLES
listobject = listobject.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
compressed_size = compressed_size
TABLES
in = listobject
out = compressed_attachment.
DESCRIBE TABLE compressed_attachment.
CLEAR packing_list.
packing_list-transf_bin = 'X'.
packing_list-head_start = 0.
packing_list-head_num = 0.
packing_list-body_start = 1.
packing_list-body_num = sy-tfill.
packing_list-objtp = 'ALI'.
packing_list-objnam = 'Object name'.
packing_list-objdes = 'Attachment description'.
packing_list-objlen = compressed_size.
APPEND packing_list.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = w_object_hd_change
object_type = 'RAW'
owner = sy-uname
TABLES
objcont = message_content
receivers = receiver_list
packing_list = packing_list
att_cont = compressed_attachment. -
Disallow sending External email
Hi, how to configure Exchange 2013 to disallow certain users to send external email
Hi,
As what DareDevil57 mentioned above, we can create a transport rule to meet this requirement.
Here is an article about transport rule for your reference.
Transport Rules:
http://social.technet.microsoft.com/Forums/en-US/dedce6eb-f4b9-42be-b732-dba691b6c284/disallow-sending-external-email?forum=exchangesvradmin
Hope this helps.
Best regards,
Belinda
Belinda Ma
TechNet Community Support -
How to use Apple Mail to send outgoing emails only?
Hello,
I haven't been able to find exactly what I'm looking for elsewhere on the interwebs.
I want to be able to set up the Apple Mail app on my Mac to send outgoing emails only from my Gmail account. I use the Gmail website and my iPhone for sending/receiving emails and I don't want or have a need for all of my Gmail emails to be downloaded into the Apple Mail app or for new emails to appear in the Mail app as they come in.
I just want to be able to send outgoing emails from the app so that I can send photos directly from iPhoto using the Email button. Any help is greatly appreciated!Great news, thanks!
-
Sending external email via SAPCONNECT
Hi all,
I want to know how to send external email through sap.
Thanks in advance,
Manosh.HI,
Try this code:
*& Report ZSENDEMAIL *
*& Example of sending external email via SAPCONNECT *
REPORT zsendemail .
PARAMETERS: psubject(40) type c default 'Hello',
p_email(40) type c default '[email protected]' .
data: it_packing_list like sopcklsti1 occurs 0 with header line,
it_contents like solisti1 occurs 0 with header line,
it_receivers like somlreci1 occurs 0 with header line,
it_attachment like solisti1 occurs 0 with header line,
gd_cnt type i,
gd_sent_all(1) type c,
gd_doc_data like sodocchgi1,
gd_error type sy-subrc.
data: it_message type standard table of SOLISTI1 initial size 0
with header line.
*START-OF-SELECTION.
START-OF-SELECTION.
Perform populate_message_table.
*Send email message, although is not sent from SAP until mail send
*program has been executed(rsconn01)
PERFORM send_email_message.
*Instructs mail send program for SAPCONNECT to send email(rsconn01)
perform initiate_mail_execute_program.
*& Form POPULATE_MESSAGE_TABLE
Adds text to email text table
form populate_message_table.
Append 'Email line 1' to it_message.
Append 'Email line 2' to it_message.
Append 'Email line 3' to it_message.
Append 'Email line 4' to it_message.
endform. " POPULATE_MESSAGE_TABLE
*& Form SEND_EMAIL_MESSAGE
Send email message
form send_email_message.
Fill the document data.
gd_doc_data-doc_size = 1.
Populate the subject/generic message attributes
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SAPRPT'.
gd_doc_data-obj_descr = psubject.
gd_doc_data-sensitivty = 'F'.
Describe the body of the message
clear it_packing_list.
refresh it_packing_list.
it_packing_list-transf_bin = space.
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
describe table it_message lines it_packing_list-body_num.
it_packing_list-doc_type = 'RAW'.
append it_packing_list.
Add the recipients email address
clear it_receivers.
refresh it_receivers.
it_receivers-receiver = p_email.
it_receivers-rec_type = 'U'.
it_receivers-com_type = 'INT'.
it_receivers-notif_del = 'X'.
it_receivers-notif_ndel = 'X'.
append it_receivers.
Call the FM to post the message to SAPMAIL
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = gd_doc_data
put_in_outbox = 'X'
importing
sent_to_all = gd_sent_all
tables
packing_list = it_packing_list
contents_txt = it_message
receivers = it_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.
Store function module return code
gd_error = sy-subrc.
Get it_receivers return code
loop at it_receivers.
endloop.
endform. " SEND_EMAIL_MESSAGE
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
form initiate_mail_execute_program.
wait up to 2 seconds.
if gd_error eq 0.
submit rsconn01 with mode = 'INT'
with output = 'X'
and return.
endif.
endform. " INITIATE_MAIL_EXECUTE_PROGRAM
Reward points if found helpful....
Cheers,
Chandra Sekhar. -
Sending an email notification when an IDOC get failed
Hi Experts,
Can anybody tell how i can send an email notification when my Idoc fails.
Regards,
Ratheeshreport zalv10.
type-pools: slis.
data: g_repid like sy-repid,
gs_print type slis_print_alv,
gt_list_top_of_page type slis_t_listheader,
gt_events type slis_t_event,
gt_sort type slis_t_sortinfo_alv,
gs_layout type slis_layout_alv,
gt_fieldcat type slis_t_fieldcat_alv,
fieldcat_ln like line of gt_fieldcat,
col_pos type i.
data: begin of itab,
field1(5) type c,
field2(5) type c,
field3(5) type p decimals 2,
end of itab.
data: begin of itab1 occurs 0.
include structure itab.
data: end of itab1.
data: begin of itab_fieldcat occurs 0.
include structure itab.
data: end of itab_fieldcat.
Print Parameters
parameters:
p_print as checkbox default ' ', "PRINT IMMEDIATE
p_nosinf as checkbox default 'X', "NO SELECTION INFO
p_nocove as checkbox default ' ', "NO COVER PAGE
p_nonewp as checkbox default ' ', "NO NEW PAGE
p_nolinf as checkbox default 'X', "NO PRINT LIST INFO
p_reserv type i. "NO OF FOOTER LINE
initialization.
g_repid = sy-repid.
perform print_build using gs_print. "Print PARAMETERS
start-of-selection.
TEST DATA
move 'TEST1' to itab1-field1.
move 'TEST1' to itab1-field2.
move '10.00' to itab1-field3.
append itab1.
move 'TEST2' to itab1-field1.
move 'TEST2' to itab1-field2.
move '20.00' to itab1-field3.
append itab1.
do 50 times.
append itab1.
enddo.
end-of-selection.
perform build.
perform eventtab_build changing gt_events.
perform comment_build changing gt_list_top_of_page.
perform call_alv.
form build.
DATA FIELD CATALOG
Explain Field Description to ALV
data: fieldcat_in type slis_fieldcat_alv.
clear fieldcat_in.
fieldcat_ln-fieldname = 'FIELD1'.
fieldcat_ln-tabname = 'ITAB1'.
*FIELDCAT_LN-NO_OUT = 'X'. "FIELD NOT DISPLAY, CHOOSE FROM LAYOUT
fieldcat_ln-key = ' '. "SUBTOTAL KEY
fieldcat_ln-no_out = ' '.
fieldcat_ln-seltext_l = 'HEAD1'.
append fieldcat_ln to gt_fieldcat.
clear fieldcat_in.
fieldcat_ln-fieldname = 'FIELD2'.
fieldcat_ln-tabname = 'ITAB1'.
fieldcat_ln-no_out = 'X'.
fieldcat_ln-seltext_l = 'HEAD2'.
append fieldcat_ln to gt_fieldcat.
clear fieldcat_in.
fieldcat_ln-fieldname = 'FIELD3'.
fieldcat_ln-tabname = 'ITAB1'.
fieldcat_ln-ref_fieldname = 'MENGE'. "<- REF FIELD IN THE DICTIONNARY
fieldcat_ln-ref_tabname = 'MSEG'. "<- REF TABLE IN THE DICTIONNARY
fieldcat_ln-no_out = ' '.
fieldcat_ln-do_sum = 'X'. "SUM UPON DISPLAY
append fieldcat_ln to gt_fieldcat.
DATA SORTING AND SUBTOTAL
data: gs_sort type slis_sortinfo_alv.
clear gs_sort.
gs_sort-fieldname = 'FIELD1'.
gs_sort-spos = 1.
gs_sort-up = 'X'.
gs_sort-subtot = 'X'. ***CRUCIAL STATEMENT****
append gs_sort to gt_sort.
clear gs_sort.
gs_sort-fieldname = 'FIELD2'.
gs_sort-spos = 2.
gs_sort-up = 'X'.
*GS_SORT-SUBTOT = 'X'. **THIS SHOULD NOT BE UNCOMENTED*
append gs_sort to gt_sort.
endform.
form call_alv.
ABAP List Viewer
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = g_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
i_structure_name = 'ITAB1'
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = gt_sort[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = gt_events[]
IT_EVENT_EXIT =
is_print = gs_print
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = itab1
exceptions
program_error = 1
others = 2.
endform.
HEADER FORM
form eventtab_build changing lt_events type slis_t_event.
constants:
gc_formname_top_of_page type slis_formname value 'TOP_OF_PAGE'.
*GC_FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE'.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = lt_events.
read table lt_events with key name = slis_ev_top_of_page
into ls_event.
if sy-subrc = 0.
move gc_formname_top_of_page to ls_event-form.
append ls_event to lt_events.
endif.
define END_OF_PAGE event
READ TABLE LT_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_END_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO LT_EVENTS.
ENDIF.
endform.
form comment_build changing gt_top_of_page type slis_t_listheader.
data: gs_line type slis_listheader.
clear gs_line.
gs_line-typ = 'H'.
gs_line-info = 'HEADER 1'.
append gs_line to gt_top_of_page.
clear gs_line.
gs_line-typ = 'S'.
gs_line-key = 'STATUS 1'.
gs_line-info = 'INFO 1'.
append gs_line to gt_top_of_page.
gs_line-key = 'STATUS 2'.
gs_line-info = 'INFO 2'.
append gs_line to gt_top_of_page.
CLEAR GS_LINE.
GS_LINE-TYP = 'A'.
GS_LINE-INFO = 'ACTION'.
APPEND GS_LINE TO GT_TOP_OF_PAGE.
endform.
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = gt_list_top_of_page.
write: sy-datum, 'Page No', sy-pagno left-justified.
endform.
form end_of_page.
write at (sy-linsz) sy-pagno centered.
endform.
PRINT SETTINGS
form print_build using ls_print type slis_print_alv.
ls_print-print = p_print. "PRINT IMMEDIATE
ls_print-no_print_selinfos = p_nosinf. "NO SELECTION INFO
ls_print-no_coverpage = p_nocove. "NO COVER PAGE
ls_print-no_new_page = p_nonewp.
ls_print-no_print_listinfos = p_nolinf. "NO PRINT LIST INFO
ls_print-reserve_lines = p_reserv.
endform.deepakb
Posts: 3
Joined: Mon Nov 17, 2003 8:18 am
Location: Mumbai -
My iPhones email app is not checking automatically for emails, only when I open it.. How to fix?
Settings > Mail, Contacts, Calendars > Fetch New Data > On
then scroll down to bottom of that page to check whether you want to fetch email:
every 15 minutes
every 30 minutes
hourly
manually -
Send different email notifications when a request is rejected/completed
Hi Friends,
I have developed a SOA composite in OIM 11g. And I am getting the same email notification when a request is fully completed or when it is rejected by an approver. How to send diffrerent email notification when a request is completed and when it is rejected by an approver.There are multiple ways in which you can do it.
1. Modify your SOA composite and change the notification properties in the .task. Here change the status of the event and configure different notifications for different events.
2. Use the Request Status change plugin in OIM to send the notification and remove all notification from SOA composite.
3. Use explicit notification service in the SOA composite and attach the notification service component at appropriate places in the SOA workflow. Additionally remove the notification configuration from the .task
-Bikash -
I use FM SO_OBJECT_SEND to send external email in my Z program but the output always in attachment format, depend on the format i specified (pdf,htm,txt,xls). I want the output to be in standard email body. How to do it?
Hi,
Can you please send your code or check if you are passing att_cont parameter in your function module. I would suggest you to use SO_NEW_DOCUMENT_SEND_API1 function module to send mail.
Also find the code below for your reference.
REPORT z_test_email_sending.
DATA: t_reclist TYPE TABLE OF somlreci1,
wa_receiver LIKE LINE OF t_reclist,
objcont TYPE TABLE OF solisti1,
subject TYPE TABLE OF solisti1,
objline TYPE solisti1,
w_line_count TYPE i,
doc_chng TYPE sodocchgi1,
offset type i.
CONSTANTS c_sep TYPE c VALUE '|'.
DATA : BEGIN OF mail_line OCCURS 0,
sep0,
model_year(6),
sep1,
mf(4),
sep2,
type(5),
sep3,
variant(14),
sep4,
kitype(5),
sep5,
option(8),
sep6,
color(8),
sep7,
uph(11),
sep8,
struc_week(10),
sep9,
END OF mail_line.
*construct the message and the e-mail
wa_receiver-receiver = receivers mail id.
* Email Subject
doc_chng-obj_name = 'test mail'.
MOVE 'Cost Error from SAP' TO doc_chng-obj_descr.
doc_chng-obj_langu = sy-langu.
* doc_chng-SENSITIVTY = 'P'.
* Email body
CLEAR objline.
CONCATENATE 'This is an automatically generated email'
'Please do not reply to this email.'
INTO objline SEPARATED BY space.
APPEND objline TO objcont.
CLEAR objline.
APPEND objline TO objcont.
CONCATENATE 'Cost errors in SAP as on' sy-datum INTO
objline SEPARATED BY space.
APPEND objline TO objcont.
CLEAR objline.
CLEAR objline.
APPEND objline TO objcont.
* horizontal line at beginning of records
DO 80 TIMES.
IF sy-index = 1.
* objline+sy-index(1) = ' '.
continue.
ELSE.
offset = sy-index - 1.
objline+offset(1) = '-'.
ENDIF.
ENDDO.
clear offset.
APPEND objline TO objcont.
CLEAR objline.
mail_line-sep0 = c_sep.
mail_line-model_year = 'Model Yr'.
mail_line-sep1 = c_sep.
mail_line-mf = 'Mf'.
mail_line-sep2 = c_sep.
mail_line-type = 'Type'.
mail_line-sep3 = c_sep.
mail_line-variant = 'Variant'.
mail_line-sep4 = c_sep.
mail_line-kitype = 'Ki-type'.
mail_line-sep5 = c_sep.
mail_line-option = 'Option'.
mail_line-sep6 = c_sep.
mail_line-color = 'Color'.
mail_line-sep7 = c_sep.
mail_line-uph = 'Upholstery'.
mail_line-sep8 = c_sep.
mail_line-struc_week = 'Str_week'.
mail_line-sep9 = c_sep.
MOVE mail_line TO objline.
APPEND objline TO objcont.
CLEAR mail_line.
CLEAR objline.
* horizontal line at beginning of records
*horizontal line at beginning of records
DO 80 TIMES.
IF sy-index = 1.
* objline+sy-index(1) = ' '.
continue.
ELSE.
offset = sy-index - 1.
objline+offset(1) = '-'.
ENDIF.
ENDDO.
clear offset.
APPEND objline TO objcont.CLEAR objline.
DO 5 TIMES.
mail_line-sep0 = c_sep.
mail_line-model_year = 'xxxx'.
mail_line-sep1 = c_sep.
mail_line-mf = 'xxx'.
mail_line-sep2 = c_sep.
mail_line-type = 'xxx'.
mail_line-sep3 = c_sep.
mail_line-variant = 'xxxx xxxxx'.
mail_line-sep4 = c_sep.
mail_line-kitype = 'xxx'.
mail_line-sep5 = c_sep.
mail_line-option = 'xxxxxx'.
mail_line-sep6 = c_sep.
mail_line-color = 'xxxxxx'.
mail_line-sep7 = c_sep.
mail_line-uph = 'xxxxxx'.
mail_line-sep8 = c_sep.
mail_line-struc_week = 'xxxxxx'.
mail_line-sep9 = c_sep.
MOVE mail_line TO objline.
APPEND objline TO objcont.
ENDDO.
CLEAR objline.
*horizontal line at beginning of records
DO 80 TIMES.
IF sy-index = 1.
* objline+sy-index(1) = ' '.
continue.
ELSE.
offset = sy-index - 1.
objline+offset(1) = '-'.
ENDIF.
ENDDO.
clear offset.
APPEND objline TO objcont.
CLEAR objline.
wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver TO t_reclist.
* size
DESCRIBE TABLE objcont LINES w_line_count.
READ TABLE objcont INDEX w_line_count INTO objline.
doc_chng-doc_size = ( w_line_count - 1 ) * 255 +
STRLEN( objline ).
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = doc_chng
document_type = 'RAW'
* put_in_outbox = ' '
commit_work = 'X'
TABLES
* object_header = subject
object_content = objcont
receivers = t_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
KR Jaideep, -
SharePoint Workflow send the notification to External email address fine but do not work when Trusted Identity Provider/SSO feature Checked. Please Advice!
Hi,
I am trying to involve someone familiar with this topic to further look at this issue.
Regards,
Rebecca
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Rebecca Tu
TechNet Community Support
Maybe you are looking for
-
Hi all Basis Gurus, This is my question to Basis forum Please reply me immediately. while running ITS in CRM 50 i am getting mentioned below error (Logon on with a dialog user). can u please guide what are things i have to follow to res
-
M Audio Firewire 410 & 10.4.4 not working please help!!!!!
Hello All Has anyone who is using 410 and tiger 10.4.4 got them working properly mine just makes a high pitch whine not to sure about those latest drivers. (M Audio 1.6 drivers) Was on 10.3.9 before and was rock soild now i have no sound, please help
-
ITunes 11.0.1.2 crashing Windows 7
I've done a lot of searching and not really got an answer....every time I try and sync with my iPhone it will copy a few tracks and then iTunes will crash my PC: not freezing, not crashing iTunes but totally crashing my PC. I have tried everything: c
-
Driver for DVD rom drive for dv6308nr
Does anyone know where to find the driver for an HP laptop dv6308nr cd/dvd rom drive? I looked it up on the site and it isn't listed under the available drivers. Maybe I am missing it????
-
Can I package ABAP proxy messages as IDOCs from XI to ECC
Hello, We need to send a lot of messages from XI to ECC that must be processed independently. Could we send them in one message package from XI to ECC as we can do with IDOCs? Thanks Diego.