Mitigation control: Sending failed No valid SAP sender address

GRC 5.3 SP10 RAR
In mitigation control:  I have created a new control ID. When I am trying to assign it to a user getting error
"Sending failed No valid SAP sender address"
Please advise to resolve the issue. I need to mitigate user.

Hello Pal,
Please go to RAR configuration -> Risk Analysis -> Additional Options. Here check if you have the parameter Enable Monitor Notification set to YES. If you do then set this one to NO. Also, kindly check and make sure that you have a valid email address maintained for each of the mitigation control monitor in Mitigation tab.
If you wish to have the parameter set to yes only then you need to do the JAVA mail settings in Visual Admin. Check configuration of the JAVA mail client, which can be done using Visual Administrator, to send the Email Notification.
(Configuration > Java Mail Client > Properties > Smtp).
Regards, Varun
Edited by: Thakur Varun on May 21, 2010 3:47 PM

Similar Messages

  • Sending failed because of invalid destination addresses - URGENT

    Hello all,
    I have to send an e-mail with a lot of users in BCC.
    The e-mail is not sent because some addresses are not valid and i get the following message : SMTPTransport: Sending failed because of invalid destination addresses.
    I supposed that even if some addresses are not valid the mail would be sent to the others.
    Is there anyway to send the e-mail only to the valid addresses ?
    Cheers.
    Stefano

    Have you tried adding this bit of code to your program?
    Properties props = System.getProperties();
    props.put("mail.smtp.sendpartial","true");
    If you set send partial to true, it should send emails to the valid addresses
    Good Luck,
    A

  • Mitigating Control creation and application in SAP GRC 10

    Hi Expert,
    We have SAP GRC Access Control 10 being implemenmted for our client.  While trying to create Mitigating Control, we just realized that Before creating mitigating controls you need to create a Root Org entry, this replaces the Business Units in previous AC versions which is visible only when we activate the GRC-PC Application.
    My queries are:
    1. Is it that Mitigation control can only be created if PC is enable.
    2. What about Licencing if GRC-PC Application is used for Mitigating Control Creation.
    Thanking you i advance.
    Thanks & Regards,
    Abhimanu Kumar Singh

    HI,
    Thank you for the response, I just checked and could find that I can create Mitigating control without PC application. It is just that PC relevant fields are not displayed.
    However can anybody answer as to what happens if I use PC to create Mitigating Control, Do I have to purchase the license for SAP GRC PC or it is ok for shared resources.
    Thanks again.
    Thanks & Regards,
    Abhimanu Kumar Singh

  • Sending failed due to invalid destination address - HELP

    javax.mail.SendFailedException: Sending failed;
    nested exception is:
    class javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    class javax.mail.SendFailedException: 550 5.7.1 Unable to relay for shoi
    [email protected]
    at javax.mail.Transport.send0(Transport.java:218)
    at javax.mail.Transport.send(Transport.java:80)
    at msg.main(msg.java:70)
    javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    class javax.mail.SendFailedException: 550 5.7.1 Unable to relay for shoi
    [email protected]
    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:848)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:323)
    at javax.mail.Transport.send0(Transport.java:163)
    at javax.mail.Transport.send(Transport.java:80)
    at msg.main(msg.java:70)
    ***** Though i have given the recipent address correct, still i am getting this invalid address and sending failed exception, i really dont understand what is happening, b'cause the program is perfectly allriight, the only problem i think what could be is, the mail server should be having the problem, i just want to know how to rectify it and what is the solution.

    the 550 error code usually means that the mail server you connected with didn't want to relay your message (which is an option they often don't allow). lot of mail servers don't want you to use your own software so that you have to use their software (usually a browser account) so that they can show you all sorts of advertisements (I could be wrong about this, though). The SMTP will allow them to basically cut you off from using it unless you're actually logged onto the server itself (which I have yet to find a way, as its not part of SMTP -- it's part of the POP commands, but they can disable POP altogether).
    If you want to keep developing in spite of this, though, try setting your own PC up to be a SMTP server with your own software or do a search for some small software called "agsmail" which is free. If you want to learn more about the SMTP commands (which those Java mail libraries are probably using behind the scenes) take a look at the RFC's for 'em.... here's the basic one for SMTP: http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2821.html
    ref: a friend from community discussion

  • Mitigation control ID validity extension -easy way

    I work in GRC AC 5.3. All Mitigation control IDs have a validity expiration on same date in near future. Our GRC has many mitigation control IDs with mitigated users. How can I change the valid to date in convenient way?
    It may be extended for all mitigated users separately/individually, but it will take huge time.

    You can download all of them in a text file, make changes and upload it back via the import/export utility under mitigation tab,
    Alpesh

  • Query on Mitigation Control

    Hi all,
    We have configured Mitigation Controls and mitigated some of the users. We have the following queries in this regard:
    a) When we run the SoD anlaysis for that particular user we could able to see only half description of the Mitigation Control.
    Is there any limitation for the space or the parameters for the Mitigation Control Description.We are unable to see the entire description of the Mitigation Control (If the mitigation control is more than 7-8 lines) in the Detailed Report screen as well. Even after downloading into a spreadsheet also we are getting only the part of the mitigation control and not the entire description of the mitigation control
    b) A risk ID can be addressed by 2 or 3 mitigation controls. In this scenario,we have assigned 2-3 mitigation controls to one Mitigated user for mitigation. When we run SoD analysis we could able to see only the latest mitigation control assigned to the user in the report format (say out of 3 assigned only the 3rd one assigned is being shown).
    But when we did a search for Mitigation controls with  the Risk ID & User ID combination then it is throwing all the 3 mitigation controls. But the same is not shown in SoD violations reports
    Is there anything to do with the parameters set up or at the configuration side to resolve this.
    Please provide the procedure also in case of any changes to be made at configuration level.
    Thanks and Best Regards,
    Sri

    Hi Vit,
    Thanks for your reply. We crosschecked and you are correct that the space limitation is only for 132 characters in this table.
    Is there a way to get the mitigation control whole description or do we need to stick to this limitation itself.
    Also, when we did a search for Mitigation Control it gives only Mit.ID, Mit Control Desc, BU and Management approver. Whether there are any tables (from SAP Backend) or reports where we can get the Risk Ids including the above addressed by the mitigation controls.
    Thanks and Best Regards,
    Sri

  • E-Mail Validation fails (email validation)

    Hi,
    according to the RFC, emails addresses in the following
    format are allowed: [email protected]
    but SPRY fails on validating this email address. Is there a
    fix for that? And if not, which file would I have to update in
    order to allow this email format?
    Thanks!
    Nils

    Hi Nils,
    You need to modify
    http://labs.adobe.com/technologies/spry/widgets/textfieldvalidation/SpryValidationTextFiel d.js
    Open that file and do a search for 'email', you should see a
    regular expression after it that looks something like this:
    var rx = /^[\w\.-]+@[\w\.-]+\.\w+$/i;
    You'll probably want to add the + to it like this:
    var rx = /^[\w\.-\+]+@[\w\.-]+\.\w+$/i;
    I'll file a bug on our side to make sure we allow all chars
    specified in the RFC.
    --== Kin ==--

  • Java APM Agent initialization failed: SEAgent.config.xml does not have a valid event sender configured

    Today I tried to configure JAVA APM on a CentOS 6.4 server with tomcat6 installed through the normal RPM package. Adding this server to SCOM was no problem and it shows itself as a 'Deep Monitored Configuration'. The last part of enabling
    JAVA APM fails. I have followed the following process:
    1. Imported the JAVA APM MP's
    2. Extracted the JAVA APM Files
    3. Copied those files to my CentOS server
    4. Added the JAVA_OPTS to my tomcat configuration file
    5. Restarted Tomcat
    When I look for the log file which needs to be created through the installation of the APM agent it cannot be find. When I look into my Catalina.out file I see the following errors:
    Mar 05, 2014 7:05:16 PM com.microsoft.ManagementServices.APMAgent.Log.SystemLogger error
    SEVERE: Java APM Agent initialization failed: SEAgent.config.xml does not have a valid event sender configured
    com.microsoft.ManagementServices.APMAgent.Exception.ApmException: SEAgent.config.xml does not have a valid event sender configured
            at com.microsoft.ManagementServices.APMAgent.AgentThreadManager.<init>(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.AgentThreadManager.<init>(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.Agent.Monitor.AgentContext.<init>(Unknown Source)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
            at com.microsoft.ManagementServices.APMAgent.Agent.Startup.AgentContextLoader.loadContext(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.Agent.Startup.Agent.premain(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
            at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
            ... 15 more
    Caused by: com.microsoft.ManagementServices.APMAgent.Exception.ApmException: Error registering MBean: com.microsoft.ManagementServices.APMAgent:type=COUNTER
            at com.microsoft.ManagementServices.APMAgent.EventSender.MBeanEventLog.registerMetricMBeans(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.EventSender.MBeanEventLog.<init>(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.EventSender.MBeanEventLog.<init>(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.AgentThreadManager.<init>(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.AgentThreadManager.<init>(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.Agent.Monitor.AgentContext.<init>(Unknown Source)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
            at com.microsoft.ManagementServices.APMAgent.Agent.Startup.AgentContextLoader.loadContext(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.Agent.Startup.Agent.premain(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
            at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
            ... 15 more
    Caused by: com.microsoft.ManagementServices.APMAgent.Exception.ApmException: Error registering MBean: com.microsoft.ManagementServices.APMAgent:type=COUNTER
            at com.microsoft.ManagementServices.APMAgent.EventSender.MBeanEventLog.registerMetricMBeans(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.EventSender.MBeanEventLog.<init>(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.EventSender.MBeanEventLog.<init>(Unknown Source)
            ... 19 more
    Mar 05, 2014 7:05:16 PM com.microsoft.ManagementServices.APMAgent.Log.SystemLogger info
    INFO: Java APM Agent loading failed (Build: 1.10.100.15, Label: NotFromLabel, BuildDate: 20131112)
    java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
            at com.microsoft.ManagementServices.APMAgent.Agent.Startup.AgentContextLoader.loadContext(Unknown Source)
            at com.microsoft.ManagementServices.APMAgent.Agent.Startup.Agent.premain(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
            at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
    Caused by: java.lang.InstantiationException: Monitor initialization failed: SEAgent.config.xml does not have a valid event sender configured
            at com.microsoft.ManagementServices.APMAgent.Agent.Monitor.AgentContext.<init>(Unknown Source)
            ... 12 more
    Does anyone have seen this error before? Can someone help me with this one?
    Thnx,

    I'm running tomcat on a CentOS release 6.4 (Final) server. I installed Tomcat 6 through an RPM from the CentOS sources. I have installed Apache Tomcat/6.0.24 wit JVM version 1.7.0_09-icedtea-mockbuild_2013_01_16_18_52-b00, the JVM Vendor is Oracle Corporation.
    My tomcat configuration needs to be done in '/etc/tomcat6/tomcat6.conf'
    I installed the APM Agent in the path '/opt/apm/' with the rights  40755 (root/root). The files have the following rights:
    -rw-rw-r-- 1 root tomcat  32046 Mar  3 15:38 apm_facade.jar
    -rw-rw-r-- 1 root tomcat 244819 Mar  3 15:38 apm_monitor.jar
    -rw-rw-r-- 1 root tomcat  38110 Mar  3 15:38 apm_producers.jar
    -rw-rw-r-- 1 root tomcat 207006 Mar  3 15:38 asm-all-3.3.1.jar
    -rw-rw-r-- 1 root tomcat   4157 Mar  3 15:38 ASM_Third_Party_Notices.txt
    -rw-rw-r-- 1 root tomcat 241368 Mar  3 15:38 DispatcherStub.dll
    -rw-rw-r-- 1 root tomcat  36880 Mar  3 15:38 pmonitor.config.xml
    -rw-rw-r-- 1 root tomcat   2625 Mar  3 15:38 SEAgent.config.xml
    -rw-rw-r-- 1 root tomcat    830 Mar  5 15:19 Starter.properties
    The above rights are equal to the /etc/tomcat6 directory with the tomcat configuration files.
    In the tomcat6.conf I have added the following entries:
    #Microsoft SCOM APM
    JAVA_OPTS="${JAVA_OPTS} -Djava.library.path=/opt/apm"
    JAVA_OPTS="${JAVA_OPTS} -javaagent:/opt/apm/apm_facade.jar -Xbootclasspath/p:/opt/apm/apm_producers.jar -Xbootclasspath/p:/opt/apm/apm_facade.jar"
    When I look into the running tomcat process I see the following:
    tomcat   17401     1  0 Mar05 ?        00:00:39 /usr/lib/jvm/jre/bin/java -Djava.library.path=/opt/apm -javaagent:/opt/apm/apm_facade.jar -Xbootclasspath/p:/opt/apm/apm_producers.jar -Xbootclasspath/p:/opt/apm/apm_facade.jar
    -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory -Djava.library.path=/opt/apm -javaagent:/opt/apm/apm_facade.jar -Xbootclasspath/p:/opt/apm/apm_producers.jar -Xbootclasspath/p:/opt/apm/apm_facade.jar -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory
    -classpath :/usr/share/tomcat6/bin/bootstrap.jar:/usr/share/tomcat6/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat6 -Dcatalina.home=/usr/share/tomcat6 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat6/temp
    -Djava.util.logging.config.file=/usr/share/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start
    My Starter.Properties looks like this:
    # Jars to load by inner classloader.
    # Use semicolons to separate the JAR entries
    ClassPath=apm_monitor.jar;asm-all-3.3.1.jar;apm_producers.jar
    # Path to pmonitor.config
    MonitorConfigFileName=pmonitor.config.xml
    # Path to SEAgent.config
    AgentConfigFileName=SEAgent.config.xml
    # Log file name
    # Example for full-path location:
    #                  LogFileName=c:\\tracelog\\apm-java-agent.log
    # Example for relative path (to agent jar files):
    #                  LogFileName=apm-java-agent.log
    LogFileName=apm-java-agent.log
    # Log level (SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST)
    # A level of FINER or FINEST may expose Personally identifiable
    # information (PII) in the log file.  The levels below INFO are
    # intended for debugging and diagnostic use only.
    LogLevel=FINEST
    The 'apm-java-agent.log' is not created on the system. The only logging is done in the catalina.out. When restarting tomcat I see the following entries in te log file:
    INFO: Initializing Java APM Agent (Build: 1.10.100.15, Label: NotFromLabel, BuildDate: 20131112)
    Mar 06, 2014 9:35:21 AM com.microsoft.ManagementServices.APMAgent.Log.SystemLogger info
    INFO: Java APM Agent loading succeeded (Build: 1.10.100.15, Label: NotFromLabel, BuildDate: 20131112)
    Mar 06, 2014 9:35:21 AM com.microsoft.ManagementServices.APMAgent.Log.SystemLogger info
    INFO: Initializing Java APM Agent (Build: 1.10.100.15, Label: NotFromLabel, BuildDate: 20131112)
    Mar 06, 2014 9:35:21 AM com.microsoft.ManagementServices.APMAgent.Log.SystemLogger warning
    WARNING: Failed registering the COUNTER MBean
    Mar 06, 2014 9:35:21 AM com.microsoft.ManagementServices.APMAgent.Log.SystemLogger error
    SEVERE: Java APM Agent initialization failed: SEAgent.config.xml does not have a valid event sender configured
    Mar 06, 2014 9:35:21 AM com.microsoft.ManagementServices.APMAgent.Log.SystemLogger info
    INFO: Java APM Agent loading failed (Build: 1.10.100.15, Label: NotFromLabel, BuildDate: 20131112)
    Hope this gives your some more background around my problem, I double checked the permissions..

  • Sender HTTP and validation

    Hallo,
    we have a HTTP sender to allow partners to send HTTP/XML message. THese messages are converted to IDOCs and are posted to the R/3 system.
    HTTP -> IDOC scencario
    Until now we have no validation of the incomming XML message.
    Goal is not to accept the wrong XML message and to send back a HTTP error code to the sender.
    Is it possible to have an adapter module on the planHTTP adapter? As I understood this is not possible???!!!
    Is it possible to use the SOAPsender Adapter with the option "No Soap"? I still want to receive HTTP/XML message and I do not want to force my partners to call a webservice.
    Can I implement a adapter module in the SOAPsender to return a specific HTTP code if the XML validation fails?
    Can this be done only in SYNCHRON mode?
    The problem is, the the IDOC to SAP is only asynchron, so do I have to implement a BPM with SYNCH-ASYNCH bridge then?
    I know, a lot of questions but all because there is no valiation on XI at the moment.
    Best regards
    Werner Magerl

    Hi,
    > Irrespective of where you are doing the validation,
    > as Idoc is an Asynch always, wouldnt you need a BPM
    > with a Synch - Asynch bridge.
    Yes, this is clear and I have implemented this BPM to cover this SYNC-ASYNC problem. I ecpected here, also, that I can send back a HTTP error code, but the only thing which is sent back is HTTP-200 for ok and HTTP-500 (time out).....
    > Even if the XML message
    > is valid and Idoc is sent succesfully, are you not
    > going to send some response back to the HTTP? Wouldnt
    > you be using a BPM in this case too?
    this is the reason, why I try to do this in an adapter module. Because I think, then the HTTP connection is still open and I can send each HTTP code I want before the message arrives in the integration server or in a BPM
    > There are 2 options from what I can understand of the
    > requirement,
    >
    > 1. Either make an Asynch call and avoid a BPM
    > altogether , but not propogate back any success or
    > error message.
    no, we wnat to show an error
    > 2. Make a synch call and use a BPM, and propgate
    > either a success or failure message.
    this is also a way we are working on, but here we have the problem of defining the answer message interfaces.
    The incomming message is defined by a industry specific XSD and I was not able to enhance this message interface to be SYNCHRON and with ANSWER message.
    But if adapter mdouel is not possible we will work on this again.
    reagrds
    Werner
    >
    > Regards,
    > Bhavesh

  • Sending IDoc from Non-SAP system to XI

    Dear all,
       We have a non sap system which needs to send IDoc to XI, Please could you answer my following four questions
    1. What should be the values for the following fields in the IDoc control record
    e.g. RCVPRN = <logical system name of XI>
    SNDPOR
    SNDPRT
    SNDPRN
    RCVPRT
    RCVPOR
    2. How does XI decide which port(idx1) to be used when it receives an idoc
    3. The third party system is a non sap one, so it does not have a client no, so I would assume, I need to use another SAP system as a meta data provider, in that case, how would i tell XI to use that port when it receives IDocs from the non-SAP system ?
    4. In what step does XI use the logical system name of the Business system(in SLD)?
    Thanks in advance
    cheers
    danus
    Edited by: Chidambaram Danus on Jan 25, 2008 2:21 PM

    Hi
    there is bit wrong interpretation of the statement
    If the sender system is a non-SAP system, the sender service is identified from the logical system name of the sender port.
    If the sender system is nonSAP it indicates taht the data is coming to XI from non sap systems such as file, database, webservice etc. to XI and from XI it will pass to sap as IDOC inbound.
    For this you need to create the logical system in SAP (receiver) and pass on that value to IDOC header.
    You could maintain it in the Business service used for Sender system (nonSAP). here it will be available in the tabs ---> History.
    note : IDOC is the concept of data container in SAP, you will not be able to have the IDOCs in non sap systems...
    Thanks
    Swarup
    Edited by: Swarup Sawant on Jan 25, 2008 2:54 PM

  • Sending a Mail to SAP inbox

    Hi all,
        I am using the following code to send the mail to SAP inbox,
      DATA : it_reclist TYPE TABLE OF somlreci1,
             wa_reclist TYPE somlreci1.
      DATA : wa_docdata TYPE sodocchgi1.
      DATA : it_message TYPE TABLE OF solisti1,
             wa_message TYPE solisti1,
             it_attach  TYPE TABLE OF sopcklsti1.
      LOOP AT it_super_uid INTO wa_super_uid.
        wa_reclist-receiver = wa_super_uid-usid.
        wa_reclist-rec_type = 'B'.
        APPEND wa_reclist TO it_reclist.
      ENDLOOP.
      wa_docdata-obj_langu  = sy-langu.
      wa_docdata-obj_name   = text-005.
      wa_docdata-obj_descr  = text-006.
      wa_docdata-sensitivty = 'F'.
      wa_message-line = text-007.
      APPEND wa_message TO it_message.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data                    = wa_docdata
          put_in_outbox                    = 'X'
        COMMIT_WORK                      = ' '
        IMPORTING
        SENT_TO_ALL                      =
        NEW_OBJECT_ID                    =
        TABLES
          packing_list                     = it_attach
        OBJECT_HEADER                    =
        CONTENTS_BIN                     =
        CONTENTS_TXT                     =
        CONTENTS_HEX                     =
        OBJECT_PARA                      =
        OBJECT_PARB                      =
          receivers                        = it_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 SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF sy-subrc = 0.
        MESSAGE text-008 TYPE 'S'.
      ENDIF.
    Still i am not able to send the mail , its giving me exception 5. Please let me know how could i modify the code.
    Thanx,
    Girish.

    HI,
    The code below demonstrates how to send an SAP mail to a users inbox (SBWP)
    : Report  ZSAPTALK                                                   :
    : Author  SAPdev.co.uk                                               :
    : Description :                                                      :
    : Send mail message to SAP mail inbox.                               :
    :                     Please visit www.sapdev.co.uk for further info :
    REPORT ZSAPMAIL NO STANDARD PAGE HEADING.
    TABLES: DRAD,
            QINF,
            DRAW,
            SOUC,
            SOFD,
            DRAP.
    DATA: P_RETURN_CODE LIKE SY-SUBRC.
    data: d_username LIKE DRAP-PRNAM.
    mail declarations
    DATA : BEGIN OF NEW_OBJECT_ID.         " the newly created email object
            INCLUDE STRUCTURE SOODK.
    DATA : END OF NEW_OBJECT_ID.
    DATA : BEGIN OF FOLDER_ID.             " the folder id of the outbox
            INCLUDE STRUCTURE SOODK.
    DATA : END OF FOLDER_ID.
    DATA : BEGIN OF REC_TAB OCCURS 5.     " the table which will contain the
            INCLUDE STRUCTURE SOOS1.       " information on the destination
    DATA : END OF REC_TAB.
    DATA : BEGIN OF OBJECT_HD_CHANGE.      " the table which contains the
            INCLUDE STRUCTURE SOOD1.       " info for the object we will be
    DATA : END OF OBJECT_HD_CHANGE.        " creating
    DATA : OBJECT_TYPE LIKE SOOD-OBJTP.    " the type of object
    DATA : BEGIN OF OBJHEAD OCCURS 5.      " the header of the object
            INCLUDE STRUCTURE SOLI.
    DATA : END OF OBJHEAD.
    DATA : BEGIN OF OBJCONT OCCURS 0.      " the contents of the object
            INCLUDE STRUCTURE SOLI.        " i.e. the text etc
    DATA : END OF OBJCONT.
    DATA : BEGIN OF OBJPARA OCCURS 5.      " formatting options
            INCLUDE STRUCTURE SELC.
    DATA : END OF OBJPARA.
    DATA : BEGIN OF OBJPARB OCCURS 5.      " formatting options
            INCLUDE STRUCTURE SOOP1.
    DATA : END OF OBJPARB.
    DATA : BEGIN OF T_MAIL_TEXT OCCURS 0,  "Message table for messages to
            STRING(255),                   "user via mailbox
           END OF T_MAIL_TEXT.
    Parameter: p_uname like sy-uname.
    **START-OF-SELECTION
    START-OF-SELECTION.
        d_username = p_uname.
        PERFORM POPULATE_EMAIL_TEXT.
        PERFORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
        PERFORM CREATE_AND_SEND_MAIL_OBJECT.
          FORM POPULATE_EMAIL_TEXT                                      *
          Inserts text for email message                                *
    FORM POPULATE_EMAIL_TEXT.
      CLEAR T_MAIL_TEXT-STRING.            "puts a blank line in
      APPEND T_MAIL_TEXT.
      APPEND T_MAIL_TEXT.
    adds failed list  on to end of success list.
      T_MAIL_TEXT-STRING = 'Test email message line 1'.
      APPEND T_MAIL_TEXT.
      T_MAIL_TEXT-STRING = 'Test email message line 1'.
      APPEND T_MAIL_TEXT.
      CLEAR T_MAIL_TEXT-STRING.            "puts a blank line in
      APPEND T_MAIL_TEXT.
      T_MAIL_TEXT-STRING = 'Header1    Header2    Header3'.
      APPEND T_MAIL_TEXT.
      T_MAIL_TEXT-STRING = '----
      APPEND T_MAIL_TEXT.
    ENDFORM.
    *&      Form  SETUP_TRX_&_RTX_MAILBOXES
      Ensure that the mailboxes of the sender (INTMGR) are set up OK
    FORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
    get the user no of the sender in order to add the mail to the
    user name's outbox for future reference
      SELECT SINGLE * FROM SOUC
               WHERE SAPNAM = SY-UNAME.    "SAP name of a SAPoffice user
      IF SY-SUBRC NE 0.
        "Error finding the SAPoffice user info for the user
        MESSAGE E064(ZR53) WITH SY-UNAME.
        P_RETURN_CODE = 1.
        EXIT.
      ENDIF.
    *Get the outbox No for the sender from the user No where the folder
                                           " type is an outbox
      SELECT * FROM SOFD WHERE OWNTP = SOUC-USRTP   "Owner type from ID
                           AND OWNYR = SOUC-USRYR   "Owner year from the ID
                           AND OWNNO = SOUC-USRNO   "Owner number from the I
                           AND FOLRG = 'O'."Output box
      ENDSELECT.
      IF SY-SUBRC NE 0.
        " Error getting folder information for the user
        MESSAGE E065(ZR53) WITH SY-UNAME.
        P_RETURN_CODE = 1.
        EXIT.
      ENDIF.
    ENDFORM.                               " SETUP_TRX_&_RTX_MAILBOXES
    *&      Form  CREATE_AND_SEND_MAIL_OBJECT
    FORM CREATE_AND_SEND_MAIL_OBJECT.
      FOLDER_ID-OBJTP = SOFD-FOLTP.        " the folder type ( usually FOL )
      FOLDER_ID-OBJYR = SOFD-FOLYR.        " the folder year ( usually 22 )
      FOLDER_ID-OBJNO = SOFD-FOLNO.        " the folder no.
      OBJECT_TYPE     = 'RAW'.             " the type of object being added
    build up the object information for creating the object
      OBJECT_HD_CHANGE-OBJLA  = SY-LANGU.  " the language of the email
      OBJECT_HD_CHANGE-OBJNAM = 'PS to DM Interface'. " the object name
    mail subject 'Mass Linking of QA, pass/fail'
      MOVE TEXT-002 TO OBJECT_HD_CHANGE-OBJDES.
      OBJECT_HD_CHANGE-DLDAT = SY-DATUM.   " the date of the email
      OBJECT_HD_CHANGE-DLTIM = SY-UZEIT.   " the time of the email
      OBJECT_HD_CHANGE-OBJPRI = '1'.       " the priority ( highest )
      OBJECT_HD_CHANGE-OBJSNS = 'F'.       " the object sensitivity
    F is functional, C - company sensitive
    object_hd_change-skips  = ' '.       " Skip first screen
    object_hd_change-acnam  = 'SM35'.    " Batch imput transaction
    object_hd_change-vmtyp  = 'T'.       " Transaction type
    add the text lines into the contents of the email
      CLEAR OBJCONT.
      REFRESH OBJCONT.
    free objcont.      " added this to delete the mail contents records
      LOOP AT T_MAIL_TEXT.
        OBJCONT-LINE = T_MAIL_TEXT-STRING.
        APPEND OBJCONT.
      ENDLOOP.
      CLEAR OBJCONT.
    build up the table of receivers for the email
      REC_TAB-RCDAT = SY-DATUM.            " the date to send the email
      REC_TAB-RCTIM = SY-UZEIT.            " the time to send the email
    the SAP username of the person who will receive the email
      REC_TAB-RECNAM = D_USERNAME.
    the user type of the person who will send the email ( USR )
      REC_TAB-SNDTP = SOUC-USRTP.
    the user year of the person who will send the email ( 22 )
      REC_TAB-SNDYR = SOUC-USRYR.
    the user number of the person who will send the email
      REC_TAB-SNDNO = SOUC-USRNO.
    the sap username of the person who will send the email
      REC_TAB-SNDNAM = SY-UNAME.
    get the user info for the receiver of the document
      SELECT SINGLE * FROM SOUC WHERE SAPNAM = D_USERNAME.
      IF SY-SUBRC NE 0.
        WRITE : / TEXT-001, D_USERNAME.    "usnam.
        EXIT.
      ENDIF.
    the user number of the person who will receive the email ( USR )
      REC_TAB-RECNO = SOUC-USRNO.
    the user type of the person who will receive the email ( USR )
      REC_TAB-RECTP = SOUC-USRTP.
    the user year of the person who will receive the email ( USR )
      REC_TAB-RECYR = SOUC-USRYR.
    the priority of the email ( highest )
      REC_TAB-SNDPRI = '1'.
    check for delivery on the email
      REC_TAB-DELIVER = 'X'.
    send express so recipient knows there is a problem
      REC_TAB-SNDEX = 'X'.
    check for a return receipt
      REC_TAB-READ = 'X'.
    the sap username of the person receiving the email
      REC_TAB-ADR_NAME = D_USERNAME.       "usnam.
    add this receiver to the internal table
      APPEND REC_TAB.
      CLEAR REC_TAB.
    call the function to create the object in the outbox of the sender
      CALL FUNCTION 'SO_OBJECT_INSERT'
           EXPORTING
                FOLDER_ID                  = FOLDER_ID
                OBJECT_HD_CHANGE           = OBJECT_HD_CHANGE
                OBJECT_TYPE                = OBJECT_TYPE
                OWNER                      = SY-UNAME
           IMPORTING
                OBJECT_ID                  = NEW_OBJECT_ID
           TABLES
                OBJCONT                    = OBJCONT
                OBJHEAD                    = OBJHEAD
                OBJPARA                    = OBJPARA
                OBJPARB                    = OBJPARB
           EXCEPTIONS
                ACTIVE_USER_NOT_EXIST      = 1
                COMMUNICATION_FAILURE      = 2
                COMPONENT_NOT_AVAILABLE    = 3
                DL_NAME_EXIST              = 4
                FOLDER_NOT_EXIST           = 5
                FOLDER_NO_AUTHORIZATION    = 6
                OBJECT_TYPE_NOT_EXIST      = 7
                OPERATION_NO_AUTHORIZATION = 8
                OWNER_NOT_EXIST            = 9
                PARAMETER_ERROR            = 10
                SUBSTITUTE_NOT_ACTIVE      = 11
                SUBSTITUTE_NOT_DEFINED     = 12
                SYSTEM_FAILURE             = 13
                X_ERROR                    = 14
                OTHERS                     = 15.
      IF SY-SUBRC NE 0.
        MESSAGE A063(ZR53) WITH SY-SUBRC.
        EXIT.
      ENDIF.
    call the function to send the already created email to the receivers
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                FOLDER_ID                  = FOLDER_ID
                OBJECT_ID                  = NEW_OBJECT_ID
                OUTBOX_FLAG                = 'X'
                OWNER                      = SY-UNAME
           TABLES
                RECEIVERS                  = REC_TAB
           EXCEPTIONS
                ACTIVE_USER_NOT_EXIST      = 1
                COMMUNICATION_FAILURE      = 2
                COMPONENT_NOT_AVAILABLE    = 3
                FOLDER_NOT_EXIST           = 4
                FOLDER_NO_AUTHORIZATION    = 5
                FORWARDER_NOT_EXIST        = 6
                NOTE_NOT_EXIST             = 7
                OBJECT_NOT_EXIST           = 8
                OBJECT_NOT_SENT            = 9
                OBJECT_NO_AUTHORIZATION    = 10
                OBJECT_TYPE_NOT_EXIST      = 11
                OPERATION_NO_AUTHORIZATION = 12
                OWNER_NOT_EXIST            = 13
                PARAMETER_ERROR            = 14
                SUBSTITUTE_NOT_ACTIVE      = 15
                SUBSTITUTE_NOT_DEFINED     = 16
                SYSTEM_FAILURE             = 17
                TOO_MUCH_RECEIVERS         = 18
                USER_NOT_EXIST             = 19
                X_ERROR                    = 20
                OTHERS                     = 21.
      IF SY-SUBRC EQ 0.
        MESSAGE I035(ZR53) WITH NEW_OBJECT_ID D_USERNAME. "usnam.
      ELSE.
        MESSAGE I036(ZR53) WITH D_USERNAME."      sy-subrc.
      ENDIF.
    ENDFORM.                               " CREATE_AND_SEND_MAIL_OBJECT
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • SAP WCF - Getting incorrect action when trying to send a RFC to SAP

    SAP WCF - Getting incorrect action when trying to send a RFC to SAP
    I am trying to send a rfc and i am getting this message below.
    Does anyone know the correct action i need to use?
    Event Type:        Warning
    Event Source:    BizTalk Server 2006
    Event Category:                BizTalk Server 2006
    Event ID:              5743
    Date:                     7/6/2009
    Time:                     3:02:26 PM
    User:                     N/A
    Computer:          saptestbox
    Description:
    The adapter failed to transmit message going to send port "WcfSendPort_SAPBinding_Rfc_Custom" with URL "sap://CLIENT=200;LANG=EN;@a/saptest/90?ListenerGwServ=sapgw90&ListenerGwHost=saptest&ListenerProgramId=testE1D200&RfcSdkTrace=False&AbapDebug=False". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.UnsupportedOperationException: Incorrect Action <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Operation Name="_x002F_SIE_x002F_E_MM_INVENTORY_INTF" Action="http://Microsoft.LobServices.Sap/2007/03/Rfc/_x002F_SIE_x002F_E_MM_INVENTORY_INTF" />
    </BtsActionMapping>. Correct the specified Action, or refer to the documentation on the allowed formats for the Actions.
    Server stack trace:
       at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)".
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    I am getting same error even after using the same operation name  in logical and  in action on physical port as in Binding file created by adapter
    Details:"Microsoft.ServiceModel.Channels.Common.UnsupportedOperationException: Incorrect Action <BtsActionMapping>
    <Operation Name="Send" Action="http://Microsoft.LobServices.Sap/2007/03/Idoc/3/ORDERS05//711/Send"/>
    </BtsActionMapping>. Correct the specified Action, or refer to the documentation on the allowed formats for the Actions. Note that Actions are case-sensitive.

  • Sending IDoc Batches to SAP: Issue with Header Mapping for SNDPRN

    We are sending batched IDocs from XI to SAP. We need the individual IDocs to reflect different SNDPRN values. Our mapping creates the different IDoc EDI_DC40 record correctly with different SNDPRN values. However, XI wipes out the SNDPRN values in the payload. When we define Header mapping to get the Sender Party as the XPath to the SNDPRN in the payload, then the header mapping errors out because the XPath returns multiple values.
    I wanted to know if anyone has successfully implemented sending IDoc batches to SAP from XI with different SNDPRN values.
    Your feedback is appreciated.
    Jay Malla
    Licensed To Code
    Genentech SAP XI Team

    Hello,
    I have the same problem. I want XI send an IDOC with the SNDPOR, SNDPRT and the SNDPRN that are in the EDIDC40.
    <u><b>I find this in sap.help : </b></u>
    <i>Mapping
    The IDoc adapter does not make any special demands on mapping. The IDoc adapter must simply be provided with an IDoc XML structure at the Integration Server outbound channel. This either already exists or must be generated by using a mapping.
    If the IDoc XML structure contains a control record, it is deleted and created again by the IDoc adapter. If you want to include additional values in the control record, you must select the Apply Control Record Values from Payload checkbox in the parameters in the communication channel and provide a corresponding mapping for the values.
    You can include the values from the following fields in your IDoc control record:
    MESCOD, MESFCT
    TEST
    EXPRESS
    STD, STDVRS, STDMES
    SNDSAD, SNDLAD
    RCVSAD, RCVLAD
    REFINT, REFGRP, REFMES</i>
    http://help.sap.com/saphelp_nw04/helpdata/en/b9/c5b13bbeb0cb37e10000000a11402f/frameset.htm
    Perhaps we must use party configuration but I don't know how do this !
    Regards,
    Chris<u></u>

  • How to send a mail from SAP 3.1H Ver.

    Hi,
      I am working on SAP 3.1H Version. I need to send mail from one of my ABAP program. Since SAP 3.1H version does not have Standard function modules which send mails from any ABAP program so how can I achive this task in this version of SAP.
    The Operating system of my application server is Sun solaris.
    Waiting for an early and postive reply.
    Thanks & Regards,
    Maqsood Khan

    REPORT ZSAPMAIL NO STANDARD PAGE HEADING.
    TABLES: DRAD,
            QINF,
            DRAW,
            SOUC,
            SOFD,
            DRAP.
    DATA: P_RETURN_CODE LIKE SY-SUBRC.
    data: d_username LIKE DRAP-PRNAM.
    mail declarations
    DATA : BEGIN OF NEW_OBJECT_ID.         " the newly created email object
            INCLUDE STRUCTURE SOODK.
    DATA : END OF NEW_OBJECT_ID.
    DATA : BEGIN OF FOLDER_ID.             " the folder id of the outbox
            INCLUDE STRUCTURE SOODK.
    DATA : END OF FOLDER_ID.
    DATA : BEGIN OF REC_TAB OCCURS 5.     " the table which will contain the
            INCLUDE STRUCTURE SOOS1.       " information on the destination
    DATA : END OF REC_TAB.
    DATA : BEGIN OF OBJECT_HD_CHANGE.      " the table which contains the
            INCLUDE STRUCTURE SOOD1.       " info for the object we will be
    DATA : END OF OBJECT_HD_CHANGE.        " creating
    DATA : OBJECT_TYPE LIKE SOOD-OBJTP.    " the type of object
    DATA : BEGIN OF OBJHEAD OCCURS 5.      " the header of the object
            INCLUDE STRUCTURE SOLI.
    DATA : END OF OBJHEAD.
    DATA : BEGIN OF OBJCONT OCCURS 0.      " the contents of the object
            INCLUDE STRUCTURE SOLI.        " i.e. the text etc
    DATA : END OF OBJCONT.
    DATA : BEGIN OF OBJPARA OCCURS 5.      " formatting options
            INCLUDE STRUCTURE SELC.
    DATA : END OF OBJPARA.
    DATA : BEGIN OF OBJPARB OCCURS 5.      " formatting options
            INCLUDE STRUCTURE SOOP1.
    DATA : END OF OBJPARB.
    DATA : BEGIN OF T_MAIL_TEXT OCCURS 0,  "Message table for messages to
            STRING(255),                   "user via mailbox
           END OF T_MAIL_TEXT.
    Parameter: p_uname like sy-uname.
    **START-OF-SELECTION
    START-OF-SELECTION.
        d_username = p_uname.
        PERFORM POPULATE_EMAIL_TEXT.
        PERFORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
        PERFORM CREATE_AND_SEND_MAIL_OBJECT.
          FORM POPULATE_EMAIL_TEXT                                      *
          Inserts text for email message                                *
    FORM POPULATE_EMAIL_TEXT.
      CLEAR T_MAIL_TEXT-STRING.            "puts a blank line in
      APPEND T_MAIL_TEXT.
      APPEND T_MAIL_TEXT.
    adds failed list  on to end of success list.
      T_MAIL_TEXT-STRING = 'Test email message line 1'.
      APPEND T_MAIL_TEXT.
      T_MAIL_TEXT-STRING = 'Test email message line 1'.
      APPEND T_MAIL_TEXT.
      CLEAR T_MAIL_TEXT-STRING.            "puts a blank line in
      APPEND T_MAIL_TEXT.
      T_MAIL_TEXT-STRING = 'Header1    Header2    Header3'.
      APPEND T_MAIL_TEXT.
      T_MAIL_TEXT-STRING = '----
      APPEND T_MAIL_TEXT.
    ENDFORM.
    *&      Form  SETUP_TRX_&_RTX_MAILBOXES
      Ensure that the mailboxes of the sender (INTMGR) are set up OK
    FORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
    get the user no of the sender in order to add the mail to the
    user name's outbox for future reference
      SELECT SINGLE * FROM SOUC
               WHERE SAPNAM = SY-UNAME.    "SAP name of a SAPoffice user
      IF SY-SUBRC NE 0.
        "Error finding the SAPoffice user info for the user
        MESSAGE E064(ZR53) WITH SY-UNAME.
        P_RETURN_CODE = 1.
        EXIT.
      ENDIF.
    *Get the outbox No for the sender from the user No where the folder
                                           " type is an outbox
      SELECT * FROM SOFD WHERE OWNTP = SOUC-USRTP   "Owner type from ID
                           AND OWNYR = SOUC-USRYR   "Owner year from the ID
                           AND OWNNO = SOUC-USRNO   "Owner number from the I
                           AND FOLRG = 'O'."Output box
      ENDSELECT.
      IF SY-SUBRC NE 0.
        " Error getting folder information for the user
        MESSAGE E065(ZR53) WITH SY-UNAME.
        P_RETURN_CODE = 1.
        EXIT.
      ENDIF.
    ENDFORM.                               " SETUP_TRX_&_RTX_MAILBOXES
    *&      Form  CREATE_AND_SEND_MAIL_OBJECT
    FORM CREATE_AND_SEND_MAIL_OBJECT.
      FOLDER_ID-OBJTP = SOFD-FOLTP.        " the folder type ( usually FOL )
      FOLDER_ID-OBJYR = SOFD-FOLYR.        " the folder year ( usually 22 )
      FOLDER_ID-OBJNO = SOFD-FOLNO.        " the folder no.
      OBJECT_TYPE     = 'RAW'.             " the type of object being added
    build up the object information for creating the object
      OBJECT_HD_CHANGE-OBJLA  = SY-LANGU.  " the language of the email
      OBJECT_HD_CHANGE-OBJNAM = 'PS to DM Interface'. " the object name
    mail subject 'Mass Linking of QA, pass/fail'
      MOVE TEXT-002 TO OBJECT_HD_CHANGE-OBJDES.
      OBJECT_HD_CHANGE-DLDAT = SY-DATUM.   " the date of the email
      OBJECT_HD_CHANGE-DLTIM = SY-UZEIT.   " the time of the email
      OBJECT_HD_CHANGE-OBJPRI = '1'.       " the priority ( highest )
      OBJECT_HD_CHANGE-OBJSNS = 'F'.       " the object sensitivity
    F is functional, C - company sensitive
    object_hd_change-skips  = ' '.       " Skip first screen
    object_hd_change-acnam  = 'SM35'.    " Batch imput transaction
    object_hd_change-vmtyp  = 'T'.       " Transaction type
    add the text lines into the contents of the email
      CLEAR OBJCONT.
      REFRESH OBJCONT.
    free objcont.      " added this to delete the mail contents records
      LOOP AT T_MAIL_TEXT.
        OBJCONT-LINE = T_MAIL_TEXT-STRING.
        APPEND OBJCONT.
      ENDLOOP.
      CLEAR OBJCONT.
    build up the table of receivers for the email
      REC_TAB-RCDAT = SY-DATUM.            " the date to send the email
      REC_TAB-RCTIM = SY-UZEIT.            " the time to send the email
    the SAP username of the person who will receive the email
      REC_TAB-RECNAM = D_USERNAME.
    the user type of the person who will send the email ( USR )
      REC_TAB-SNDTP = SOUC-USRTP.
    the user year of the person who will send the email ( 22 )
      REC_TAB-SNDYR = SOUC-USRYR.
    the user number of the person who will send the email
      REC_TAB-SNDNO = SOUC-USRNO.
    the sap username of the person who will send the email
      REC_TAB-SNDNAM = SY-UNAME.
    get the user info for the receiver of the document
      SELECT SINGLE * FROM SOUC WHERE SAPNAM = D_USERNAME.
      IF SY-SUBRC NE 0.
        WRITE : / TEXT-001, D_USERNAME.    "usnam.
        EXIT.
      ENDIF.
    the user number of the person who will receive the email ( USR )
      REC_TAB-RECNO = SOUC-USRNO.
    the user type of the person who will receive the email ( USR )
      REC_TAB-RECTP = SOUC-USRTP.
    the user year of the person who will receive the email ( USR )
      REC_TAB-RECYR = SOUC-USRYR.
    the priority of the email ( highest )
      REC_TAB-SNDPRI = '1'.
    check for delivery on the email
      REC_TAB-DELIVER = 'X'.
    send express so recipient knows there is a problem
      REC_TAB-SNDEX = 'X'.
    check for a return receipt
      REC_TAB-READ = 'X'.
    the sap username of the person receiving the email
      REC_TAB-ADR_NAME = D_USERNAME.       "usnam.
    add this receiver to the internal table
      APPEND REC_TAB.
      CLEAR REC_TAB.
    call the function to create the object in the outbox of the sender
      CALL FUNCTION 'SO_OBJECT_INSERT'
           EXPORTING
                FOLDER_ID                  = FOLDER_ID
                OBJECT_HD_CHANGE           = OBJECT_HD_CHANGE
                OBJECT_TYPE                = OBJECT_TYPE
                OWNER                      = SY-UNAME
           IMPORTING
                OBJECT_ID                  = NEW_OBJECT_ID
           TABLES
                OBJCONT                    = OBJCONT
                OBJHEAD                    = OBJHEAD
                OBJPARA                    = OBJPARA
                OBJPARB                    = OBJPARB
           EXCEPTIONS
                ACTIVE_USER_NOT_EXIST      = 1
                COMMUNICATION_FAILURE      = 2
                COMPONENT_NOT_AVAILABLE    = 3
                DL_NAME_EXIST              = 4
                FOLDER_NOT_EXIST           = 5
                FOLDER_NO_AUTHORIZATION    = 6
                OBJECT_TYPE_NOT_EXIST      = 7
                OPERATION_NO_AUTHORIZATION = 8
                OWNER_NOT_EXIST            = 9
                PARAMETER_ERROR            = 10
                SUBSTITUTE_NOT_ACTIVE      = 11
                SUBSTITUTE_NOT_DEFINED     = 12
                SYSTEM_FAILURE             = 13
                X_ERROR                    = 14
                OTHERS                     = 15.
      IF SY-SUBRC NE 0.
        MESSAGE A063(ZR53) WITH SY-SUBRC.
        EXIT.
      ENDIF.
    call the function to send the already created email to the receivers
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                FOLDER_ID                  = FOLDER_ID
                OBJECT_ID                  = NEW_OBJECT_ID
                OUTBOX_FLAG                = 'X'
                OWNER                      = SY-UNAME
           TABLES
                RECEIVERS                  = REC_TAB
           EXCEPTIONS
                ACTIVE_USER_NOT_EXIST      = 1
                COMMUNICATION_FAILURE      = 2
                COMPONENT_NOT_AVAILABLE    = 3
                FOLDER_NOT_EXIST           = 4
                FOLDER_NO_AUTHORIZATION    = 5
                FORWARDER_NOT_EXIST        = 6
                NOTE_NOT_EXIST             = 7
                OBJECT_NOT_EXIST           = 8
                OBJECT_NOT_SENT            = 9
                OBJECT_NO_AUTHORIZATION    = 10
                OBJECT_TYPE_NOT_EXIST      = 11
                OPERATION_NO_AUTHORIZATION = 12
                OWNER_NOT_EXIST            = 13
                PARAMETER_ERROR            = 14
                SUBSTITUTE_NOT_ACTIVE      = 15
                SUBSTITUTE_NOT_DEFINED     = 16
                SYSTEM_FAILURE             = 17
                TOO_MUCH_RECEIVERS         = 18
                USER_NOT_EXIST             = 19
                X_ERROR                    = 20
                OTHERS                     = 21.
      IF SY-SUBRC EQ 0.
        MESSAGE I035(ZR53) WITH NEW_OBJECT_ID D_USERNAME. "usnam.
      ELSE.
        MESSAGE I036(ZR53) WITH D_USERNAME."      sy-subrc.
      ENDIF.
    ENDFORM.                               " CREATE_AND_SEND_MAIL_OBJECT
    award points if useful,
    Aleem.

  • HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7

    All -
    I'm new to consuming web services in JDeveloper. I'm using Oracle JDEV 10.1.3.3/OC4J.  I'm using this version since it is compatible with Oracle EBS 12.1.3.  My intent is to pull data from our third party recruitment app (Success Factors) and load that data into Oracle HRIS.  I'm already doing this through a .NET application.  I'm converting it to be a Java Concurrent Program in EBS.  The code listed below is a stub call to verify I'm on the right track. I created a JDeveloper Web Services proxy project.  I'm testing it locally on my windows desktop.  When I'm able to consume the service successfully, then I'll think about moving it to the EBS server.
    I'm getting the following error when I invoke the following service:
    HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
    End point is: https://api4.successfactors.com/sfapi/v1/soap?wsdl
    Any help/assistance would be much appreciated. 
    Below is my code and output of my test:
    package emsc.oracle.apps.emscper.sfapi.proxy;
    import HTTPClient.HTTPConnection;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.IsValidSession;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.IsValidSessionResponse;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Login;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LoginResponse;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LoginResult;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Logout;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LogoutResponse;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.SFCredential;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.SFParameter;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Error;
    import java.io.File;
    import javax.xml.rpc.ServiceFactory;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Date;
    import javax.xml.ws.BindingProvider;
    import javax.xml.soap.SOAPException;
    import java.util.Map;
    import oracle.security.ssl.OracleSSLCredential;
    public class SFAPITest {
        // Declare members:      
        private String companyId;
        private String userName;
        private String password;
        private String developerKey;
        private Date   effDt;
        private String greaterThanEffDt;
        private String lessThanEffDt;
        // Declare constants:      
        final static private String breakLine = "+---------------------------------------------------------------------------+";
        final static private String format    = "yyyy-mm-dd";      
        private enum ReqId {
            PrimaryReq(25),
            PrimaryReqCEO(26),
            EmCarePrimary(27),
            RTI(28),
            EmCareClinical(29);
            private int reqId; 
            private ReqId() {
            private ReqId(int value) {
                reqId = value;
            public int getReqId() {
                return reqId;
        // Getters and Setters:  
        protected String getCompanyId() {
           return this.companyId;
        protected void setCompanyId(String value) {
           this.companyId = value;                 
        protected String getUserName() {
           return this.userName;
        protected void setUserName(String value) {
           this.userName = value;                 
        protected String getPassword() {
           return this.password;
        protected void setPassword(String value) {
           this.password = value;                 
        protected String getDeveloperKey() {
           return this.developerKey;
        protected void setDeveloperKey(String value) {
           this.developerKey = value;                 
        protected Date getEffDt() {
            return this.effDt;
        protected void setEffDt(Date value) {
            this.effDt = value;                 
        protected String getGreaterThanEffDt() {
           return this.greaterThanEffDt;
        protected void setGreaterThanEffDt(String value) {
           this.greaterThanEffDt = value;                 
        protected String getLessThanEffDt() {
           return this.lessThanEffDt;
        protected void setLessThanEffDt(String value) {
           this.lessThanEffDt = value;                 
        public void runProgram()
            SFAPIService mySFAPIService;
            String CompletionText = "";
            String effDtStr2 = null;
        /* Code your program logic here.
        * Use getJDBCConnection method to get the connection object for any
        * JDBC operations.
        * Use CpContext provided commit,rollback methods to commit/rollback
        * data base transactions.
        * Don't forget to release the connection before returning from this
        * method.
        /* Call setCompletion method to set the request completion status and
        * completion text.
        * Status values are ReqCompletion.NORMAL,ReqCompletion.WARNING,
        * ReqCompletion.ERROR.
        * Use Completion text message of length 240 characters. If it is more
        * than 240 then full string will appear in log file and truncated 240
        * characters will be used as request completion text.
        try
            ServiceFactory factory = ServiceFactory.newInstance();
            mySFAPIService = (emsc.oracle.apps.emscper.sfapi.proxy.SFAPIService)factory.loadService(emsc.oracle.apps.emscper.sfapi.proxy.SFAPIService.class);      
            SFAPI api = mySFAPIService.getSFAPI();
           /// SFAPI api = new SFAPI();
            //Map<String, Object> requestContext = ((BindingProvider) api).getRequestContext();
            //requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
            System.out.println("ServiceName => " + mySFAPIService.getServiceName().toString());
            System.out.println("End Point   => " + mySFAPIService.getServiceName().toString());
            System.out.println(breakLine);
            // Authentication: Login to SFAPI:
            SFCredential credential = new SFCredential();
            // Fake credentials being passed in for this post:   
            credential.setCompanyId("XXX");
            credential.setUsername("XXX");
            credential.setPassword("XXX");
            credential.setDeveloperKey("XXX");
            HTTPConnection httpsConnection = null;       
            OracleSSLCredential _credential = new OracleSSLCredential();      
            _credential.setWallet("\\\\\\C:\\Program Files\\Java\\jdk1.6.0_33\\jre\\lib\\security", "ParkEstes3");
            /*System.setProperty("javax.net.ssl.trustStore","C:\\\\\OraHome_1\\jdev\\jdevbin\\jdk\\jre\\lib\\security\\keystore");
            System.setProperty("javax.net.ssl.trustStorePassword","changeit");  
            System.out.println(System.getProperty("javax.net.ssl.trustStore"));*/
            // SFParameter: Define a generic SFParameter List.  This is a necessary parameter
            // to invoking calls in SFAPI:      
             /*System.setProperty("javax.net.ssl.keyStore",
             "file:\\\C:\\jdk1.4.1\\jre\\lib\\security\\client.keystore");
             System.setProperty("javax.net.ssl.keyStorePassword","welcome");         */
            /*  System.setProperty("oracle.net.wallet_location",
                          "(SOURCE=(METHOD=file)(METHOD_DATA=(DIRECTORY=\\\C:\Users\dparrish\Oracle\WALLETS)))");  // (2)                     */
            File kstore = new File("C:\\OraHome_1\\jdev\\jdevbin\\jdk\\jre\\lib\\security\\jssecacerts");
            boolean exists = kstore.exists();
            if (!exists) {
                System.out.println("Keystore does not exist");
            else {
                System.out.println("Keystore does exist");
            System.setProperty("javax.net.ssl.trustStore", kstore.getAbsolutePath());
            System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
            //System.setProperty("proxySet", "false");
            //System.setProperty("http.proxyHost", "127.0.0.1");
            //System.setProperty("http.proxyPort", "8080");
            System.out.println(kstore.getAbsolutePath());
            List<SFParameter> lst = new ArrayList<SFParameter>();
            SFParameter param = new SFParameter();
            param.setName("");
            param.setValue("");
            lst.add(param);      
            SFParameter[] sfParam = lst.toArray(new SFParameter[lst.size()]);
            Login login = new Login();
            try {
                login.setCredential(credential);
                System.out.println("1");
                login.setParam(sfParam);
                System.out.println("2");
                LoginResponse loginResponse = new  LoginResponse();
                LoginResult loginResult = new LoginResult();
                try {
                     loginResponse = api.login(login);               
                catch (Exception e ) {
                    System.out.println(e.getMessage());
                System.out.println("3");
                try {               
                     loginResult = loginResponse.getResult();
                catch (Exception e ) {
                    System.out.println(e.getMessage());
                System.out.println("4");
                IsValidSession vs = new IsValidSession();                  
                IsValidSessionResponse isValidSessionResponse = api.isValidSession(vs);
                System.out.println("5");
                if (isValidSessionResponse.isResult()) {
                     System.out.println("Session is valid");
                     System.out.println("Result => " + loginResult.getSessionId());
                     System.out.println(breakLine);              
                    Logout logout = new Logout();
                    LogoutResponse logoutResponse = api.logout(logout);
                    if (logoutResponse.isResult()) {
                         System.out.println("Logout of SFAPI Successful");
                    else {
                        System.out.println("Logout of SFAPI Unsuccessful");
                else {
                     System.out.println("Session is invalid");
                    List<Error> errors = new ArrayList<Error>();
                    for (int i = 0; i < loginResult.getError().length;  i++) {
                        errors.add(loginResult.getError()[i]);
                    for (int i = 0; i < errors.size(); i++) {
                         System.out.println("Error Indice   => " + i);
                         System.out.println("Error Code:    => " + errors.get(i).getErrorCode());
                         System.out.println("Error Message: => " + errors.get(i).getErrorMessage());
                         System.out.println(breakLine);                                                          
                    } // end for loop of SFObject errors
                } // end InvalidSession
            catch (Exception e)
                 System.out.println("Session Credential Exception");
                 System.out.println("Exception => " + e.getMessage());
                 System.out.println(breakLine);                   
        catch (Exception e)
            System.out.println("Parameter List Exception");
            System.out.println("Exception => " + e.getMessage());
            System.out.println(breakLine);
        }   // end runProgram
        // Constructor:
        public SFAPITest()  {
        } // end constructor
        public static void main (String args[]) {
            try
                SFAPITest test = new SFAPITest();        
                test.runProgram();
            catch (Exception e) {
                System.out.println("main exception => " + e.getMessage());
    } // SFAPITest
    Here is the output with trace:
    WARNING: Unable to connect to URL: https://api4.successfactors.com:443/sfapi/v1/soap due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
    Session Credential Exception
    Exception => ; nested exception is:
        HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
    +---------------------------------------------------------------------------+
    Process exited with exit code 0.

    The other end is throwing back a programming error.
    That might be because you are sending incorrect data and the other end fails to validate it.
    You might be able to guess based on your C# code.  But, since you are using soap one generic solution is available to you.
    - Get an http proxy interceptor like wireshark.
    - Run it while your C# app runs, collect the http requests from that.
    - Run it while running your java code, collect the http requests from that.
    Compare the two.

Maybe you are looking for