Adding the duration in Activity of Service Call

Hi All,
How to construct a query that will add all together the duration of my Activities in Service Call.
Lets say for example,
Activity 1 .............. 30 Minutes
Activity 2 ............... 2 hours
Activity 3 ................3.5 hours
thnks
vin.

Hi,
Try this:
SELECT T0.ParentId,
SUM(CASE T0.DurType
WHEN 'M' THEN T0.duration
WHEN 'H' THEN T0.duration * 60
ELSE T0.duration * 1440
END) 'Duration(minute)'
FROM dbo.oclg t0
WHERE t0.parentId >= [%0\] and parenttype = 191
GROUP by T0.parentid
Thanks,
Gordon

Similar Messages

  • Create Activity same as button Activity on TAB Activity of Service Call

    Anyone can lead me on the right track with the DI API to create an Activity which is the same as
    going in the Service Call , tab Activities and pressing the Activity button at the bottom ?

    Hi Marc,
    You can try this it will help,
    Dim oActivity As SAPbobsCOM.Contacts
    oActivity = vCompany.GetBusinessObject(oContacts)
    oActivity.Activity = SAPbobsCOM.BoActivities.cn_Conversation
    oActivity.CardCode = ""
    oActivity.Subject = ""
    oActivity.ContactPersonCode = ""
    oActivity.ContactDate = ""
    oActivity.Notes = ""
    oActivity.Add()
    Thanks & Regards,
    Amit

  • Setting the attachment name in web service call scheduleReport

    Hi there,
    I searched the forum for this, found lots of threads but no useful solution...
    I am using BI Publisher 10.1.3.4.1 and I need to send a PDF report by email using its web service functionality. This works fine but the report is attached as "attachment.pdf" which is far from ideal. Is it possible to specify what the attachment should be called (e.g. "veryimportantreport.pdf")
    See below an example of the web service call I am doing.
    Thanks
    Luis
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
          xmlns:pub="http://xmlns.oracle.com/oxp/service/v11/PublicReportService"
          xmlns:pub1="http://xmlns.oracle.com/oxp/service/PublicReportService">
       <soapenv:Header/>
       <soapenv:Body>
          <pub:scheduleReport>
             <pub:scheduleRequest>
                <pub:cronExpression></pub:cronExpression>
                <pub:deliveryRequest>
                   <pub:contentType>pdf</pub:contentType>
                   <pub:documentData></pub:documentData>
                   <pub:emailOption>
                      <pub:emailBody>Message body</pub:emailBody>
                      <pub:emailFrom>[email protected]</pub:emailFrom>
                      <pub:emailReplyTo>[email protected]</pub:emailReplyTo>
                      <pub:emailServerName>emailserver</pub:emailServerName>
                      <pub:emailSubject>Subject</pub:emailSubject>
                      <pub:emailTo>[email protected]</pub:emailTo>
                   </pub:emailOption>
                </pub:deliveryRequest>
                <pub:reportRequest>
                   <pub:reportAbsolutePath>/Order/Order.xdo</pub:reportAbsolutePath>
                   <pub:attributeFormat>pdf</pub:attributeFormat>
                   <pub:parameterNameValues>
                      <pub:item>
                         <pub:name>P_ORDER_ID</pub:name>
                         <multiValuesAllowed>false</multiValuesAllowed>
                         <pub:values>
                            <pub1:item>123</pub1:item>
                         </pub:values>
                      </pub:item>
                   </pub:parameterNameValues>
                </pub:reportRequest>
             </pub:scheduleRequest>
             <pub:userID>luis</pub:userID>
             <pub:password>luis</pub:password>
          </pub:scheduleReport>
       </soapenv:Body>
    </soapenv:Envelope>

    mdonohue wrote:
    Sorry, product currently does not provide a way to name the attachment. I have entered an enhancement request to get that into a future release.That is a bit disappointing but thanks for letting me know!
    We are using BIP to generate reports from Apex and it works very well, except for this small detail.
    By the way, you sound very sure; are you related to Oracle in any way (I mean, is this an "official" answer)? I can't tell from your profile...
    Cheers
    Luis

  • Outlook Integration - Save Email as activity to Service Calls

    Hello Experts, this is my first post.
    Could anyone please tell me if it is possible to save an email as an ativity directly to the Service Call activities window from Outlook Integration?  If so, how?  I only see access to Business Partners and Sales/Purchasing docs within Outlook.  My customer would like to integrate this feature for their service/support department.

    Hi Dale,
    I have the same problem, unfortuantely it does not seem to be a high priority item as you have never had a response.
    Hopefully somebody might look into this.
    Cheers

  • Service Call Activity's attachments missing/not adding

    Hi Experts,
    First off, some technical data. We have SAP Business One 9.0(9.02.220) PL 12 running on MS Windows Server 2012 R2 Standard ontop of MS SQL Server 2012
    Now as the title suggests, when adding attachments to activities in a service call through the DI-API, they do in-fact not get added to SAP(once you check the actual activity).
    Strange thing is that this was working a couple of months ago and I cannot seem to get this working. Now to twist things up, in a development environment, with an older database, exactly the same SAP version and on MS SQL Server 2008 R2 - It works fine as it did before.
    I remember reading SAP Note 1290959( 1290959 - Missing attachments after upgrading to 2007 versions), which pretty much describes our situation.
    I cannot find the SAP note relevant to my situation. Does anyone know whether this is a known issue or am I just blind and overlooking the SAP note.
    Thanks!

    Hi Rikus,
    While connecting on each environment, do you change the database server type?
    Are you using DIS alone, or with B1WS and in such a case, are you using the version 1.2 which is specific to V9?
    Regards,
    Eric

  • URGENT: Service Call Activity Issue

    Hi guys, I have a seriously irritating issue concerning the linking of an activity to service call.
    As of Service Pack 01, Patch 36 (at least as far as I know) I get the following error when attempting to create and link an activity to a service call:
    Error Code: -5002
    Error Description: A service call activity does not exist
    I use the folliwing code;
    If oServ.GetByKey(MRI) Then
                    If DocType = "QT" Then
                        oAct = oComp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oContacts)
                        oAct.Activity = SAPbobsCOM.BoActivities.cn_Task
                        oAct.CardCode = oServ.CustomerCode
                        oAct.DocEntry = DocID
                        oAct.DocType = 23
                        oDoc = oComp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oQuotations)
                        If oDoc.GetByKey(DocID) Then
                            oAct.Notes = "Sales Quote: " & oDoc.Comments
                        End If
                        oAct.Details = "Sales Quote " & DocID & " auto created by MRI " & MRI & ""
                        If oAct.Add <> 0 Then
                            oApp.SetStatusBarMessage("Error adding Linked Document Activity for Sales Quote " & DocID & " : " & oComp.GetLastErrorDescription)
                            oLog.WriteLog("Error adding Linked Document Activity for Sales Quote " & DocID & " : " & oComp.GetLastErrorCode & oComp.GetLastErrorDescription, EventLogEntryType.Error)
                        Else
                            oServ.Activities.Add()
                            oServ.Activities.ActivityCode = oComp.GetNewObjectKey
                            oServ.Activities.SetCurrentLine(oServ.Activities.Count() - 1)
                        End If
    If oServ.Update <> 0 Then
                        oApp.SetStatusBarMessage("Error linking Expense Document " & DocID & ":" & oComp.GetLastErrorDescription)
                        oLog.WriteLog("Error linking Expense Document " & DocID & ":" & oComp.GetLastErrorCode & "-" & oComp.GetLastErrorDescription, EventLogEntryType.Error)
                    End If
    the Activity is added without any problem, but the error comes when linking it to the Service Call (oServ.Update)
    Can you please help, I'm going insane with this problem.

    this is how i got it to work:
    ServiceCalls sc = null;
    sc = (ServiceCalls)company.GetBusinessObject(BoObjectTypes.oServiceCalls);
    if (!sc.GetByKey(callId))
          throw new Exception("Failed to add service call activity! Service call does not exist!");
    if (sc.Activities.Count == 1)
             sc.Activities.SetCurrentLine(sc.Activities.Count - 1);
             string temp = sc.Activities.ActivityCode.ToString();
             if (!string.IsNullOrEmpty(temp) && !temp.Equals("0"))
                     sc.Activities.Add();
    else
             sc.Activities.Add();
    sc.Activities.SetCurrentLine(sc.Activities.Count - 1);
    sc.Activities.ActivityCode = int.Parse(lastAcctivity);
    if (sc.Update() != 0)
             company.GetLastError(out errorCode, out errorMsg);
              if (null != sc)
                      System.Runtime.InteropServices.Marshal.ReleaseComObject(sc);
                      sc = null;
    throw new Exception(errorCode + " -> " + errorMsg);
    You could either use that piece of code or make an insert in SCL5.

  • Service Call Activity

    Hi all,
    Does anyone know how to create a service call activity? I've created a service call but now I need to create an activity for that service call. The DI help file states that you need to specify the ActivityCode, and then I assume you call the Add method. 
    But where or how do you obtain an ActivityCode? I've tried setting it to the newly created service call and also to a value of 1 but both of these attempts  did not work.
    Also the Add method does not return a value, so you can't determine whether or not the activity has been created unless you look at the service activiy table or the activity screen.
    Does anyone else have any experience in this area?
    Regards, Lita

    If you create the activity first, this will give you an activity code which you can then use for the service call activity object.
    Here is a sample adding a new activity to an existing service call.
    Private Sub ServiceCallActivities()
        Dim sboServiceCall      As SAPbobsCOM.ServiceCalls
        Dim sboContact          As SAPbobsCOM.Contacts
        Dim lngDocEntry         As Long
        'Create a new Activity
        Set sboContact = sboCompany.GetBusinessObject(oContacts)
        sboContact.CardCode = "SLU003"
        sboContact.Closed = tNO
        sboContact.ContactDate = Date
        sboContact.Details = "Details...."
        sboContact.Notes = "Sample notes..."
        sboContact.DocType = oServiceCalls
        sboContact.DocEntry = 31
        sboContact.Add
        'Get Activity Code
        lngDocEntry = sboCompany.GetNewObjectKey
        'Assign Activity to Service Call
        Set sboServiceCall = sboCompany.GetBusinessObject(oServiceCalls)
        sboServiceCall.GetByKey 31
        sboServiceCall.Activities.Add
        sboServiceCall.Activities.ActivityCode = lngDocEntry
        sboServiceCall.Update
    End Sub
    John.

  • How can I associate an A/P invoice to a service call?

    Hi,
    Customer wants this:
    1. They (Co. A) gets a service call from their customer say for lump sum of 400 dollars.
    2. They (Co. A)  give out a contract to technician say at 45 dollars an hours and travel expenses. This is SERVICE ITEM for a total expense of say 45*2+120=210.
    3. Technician (A Vendor BP in SAP Business one) produces a PO. Co. A pays off the Technician.
    How can I create a Service Call to show both ends of incoming revenue and outgoing expense in the service call?
    Appreciate your help.
    Thank you.

    Dear Syed Aleem,
    I have described some ideas, but if these ideas do not help you, please come back to us with more details of what you need.
    1. They (Co. A) gets a service call from their customer say for lump sum of 400 dollars.
    Here you can create the servce call with the information in the General Tab and in the Remark and in the subject. If this is not enough I would suggest to create an activity and write your remark and content in the activity.
    You can create an activity clicking on the Activity tab. In the activity there is a tab called linked documents and you can add documents linked to the activity and service call.
    2. They (Co. A) give out a contract to technician say at 45 dollars an hours and travel expenses. This is SERVICE ITEM for a total expense of say 45*2+120=210.
    You can use anothe activity or you can add Return from Technician under the Expenses tab of the Service call.
    3. Technician (A Vendor BP in SAP Business one) produces a PO. Co. A pays off the Technician.
    Now, create another activity (or your first one) and add the Purchase order and the payment to it.
    Please, let me know if my suggestions help you.
    Regards,
    Marcella Rivi
    SAP Business One Forums Team

  • Create Service Call

    hi,
    I'm in the process of creating a service call with DI API using the following code:
            Dim ServiceCalls As SAPbobsCOM.ServiceCalls
            ServiceCalls = vCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oServiceCalls)
            ServiceCalls.CustomerCode = CardCode
            ServiceCalls.Subject = " Created : " & Now
            ServiceCalls.InternalSerialNum = intSerNo
            ServiceCalls.CallType = 1
            SBO_Application.MessageBox(ServiceCalls.Add())
    <b>intSerNo</b> holds the correct value, but Add function returns -2028.
    when <b>InternalSerialNum </b> is not assigned any value the service call gets added without any problem.
    where is my code going wrong?
    regards,
    lakshman.

    hello,
    do you think there would be any side effects if i execute the query after creation of the service call???
              querystring = " UPDATE OSCL SET internalSN = '" & intSerNo & "', " & _
                            " contractid = '" & contractNo & "' WHERE " & _
                            " CALLID = (Select Max(callID) from OSCL) "
    thanks, bye.

  • Series Primary overlaps object Service Call

    hI SAP gurus,
    i am trying to create new series in Document Numbering for  'Service Call' , it doesn't allow me to create Series Numbering and following Error is showing ...
    Series Primary overlaps object Service Call
    Does any one know how should i create a new Series for Service Call..?
    i appreciate your help.
    Thanks and Regards,
    kaviprashu

    hi,
    ok i will quote this for you
    Symptom
    It is a legal requirement in Brazil that service calls are numbered.
    Solution
    To facilitate the legal requirement that users can trace and manage service calls efficiently, it is now possible to assign service calls to sequential series numbering. All marketing document numbering rules (search, overlapping numbers, manual series, and etc.) are also applied on service calls. The following fields and objects are added:
    In the Document Numbering - Setup window, the service calls object is added.
    To access the Document Numbering - Setup window, choose Administration -> System Initialization -> Document Numbering.
    In the Series - Service Calls - Setup window, the 'Primary' series is added.
    For new and upgraded companies, the application automatically creates the 'Primary' series for service calls.
    In the Numbering Series - Setup window, the 'Primary' series is added.
    In the Service Call window, the No. fields (selection of series and number) are added.
    To access the Service Call window, choose Service -> Service Call.
    In the Relate Series to Document - Setup window, the service calls object is added.
    For the service reports (Service Calls, Service Calls by Queue, Response Time by Assigned to, Average Closure Time, Service Monitor, My Service Calls, My Open Service Calls and My overdue Service Calls, Service Contract document - subtab Service Calls and Customer Equipment Card - subtab Service Calls):
    Call No. (label text) is changed to Call ID.
    The Document No. field represents the new call no. field.
    Series column is added to service reports.
    The Check Document Numbering - Selection Criteria window also includes checking of the service calls sequence.
    To access the Check Document Numbering - Selection Criteria window, choose Administration -> Utilities -> Check Document Numbering.
    For new created service calls, no record will be written to History Change Log when you add service calls (the same as the system behavior in the marketing documents).
    Only after the actual update on an already added service call, a history record will be added.
    There is no change in the already existing Call ID field, the behavior of this field stays the same.
    Other terms
    service calls, series, numbering, B1, sequential
    Header Data
    Released on     15.08.2011 15:48:33
    Release status     Released for Customer
    Component     SBO-SER-SCL Service Call
    Priority     Recommendations/additional info
    Category     Advance development
    References
    This document is referenced by:
    SAP Business One Notes
    1606253           Overview Note for SAP Business One 8.81 patch 07
    Validity
    Software Component
    Version
    SAP BUSINESS ONE
    8.81
    regards,
    Fidel

  • Need Information regarding Service Call creation in SAP R/3

    Hello,
      I need the Transaction code or BAPI to create a service call in sap. Please provide the database table name for the service calls.
    We want to develop  service call management in our server.So please send me the Business data model for service call management in SAP.(All related objects to the service call and their data models.)
    Regards,
    Kiran.

    Hi
    Invoice list is basically SD configuration.
    <b>Invoice List</b>
    <b>Purpose</b>
    The invoice list lets you create, at specified time intervals or on specific dates, a list of billing documents (invoices, credit and debit memos) to send to a particular payer.
    The billing documents in the invoice list can be single or collective documents (collective invoices combine items from more than one delivery).
    The standard version of the SAP R/3 System includes two types of invoice lists:
    1.for invoices and debit memos
    2.for credit memos
    If you wish, you can process invoices, debit memos, and credit memos at the same time. The system automatically creates a separate invoice list for credit memos.
    A payer may be the head office of a buying group, which pays all the invoices for goods that are shipped to individual members. The group payer takes responsibility for paying the invoice lists and then collecting payment from the individual members. In return for these services, the group payer usually earns a factoring or del credere discount.
    Depending on the tax structure of the payer's country, the payer may be liable to pay taxes on factoring discounts that he earns. In Germany, for example, factoring discounts are taxed at the standard rate of 15%. During invoice list processing, you can reimburse the payer in advance for this tax liability by creating special condition records
    Regards
    Ramakrishna

  • Duration of an Abap Function call from Java using Jco3

    Hi guys!
    I would like to use this discussion to get some refernces of the duration Timespan of an RFC call from Java to SAP. At the moment, i need at last about 200ms to call the Abap function. I'm just using one simple import and export parameter (so no deep structures). I think that the reason for my poor performance is, that the Java Tool and the SAP instance are not in the same network. So, i hope some of you have some data, how fast an RFC call from Java using Jco can be executed.
    greetings, Hannes

    Hi Hannes,
    I think you have already got the answer to your question - the network set-up you have is probably the bottleneck.  Whenever I've worked with Java <-> ABAP and they are in the same network, I've had no performance problems at all.
    Does your RFC contain any complex logic or business processes?  Are you able to try and call something that does nothing, say it just accepts an input string and returns it straight away as an export.  Do you have any scope for testing with your Java tool on the same network as the SAP system?
    Cheers,
    G.

  • How to retrieve error message(s) after failed web service call

    Hi!
    I tried to create an item using the web service ego_item_pub.process_item and it worked ok (version 12.1.1). Sending the same request again, I got an error which should be ok since the item id already exists. The thing is, that I only get an "E" as return status:
    <X_RETURN_STATUS>E</X_RETURN_STATUS>
    <X_MSG_COUNT>1</X_MSG_COUNT>
    As described in the integration repository, there should be a parameter called msg_data which should contain the message if there is exactly 1 message, but I cannot find it.
    So, I tried to get the message using fnd_message.get, but the response of my web service call is:
    AuthorizationFailure : User not authorized to execute service. (I use sysadmin/sysadmin as ws security user).
    I use the following grant details:
    All Users     Direct     GLOBAL     Revoke Action Enabled
    SYSADMIN SYSADMIN     Direct     USER
    What else can I do or how can I retrieve error messages for a failed web service call?
    Thanks a lot,
    Konrad

    Hi Konrad,
    As we've found out, search the Integration Repository for internal name ERROR_HANDLER and use that. Letting the general public know the answer for this one!
    Regards,
    Gareth
    http://garethroberts.blogspot.com

  • Linking activities to service call with DTW

    We would like to be able to create activities and link them to service calls using a DTW import.  Is this even possible?
    Thanks in advance,
    Jon

    Ah OK.
    Use the column 'RecordKey' as the index when creating a Service Call.  Here is an example:
    RecordKey;ContactCode;ContractID;CustomerCode;CallType;Subject;Description;Origin;BelongsToAQueue;Queue
    RecordKey;ContactCode;ContractID;CustomerCode;CallType;Subject;Description;Origin;BelongsToAQueue;Queue
    1;123456;123456;C12345;0;New call request;Call Description;8;Y;Queue1;
    2;123456;123456;C12345;0;New call request;Call Description;8;Y;Queue2;
    3;123456;123456;C12345;0;New call request;Call Description;8;Y;Queue2;
    You will have to use valid codes (that already exist in the system) for ContactCode, ContractID, CustomerCode, CallType, and Origin, and also a valid Queue.  Some of these fields are mandatory, but I can't remember which.  Add extra fields if you need them.
    This should create 3 new calls in the system and generate the CallID automatically.

  • Problem in Service Call

    Hi All,
    I'm trying to Use Service Call Functionality in Web Dynpro Component to use the class method for the context.
    When running the wizard I'm only getting the option of Function Module RADIO BUTTON ONLY.
    I'm not getting the Class method and other radio buttons.
    Please suggest solution.
    Regards,
    KUMAR

    Hi Alex,
    Thanks for the response.
    In Create Service Call in the 3rd step while trying choose the service type I'm getting this problem.
    While selecting the Service Type In ECC 6.0 System Im getting the following options as radio buttons
    Function Module
    Assistance Class Method
    Class Method
    Web Service Proxy.
    Where as in Solution Manager System
    I'm getting only 1 radio button that is Function Module.
    Please Suggest.
    Regards,
    Kumar

Maybe you are looking for

  • LSO - Restricting Course Group to specific Org Unit

    Hi, We have created a Course Group (Object Type L) that we only want a specific Org Unit to see in the Dynamic Course/Participation menu. What would be the best way to restrict this? Thanks Agent 009

  • Can you forward an email to a folder in the cloud?

    Can you forward an email to a folder in the cloud?

  • Mail - Exchange access via Proxy

    Hello! I'm using Mac OS X 10.6.1. with Mail Version 4.1 (1076). Setting up the connection of an Exchange 2007 mail server in an intern network works great. Now I want to have access from outside/external. The Windows setup is via a proxy server. In M

  • Extract assets workflow question

    Hi, We are doing more and more web design these days, we mainly design for Print usually, and we now need to provide image assets to web developers. I'm trying the Export assets feature in PS CC Fall 2014 and I'm puzzled by the results. I use the can

  • ForEach Loop Iteration Order

    Hi, I have a SSIS package that uses a Foreach Loop Container to iterate through a series of flat files. The order in which the files are iterated through is based on the name of the file. Is it possible to change the iteration order? More specificall