Assigning Tasks and Sending Notifications to Users Dynamically

BPM Experts,
We have a BPM process which gets triggered from a JWD application. The issue which we are having is as follows
1.Dynamic allocation of Single user to a task is not working. The  approach we have taken is WD application will send User Unique Id from context and it will be mapped to getPrincipal exression.
2.Assign to task to multiple users, first in complex type we are not able to set the  cardinality 0..n , it accepting 0..1 or 1..1...To handle this we have appended each of IUsedId sent as string in WD with special characters and tried using tokenize function and then getPrincipals even that also not working
Any quick response and pointers will be highly appreciated
FYI... we cannot use Portal UME groups in this scenario
Best regards,
Prasad

Hi Julian,
Thanks for the reply, I am getting below warning when trying to deploy the EAR which has got EJB as used DC. The same error is coming when I am trying use the same in BPM after deployment at runtime -
com.sap.engine.services.ejb3.runtime.impl.refmatcher.EJBResolvingException: Cannot start application xxxxx.com/devc~eardynamicusers; nested exception is: java.rmi.RemoteException: ASJ.dpl_ds.006125 Error occurred while starting application locally and wait.; nested exception is:
*     com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Application [xxxxx.com/devc~eardynamicusers] cannot be started. Reason: it has hard reference to resource [devc~ejbdynamicusers] with type [application], which is not active on the server.*
Hint: 1) Is referred resource deployed? 2) Is referred resource able to start?     at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.startApp(DefaultContainerRepository.java:351)
     at com.sap.engine.services.ejb3.runtime.impl.refmatcher.result.SingleResultImpl.add(SingleResultImpl.java:17)
     at com.sap.engine.services.ejb3.runtime.impl.refmatcher.BeanMatcher.matchLocalInterfaces(BeanMatcher.java:208)
     at com.sap.engine.services.ejb3.runtime.impl.refmatcher.BeanMatcher.matchInterfaces(BeanMatcher.java:83)
     at com.sap.engine.services.ejb3.runtime.impl.refmatcher.BeanMatcher.matchReferenceToBean(BeanMatcher.java:46)
     at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.matchBean(DefaultContainerRepository.java:390)
     at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.matchApps(DefaultContainerRepository.java:367)
     at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.getEnterpriseBeansContainers(DefaultContainerRepository.java:95)
     at com.sap.engine.services.ejb3.runtime.impl.DefaultRemoteObjectFactory.resolveReference(DefaultRemoteObjectFactory.java:73)
     at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:145)
     at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:64)
     at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl._getObjectInstance(ObjectFactoryBuilderImpl.java:77)
     at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl.access$100(ObjectFactoryBuilderImpl.java:33)
     at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl$DispatchObjectFactory.getObjectInstance(ObjectFactoryBuilderImpl.java:228)
     at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:283)
     at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:450)
     at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:224)
     at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:243)
     at javax.naming.InitialContext.lookup(InitialContext.java:392)
     at javax.naming.InitialContext.lookup(InitialContext.java:392)
     at com.sap.glx.mapping.execution.implementation.function.BeanFunctionProvider.createBeanFunction(BeanFunctionProvider.java:24)
     at com.sap.glx.mapping.execution.implementation.Compiler$NativeBeanFunction.invokeNative(Compiler.java:362)
     at com.sap.glx.mapping.execution.implementation.rule.invocation.StandardInvocation.step(StandardInvocation.java:133)
     at com.sap.glx.mapping.execution.implementation.rule.expression.DeepExpression$Resolver.resolve(DeepExpression.java:45)
     at com.sap.glx.mapping.execution.implementation.rule.expression.DeepExpression$Resolver.<init>(DeepExpression.java:27)
     at com.sap.glx.mapping.execution.implementation.rule.expression.DeepExpression.internalExpress(DeepExpression.java:77)
     at com.sap.glx.mapping.execution.implementation.rule.expression.AbstractExpression.express(AbstractExpression.java:50)
     at com.sap.glx.mapping.execution.implementation.rule.part.AbstractPart.processSourceExpression(AbstractPart.java:117)
     at com.sap.glx.mapping.execution.implementation.rule.part.TerminalPart.internalPartake(TerminalPart.java:23)
     at com.sap.glx.mapping.execution.implementation.rule.part.AbstractPart.partake(AbstractPart.java:87)
     at com.sap.glx.mapping.execution.implementation.rule.mapping.NarrowMapping.internalMap(NarrowMapping.java:42)
     at com.sap.glx.mapping.execution.implementation.rule.mapping.AbstractMapping.map(AbstractMapping.java:49)
     at com.sap.glx.mapping.execution.implementation.rule.invocation.StandardInvocation$ImplementedInput.receive(StandardInvocation.java:77)
     at com.sap.glx.mapping.execution.implementation.invoker.MediatedSdoInvoker$Mediator.createInputDataObject(MediatedSdoInvoker.java:110)
     at com.sap.glx.mapping.execution.implementation.invoker.MediatedSdoInvoker.invokeNative(MediatedSdoInvoker.java:155)
     at com.sap.glx.mapping.execution.implementation.Compiler$NativeBeanFunction.invokeNative(Compiler.java:364)
     at com.sap.glx.mapping.execution.implementation.rule.invocation.StandardInvocation.step(StandardInvocation.java:133)
     at com.sap.glx.mapping.execution.implementation.rule.expression.DeepExpression$Resolver.resolve(DeepExpression.java:45)
     at com.sap.glx.mapping.execution.implementation.rule.expression.DeepExpression$Resolver.<init>(DeepExpression.java:27)
     at com.sap.glx.mapping.execution.implementation.rule.expression.DeepExpression.internalExpress(DeepExpression.java:77)
     at com.sap.glx.mapping.execution.implementation.rule.expression.AbstractExpression.express(AbstractExpression.java:50)
     at com.sap.glx.mapping.execution.implementation.rule.part.AbstractPart.processSourceExpression(AbstractPart.java:117)
     at com.sap.glx.mapping.execution.implementation.rule.part.BroadPart.internalPartake(BroadPart.java:38)
     at com.sap.glx.mapping.execution.implementation.rule.part.AbstractPart.partake(AbstractPart.java:87)
     at com.sap.glx.mapping.execution.implementation.rule.part.BroadPart.internalPartake(BroadPart.java:46)
     at com.sap.glx.mapping.execution.implementation.rule.part.AbstractPart.partake(AbstractPart.java:87)
     at com.sap.glx.mapping.execution.implementation.rule.mapping.NarrowMapping.internalMap(NarrowMapping.java:42)
     at com.sap.glx.mapping.execution.implementation.rule.mapping.AbstractMapping.map(AbstractMapping.java:49)
     at com.sap.glx.mapping.execution.implementation.Runner.transform(Runner.java:61)
     at com.sap.glx.mapping.execution.implementation.Runner.transform(Runner.java:41)
     at com.sap.glx.core.internaladapter.Transformer$TransformerTemplateAccessor$MapperTemplate$ImplementedInvocationHandler.map(Transformer.java:3016)
     at com.sap.glx.core.internaladapter.Transformer$TransformerTemplateAccessor$MapperTemplate$ImplementedInvocationHandler.invoke(Transformer.java:2997)
     at com.sap.glx.core.internaladapter.Transformer$TransformerInvocationHandler.invoke(Transformer.java:3284)
     at com.sap.glx.core.dock.impl.DockObjectImpl.invokeMethod(DockObjectImpl.java:530)
     at com.sap.glx.core.kernel.trigger.config.Script$MethodInvocation.execute(Script.java:245)
     at com.sap.glx.core.kernel.trigger.config.Script.execute(Script.java:791)
     at com.sap.glx.core.kernel.execution.transition.ScriptTransition.execute(ScriptTransition.java:63)
     at com.sap.glx.core.kernel.execution.transition.Transition.commence(Transition.java:138)
     at com.sap.glx.core.kernel.mmtx.DirectNestedTransaction.inPrepare(DirectNestedTransaction.java:67)
     at com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_prepare(AbstractTransaction.java:198)
     at com.sap.glx.core.kernel.mmtx.AbstractTransaction.commit(AbstractTransaction.java:81)
     at com.sap.glx.core.kernel.mmtx.DirectNestedTransaction.inPrepare(DirectNestedTransaction.java:68)
     at com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_prepare(AbstractTransaction.java:198)
     at com.sap.glx.core.kernel.mmtx.AbstractTransaction.commit(AbstractTransaction.java:81)
     at com.sap.glx.core.kernel.mmtx.PrimaryTransaction.inPrepare(PrimaryTransaction.java:125)
     at com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_prepare(AbstractTransaction.java:198)
     at com.sap.glx.core.kernel.mmtx.AbstractTransaction.commit(AbstractTransaction.java:81)
     at com.sap.glx.core.kernel.execution.LeaderWorkerPool$Follower.run(LeaderWorkerPool.java:129)
     at com.sap.glx.core.resource.impl.common.WorkWrapper.run(WorkWrapper.java:58)
     at com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator$1.run(ServiceUserManager.java:124)
     at java.security.AccessController.doPrivileged(Native Method)
     at javax.security.auth.Subject.doAs(Subject.java:337)
     at com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator.run(ServiceUserManager.java:121)
     at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:182)
     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:299)
at: NamingException: Exception during lookup operation of object with name xxxxx.com/devc~eardynamicusers/LOCAL/DynamicUsersBean/bean.DynamicUsersBeanLocal, cannot resolve object reference.
Edited by: Hemanth Racharla on Jun 19, 2011 6:18 PM

Similar Messages

  • Workflow API which can be used to avoid sending notification to user

    Hi Folks,
    We want Workflow API which can be used to avoid sending notification to user for particular type of error.
    Say we are using following API which are used to send notification to mailbox as soon as program run into error.
    wf_core.context(c_v_package_name
    ,c_v_func_name2
    ,p_event.getEventName()
    ,c_v_task_id_prompt||l_n_task_id
    ,l_v_msg_data);
    wf_event.seterrorinfo(p_event, c_v_result_error);
    Now we want to restrict certain type of error to send as a notification however we want to keep this record in wf_notifications table for further investigation.
    Thanks and Regards,
    Javed Khan

    Matt,
    It looks like another person had a similar question before, see the following thread:
    https://supportforums.cisco.com/discussion/9697836/can-use-axl-or-other-api-get-calls-progress
    Also, according to the comments seen on that post, I was able to find the JTAPI developers guide, see more information below:
    http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/jtapi_dev/8_6_1/jtapidevguide/overview.html
    If this still does not satisfy your question then, the best you can do is post this inquiry on the Cisco Developer Network on the following link:
    https://developer.cisco.com/site/devnet/home/index.gsp
    Hope this information helps,
    Marco Rojas.

  • Need to send notification to user when salary added or updated on Salary form (11.5.10.2)

    We do not have AME so workflows are not available to us, but I need to find a way to send notifications to users/managers of salary changes.  When a user adds or updates a salary, it needs to go to a second user for approval.  The second user is not going to know to approve without a notification that one is ready to approve.  Can someone help me set this up?  I don't see anywhere in the form where it can be personalized. Is there a simple way to do this?  I see from blogs that some used an alert which fired when the salary admin record is inserted and sent a message to the manager. The manager could then go back into the salary admin form with the salary admin:approve profile on and approve it.  Or if that wouldn't work, then to use a trigger.  Where would these be done at using the Salary form?
    Any help would be appreciated!

    Any thoughts?Just kill the user

  • Step to schedule to run the report and send to the users in Unix (10g AS)

    Hello;
    I'm looking for the script or the guide to schedule generate monthly report and send to the users such as using batch or cron job. Please help.
    Thanks in advance,
    TD

    Hi,
    There are Parameters DESTTYPE, DESFORMAT and DESNAME. You can set these parameters to get as you want.
    1) Output in Excel File
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'FILE');
         ADD_PARAMETER(PL_ID, 'DESFORMAT', TEXT_PARAMETER, 'DELIMITED');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<file_name>.XLS');2) output to printer
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<printer_name>');3) Email - Have to configure SMTP and all. ( i didn't checked it)
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'MAIL');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<email_id>');Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • Assign task and see users from team

    Hi,
    I am using Vibe 4 with LDAP authentication.
    I am desperately trying to use the feature "assign task to user" or to "group".
    However, users...

    At our organization we use the same dropdown for many different custom forms; job titles. Since Vibe does not allow for the use of the same dropdown...

  • How to upload a template in sharepoint and send notification through labview?

    Hi,
    i am trying to make a form in LabView and want to send notification through labview if possible and upload it on sharepoint site. Can it be done?
    I am attaching the vi. in this i have few questions?
    In front panel if you click STANDARD there will be several options through which we can choose from. For every  option which is clicked by user i need to get a pop up box in which there will be options which user want to choose. example if user select A then pop up box pops out and there will be 5 things in which he need to tick depending on what he wants. I tried to make case for each options but could not understand how to do it.
    And
    How to make Submit, Exit, preview order buttons?
    Thank You
    Attachments:
    WEB_TEST.vi ‏13 KB

    Hello Hnagpal,
    I just wanted to clarify the question first. Are you basically wanting to create a LabVIEW VI that you can upload to a Microsoft SharePoint site, and then have users who go to the SharePoint site run this VI directly from the site, and essentially see the front panel on SharePoint site? If this is the case, I don't believe this currently supported in LabVIEW. There may be a way to do it by creating a web service with your VI first, and then using this web service file in conjunction with sharepoint, but that may be tricky to get working.
    As for making case structures, the case structure you have in your VI will only run once (you need to put it in a while loop if you want the functionality of having it update when the user changes their selection). The case structure will choose the case that is selected when the user first runs the VI. You also need to put the code you want to run for each case inside the respective cases of the structure (I assume this was your next step since there is currently nothing inside the case structure).
    To make various buttons, you can go to the front panel, right click and go to "modern" then "boolean" and put and "ok button" on your front panel. You can then change the name of the button to whatever you want and edit the text it displays (like Submit, Exit, or Preview). I hope this helps!
    -Nathan H
    Software Developer
    National Instruments

  • What is standard task for sending notification

    Is there any standard common workflow task which are using SELFITEM.SENDTASKDESCRIPTION for sending notification?

    Hello,
    As far as I am able to get a clear understanding of your question, there will not be a common task for the notifications. It depends on the scenario in which it is used. You can find a lot of standard tasks which use the SELFITEM.SENDTASKDESCRIPTION. Just use the where-used list of the business object in the business object builder to view the list.
    It would be better if you could provide some more details as to what you are planning to do and other things so that the answers can help you.
    Hope this will help.
    Regards,
    Samson

  • Find deadlock and send notification

    Hi World,
    I am looking for trigger to find out the deadlock and send an email to me to kill .
    can you help me please

    proora, the condition you are speaking about is probably just lock waited task rathter than a deadlock. A deadlock (simple form) is where task_A wants resources held by task_B and task_B want resources held by task_A. Since both process hold resouces needed by the other neighter will ever be able to get the resouces it needs to continue. Oracle will detect this situation and automatically choose a process and kill it so the other process can get the newly freed resources and complete. Oracle records when this occurs.
    Your situation is more highly a locked waited task caused by one session performing DML and not issueing a timely commit to release the locks. Oracle provides a lock tree script in the $ORACLE_HOME/rdbms/admin directly named something like utlltree.sql Numerous lock waited scripts have been posted on this and other forumns.
    The other possibility is that the entire database is hung, but this situation is unlikely. Oracle support provides articles on what to do in the case of a hung database.
    HTH -- Mark D Powell --

  • Getting the validity period of a Document and send notification

    Dear Experts
    I have enabled Timebased publishing for some folders. Now I want to send a notification to the Administrator prior to expiry of a document.
    Can I achieve using a scheduler Task?
    If yes, if choose the CM system on which i want the scheduler to be executed will it execute for all subfolders?
    Regards
    Harish

    Hi Harish,
    I think you can achieve using a schedular task, Pls go thro the useful links.
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/5b6635f5e0ef428fb513336881679b/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/5b6635f5e0ef428fb513336881679b/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/5b6635f5e0ef428fb513336881679b/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/5b6635f5e0ef428fb513336881679b/frameset.htm</a>
    And also you send the notification to administrator, using the KM RecentNotification iview.
    <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/3a/d60a00803111d5992f00508b6b8b11/content.htm">Notification</a>
    Regards
    Prakash

  • How to generate report output in csv file and send it to user email inbox

    Hi All,
    We have requiremnt to generate the csv file from the report (Bex query)automatically and need to send that file automatically to user email address every week.
    It should be done automatically and one more thing the file name should contain that particuar date
    for example if we generate file automatically today the file name should be like below.
    US_04_15_2009.CSV
    Any one have any ideas?
    Regards,
    Sirisha

    Hi Arun Varadarajan.
    Thanks for your reply.We are in BI 7.0.Can you tell me how to  broadcast the query as CSV.Please let me know  if there is any possiblity to display or change the file name dynamically  based on system date.
    Regards,
    Sirisha
    Edited by: sirisha Nekkanti on Apr 16, 2009 4:08 AM

  • Monitor exclusive lock on a table and send notification email through EM

    Hi,
    I have Oracle10g and EM10G running on different servers.
    now one of my plsql code creates an exclusive lock on one of my tables.
    i want to monitor this exclusive lock on this table through the EM. and when the exclusive lock on the table is continuing for more than 1 hour, i want an email notification sent to me by the EM.
    How can i do this?
    Can someone help me achieve this above situation.
    Thanks.
    Philip.

    One of the nice about OEM is that a lot of the things are self explanatory. E.g. I never read docs to set up our first user defined metrics. It is really just to dive in there. Define a metric and the sql you want to use for monitoring the lock. Then you just go and create email notification for this when it hits warning or critical treshold.

  • Read from sql task and send to data flow task - [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.

    I have created a execut sql task -
    In that, i have a created a 'empidvar' variable of string type and put sqlstatement = 'select distinct empid from emp'
    Resultset=resultname=0 and variablename=empidvar
    I have added data flow task of ole db type and I put this sql statement under sql command - exec emp_sp @empidvar=?
    I am getting an error.
    [OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.
    [SSIS.Pipeline] Error: component "OLE DB Source" (1) failed the pre-execute phase and returned error code 0xC02092B4.

    shouldnt setting be Result
    Set=Full Resultset as your query returns a resultset? also i think variable to be mapped should be of object type.
    Then for data flow task also you need to put it inside a ForEachLoop based on ADO.NET recordset and map your earlier variable inside it so as to iterate for every value the sql task returns.
    Also if using SP in oledb source make sure you read this
    http://consultingblogs.emc.com/jamiethomson/archive/2006/12/20/SSIS_3A00_-Using-stored-procedures-inside-an-OLE-DB-Source-component.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Convert internal table data to pdf format and send mail to Users

    Hi all ,
    I want to convert the data available in internal table to pdf format and then send it to mail .
    Please tell me wht are the fn modules available to convert the data from internal table to pdf and then send it mail .
    regards
    santosh .

    Hi Santosh
    Sending mail with attachment report in Background
    Content Author: Fernando Faian
    I have read the hint about "Sending mail with attachment report".
    It's great, but how can I make this function work in background??
    I had that needed last year too. See attachment a function group with two functions. The second one has that functionality to send email or fax (SAP office) with attachment objects in background job using SO_ATTACHMENT_INSERT function. 
    Pay attention because it’s working with output list from spool converted to pdf. 
    =================================================================================
    z_send_email_fax_global
    FUNCTION-POOL z_gfaian_mail_fax.            "MESSAGE-ID ..
    WORK TABLE AREAS
    TABLES: tsp01.
    INTERNAL TABLES
    DATA: lt_rec_tab LIKE STANDARD TABLE OF soos1 WITH HEADER LINE,
          lt_note_text   LIKE STANDARD TABLE OF soli  WITH HEADER LINE,
          lt_attachments LIKE STANDARD TABLE OF sood5 WITH HEADER LINE.
    DATA: lt_objcont LIKE STANDARD TABLE OF soli WITH HEADER LINE,
          lt_objhead LIKE STANDARD TABLE OF soli WITH HEADER LINE.
    DATA: pdf_format LIKE STANDARD TABLE OF tline WITH HEADER LINE.
    TYPES: BEGIN OF y_files,
           file(60) TYPE c,
           END OF y_files.
    DATA: lt_files TYPE STANDARD TABLE OF y_files WITH HEADER LINE.
    DATA: l_objcont     LIKE soli OCCURS 0 WITH HEADER LINE.
    DATA: l_objhead     LIKE soli OCCURS 0 WITH HEADER LINE.
    STRUCTURES
    DATA: folder_id      LIKE soodk,
          object_id      LIKE soodk,
          link_folder_id LIKE soodk,
          g_document     LIKE sood4,
         g_header_data  LIKE sood2,
          g_folmem_data  LIKE sofm2,
          g_header_data  LIKE sood2,
          g_receive_data LIKE soos6,
          g_ref_document LIKE sood4,
          g_new_parent   LIKE soodk,
          l_folder_id    LIKE sofdk,
          v_email(50).
    DATA: hd_dat  like sood1.
    VARIABLES
    DATA: client  LIKE tst01-dclient,
          name    LIKE tst01-dname,
          objtype LIKE rststype-type,
          type    LIKE rststype-type.
    DATA: numbytes TYPE i,
          arc_idx LIKE toa_dara,
          pdfspoolid LIKE tsp01-rqident,
          jobname LIKE tbtcjob-jobname,
          jobcount LIKE tbtcjob-jobcount,
          is_otf.
    DATA: outbox_flag LIKE sonv-flag VALUE 'X',
          store_flag  LIKE sonv-flag,
          delete_flag LIKE sonv-flag,
          owner       LIKE soud-usrnam,
          on          LIKE sonv-flag VALUE 'X',
          sent_to_all LIKE sonv-flag,
          g_authority LIKE sofa-usracc,
          w_objdes    LIKE sood4-objdes.
    DATA: c_file LIKE rlgrap-filename,
          n_spool(6) TYPE n.
    DATA: cancel.
    DATA: desired_type  LIKE sood-objtp,
          real_type LIKE sood-objtp,
          attach_type LIKE sood-objtp,
          otf LIKE sood-objtp VALUE 'OTF', " SAPscript Ausgabeformat
          ali LIKE sood-objtp VALUE 'ALI'. " ABAP lists
    CONSTANTS
    CONSTANTS: ou_fol LIKE sofh-folrg              VALUE 'O',
               c_objtp    LIKE g_document-objtp    VALUE 'RAW',
               c_file_ext LIKE g_document-file_ext VALUE 'TXT'.
    =================================================================================
    z_send_email_fax2
    FUNCTION z_faian_mail_fax2.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"     REFERENCE(FAX_MAIL_NUMBER) TYPE  SO_NAME
    *"     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *"     REFERENCE(OBJECT_TYPE) TYPE  SO_ESCAPE
    *"  TABLES
    *"      LT_BODY_EMAIL STRUCTURE  SOLI
    *"  EXCEPTIONS
    *"      ERR_NO_ABAP_SPOOLJOB
    Fist part: Verify if the spool really exists
      SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
      IF sy-subrc NE 0.
        RAISE err_no_abap_spooljob. "doesn't exist
      ELSE.
        client = tsp01-rqclient.
        name   = tsp01-rqo1name.
        CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
             EXPORTING
                  authority     = 'SP01'
                  client        = client
                  name          = name
                  part          = 1
             IMPORTING
                  type          = type
                  objtype       = objtype
             EXCEPTIONS
                  fb_error      = 1
                  fb_rsts_other = 2
                  no_object     = 3
                  no_permission = 4
                  OTHERS        = 5.
        IF objtype(3) = 'OTF'.
          desired_type = otf.
        ELSE.
          desired_type = ali.
        ENDIF.
        CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
             EXPORTING
                  rqident              = src_spoolid
                  desired_type         = desired_type
             IMPORTING
                  real_type            = real_type
             TABLES
                  buffer               = l_objcont
             EXCEPTIONS
                  no_such_job          = 14
                  type_no_match        = 94
                  job_contains_no_data = 54
                  no_permission        = 21
                  can_not_access       = 21
                  read_error           = 54.
        IF sy-subrc EQ 0.
          attach_type = real_type.
        ENDIF.
        CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
             EXPORTING
                  owner     = sy-uname
                  region    = ou_fol
             IMPORTING
                  folder_id = l_folder_id
             EXCEPTIONS
                  OTHERS    = 5.
    fill out informations about the header of the email
        CLEAR: g_document.
        g_document-foltp     = l_folder_id-foltp.
        g_document-folyr     = l_folder_id-folyr.
        g_document-folno     = l_folder_id-folno.
        g_document-objtp     = c_objtp.
        g_document-objdes    = header_mail.
        g_document-file_ext  = c_file_ext.
        g_header_data-objdes    = header_mail.
        CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
             EXPORTING
                  method      = 'SAVE'
                  office_user = sy-uname
             IMPORTING
                  authority   = g_authority
             TABLES
                  objcont     = lt_body_email
                  attachments = lt_attachments
             CHANGING
                  document    = g_document
                  header_data = g_header_data
             EXCEPTIONS
                  OTHERS      = 1.
        folder_id-objtp = l_folder_id-foltp.
        folder_id-objyr = l_folder_id-folyr.
        folder_id-objno = l_folder_id-folno.
        object_id-objtp = c_objtp.
        object_id-objyr = g_document-objyr.
        object_id-objno = g_document-objno.
        link_folder_id-objtp = l_folder_id-foltp.
        link_folder_id-objyr = l_folder_id-folyr.
        link_folder_id-objno = l_folder_id-folno.
        REFRESH lt_rec_tab.
       CLEAR lt_rec_tab.
       lt_rec_tab-sel        = 'X'.
       lt_rec_tab-recesc     = object_type.   "This field for FAX/MAIL
       lt_rec_tab-recnam     = 'U-'.
       lt_rec_tab-deliver    = 'X'.
       lt_rec_tab-not_deli   = 'X'.
       lt_rec_tab-read       = 'X'.
       lt_rec_tab-mailstatus = 'E'.
       lt_rec_tab-adr_name   = fax_mail_number.
       lt_rec_tab-sortfield  = fax_mail_number.
       lt_rec_tab-recextnam  = fax_mail_number.
       lt_rec_tab-sortclass  = '5'.
       APPEND lt_rec_tab.
          lt_rec_tab-recextnam = fax_mail_number.
          lt_rec_tab-recesc = object_type.
          lt_rec_tab-sndart = 'INT'.
          lt_rec_tab-sndpri = 1.
          APPEND lt_rec_tab.
        lt_files-file = c_file.
        APPEND lt_files.
    begin of insertion by faianf01
        hd_dat-objdes = header_mail.
        CALL FUNCTION 'SO_ATTACHMENT_INSERT'
             EXPORTING
                  object_id                  = object_id
                  attach_type                = attach_type
                  object_hd_change           = hd_dat
                  owner                      = sy-uname
             TABLES
                  objcont                    = l_objcont
                  objhead                    = l_objhead
             EXCEPTIONS
                  active_user_not_exist      = 35
                  communication_failure      = 71
                  object_type_not_exist      = 17
                  operation_no_authorization = 21
                  owner_not_exist            = 22
                  parameter_error            = 23
                  substitute_not_active      = 31
                  substitute_not_defined     = 32
                  system_failure             = 72
                  x_error                    = 1000.
        IF sy-subrc > 0.
        ENDIF.
    end of insertion by faianf01
    send email from SAPOFFICE
        CALL FUNCTION 'SO_OBJECT_SEND'
             EXPORTING
                  folder_id                  = folder_id
                  object_id                  = object_id
                  outbox_flag                = outbox_flag
                  link_folder_id             = link_folder_id
                  owner                      = sy-uname
                 check_send_authority       = 'X'
             TABLES
                  receivers                  = lt_rec_tab
                 note_text                  = lt_note_text
             EXCEPTIONS
                  active_user_not_exist      = 35
                  communication_failure      = 71
                  component_not_available    = 1
                  folder_no_authorization    = 5
                  folder_not_exist           = 6
                  forwarder_not_exist        = 8
                  object_no_authorization    = 13
                  object_not_exist           = 14
                  object_not_sent            = 15
                  operation_no_authorization = 21
                  owner_not_exist            = 22
                  parameter_error            = 23
                  substitute_not_active      = 31
                  substitute_not_defined     = 32
                  system_failure             = 72
                  too_much_receivers         = 73
                  user_not_exist             = 35.
      ENDIF.
    ENDFUNCTION.
    =================================================================================
    z_send_email_fax
    FUNCTION ZCBFS_SEND_MAIL.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *"  TABLES
    *"      LIST_FAX_MAIL_NUMBER STRUCTURE  SOLI
    *"  EXCEPTIONS
    *"      ERR_NO_ABAP_SPOOLJOB
      DATA: vg_achou(1) TYPE n.
    Fist part: Verify if the spool really exists
      vg_achou = 1.
      DO 60 TIMES.
        SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
        IF sy-subrc IS INITIAL.
          CLEAR vg_achou.
          EXIT.
        ELSE.
          WAIT UP TO 1 SECONDS.
        ENDIF.
      ENDDO.
      IF vg_achou = 1.
        RAISE err_no_abap_spooljob. "doesn't exist
      ENDIF.
      client = tsp01-rqclient.
      name   = tsp01-rqo1name.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
           EXPORTING
                authority     = 'SP01'
                client        = client
                name          = name
                part          = 1
           IMPORTING
                type          = type
                objtype       = objtype
           EXCEPTIONS
                fb_error      = 1
                fb_rsts_other = 2
                no_object     = 3
                no_permission = 4
                OTHERS        = 5.
      IF objtype(3) = 'OTF'.
        desired_type = otf.
      ELSE.
        desired_type = ali.
      ENDIF.
      CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
           EXPORTING
                rqident              = src_spoolid
                desired_type         = desired_type
           IMPORTING
                real_type            = real_type
           TABLES
                buffer               = l_objcont
           EXCEPTIONS
                no_such_job          = 14
                type_no_match        = 94
                job_contains_no_data = 54
                no_permission        = 21
                can_not_access       = 21
                read_error           = 54.
      IF sy-subrc EQ 0.
        attach_type = real_type.
      ENDIF.
      CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
           EXPORTING
                owner     = sy-uname
                region    = ou_fol
           IMPORTING
                folder_id = l_folder_id
           EXCEPTIONS
                OTHERS    = 5.
    fill out informations about the header of the email
      CLEAR: g_document.
      g_document-foltp     = l_folder_id-foltp.
      g_document-folyr     = l_folder_id-folyr.
      g_document-folno     = l_folder_id-folno.
      g_document-objtp     = c_objtp.
      g_document-objdes    = header_mail.
      g_document-file_ext  = c_file_ext.
      g_header_data-objdes    = header_mail.
      CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
           EXPORTING
                method      = 'SAVE'
                office_user = sy-uname
           IMPORTING
                authority   = g_authority
           TABLES
                attachments = lt_attachments
           CHANGING
                document    = g_document
                header_data = g_header_data
           EXCEPTIONS
                OTHERS      = 1.
      folder_id-objtp = l_folder_id-foltp.
      folder_id-objyr = l_folder_id-folyr.
      folder_id-objno = l_folder_id-folno.
      object_id-objtp = c_objtp.
      object_id-objyr = g_document-objyr.
      object_id-objno = g_document-objno.
      link_folder_id-objtp = l_folder_id-foltp.
      link_folder_id-objyr = l_folder_id-folyr.
      link_folder_id-objno = l_folder_id-folno.
      REFRESH lt_rec_tab.
      LOOP AT LIST_FAX_MAIL_NUMBER.
        lt_rec_tab-recextnam = LIST_FAX_MAIL_NUMBER-LINE.
        lt_rec_tab-recesc = 'U'.
        lt_rec_tab-sndart = 'INT'.
        lt_rec_tab-sndpri = 1.
        APPEND lt_rec_tab.
      ENDLOOP.
      lt_files-file = c_file.
      APPEND lt_files.
      hd_dat-objdes = header_mail.
      CALL FUNCTION 'SO_ATTACHMENT_INSERT'
           EXPORTING
                object_id                  = object_id
                attach_type                = attach_type
                object_hd_change           = hd_dat
                owner                      = sy-uname
           TABLES
                objcont                    = l_objcont
                objhead                    = l_objhead
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                object_type_not_exist      = 17
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                x_error                    = 1000.
      IF sy-subrc > 0.
      ENDIF.
    send email from SAPOFFICE
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                folder_id                  = folder_id
                object_id                  = object_id
                outbox_flag                = outbox_flag
                link_folder_id             = link_folder_id
                owner                      = sy-uname
           TABLES
                receivers                  = lt_rec_tab
                note_text                  = lt_note_text
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                component_not_available    = 1
                folder_no_authorization    = 5
                folder_not_exist           = 6
                forwarder_not_exist        = 8
                object_no_authorization    = 13
                object_not_exist           = 14
                object_not_sent            = 15
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                too_much_receivers         = 73
                user_not_exist             = 35.
    ENDFUNCTION.
    Regards,
    Sree

  • Icloud deleted recurring event and send notifications to everybody. I never used icloud and never deleted this event.

    I never used icloud and never made any changes to my icloud.
    Today icloud sent notifications to 100 people that the event was cancelled. I didnt made any changes. Those 100 people wrote "very good feedback"
    This event was created not in icloud, it was created in Outlook on my work PC, and it was done half a year ago.
    As I understand events from my outlook synced with icloud and iclud somehow made chamges without my permission.
    But the most fummy thing that event is still present in icloud, in Outlook and in my Iphone also.
    Please FIX or explain this, I dodnt want to have a repeat of this bug tomorrow

    Thanks, yeah I called Apple Customer Services and the guy said that the only thing I can do is restore my phone from my latest iTunes backup.
    The screen I got when this debacle happened literally said: "What would you like to do with the previously synched iCloud contacts on your iPhone?" It's so poorly worded, I thought it was just referring to the contacts that were just put on my phone from my computer, hense the "previously synched iCloud contacts" but when I was on the phone with the guy he was saying that I misunderstood the screen.
    I don't think I'm crazy, they could have worded it better and made it more clear they meant ALL contacts deleted, not just the ones synched from iCloud.

  • Periodically auto generation of Report in background and send result to user mail ID in Excel Format

    Hi Experts, I want to get the warehouse inventory report to be receive by email in excel format every month end. also i have 4-5 transaction for that I need the report by email in excel format in specific frequency.
    Can some one help me on this?
    Regards,
    Rushikesh

    Hi Rushikesh,
    You can create batch Jobs (Trx. SM36) for executing the transactions in background at specified times and in the spool recipient option mention the email IDs of the recipients.
    Regards,
    Namita

Maybe you are looking for

  • Help for Multiprovider

    Dear All, In my project client wants to maintain only 2 years history. So should i create DSO or InfoCube?? Moreover we need to develop one query which will show up data for Current transaction (coming from Cube) as well as History data. So we decide

  • How to keep that valve open for certain period of time and shut off automatically

    Hi everyone, The objective of the VI is to measure pH and then open acid or base valve based on pH valve. Below is my UNFINISHED VI My question is:  if, for example, the  pH is 10, then, the program will open acidic valve for 5 seconds and then shut

  • Info about post installation - erp 6

    hi to everyone... i have finished intallation of erp 6 ids.. and im looking for some pdf that includes all the informetion about the post instalation of a system thing like: registretion logical system stms post install xyz system copy client sp and

  • Interactive form that auto selects input fields based on initial selection

    i want to create a form that based on initial selections, automatically highlights "required" input fields. i.e.  if i create an item on the form called "promotion", when this item is "checked", all the fields that are required will automatically lig

  • PC to Mac mini conversion

    Well, basically, my PC has crashed and I have been refunded with the money, enough to buy a mac mini, I have decided to opt for this decision, but I have one small problem, if I were to be sent back all of my crashed memory on a CD (ie. my iTunes mus