FM SO_NEW_DOCUMENT_ATT_SEND_API1 not working
Hi Expert,
I am working on ECC 6.0 I have requirement to send e-mail with PDF attachement to user.For sending e-mail I am using FM SO_NEW_DOCUMENT_ATT_SEND_API1 in my Z-program .It return Exception DOCUMENT_NOT_SENT.
But same code is working in our old version of ECC 5.0.
What will be the reason???
Thanks
Regards
REPORT zsendemail .
PARAMETERS: psubject(40) type c default 'Hello',
p_email(40) type c default WRITE ID' .
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
Similar Messages
-
Attachment of type XLS/CSV is not working properly while sending mail
Hi,
I am trying to send mail through the function module SO_NEW_DOCUMENT_ATT_SEND_API1. I am passing data to send a mail with a XLS/CSV file as attachment. I am sending data as ASCII (/Text) mode.
It is working fine in our development system but not in Quality system. In Quality system I am getting the mail with attachment the formatting within the file is messed up. But if I pass TXT instead of CSV it is working fine.
My question is though CSV/XLS/TXT extensions are ASCII formatted still why it's not working for XLS/CSV. Again it's working in Development then why it's not working in Quality.
I have tried the same code in different systems... 4.6C and 4.7 environments also. But it is working only in the development server of 4.7 versions (EBP). It's not working in an environment which is a refresh of the system where it is working fine.
Please let me know anyone who faced similar kind of problem and got any answer.
Thanks,
AchirangshuCheck your conversion rules in both systems to see if they match. On 4.6c Transaction SCOT on your pull down menus Choose Settings-> Conversion rules.
Message was edited by: Vyerah Yende -
SWN_CREATE_SHORTCUT not working for Unicoded system
The FM "SWN_CREATE_SHORTCUT" is working fine for a non-unicoded system. While for an unicoded system the shortcut created is not working. Is there any parameter i need to set for an unicoded system or do we have to use another FM for it..?
*"Create shortcut for transaction ZMSABSR02_NEW.
CALL FUNCTION 'SWN_CREATE_SHORTCUT'
EXPORTING
I_TRANSACTION = c_tran
I_SYSID = SY-SYSID
I_CLIENT = SY-MANDT
I_USER = SY-UNAME
I_LANGUAGE = SY-LANGU
I_WINDOWSIZE = c_window
I_TITLE = c_title2
IMPORTING
SHORTCUT_STRING = w_string
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
OTHERS = 2.Hello,
I had the same problem today.
I'm in a unicode system, the "SO_NEW_DOCUMENT_ATT_SEND_API1" FM creates a unicode shortcut that doesn't work fine.
Solution : Add the following lines to your code:
DATA: wlt_object_header TYPE TABLE OF solisti1,
wls_object_header TYPE solisti1.
REFRESH wlt_object_header.
CLEAR wls_object_header.
wls_object_header = '&SO_FORMAT=ASC'.
APPEND wls_object_header TO wlt_object_header.
And add the internal table wlt_object_header to the TABLES parameters object_header of the "SO_NEW_DOCUMENT_ATT_SEND_API1" FM call :
TABLES
object_header = wlt_object_header
Now, the shortcut is non-unicode and works fine.
For information, my saplogin.ini gives : "DEFAULT_NON_UNICODE".
Best regards,
-Olivier- -
In forground progarm working fine, but in back ground it is not working
Hi experts
one program having functionality like using BDC it is creating the session and it is posting session automatically.
if error occurs mail notification send to user .used this FM ---SO_NEW_DOCUMENT_ATT_SEND_API1
when i am executing the program in foregroung it is working properly. means file contains wrong data
and session having the error and mail is going to user.
but when i am scheduling same thing in background , session has created sucessfully with error .
but mail functionality is not working .
Please help me why this is not (mail functionality in back ground)
thanks.hi
in program used to capture the errors in session from APQI table .
but it is capturing the errors in the fore ground , why it is not allowing in back ground.
session processed automatically using RSBDCSUB program .
could any one help me on this.
Thanks -
Try to send mail , not working , why ?
hello ,
i try to use function SO_NEW_DOCUMENT_ATT_SEND_API1.
in my program it is not working so i found note ( 609696 ) with examle
also not working , i check in "scot" nothing show up .
what can be the reason ?
sap example
*& Report ZSSO_DOCUMENT_SEND_API1
*& Send document with OTF/ALI attachment from spool to external reci-
*& pient. OTF/ALI document is converted to PDF/HTML format during the
*& SAPconnect send process.
*& This report serves as example documentation for the function
*& modules SO_NEW_DOCUMENT_ATT_SEND_API1 and SO_DOCUMENT_SEND_API1.
*& Following this example you should be able to develop your own
*& report to send documents with all kinds of attachments.
REPORT ZSSO_DOCUMENT_SEND_API1.
Data Declaration
Data: docdata like sodocchgi1,
objpack like sopcklsti1 occurs 1 with header line,
objhead like solisti1 occurs 1 with header line,
objtxt like solisti1 occurs 10 with header line,
objbin like solisti1 occurs 10 with header line,
reclist like somlreci1 occurs 1 with header line.
Data: listobject like abaplist occurs 1 with header line.
Data: tab_lines type i,
doc_size type i,
att_type like SOODK-OBJTP.
NOTE: Create ALI/OTF Document in Spool
ALI Document can be created by displaying a list and selecting
menue System -> List -> Print (only put to Spool).
OTF Document can be created running report SF_EXAMPLE_01 in system.
Example used here:
create list in memory
submit SHOWCOLO exporting list to memory and return.
and read list from memory into table
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
message ID '61' TYPE 'E' NUMBER '731'
with 'LIST_FROM_MEMORY'.
ENDIF.
Because listobject is of size RAW(1000)
and objbin is of size CHAR(255) we make this table copy
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
IN = listobject
OUT = objbin
EXCEPTIONS
OTHERS = 1
if sy-subrc <> 0.
message ID '61' TYPE 'E' NUMBER '731'
with 'TABLE_COMPRESS'.
endif.
NOTE: Creation of attachment is finished yet.
For your report, the attachment should be placed into table
objtxt for plain text or
objbin for binary content.
Now create the message and send the document.
Create Message Body
Title and Description
docdata-obj_name = 'TEST_ALI'.
docdata-obj_descr = 'Test including ALI/HTML Attachment'.
Main Text
objtxt = 'Test Document.'.
append objtxt.
objtxt = 'You will find an ALI/HTML attachment in this message.'.
append objtxt.
objtxt = 'Have a nice day.'.
append objtxt.
Write Packing List (Main)
describe table objtxt lines tab_lines.
read table objtxt index tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
clear objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
append objpack.
Create Message Attachment
Write Packing List (Attachment)
att_type = 'ALI'.
describe table objbin lines tab_lines.
read table objbin index tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + strlen( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = 'Attached Document'.
append objpack.
Create receiver list
reclist-receiver = '[email protected]'. "<-- change address
reclist-rec_type = 'U'.
append reclist.
reclist-receiver = sy-uname. "<-- change internal user
reclist-rec_type = 'B'.
append reclist.
Send Message
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
PUT_IN_OUTBOX = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
tables
packing_list = objpack
OBJECT_HEADER = objhead
CONTENTS_BIN = objbin
CONTENTS_TXT = objtxt
OBJECT_PARA =
OBJECT_PARB =
receivers = 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.
message ID 'SO' TYPE 'S' NUMBER '023'
with docdata-obj_name.
ENDIF.
write: / 'End of Program'.Hi,
your program has problem in creating the reciever list.
check the Amit's Code in this thread. It is perfect.you can update accordingly.
Mail with attachment.
Regards,
Amit
Reward all helpful replies. -
Not work tablet UI on Prestigio 5080 PRO tablet
I read that browser.ui.layout.tablet = "1" can fix this problem. But it not works. I can work only in pnone interface that is not good for my 8'' tablet.
Would it be possible for you to share the problematic pdf and OS information with us at [email protected] so that we may investigate?
Thanks,
Adobe Reader Team -
Why self-defined access sequences of free goods can not work?
Hi gurus,
I have maintained access sequences of free goods self-defined.but when i creat the SO it does not work!
when i used the standard access sequences ,it is OK .
Can anybody tell me why?
thanks in advanceDear Sandy,
Go to V/N1 transaction select your self defined access sequence then go in to the accesses and fields and check all fields are activated.
Make sure that these fields are flowing in your sales order.
I hope this will help you,
Regards,
Murali. -
Adobe bridge raw not working with windows vista in photoshop cc, why?
adobe bridge raw not working in photoshop cc, is there a fix?
Your sure your using photoshop cc on windows vista?
I was under the impression that photoshop cc would not even install on windows vista.
What version of camera raw do you have?
In photoshop under Help>About Plugin does it list Camera Raw and if so which version is it?
(click on the words Camera Raw to see the version)
Camera raw doesn't work if it's a camera raw file or some other file type such as jpeg or tif?
What camera are the camera raw files from?
Officially camera raw 8.3 is the latest version of camera raw that will work on windows vista. -
Adobe Bridge CS5 in windows 7 not working?
Adobe Bridge CS5 in windows 7 not working. I was using bridge perfectly for last 2 years. It stops working since 3 days. I tried to install updates. Showing some error to install.
Tried to install creative cloud..again some error. Error code : 82
Could you please advice how I can fix my adobe bridge.https://www.youtube.com/watch?v=xDYpTOoV81Q&feature=youtu.be
please check this video I uploaded..this is what happens when I click adobe bridge.. just blinks and go off. bridge not working on task manager -
ADOBE CLOUD ON MY DESKTOP WILL NOT WORK. IT LOADS UP BUT NOTHING FILLS THE WINDOW
ADOBE CLOUD ON MY DESKTOP WILL NOT WORK. IT LOADS UP BUT NOTHING FILLS THE WINDOW
BLANK Cloud Screen http://forums.adobe.com/message/5484303 may help
-and step by step http://forums.adobe.com/thread/1440508?tstart=0
-and http://helpx.adobe.com/creative-cloud/kb/blank-white-screen-ccp.html -
Partner application logoff not working
We have a partner application registered with sso with custom login screen. The login works fine. We use the following code to logoff the partner application in logoff.jsp
response.setHeader("Osso-Return-Url", "http://my.oracle.com" );
response.sendError(470, "Oracle SSO");
session.invalidate();
but the logoff is not working properly. It is not invalidating the session and the logout http request is not going from the application server to the sso server.
Are there any additional configurations for SSO logoff.Any help is appreciated.
ThanksHi
The WF should also trigger if i add the Partner function in UI.If i change any Attribute the WF triggers but i dont want to change the attribute when i add the partner function.
If i have only one event for WF that is Partner Change the WF will not trigger it for the 1st time when i save the UI. But next i come to the same saved doc and add a partner function then the Wf triggers.
So this means that Partner change is active.
the issue here is i need to trigger the WF on , the 1st time i save the UI, for which i wil be using Attribute Change and next time when i come back to saved doc the and add only the partner function and no changes are made to attributes the WF should again trigger.
Thanks
Tarmeem -
IPhone 4 Voice Memos not working/saving
Hi there,
I'm having trouble with my voice memos too. Up until yesterday they were working fine and now, even though the record button works, the stop button does not and I can only pause them. Worse again is that the button to go into the menu to view all voice memos is not working so I can't play them from my iPhone and nothing new is saving to my iTunes. Please help!I've always had the "Include Voice Memos" option selected. I think that only pertains to syncing voice memos from iTunes to the iPhone after it has been copied to iTunes. It has to be the new OS/iTunes not communicating that new memos have been recorded. For some reason they won't sync when I want them to, and then a few syncs later they magically appear.
By the way, I'm VERY comfortable with the iTunes and iPhone systems. I've been using iTunes for 5 years, and I've been recording class lectures with the iPhone voice memo app (and another app) for a couple years. It's not an error of not seeing that the memos were added; they don't exist in my library or music folders.
JUST OUT OF CURIOSITY, POST WHICH FIRMWARE YOU ARE RUNNING EXACTLY!!!
I'm on an iPhone 4, running firmware 4.0.1 -
Installed Premiere Pro CS4 but video display does not work?
I just got my copy of CS$. After installing Premiere I found two things that seem very wrong:
1) video display does not work, not even the little playback viewer next to improted film clips located on the project / sequence window. Audio works fine.
2) the UI is way too slow for my big beefy system.
My pc is a dual boot Vista-32 and XP system with 4GB of memory installed and nvidia geforce 280 graphics board with plenty of GPU power. The CS4 is installed on the Vista-32 partition. My windows XP partition on the same PC with Premiere CS2 works great and real fast.
Any ideas how to solve this CS4 install issue?
RonI would like to thank Dan, Hunt, and Haram:
The problem is now very clear to me. The problem only shows up with video footage imported into PP CS4 encoded with "MS Video 1" codec. So this seems to be a bug. The codec is very clearly called out and supported within various menues but video with this codec just will not play in any monitor or preview window. In addition the entire product looks horrible with respect to performance while PP CS4 trys its best to play the video. Audio will start playing after about 30 seconds. And once in awhile part of video shows up at the wrong magnification before blanking out again.
My suggestion to the Adobe team: fix the bug and add some sample footage to the next release so new installations can test their systems with known footage.
My PC is brand new with the following "beefy" components:
Motherboard
nForce 790i SLI FTW
Features:
3x PCI Express x16 graphics support
PCI Express 2.0
NVIDIA SLI-Ready (requires multiple NVIDIA GeForce GPUs)
DDR3-2000 SLI-Ready memory w/ ERP 2.0 (requires select third party system memory)
Overclocking tools
NVIDIA MediaSheild w/ 9 SATA 3 Gb/sec ports
ESA Certified
NVIDIA DualNet and FirstPacket Ethernet technology
Registered
CPU: Intel Core 2 Quad Q9550
S-Spec: SLAWQ
Ver: E36105-001
Product Code: BX80569Q9550
Made in Malaysia
Pack Date: 09/04/08
Features:
Freq.: 2.83 GHz
L2 Cache: 12 MHz Cache
FSB: 1333 MHz (MT/s)
Core: 45nm
Code named: Yorkfield
Power:95W
Socket: LGA775
Cooling: Liquid Cooled
NVIDIAGeForce GTX 280 SC graphics card
Features:
1 GB of onboard memory
Full Microsoft DirectX 10
NVIDIA 2-way and 3-way SLI Ready
NVIDIA PureVideo HD technology
NVIDIA PhysX Ready
NVIDI CUDA technology
PCI Express 2.0 support
Dual-link HDCP
OpenGL 2.1 Capaple
Output: DVI (2 dual-link), HDTV
Western Digital
2 WD VelociRaptor 300 GB SATA Hard Drives configured as Raid 0
Features:
10,000 RPM, 3 Gb/sec transfer rate
RAM Memory , Corsair 4 GB (2 x 2 GB) 1333 MHz DDR3
p/n: TW3X4G1333C9DHX G
product: CM3X2048-1333C9DHX
Features:
XMS3 DHX Dual-Path 'heat xchange'
2048 x 2 MB
1333 MHz
Latency 9-9-9-24-2T
1.6V ver3.2 -
Ideapad A1-07 tablet wifi-bluet​ooth does not work!
Hello everyone. As you can see from the title on my tablet is not working wifi and bluetooth. When turning wifi tablet is reset and continues to be off and on until it forcibly turns off, and when you turn it on again, and do not touch wifi everything is normal and there are no problems with resetting. Can someone help me and give suggestion to solve this stupid problem. I'm from Croatia and I'm bad with the English writing.
Hi
Welcome To Lenovo Community
Please perform a factory reset
Please ensure you have backed any important data before doing factory reset
Hold the volume down and the power till Lenovo logo appears .
System will boot into recover mode. Follow the instructions
Hope This Helps
Cheers!!!
Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
Did someone help you today? Press the star on the left to thank them with Kudos!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
Follow @LenovoForums on Twitter! -
Polygonal lasso tool not working with stylus on Surface Pro 2
Hi guys,
I'm new here so please bare with me if I'm posting in the wrong place or don't make immediate sense.
Hardeware / software used: surface pro 2 and I'm running photoshop CS5.
Problem is a fairly basic one: I am trying to make basic selections using the polygonal lasso tool (using the stylus that comes with the tablet) but it simply will not work. All I get when I touch the stylus to the screen is the circle that appears then fades. If I attach the keypad and try using that then it works no problem at all.
Does anyone have any ideas as to whether there is a particular setting that I need to switch on or off e.g. something relating to pressure sensitivity (although not sure why this would affect this particular selection tool)?
I've searched the web and come up with nothing so far so any help is greatly appreciated!
Thanks for your time
Scottsame problem on surface pro 3 !!!!
and i think quite significant, for lot of artists using polygonal lasso a lot (including me). How come that the stupid surface cannot work properly
Maybe you are looking for
-
DISTINCT in SELECT statements for Entities / Views - Oracle JDeveloper 11G
Hi Steve, i have a question about using DISTINCT in SELECT statements for Entities / Views. On Oracle JDeveloper 11G ADF / BC4J --- This is unique--- SELECT distinct(GC."course_title"), GC.SEC_GRP_PARENT_ID, from "grp_courses" GC --- This is NOT uniq
-
Best way to remove noise and artifact - CS3
Hello folks, Currently I'm struggling with a stock agency on a few images where the rejection is for "Artifact" and "Noise". First, let me ask - are these the same? They sometimes list these problems independently. They state that "camera setting and
-
How to create Proxy Server in Java
Hello I need to create Proxy server on port number 80. Does enybody knows how to do that.??? ThX
-
Get the first photo in photo album
Hi, I am new to iphone programming. How can I get the first image in photo album into an UIImage object? I can not use the ImagePicker because this will the initial image when user launches the app. Thanks, fm
-
Photoshop CS5 Extended or After Effects?
I'm getting ready to upgrade from CS2 to CS5 and I'm not sure if I should pay extra to get the Extended version, or do not get the Extended version and buy After Effects instead. I'm not familiar with the Extended but I don't want to buy it and then