How to check for errors in starting workflow from plsql?

Hi All,
I am using the below code to start a custom workflow.
DECLARE
l_itemtype VARCHAR2(30) := 'XXPWA';
l_itemkey  VARCHAR2(30) := '1116410C';
error_code VARCHAR2(2000);
error_msg  VARCHAR2(2000);
BEGIN
    wf_engine.createprocess(l_itemtype, l_itemkey, 'XX_WEBADI_APPROVAL');
    wf_engine.setitemuserkey(itemtype => l_itemtype
                            ,itemkey  => l_itemkey
                            ,userkey  => 'USERKEY: ' || '1116410C');
    wf_engine.setitemowner(itemtype => l_itemtype
                          ,itemkey  => l_itemkey
                          ,owner    => 'SYSADMIN');
    wf_engine.setitemattrnumber(itemtype => l_itemtype
                               ,itemkey  => l_itemkey
                               ,aname    => 'BATCH_ID'
                               ,avalue   => 1116410);
    wf_engine.startprocess(l_itemtype, l_itemkey);
EXCEPTION
WHEN OTHERS THEN
error_code := SQLCODE;
error_msg  := SQLERRM(SQLCODE);
dbms_output.put_line(error_code||error_msg);
END ;
The script completes successfully without errors.
I am sending a notification from this workflow. I can see the records getting created in tables like WF_NOTIFICATIONS and WF_ITEM_ATTRIBUTE_VALUES. But i cannot see any thing if i query from Status Monitor. Also I am not getting the said notifications. How can i find what is the issue?

Hi Manu,
Thanks for sharing the information, If you think of speeding up finding were exactly your notification is struck, You can use the below query (Input parameter would be your notification id), Hope this information is good, I liked this very much, the way it was narrated.
SELECT n.begin_date,
       n.status,
       n.mail_status,
       n.recipient_role,
       de.def_enq_time,
       de.def_deq_time,
       de.def_state,
       ou.out_enq_time,
       ou.out_deq_time,
       ou.out_state
  FROM applsys.wf_notifications n,
       (SELECT d.enq_time def_enq_time,
               d.deq_time def_deq_time,
               TO_NUMBER((SELECT VALUE
                           FROM TABLE(d.user_data.parameter_list)
                          WHERE NAME = 'NOTIFICATION_ID')) d_notification_id,
               msg_state def_state
          FROM applsys.aq$wf_deferred d
         WHERE d.corr_id = 'APPS:oracle.apps.wf.notification.send') de,
       (SELECT o.deq_time out_deq_time,
               o.enq_time out_enq_time,
               TO_NUMBER((SELECT str_value
                           FROM TABLE(o.user_data.header.properties)
                          WHERE NAME = 'NOTIFICATION_ID')) o_notification_id,
               msg_state out_state
          FROM applsys.aq$wf_notification_out o) ou
WHERE n.notification_id = &NOTIFICATION_ID
   AND n.notification_id = de.d_notification_id(+)
   AND n.notification_id = ou.o_notification_id(+)
This single query links all together and shows you the current state of the message.
Column 5 & 6 shows the enqueue & dequeue time of WF_DEFFERRED queue.
Column 7 shows the message status in WF_DEFFERRED
Column 8 &  9 shows the enqueue & dequeue time of WF_NOTIFICATIONS_OUT queue.
Column 10 shows the message status in WF_NOTIFICATION_OUT.
Below is the sequence of activities going on between the PL/SQL trigger of the business event and the e-mail received from notification mailer in the tail -end
1. EBS user sends email – To send an email EBS modules use standard API. Email API is implemented in PL/SQL package WF_NOTIFICATION (I will cover it in the next article).
1.1. Provides application data – First of all user’s session inserts business data (recipient, message type, message text etc.) into WF_NOTIFICATIONS table (do not mix up with PL/SQL package mentioned above);
1.2. Defers processing Generates event – a user or process leaves EBS to run further email processing steps. It is done using a Business Events System (BES). Session raises an event k“oracle.apps.wf.notification.send” via the WF_EVENT PL/SQL package (BES processing to be covered in the next articles). Each deferred event is put in one of the two Advanced Queues WF_DEFERRED or WF_JAVA_DEFERRED for further processing. All email sending events go through the WF_DEFERRED queue.
2. Deferred Agent Listener – is a process responsible for ALL BES events processing. It executes all deferred events calling subscriptions’ functions defined for each business event. There are several more things to explain about Agent Listeners and subscription processing (e.g. there are several differed agents, subscriptions groups etc.) This is one more subject for further articles.
2.1. Reads event and starts subscriptions processing – Strictly speaking there is no any enabled subscription for the “oracle.apps.wf.notification.send” event (submitted during the first step). This event is a part of “oracle.apps.wf.notification.send.group” event group. The Deferred Agent executes subscriptions for that group rather than for the stand alone event. At this stage the Agent knows that it should process the notification with given notification id (it is a part of the event data passed via the event).
2.2. Reads application data – in order to generate the email/notification the Agent reads business data from the WF_NOTIFICATIONS table and a few related tables and during the next step builds up the email’s text in XML format.
2.3. Generates data for outbound interface – This is the last step executed by the Deferred Agent Listener. It generates XML representation of email to be sent and together with other important bits of information posts it to the Notification Mailer outbound queue WF_NOTIFICATION_OUT.
3. Notification Mailer – As you see it was a long journey even before we started to talk about the Notification Mailer. There are a lot of things which may go wrong and this is why it is important to know the whole flow of the events to troubleshoot the mail sending functionality in EBS. We’ve come to the last processing step before the message leaves EBS boundaries.
3.1. Reads message – the Notification Mailer dequeues messages fromWF_NOTIFICATION_OUT queue on regular basis. In fact this is the only place where it looks for the new messages to be sent. This means if a notification doesn’t has a corresponding event ready for dequeuing in the WF_NOTIFICATION_OUT queue it will never be send. As soon as a new message arrives Notification Mailer dequeues it and gets prepared for sending;
3.2. Sends email via SMTP – This is the step when the message leaves EBS. The Notification Mailer sends the email using text retrieved from the advanced queue during previous step;
3.3. Updates status – as the last step in the notification sending process the Notification Mailer updates a MAIL_STATUS column in WF_NOTIFICATION table.

Similar Messages

  • Error while starting workflow from warning msg or error msg?

    Hello experts,
    I m tryin to start and workflow from error msg of ME21...whn we juss click enter without entering any value, it gives error as -" enter Purch org  ". whose msg class - ME and msg num - 083.
    thn from t-code SWUY,i creating and linked workflow for the msg.
    Now while testing,when m goin to t-code ME21, and goin to the long text of tht error msg.....the button to start workflow is not getttin enabled. tht is still disable.
    PLease tell r thr any other back ground settings to be done for this.
    Regards
    Nitin

    Hi,
    Your workflow landed up in Error and you want to Restart it right.
    Go to SWPR and check that workflow is there.
    If found, select it and Restart it.
    Regards,
    Surjith

  • Can not start workflow from Servr OM code

    Hello all ,
    i want to start sharepoint 2013 workflow when a list item is updated based on some condition.
    i have writen bellow code
    var workflowServiceManager = new WorkflowServicesManager(web);
                    var workflowSubscriptionService = workflowServiceManager.GetWorkflowSubscriptionService();
                    //get all workflows associated with the list
                    //get lsit
                    SPList list = web.Lists["Leave"];
                    if (list != null)
                        var subscriptions = workflowSubscriptionService.EnumerateSubscriptionsByList(list.ID);
                        //run all workflows associated with the list
                        SPListItem item = list.GetItemById(Convert.ToInt32(drpRequest.SelectedValue));
                        foreach (var workflowSubscription in subscriptions)
                            //initiation parameters 
                            var inputParameters = new Dictionary<string, object>();
                            //inputParameters.Add("List", leaveList.ID);
                            workflowServiceManager.GetWorkflowInstanceService().StartWorkflowOnListItem(workflowSubscription, item.ID, inputParameters);
    on the last line it throws unauthorised access exception .
    while current user have owner permissions.
    here is error .
    i have run full profile sync and user is availiable in UPS.
    Please Help
    Mukesh

    Hello  all,
    After running full profile sync i am able to deploy workflow.
    it is running
    but how can i elevate privilege to start workflow.
    from code
    Mukesh

  • How to check particular error in alert log file

    Hi all,
    How to check particular error in alert log file,for supose if i get error in batabase yesterday 4 pm & today i want to check alert log file to get basic idea..it might be a big file so how to check that particular error..
    Thanks & regards,
    Eswar..

    What's your oracle version?
    If you are in 11g you can use adrci tool
    1- set homes diag/rdbms/orawiss/ORAWISS/ : the rdbms home
    2- show alert -P "MESSAGE_TEXT LIKE '%ORA-%'" -term : to find all the ORA-% errors in the alert file
    3- show alert -P "MESSAGE_TEXT LIKE '%ORA-%' and originating_timestamp > systimestamp-51 " -term : to find all the ORA-% errors in the alert file during the last 51 days,
    4- show alert -P "MESSAGE_TEXT LIKE '%ORA-%' and originating_timestamp > systimestamp-1/24 " -term : to find all the ORA-% errors in the alert file during the last hour,
    5- show alert -P "MESSAGE_TEXT LIKE '%ORA-12012%' and originating_timestamp > systimestamp-1/24 " -term : to find the particular ORA-12012 error in the alert file during the last hour,
    Example:
    [oracle@wissem wissem]$ adrci
    ADRCI: Release 11.2.0.1.0 - Production on Wed May 4 10:24:54 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    ADR base = "/home/oracle/app/oracle"
    adrci> set homes diag/rdbms/orawiss/ORAWISS/
    adrci> show alert -P "MESSAGE_TEXT LIKE '%ORA-'" -term
    ADR Home = /home/oracle/app/oracle/diag/rdbms/orawiss/ORAWISS:
    adrci> show alert -P "MESSAGE_TEXT LIKE '%ORA-%'" -term
    ADR Home = /home/oracle/app/oracle/diag/rdbms/orawiss/ORAWISS:
    2010-12-11 19:45:41.289000 +01:00
    ORA-1109 signalled during: ALTER DATABASE CLOSE NORMAL...
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/home/oracle/app/oracle/oradata/ORAWISS/system01.dbf'
    ORA-1547 signalled during: ALTER DATABASE RECOVER  database until time '2011-01-21:10:48:00'  ...
    Errors in file /home/oracle/app/oracle/diag/rdbms/orawiss/ORAWISS/trace/ORAWISS_j000_5692.trc:
    ORA-12012: error on auto execute of job 29
    ORA-01435: user does not exist
    2011-03-15 11:39:37.571000 +01:00
    opiodr aborting process unknown ospid (31042) as a result of ORA-609
    2011-03-15 12:04:15.111000 +01:00
    opiodr aborting process unknown ospid (3509) as a result of ORA-609
    adrci>
    adrci> show alert -P "MESSAGE_TEXT LIKE '%ORA-%' and originating_timestamp > systimestamp-51 " -term
    ADR Home = /home/oracle/app/oracle/diag/rdbms/orawiss/ORAWISS:
    2011-03-15 10:19:45.316000 +01:00
    Errors in file /home/oracle/app/oracle/diag/rdbms/orawiss/ORAWISS/trace/ORAWISS_j006_5536.trc:
    ORA-12012: error on auto execute of job 26
    ORA-01435: user does not exist
    Errors in file /home/oracle/app/oracle/diag/rdbms/orawiss/ORAWISS/trace/ORAWISS_j000_5692.trc:
    ORA-12012: error on auto execute of job 29
    ORA-01435: user does not exist
    2011-03-15 11:39:37.571000 +01:00
    opiodr aborting process unknown ospid (31042) as a result of ORA-609
    2011-03-15 12:04:15.111000 +01:00
    opiodr aborting process unknown ospid (3509) as a result of ORA-609
    adrci>

  • Checking for errors in application item computation (at page level)

    I have a conditional computation used to set the value of an application-level item.
    In the condition, I need to check to see if the action (button-press to initiate DML processing) generated an error (eg cannot delete row because of child records). I don't need to catch/handle any specific errors, I just need to know if an error occurred.
    What do I check for? I've seen references on the forum to hidden page items Pxx_msg and Pxx_err, but I've played around with them, and apparently don't know how they're set.
    Another thought I had is to create a before-computation process that checks to see if there is some sort of error/exception, but I'm not having luck w/ this either.
    Ideas?
    Thanks,
    C

    Max -- I appreciate you helping me to clarify this issue. I need to track which database tables have had data changes committed to them in the course of the app running. My thought is to track this in an application item (a list of changed tables), and check/set the item as needed when delete/create/apply changes buttons are pressed. But if a DML statement fails, I don't want to add the table to the list of modified tables.
    When I was setting the app item in a computation, it appeared that (like you said) I was trying to check for errors before the process had executed. (I'm also not sure I was checking for errors in the correct manner.) Regardless, the result was that the table got added to the list even when the delete operation failed because of child records.
    What I'm doing now appears to work (and sorry, I can't actually access the app this morning, the server is down, so I may not be able to communicate this as clearly as I'd like). If I recall, yes, I'm setting the item in a post comp/validation process. I'm still not doing any error checking, but it appears that if there is an error, the process isn't executing: the item is definitely not getting set.
    Can you clarify what you mean when you say that "all of this will execute before the processes". Do you mean that comps and page processes will execute before DML is executed on the database?
    Thanks,
    Carol

  • How to check syntax errors in ABAP Queries

    HI Guys,
    How to check syntax errors in ABAP queries, Can please provide the T-Codes.
    Advande thanks to everybody.
    Thanks,
    Gourisankar

    Hi
    with these you can check syntax errors and performance points
    Hi
    these all are doing t he same thing that is checking the program for better performance
    Tools for Performance Analysis
    Run time analysis transaction SE30
    SQL Trace transaction ST05
    Extended Program Check (SLIN)
    Code Inspector ( SCI)
    Run time analysis transaction SE30 :This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
    SQL Trace transaction ST05: The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on a particular database table of the ABAP program would be mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
    Extended Program Check
    This can be called in through transaction SE38 or through transaction SLIN. This indicates possible problems that may cause performance problems.
    Code Inspector (SCI)
    You can call the Code Inspector from the ABAP Editor (SE38), the Function Builder (SE37), the Class Builder (SE24), or as a separate transaction (SCI).
    The Code Inspector indicates possible problems. However, note that, especially with performance issues: There is no rule without exception. If a program passes an inspection, it does not necessarily mean that this program will have no performance problems.
    reward if usefull

  • How to check the warnings in the workflow

    Helo Abapers,
                      how to check the warnings in the workflow and to correct the warning errors can u please help me out.
                     If u have any materials on the workflow can u please give me the link i would be very thankful to u in advance.
    Regards,
    Farhee.

    Hi ,
    Go through these links....
    http://www.sap-press.com/product.cfm?account=&product=H950
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    http://www.sap-press.com/downloads/h950_preview.pdf
    Ravinder

  • Checking for errors before saving in CRMD_ORDER

    Hi,
    I have a requirement where I need to check if any errors exist before being able to save a document in t-code CRMD_ORDER. If any error exists, then user should not be able to save the document.
    Currently, if even if errors exist, the user is able to save the document. But this should not be allowed.
    I searched for BADI for this and found method CHECK_BEFORE_SAVE in BADI ORDER_SAVE. But not sure of how to check if errors exist. Can someone please guide me on how to do this?
    Thanks in advance.

    Hi Manvi,
    I have two different options for you to gte the info you need !
    Well first i would like to confirm you that the Badi you re trying to use is the right one. You can raise an error and cancel saving in case you want. And then, well you can either check dirrectly in a table or using a call function see if ticket is flagged on error
    1 - Using table: In table CRM_JCDS or in table CRM_JEST if for guid of your ticket you have an entry with stat = I1030 and flagged to INACT = ' '; then the ticket contains at least one error
    2 - Using call function:
    call function 'CRM_STATUS_CHECK'
      exporting
        objnr             = lv_guid
        status            = 'I1030'  " = gc_status-error (CRM_STATUS_CON)
      exceptions
        object_not_found  = 1
        status_not_active = 2
        others            = 3.
    PS: in Order to get the guid of your ticket you can use table crmd_orderadm_h. Using ID of ticket you ll be able to retrieve guid corresponding to it
    Hope this helps
    Regards,
    Khalil

  • Error in starting workflow queue listener

    I have registered jobs with OEM using Warehouse builder workflow deployment
    wizard. Following jobs has been registerd with OEM :
    1) ACRM_IWF_ACRM_PWF
    2)ACRM_IWF_OWB_STD_BEGIN
    3) ACRM_IWF_OWB_STD_END
    4) ACRM_IWF_OWB_STD_ERROR
    Now i submit "ACRM_IWF_ACRM_PWF" from the OEM . I shows me status of the JOB as
    "Failed" and gives the following error message:
    Error in starting workflow listener: ** Initializing queue listener
    ** Initialized queue listener
    ** Recovering item type ACRM_IWF
    ** In recovery mode
    ** Recovery complete
    ** Processing all item types
    ** Waiting to dequeue message in listener
    ** Processing job 0x4143524D5F4957465F4F57425F5354445F424547494E
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String
    index out of range: -1
    at java.lang.String.substring(String.java:1085)
    at
    oracle.wh.runtime.workflowrt.QueueListener.parseParameters(QueueListener.java:10
    03)
    at oracle.wh.runtime.workflowrt.QueueListener.startJob(QueueListener.java:798)
    at
    oracle.wh.runtime.workflowrt.QueueListener.processJobs(QueueListener.java:746)
    at
    oracle.wh.runtime.workflowrt.QueueListener.initAndRun(QueueListener.java:299)
    at oracle.wh.runtime.workflowrt.QueueListener.main(QueueListener.java:197)
    1

    This is not actually a Workflow component, this is part of the Oracle Warehouse Builder product, although the name is similar to the Workflow Agent Listener in v2.6.
    I have registered jobs with OEM using Warehouse builder workflow deployment
    wizard. Following jobs has been registerd with OEM :
    1) ACRM_IWF_ACRM_PWF
    2)ACRM_IWF_OWB_STD_BEGIN
    3) ACRM_IWF_OWB_STD_END
    4) ACRM_IWF_OWB_STD_ERROR
    Now i submit "ACRM_IWF_ACRM_PWF" from the OEM . I shows me status of the JOB as
    "Failed" and gives the following error message:
    Error in starting workflow listener: ** Initializing queue listener
    ** Initialized queue listener
    ** Recovering item type ACRM_IWF
    ** In recovery mode
    ** Recovery complete
    ** Processing all item types
    ** Waiting to dequeue message in listener
    ** Processing job 0x4143524D5F4957465F4F57425F5354445F424547494E
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String
    index out of range: -1
    at java.lang.String.substring(String.java:1085)
    at
    oracle.wh.runtime.workflowrt.QueueListener.parseParameters(QueueListener.java:10
    03)
    at oracle.wh.runtime.workflowrt.QueueListener.startJob(QueueListener.java:798)
    at
    oracle.wh.runtime.workflowrt.QueueListener.processJobs(QueueListener.java:746)
    at
    oracle.wh.runtime.workflowrt.QueueListener.initAndRun(QueueListener.java:299)
    at oracle.wh.runtime.workflowrt.QueueListener.main(QueueListener.java:197)
    1

  • How to check for a function module with its description and functionality

    Hi all,
    How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .

    Hi,
    You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
    Say for example you need to search something regarding converstion.
    Search for * CONVERT * and press F4.
    If there is something specfic like converting date to something you can give
    DATE * CONVERT *
    OR
    CONVERT * DATE *  and press F4.
    Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
    Regards,
    Pramod

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • How to check for the sub folder in the document library Is already Exist using CSOM?

    Hi,
    My requirement is to create the  folder and sub folder in SharePoint document library. If already exist leave it or create the new folder and the subfolder in the Document library using client side object model
    I able to check for the parent folder.
    But cant able to check the subfolder in the document library.
    How to check for  the sub folder in the document library?
    Here is the code for the folder
    IsFolder alredy Exist.
    private
    string IsFolderExist(string InputFolderName)
    string retStatus = false.ToString();
    try
    ClientContext context =
    new ClientContext(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryLink"]));
                context.Credentials =
    CredentialCache.DefaultCredentials;
    List list = context.Web.Lists.GetByTitle(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryName"]));
    FieldCollection fields = list.Fields;
    CamlQuery camlQueryForItem =
    new CamlQuery();
                camlQueryForItem.ViewXml =
    string.Format(@"<View  Scope='RecursiveAll'>
    <Query>
                                            <Where>
    <Eq>
    <FieldRef Name='FileDirRef'/>
    <Value Type='Text'>{0}</Value>
                                                </Eq>
    </Where>
    </Query>
                                </View>",
    @"/sites/test/hcl/"
    + InputFolderName);
                Microsoft.SharePoint.Client.ListItemCollection listItems = list.GetItems(camlQueryForItem);
                context.Load(listItems);
                context.ExecuteQuery();
    if (listItems.Count > 0)
                    retStatus =
    true.ToString();
    else
                    retStatus =
    false.ToString();
    catch (Exception ex)
                retStatus =
    "X02";
    return retStatus;
    thanks
    Sundhar 

    Hi Sundhar,
    According to your description, you might want to check the existence of sub folder in a folder of a library using Client Object Model.
    Please take the code demo below for a try, it will check whether there is sub folder in a given folder:
    public static void createSubFolder(string siteUrl, string libName, string folderServerRelativeUrl)
    ClientContext clientContext = new ClientContext(siteUrl);
    List list = clientContext.Web.Lists.GetByTitle(libName);
    CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXml =
    @"<View Scope='RecursiveAll'>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name='FSObjType' />
    <Value Type='Integer'>1</Value>
    </Eq>
    </Where>
    </Query>
    </View>";
    //camlQuery.FolderServerRelativeUrl = "/Lib1/folder1";
    camlQuery.FolderServerRelativeUrl = folderServerRelativeUrl;
    ListItemCollection items = list.GetItems(camlQuery);
    clientContext.Load(items);
    clientContext.ExecuteQuery();
    Console.WriteLine(items.Count);
    if (0 == items.Count)
    //create sub folder here
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to check for locks on a table inside a program?

    Hi Gurus,
    Kindly let me know how to check for a lock on a particular table inside a program.I know that we can see locks on table held by a user from transaction SM12 but my requirement is to check for lock on MARA/MARC/MARV if lock exist then bypass my code else do the code.
    Kindly suggest or give code to check for a lock on a particular table.
    Thanks in advance
    Sudipto

    FAQ.  Locked.

  • How to check for updates on SCM packages?

    Hey guys,
    I wondered for some time now how to check for updates on SCM packages, i.e. -git
    or -svn ones. Updates for binary packages are automatically updated by pacman,
    no problem there. Checking for updates on non-SCM packages from the AUR is
    easily done with one of the various helper tools available (personally, I use
    slurpy).
    However, SCM packages can change without their PKGBUILD changing, so I'm not
    notified that I should recompile and update them.
    Is there a "proper" way of doing this? Am I missing something?
    Thanks in advance!

    If your system is booting then u can say that your bootblks are installed.Usually BootBlks are present in 0 & 1 slice of UFS Filesystem
    /usr/platform/platform-name/lib/fs/ufs
    directory where ufs boot objects reside.
    An x86 FDISK partition for the Solaris software begins with a one-cylinder boot slice, which contains the partition boot program (pboot) in the first sector, the standard Solaris disk label and volume table of contents (VTOC) in the second and third sectors, and the bootblk program in the fourth and subsequent sectors. When the FDISK partition for the Solaris software is the active partition, the master boot program (mboot) reads the partition boot program in the first sector into memory and jumps to it. It in turn reads the bootblk program into memory and jumps to it. Regardless of the type of the active partition, if the drive contains multiple FDISK partitions, the user is given the opportunity to reboot another partition.

  • How to check for impacts due to upgrade

    We are plannining to upgrade from 4.7 to ECC6..How to check for impacts on FTP'S,shell scripts and RFC's etc due to the assesment..Please suggest

    Hi,
    FTP's and Shell scripts are OS dependant not SAP or Database dependant so there will be no change at all unless you upgrade OS too. RFC's are not afected as per guides, notes and my experience.
    I´m doing an upgrade from 4.6C to 6.0 with connections with at least 10 systems and none of them had an issue during tests
    Good luck

Maybe you are looking for