Sending POs by mail to several key users
Hi friends,
Need your help once again.
I would like to set up a new output ytpe.
It's about sending by mail POs which have been released.
Theses POs should be sent to two key users who have two distinct mail adresses.
I've created my new output type. But I'm stuck in partner functions assignement.
Does any standard partner function fullfil my requirement ?
Or should I create two new partner functions for these two key users ?
Regards,
Bahia.
one alternative can be convert the spool request into pdf generated during output of the PO using the prog 'RSTXPDFT4 'and send these pdf to any number of mail ids at the me21n screen using send--send with note option.
please check this thread for moreoptions.
Convert PO PDF File Local
Regards,
Similar Messages
-
IN IPAD AIR How can i send an e-mail to several mail adress typing a group name, similar procedure used un gmail wich is very frendly
Before all these updates, one used to be able to create a Group (such as Buddy List), then send emails by clicking on that Group Name. Has not worked for a long time now, though. I wish they would bring it back.
-
How a forum User on OTN can send a private mail to another forum user?
Hi,
How can a user of forums on OTN send a private mail to another user of OTN?
Thanks in advance for your answers.Without knowing their email address this is not possible
-
E-sourcing couldn't send out E-mail notification of new user.
Dear experts,
I got stuck on SMTP issue when configuring a E-sourcing sandbox, when I created some Buy-side users, the system was not able to send out the notifications but all stuck in "Queued Messages" .
I browsed in the system, the settings related with the SMTP function including below items:
1: "Source Email" in Company Properties, this email address is going to be indicated as the sender of a new user notification;
2: "Messaging" configuration in System Properties:
( messaging messaging.smtp.mailhost
messaging messaging.smtp.password
messaging messaging.smtp.username )
I have set up above fields as the same as a working E-sourcing application, but my sandbox still doesn't work for me, the new user created can't receive the notification to become a valid user of the system, so they will not be able to logon to the system without password information.
Would you please advice me what should I do, any of your response in highly appreciated!
Thanks and best regards!
edward.Edward,
Please verify a couple of things:
1. Is the functional e-sourcing box is running on the same version of Sandbox version (which you are configuring)
2. Verify that "New User" notification template is set to active in the email templates setting through setup
3. If no issues with 1 and 2 then would suggest to clear mail queue from backend and try generating a new email
Please let us know the out come.
Good Luck. -
Hi,
what are customizing steps to automatically send to vendors by mail POs ?
Best regardsHi,
There are a lot of similar questions ask before! You better do a little bit searches.
A hint may be going to transaction NACE, select EF and hit output types. There select your output type and go to processing routines. Make a new entry medium as 5 (external send), program as SAPFM06P, form routine as ENTRY_NEU.
Donu2019t forget to maintain SCOT in order to send mail(s) from SAP to vendor(s) mail address and, of course, vendor mail address in vendor master record.
Kind regards -
How to send e-mail alert to the user job is successful or failed.
Hi Experts,
I have scheduled a job using DBMS_JOB Package; in this job I am calling a procedure.
How can we send an e-mail(alert) to the user if the job is successful (or) job fails.
If the job is successfully completed, then we have to send mail as “Job is completed successfully along with job name”.
If the job fails we have to send email as “error message of the job along with job name”(why the job is failed).
This alert should be sending automatically no manual intervention.
Please help me.
CREATE OR REPLACE PROCEDURE APPS_GLOBAL.arc_procedure (P_ID IN NUMBER)
IS
CURSOR C IS SELECT id,table_name,archive_table_name,where_condition
FROM apps_global.control_ram
WHERE id = p_id
ORDER BY id, table_name;
BEGIN
FOR I IN C
LOOP
EXECUTE IMMEDIATE
'INSERT INTO '
|| I.ARCHIVE_TABLE_NAME
|| '
(SELECT * FROM '
|| I.TABLE_NAME
|| ' WHERE '
|| I.WHERE_CONDITION
|| ')';
EXECUTE IMMEDIATE
'DELETE FROM '
|| I.TABLE_NAME
|| ' WHERE '
|| I.WHERE_CONDITION
|| '';
COMMIT;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE (
'An error was encountered - ' || SQLCODE || ' -ERROR- ' || SQLERRM);
END arc_procedure;
/This is my job.
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'APPS.arc_procedure(1);'
,next_date => to_date('05/01/2013 00:00:00','dd/mm/yyyy hh24:mi:ss')
,interval => 'TRUNC(SYSDATE+1)'
,no_parse => FALSE
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;
/Thanks in advance.Hi,
I think you can do by creating mailing procedures and call it in the loop and outside the loop.
There would be two procedure one in inside loop which will execute after successfull completion of the loop.
Other would be in the exception block like i shown in the below code you have written;
V_variable_1 you can use as a parameter for what is the error occured.
like suppose your mailing procedure name is Status_email and Status_email_1.
CREATE OR REPLACE PROCEDURE APPS_GLOBAL.arc_procedure (P_ID IN NUMBER)
IS
CURSOR C IS SELECT id,table_name,archive_table_name,where_condition
FROM apps_global.control_ram
WHERE id = p_id
ORDER BY id, table_name;
V_VARIABLE_1 NUMBER;
V_VARIABLE_2 VARCHAR2(400);
BEGIN
FOR I IN C
LOOP
EXECUTE IMMEDIATE
'INSERT INTO '
|| I.ARCHIVE_TABLE_NAME
|| '
(SELECT * FROM '
|| I.TABLE_NAME
|| ' WHERE '
|| I.WHERE_CONDITION
|| ')';
EXECUTE IMMEDIATE
'DELETE FROM '
|| I.TABLE_NAME
|| ' WHERE '
|| I.WHERE_CONDITION
|| '';
COMMIT;
STATUS_EMAIL;
END LOOP;
EXCEPTION OTHERS THEN
V_VARIABLE_1 :=SQLCODE;
V_VARIABLE_2 :=SQLERRM;
ROLLBACK;
STATUS_EMAIL_1(V_VARIABLE_1,V_VARIABLE_2);
END arc_procedure;
/ You can refer to sample email procedure i have created for you.
CREATE OR REPLACE PROCEDURE STATUS_EMAIL
AS
v_From VARCHAR2(80) := 'EMAIL_ID';
v_Recipient VARCHAR2(80) := 'EMAIL_ID';
--YOU CAN SEND EMAIL TO MORE THAT ONE USER SO YOU CAN USE LIKE BELOW VARIABLE....
v_Recipienttt VARCHAR2(80) := 'EMAIL_ID';
v_Subject VARCHAR2(80) := 'SUBJECT_FOR_THE_MAIL';
v_Mail_Host VARCHAR2(30) := 'MAIL_SERVERS_HOST_IP(SMTP_SERVER)';
v_Mail_Conn utl_smtp.Connection;
crlf VARCHAR2(2) := chr(13)||chr(10);
BEGIN
v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host);
utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
utl_smtp.Mail(v_Mail_Conn, v_From);
utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
utl_smtp.Rcpt(v_Mail_Conn, v_Recipienttt);
--OPEN DATA CONNNECTION
UTL_SMTP.OPEN_DATA(v_mail_conn);
--MAIL HEADER
utl_smtp.write_DATA(v_Mail_Conn,'Date: ' || to_char(sysdate, 'DD-MON-YYYY hh:mi:ss AM') || crlf);
utl_smtp.write_DATA(v_Mail_Conn,'From: ' || v_From || crlf );
utl_smtp.write_DATA(v_Mail_Conn,'Subject: '|| v_Subject || ||crlf);
utl_smtp.write_DATA(v_Mail_Conn,'To: ' || v_Recipient || crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Cc: ' || v_Recipienttt ||','|| crlf);
--MAIL BODY
utl_smtp.write_DATA(v_Mail_Conn,'MIME-Version: 1.0'|| crlf );
utl_smtp.write_DATA(v_Mail_Conn,'Content-Type: multipart/mixed;'|| crlf );
utl_smtp.write_DATA(v_Mail_Conn,' boundary="-----SECBOUND"'|| crlf ||crlf );
utl_smtp.write_DATA(v_Mail_Conn,'-------SECBOUND'|| crlf );
utl_smtp.write_DATA(v_Mail_Conn,'Content-Type: text/plain;'|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Content-Transfer_Encoding: 7bit'|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Procedure is successfully complited without error'|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Dear All, '|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Procedure is successfully complited without error'||'.' ||crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'Regards, '|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,'any_name '|| crlf);
utl_smtp.write_DATA(v_Mail_Conn,null|| crlf);
utl_smtp.write_data(v_Mail_Conn, utl_tcp.CRLF ||'This mail is auto generated.');
--CLOSE CONNECTION
UTL_SMTP.CLOSE_DATA(v_mail_conn);
utl_smtp.Quit(v_mail_conn);
EXCEPTION
WHEN utl_smtp.Transient_Error OR utl_smtp.Permanent_Error then
raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
END;
/cheers.. -
How to send a E-mail Reminder to a particular user from a Tasks Calendar
I have created a calendar in my Sharepoint site and have added some Training sessions to that calendar. My Requirement is to send an E-mail to a Particular user before 3 days from the Training session date. I have created a workflow using Sharepoint Designer,
but it is not sending the e-mail before 3 days. Can you please tell me how to create a workflow for this scenario and if possible please give me the condition and Action needs to be provided for the workflow
Thanks in AdvanceThanks a lot for ur replies
I tried with the above SP Workflow and it doesn't work for me. I am not getting the mail. This what i did,
I have calendar for training in Sharepoint -> I added a training session to the Calendar on todays date and Start and End time is set as 1.05 pm- 2.05 pm -> I saved the event in my Calendar
Then i selected the Calendar in the "List Workflow" option in Sharepoint Designer and i created a Workflow in Sharepoint which i named it as "Sample Workflow". Here i created a Action as given below,
Inserted Do Action:
Calculate (Current Item:Start Time:Returned as Number of Seconds) (minus) (180) (Output to Variable:calc)
Inserted Pass until Date Action:
then Pause until Variable: calc
Inserted Send by E-mail Action
then E-mail (Specific user)
I saved and Published the above workflow. I waited for the mail 3 minutes before the Start time and i didn't receive any mail. I have also selected all the Start options in the Workflow
settings
I even tried another Action and that too doesn't work for me,
Inserted Add time to Date Action:
Add 1minute to
Current Item:Start time (Output to Variable: Created a new variable by giving some name)
Inserted Pass until Date Action:
then Pause until Variable: New Variable name selected
Inserted Send by E-mail Action
then E-mail (Specific user)
Please give me a solution to fix this issue and make this work
Thanks in Advance -
Sending an automatic mail on changing message status
Hey,
I faced this problem previously where i wanted to send a mail to the key user as soon as the message status of any Service Desk message changes from new to In Progress. I received a SAP Tutor file from SAP Support which showed the whole process of configuring it. I implemented it and it was working fine. Now i have this situation that i want to send an email to the user everytime the message status is changed. So what i basically did was that i editted the condition to include all the statuses.
Now the problem i am facing is that the email is only sent when the message status is changed for the first time. Any subsequent changes later on dont result in mail being delivered. Actually that action of
sending mail is not being generated after the first time. Please help mein this regard.
Regards,
Bilal NazirHello Chetan,
First of all, are you using SolMan 3.2 or 3.1? I am asking that because the SAP Tutor file shows old version of Service Desk. If you have 3.2, are you working with SLFN transaction type or SLF1? With SLFN, you have to change action profile SLFN0001_ADVANCED. In order to send email on status change, create a new action as explained in the SAP Tutor, but using the correct action profile. Then create a condition for action for the correct status profile. It should work, it works for me..
I use the standard action "Email to message creator" to send email to message creator. I just configured "Max. 1 Unprocessed Action for Each Action Definition", Scheduled Automatically, Partner Dependent and put the message creator partner function in the Action Definition.
If it does not work for you, please explain in details what you have done and if you have any error message.
Did you check the Actions tabstrip in your Service Desk Message? You have all the log of the actions there, if the action was scheduled and did not work, you should find an error.
Regards,
Raquel Cunha -
I got this problem when I tried to configure out-going email and add an account to farm administrator group.
I configure out-going email according to this website http://technet.microsoft.com/en-us/library/cc288949.aspx
Here are the screen shots.
The SMTP server and email accounts work out OK when I use Outlook 2010 to test.
Anyone can help me about it? Thanks.
Here is the log.
09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)
0x1138
SharePoint Foundation E-Mail
8gsf
High
#160008: The e-mail address 'admin3.sharepoint@domain' contains illegal
characters. df98555c-612f-4a58-9443-ab6e9a4fcc53
09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)
0x1138
SharePoint Foundation General
8kh7 High
Cannot complete this action. Please try again.
df98555c-612f-4a58-9443-ab6e9a4fcc53
09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)
0x1138
SharePoint Foundation E-Mail
7946 Critical
Cannot complete this action. Please try again.
df98555c-612f-4a58-9443-ab6e9a4fcc53
09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)
0x1138
SharePoint Foundation Runtime
tkau Unexpected
Microsoft.SharePoint.SPException: The user or users have been added successfully, but there was an error in sending the e-mail message. The server may not be set up correctly to send e-mail. To verify that e-mail is configured correctly, contact your
server administrator. at Microsoft.SharePoint.ApplicationPages.AclInv.SendEmailInvitation(EntityEditor picker, String subject, String message) at Microsoft.SharePoint.ApplicationPages.AclInv.BtnOK_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String
eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStage...
df98555c-612f-4a58-9443-ab6e9a4fcc53
The e-mail address I have tested it for several times and there is no problem.
Anyone has any clue about this error?Hi.
This I have seen before...
It can be that the SMTP relay server is configured to only allow certain IP ranges or addresses.
It can be that the firewall on the SP server does not allow for SMTP traffic (normally 25, for example for Exchange).
It can be that there is an Antivirus on the SP server(Client AV) that prohobits the Timer service to send email from this server. I have seen MacAfee do this. Needed an policy change.
If, its the builtin SMTP service you are using, check this link:
http://blog.sharepointrx.com/2010/11/18/setting-up-the-iis-smtp-server-for-sending-email-from-sharepoint-2010-on-server-2008-r2/
Check that and try again.
Regards
Thomas Balkeståhl - Technical Specialist - SharePoint -
http://blog.blksthl.com
Download the SharePoint Branding Project here
Download the SharePoint 2010 Site Settings Explained here -
I receive a pop-up from ICal saying the server does not recognize my user name and password for my me.com email address. This started yesterday and occurs about every 5 minutes or so. There are no problems with receiving or sending email through Mail. I did change me email password several days ago but have no problems sending/receiving since then.
I fixed the problem. I opened Preferences in ICal and entered my new password. No more pop-ups
-
Sending a text mail for different user in
Hi Abapers,
I am trying to use function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send a Text mail like "Purchase order is pending" .But how i can send a text mail .
Here we are not attach any document only the text message we need to different mail id.Or is there any other FM to send text mail.
Please help me if u have any sample code to send a text mail.
Thanks
NaniHi
You can use the fun module
UWSP_SEND_MAIL_TO_WEB
see the sample program using both he fun modules for sending some mails
REPORT zm_reservation_alert
NO STANDARD PAGE HEADING
MESSAGE-ID zm_msg.
D A T A B A S E T A B L E S D E C L A R A T I O N
T Y P E S D E C L A R A T I O N S
Reservations Main Structure
TYPES: BEGIN OF s_res,
rsnum TYPE rsnum, " Reservation No
rspos TYPE rspos, " Item No
usnam TYPE usnam, " User Name
bwart TYPE bwart, " Movement Type
aufnr TYPE aufnr, " Order Number
rsart TYPE rsart, " Record Type
bdart TYPE bdart, " Reservation Type
matnr TYPE matnr, " Material No
bdter TYPE bdter, " Req Date
menge TYPE menge_d, " Quantity
kostl TYPE kostl, " Cost Center
usrid TYPE sysid, " User ID
END OF s_res.
Output Main Structure
TYPES: BEGIN OF s_rep,
usnam TYPE usnam, " User Name
rsnum TYPE rsnum, " Reservation No
rspos TYPE rspos, " Item No
matnr TYPE matnr, " Material No
bdter TYPE bdter, " Req Date
menge TYPE menge_d, " Quantity
kostl TYPE kostl, " Cost Center
aufnr TYPE aufnr, " Order Number
END OF s_rep.
User Dept Details
TYPES: BEGIN OF s_dept,
pernr TYPE persno, " Personal No
usrid TYPE sysid, " User ID
orgeh TYPE orgeh, " Orgn Unit
orgtx TYPE orgtx, " Dept Name
END OF s_dept.
For Send Mail Purpose
DATA : i_doc_data LIKE sodocchgi1.
DATA : BEGIN OF i_pack_list OCCURS 0.
INCLUDE STRUCTURE sopcklsti1.
DATA : END OF i_pack_list.
DATA : BEGIN OF i_receivers OCCURS 0.
INCLUDE STRUCTURE somlreci1.
DATA : END OF i_receivers.
DATA : BEGIN OF i_contents OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_contents.
DATA : BEGIN OF i_header OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_header.
DATA : BEGIN OF i_att OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_att.
Internal table for bdcdata
DATA : it_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
Internal table to handle messages
DATA : it_messages LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
D A T A D E C L A R A T I O N S
DATA: gv_lines TYPE sy-index, " Total Lines int Table
gv_days TYPE i, " Difference Days
gv_date TYPE sy-datum, " Date
gv_date1 TYPE sy-datum, " Date
gv_date2 TYPE sy-datum, " Date
gv_text(85), " Text Field
gv_mesg(70), " Error Messages
gv_bdc, " BDC Flag
gv_flag TYPE i, " Flag
gv_ernam TYPE ernam. " User ID
C O N S T A N T S D E C L A R A T I O N S
CONSTANTS: c_x VALUE 'X', " Flag
c_endda TYPE endda VALUE '99991231'. " Date
I N T E R N A L T A B L E S D E C L A R A T I O N S
DATA: i_res TYPE STANDARD TABLE OF s_res WITH HEADER LINE, " Reservns
i_dept TYPE STANDARD TABLE OF s_dept WITH HEADER LINE, " Dept
i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE. " Output
S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Fetch main data
PERFORM fetch_data.
Process data
PERFORM process_data.
*& Form fetch_data
Fetching the Reservations related data from Database Tables
FORM fetch_data .
CLEAR: gv_date, gv_date1, gv_date2.
gv_date = sy-datum.
gv_date1 = sy-datum - 10.
gv_date2 = sy-datum + 10.
CLEAR i_res.
REFRESH i_res.
SELECT a~rsnum " Reservation No.
b~rspos " Reservation Item
a~usnam " User Name
a~bwart " Movement Type
a~aufnr " Order Number
b~rsart " Record Type
b~bdart " Reservation Type
b~matnr " Material No
b~bdter " Req Date
INTO TABLE i_res
FROM rkpf AS a JOIN resb AS b
ON arsnum = brsnum
WHERE ( b~bdter BETWEEN gv_date1 AND gv_date2 ) AND
b~xloek EQ ' '.
SORT i_res BY rsnum rspos.
DELETE ADJACENT DUPLICATES FROM i_res COMPARING matnr.
Add userid into the i_usr int table
LOOP AT i_res.
i_res-usrid = i_res-usnam.
MODIFY i_res INDEX sy-tabix.
ENDLOOP.
IF NOT i_res[] IS INITIAL.
Get the User Dept Name
CLEAR i_dept.
REFRESH i_dept.
SELECT a~pernr " Personal No
a~usrid " User ID
b~orgeh " Orgn Unit
c~orgtx " Dept Name
INTO TABLE i_dept
FROM pa0105 AS a JOIN pa0001 AS b
ON apernr = bpernr JOIN t527x AS c
ON borgeh = corgeh
FOR ALL ENTRIES IN i_res
WHERE a~usrid = i_res-usrid AND
a~endda EQ c_endda AND
b~endda EQ c_endda.
ENDIF.
SORT i_dept BY pernr.
DELETE ADJACENT DUPLICATES FROM i_dept COMPARING pernr.
Move the Creator of Reservation to a diff table
LOOP AT i_res.
MOVE-CORRESPONDING i_res TO i_rep.
APPEND i_rep.
CLEAR i_rep.
ENDLOOP.
SORT i_rep BY usnam rsnum rspos.
ENDFORM. " Fetch_Data
*& Form process_data
Process the Reservations related data for Expiry Date
FORM process_data .
DATA: lv_date1 LIKE sy-datum,
lv_date2 LIKE sy-datum,
lv_date3(10),
lv_menge(13),
lv_tabix LIKE sy-tabix.
LOOP AT i_rep.
CLEAR: gv_days, gv_text, lv_date1, lv_date2,lv_date3.
lv_tabix = sy-tabix.
AT NEW usnam.
Populate the Contents Table
CLEAR i_att.
REFRESH i_att.
i_att = 'Reservations Reminder'(014).
APPEND i_att.
i_att = '----
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
READ TABLE i_dept WITH KEY usrid = i_rep-usnam.
CONCATENATE 'Name:'(003) i_rep-usnam 'Dept:'(015) i_dept-orgtx
INTO i_att-line SEPARATED BY space.
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
i_att = 'Please find the List of expiring Reservations'(004).
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
CONCATENATE '--' '' '--
' INTO
i_att-line SEPARATED BY space.
APPEND i_att.
CONCATENATE 'Reservation #'(006) 'Material #'(007) ' Quantity'(002)
'Due Date'(008) 'Work Center/CC'(005) INTO
i_att-line SEPARATED BY space.
APPEND i_att.
CONCATENATE '--' '' '--
' INTO
i_att-line SEPARATED BY space.
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
ENDAT.
gv_days = i_rep-bdter - gv_date.
lv_date1 = i_rep-bdter + 5.
lv_date2 = i_rep-bdter + 10.
MOVE i_rep-menge TO lv_menge.
WRITE i_rep-bdter TO lv_date3.
IF gv_days = 10.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is due for 10 days. Please collect'(009)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is due for 10 days. Please collect'(009)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_days = 5.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is due for 5 days. Please collect'(010)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is due for 5 days. Please collect'(010)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_date = lv_date1.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is getting cancelled on'(011) lv_date2
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is getting cancelled on'(011) lv_date2
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_date = lv_date2.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is being cancelled'(012)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is being cancelled'(012)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
Mark the Reservation Item 'DELETED' using BDC.
UPDATE resb SET xloek = c_x.
PERFORM delete_item_resb.
ENDIF.
AT END OF usnam.
IF ( gv_days = 10 OR gv_days = 5 OR gv_date = lv_date1 OR
gv_date = lv_date2 ).
Read the User who creates the Reservn and send a mail alert to him
CLEAR : i_receivers,gv_ernam.
REFRESH: i_receivers.
READ TABLE i_rep INDEX lv_tabix.
gv_ernam = i_rep-usnam.
IF gv_ernam <> space.
Send mail Alert to PR Creator(SAP inbox)
PERFORM send_alert_data.
Send Mail to External Mail ID of the SAP USER
PERFORM send_mail_external.
ENDIF.
ENDIF.
ENDAT.
ENDLOOP.
ENDFORM. " Process_data
*& Form delete_item_resb
Set the Deletion Indicator for the Res. Item in RESB
FORM delete_item_resb.
gv_bdc = 'N'.
Perform to fill it_bdcdata.
PERFORM fill_it_bdcdata.
Call the Transaction MB22
CALL TRANSACTION 'MB22' USING it_bdcdata MODE 'A' UPDATE 'S'
MESSAGES INTO it_messages.
IF sy-subrc <> 0.
gv_flag = 1.
If error occurs in transaction mode run bdc session for that data
PERFORM bdc_process.
ENDIF.
Handles error messages
PERFORM error_messages.
CLEAR : it_bdcdata, it_messages.
REFRESH : it_bdcdata, it_messages.
IF gv_bdc = 'O'.
close bdc if it is open
PERFORM close_bdc.
ENDIF.
ENDFORM. "delete_item_resb
*& Form FILL_IT_BDCDATA
Filling Bdcdata structure with data
FORM fill_it_bdcdata.
PERFORM bdc_dynpro USING 'SAPMM07R' '0560'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM07M-RSPOS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RM07M-RSNUM'
i_rep-rsnum.
PERFORM bdc_field USING 'RM07M-RSPOS'
i_rep-rspos.
PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RESB-XLOEK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RESB-XLOEK'
c_x.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-KOSTL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RESB-ERFMG'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-KOSTL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
ENDFORM. " FILL_IT_BDCDATA
*& Form BDC_DYNPRO
Filling the it_bdcdata table with program name & screen number
FORM bdc_dynpro USING program LIKE bdcdata-program
dynpro LIKE bdcdata-dynpro.
it_bdcdata-program = program.
it_bdcdata-dynpro = dynpro.
it_bdcdata-dynbegin = 'X'.
APPEND it_bdcdata.
CLEAR it_bdcdata.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
Filling it_bdcdata with field name and field value
FORM bdc_field USING fnam LIKE bdcdata-fnam
fval.
it_bdcdata-fnam = fnam.
it_bdcdata-fval = fval.
APPEND it_bdcdata.
CLEAR it_bdcdata.
ENDFORM. " BDC_FIELD
*& Form ERROR_MESSAGES
Displaying error messages
FORM error_messages.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = sy-msgid
lang = sy-langu
IMPORTING
msg = gv_mesg
EXCEPTIONS
not_found = 1
OTHERS = 2.
LOOP AT it_messages WHERE msgtyp = 'E'.
WRITE : / 'Message :'(001) ,gv_mesg.
CLEAR it_messages.
ENDLOOP.
ENDFORM. " ERROR_MESSAGES
*& Form BDC_PROCESS
Open bdc session if call transaction fails
FORM bdc_process.
IF gv_bdc = 'N'.
open bdc session
PERFORM open_bdc.
gv_bdc = 'O'.
ENDIF.
IF gv_bdc = 'O'.
insert data into bdc session
PERFORM insert_bdc.
ENDIF.
ENDFORM. " BDC_PROCESS
*& Form OPEN_BDC
Calling function module to open bdc session
FORM open_bdc.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = 'ZMM'
keep = 'X'
user = sy-uname
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
OTHERS = 11.
ENDFORM. " OPEN_BDC
*& Form INSERT_BDC
Insert it_bdcdata into bdc by calling function module bdc_insert
FORM insert_bdc.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = 'MB22'
TABLES
dynprotab = it_bdcdata
EXCEPTIONS
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
printing_invalid = 5
posting_invalid = 6
OTHERS = 7.
ENDFORM. " INSERT_BDC
*& Form CLOSE_BDC
Closing bdc session
FORM close_bdc.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
not_open = 1
queue_error = 2
OTHERS = 3.
ENDFORM. " CLOSE_BDC
*& Form send_alert_data
Send Alert for the Expired Contract
FORM send_alert_data .
CLEAR: gv_lines,i_receivers, i_header, i_contents,i_doc_data.
REFRESH : i_receivers,i_header,i_contents.
DESCRIBE TABLE i_att LINES gv_lines.
i_receivers-receiver = gv_ernam.
i_receivers-receiver = 'SSHEIK'.
i_receivers-rec_type = 'B'.
i_receivers-rec_date = sy-datum.
i_receivers-express = 'X'.
i_receivers-com_type = 'INT'.
i_receivers-notif_del = 'X'.
APPEND i_receivers.
i_doc_data-obj_name = 'SAPoffice'(013).
i_doc_data-obj_descr = 'Reservations Reminder'(014).
i_doc_data-obj_langu = 'E'.
i_doc_data-no_change = c_x.
i_doc_data-obj_prio = 1.
i_doc_data-priority = 1.
i_doc_data-doc_size = ( gv_lines - 1 ) * 255 + 135.
i_pack_list-transf_bin = c_x.
i_pack_list-head_start = '1'.
i_pack_list-head_num = '1'.
i_pack_list-body_start = '1'.
i_pack_list-body_num = gv_lines.
i_pack_list-doc_type = 'DOC'.
i_pack_list-obj_name = 'SAPoffice'(013).
i_pack_list-obj_descr = 'Reservations Reminder'(014).
i_pack_list-obj_langu = 'E'.
i_pack_list-doc_size = ( gv_lines - 1 ) * 255 + 135.
APPEND i_pack_list.
i_header-line = 'Header'. APPEND i_header.
Data for contents
i_contents-line = 'Please find the Reservations Due List'(016).
APPEND i_contents.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = i_doc_data
PUT_IN_OUTBOX = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = i_pack_list
object_header = i_header
contents_bin = i_att
contents_txt = i_contents
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 i000 WITH 'Mail Sucessfully sent'(017).
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " send_alert_data
*& Form send_mail_external
Send mail to External MAIL ID of the PR Creator
FORM send_mail_external.
DATA : lv_str(24), lv_str1(40),
lv_pernr LIKE adr6-persnumber,
lv_adrnr LIKE adr6-addrnumber,
lv_usrid LIKE pa0105-usrid,
lv_mail LIKE adr6-smtp_addr,
lv_sendor TYPE syuname,
lv_receiver TYPE string,
lv_header TYPE string,
lv_body TYPE string.
CLEAR: lv_pernr, lv_usrid, lv_adrnr,
lv_mail, lv_sendor, lv_receiver,
lv_header, lv_body .
lv_usrid = gv_ernam.
SELECT SINGLE persnumber addrnumber FROM usr21
INTO (lv_pernr,lv_adrnr)
WHERE bname = lv_usrid.
IF sy-subrc = 0.
SELECT SINGLE smtp_addr INTO lv_mail FROM adr6
WHERE addrnumber = lv_adrnr AND
persnumber = lv_pernr.
IF sy-subrc <> 0.
CONCATENATE lv_usrid '@anc.com' INTO lv_mail.
lv_receiver = lv_mail.
ELSE.
lv_receiver = lv_mail.
ENDIF.
lv_receiver = '[email protected]'.
lv_sendor = 'JALKHATAM'.
lv_header = 'Reservations Reminder'(014).
lv_str = 'Pls check your SAP Inbox'(019).
lv_str1 = 'for the status of Reservations Due List'(020).
CONCATENATE lv_str lv_str1 INTO lv_body
SEPARATED BY space.
Call Function Module To send mail
CALL FUNCTION 'UWSP_SEND_MAIL_TO_WEB'
EXPORTING
id_header = lv_header
id_body = lv_body
id_receiver = lv_receiver
id_sender = lv_sendor
ID_HTML_MAIL =
id_commit_work = 'X'
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " send_mail_external
Reward points for useful Answers
Regards
Anji -
Need to send a mail back to the user in Sender Mail adapter Scenario
Hi all,
I have a scenario where the user fills the Price form or the Article form (which is a Adobe Form).When the user clicks on the "submit" button,the form is converted into xml , gets attached to the mail and sent to PI.
Now the user sometimes attaches the pdf directly instead of submitting the form. This results in the mail being sent
with pdf as attachment.
Now my requirement is to send a mail back to the user asking them to send an xml instead of a pdf.
How can this be done ?
Kindly let me know friends.
Quick Response is appreciated.hi Sanjay,
Have a look on Michal's blog, it's for JMS, but it works for others: [PI/XI: Quick tip: Preserving attributes of XI messages via MultipartHeaderBean|PI/XI: Quick tip: Preserving attributes of XI messages via MultipartHeaderBean]
Mickael -
User two cannot send email from mail app. (send icon just spins)
userone can login, use Mail to send and receive.
user two login and may receive, but not send email in Mail app
icon next to send paper airplane in folders window just spins.
able to send email thru facebook, etc.
also, recently did TDM backup into this iMac of G5 HD.
how do I access address book data from backupresolved part one: played around with mail preferences of user two to match prefs in user one
still do not know about access to TDM saved addressbook data. -
Need to send a mail to group of users when sales order saved
Hi
user requirement is send a mail to group of users when sales order is savedhi Sanjay,
Have a look on Michal's blog, it's for JMS, but it works for others: [PI/XI: Quick tip: Preserving attributes of XI messages via MultipartHeaderBean|PI/XI: Quick tip: Preserving attributes of XI messages via MultipartHeaderBean]
Mickael -
Sending Mail with attachment like User Decision
Hi,
Is there any way to send the document attached with the send mail step ? In User Decision, we can use binding between the workflow and task and document is attached. Like wise, is there any method ??
I know we can send the attachment using the FM SO_****. So don give that answers. I want to know without using the FM, is it possible or not ?
And i don want to use BO SOFM.
For example, in Project Definition, one person creates a milestone. WF is triggered and goes for attachment of concorrence note. One attaches the concorrence note and mail is send to initiator. In that mail, can he able to see the attachment ??As far as I know the answer is "probably". You aren't saying how the mail is sent to initiator, you just say you don't want to use the FM or the BOR object type SOFM. I assume you are using the standard sendmail step type, i.e. BOR object type SELFITEM with method SendTaskDescription.
As I am sure you can imagine, an attachment doesn't magically appear. If you send a workflow step (task) to someone, you can bind attachments to make them available in work item display. If you send a message you can construct it with attachments, but that doesn't happen without any effort. If you look at the parameters for SendTaskDescription you will see that there is a parameter for attachments. Try passing (binding) a value to it. If your SendMail task doesn't include that parameter as importing parameter you will of course have to fix your task (TS object) first.
Maybe you are looking for
-
Hi We tried to sort the PeopleSearch Results by LastName and then by FirstName using the Query Designer. In the preview everything works fine, buth when we save the web part settings and do a seearch on the people results page, the results are not so
-
How to find LST file ,which is used in forms 6i
hi all, can anyone tell me how to find the LST file in a form, i am calling one main LST file ,which fires when iwordpad pops up.. and when the wprdpad pops up ,it is saying that data not found in the data source ... so wanted to check that LST file
-
Hi All, This thread actually follows on from another, which you can find here: Multiple tables feeding one table I don't believe it is possible to reference specific cells in a table in the manner you have described. You can reference the cells in an
-
Mountain Lion cannot see fibre raid, Snow Leopard can?
Hi, I have a 3,1 Mac Pro, 8 core, 2.8GHz with an LSI 7404 fibre card. The card is connected directly to my 2 medea raids (no switch). The raids mount perfectly in Snow Leopard, but in Mountain Lion 8.2 only half of each raid can be seen in disc utili
-
Need to include at least email in Business Catalyst WebBasics
I have clients who want to be able to do basic editing of their site once I am done. I understand that I have to use the Business Catalyst that Muse offers. two problems. most of these clients have hosting already, so they are now being forced to