Not able to start out of the box approval workflow programmatically

We have a requirement to start an out of the box workflow from a .NET web service.
We are using the StartWorfklow method:
wfManager.StartWorkflow(item, association, association.AssociationData
we are getting the below error message at the above line of code: Attempted to perform an unauthorized operation.. Data: System.Collections.ListDictionaryInternal
Then, we tried:
SPSecurity.RunWithElevatedPrivileges(delegate()
        wfManager.StartWorkflow(item, association, association.AssociationData,
SPWorkflowRunOptions.Synchronous);
Now, the workflow got canceled automatically with "Failed on Start" status. In the "Workflow History", it is showing 2 records with "was canceled by System Account." & "failed to start" in the description
column.
Please advise.

Hi Zhengyu,
1. I've already done that:
a) when "SPSecurity.RunWithElevatedPrivileges(delegate()"
is used, there are no errors showing up and code gets executed. However, the workflow failed to start.
b) When I don't use elevated privileges, the code is showing an error (Attempted to perform an unauthorized operation.. Data: System.Collections.ListDictionaryInternal) when
it tries to start the workflow (StartWorkflow method).
2. The workflow starts with no issues through UI. I tried it using "System Account" and another account.
3. I tried also "Collect Feedback" workflow template. Same results...
You can find the code below:
public
stringStartItemWorkflow(stringsitePath,
stringlibraryName,
stringfileName)
stringreturnVal =
String.Empty;
stringwfName =
"VPApprovalWF";
SPUserTokentoken = GetSecurityToken(sitePath);
try
using(Microsoft.SharePoint.SPSiteportalSite
= newMicrosoft.SharePoint.SPSite(sitePath,
token))
using(SPWebportalWeb
= portalSite.OpenWeb())
                    portalWeb.AllowUnsafeUpdates =
true;
SPListlist = portalWeb.Lists[libraryName];
SPQueryfileQuery =
newSPQuery();
                    fileQuery.Query =
String.Format("<Where><Contains><FieldRef
Name='FileLeafRef' /><Value Type=\"User\">{0}</Value></Contains></Where>", fileName);
                    fileQuery.ViewAttributes =
"Scope='RecursiveAll'";
SPListItemCollectionlistItemCol = list.GetItems(fileQuery);
SPWorkflowManagerwfManager = portalSite.WorkflowManager;
SPWorkflowAssociationCollectionassociationCollection
= list.WorkflowAssociations;
if(listItemCol.Count > 0)
foreach(SPListItemitem
inlistItemCol)
if(associationCollection.Count > 0)
foreach(SPWorkflowAssociationassociation
inassociationCollection)
if(association.Name == wfName)
                                        item.Update();
                                        association.AutoStartChange
=
true;
                                        association.AutoStartCreate
=
false;
                                        association.AssociationData
=
String.Empty;
                                        StartWF(wfManager,
item, association);
                                        returnVal +=
"Workflow Started";
break;
else
                                returnVal +=
"No workflows are attached to the library.";
else
                        returnVal +=
"A file with the name provided doesn't exist";
                    portalWeb.AllowUnsafeUpdates =
false;
catch(Exceptionex)
            returnVal +=
"Workflow not started, reason: "+
String.Format("Source:
{0}. Stack Trace: {1}. Inner Exception:{2}. Message: {3}. Data: {4}", ex.Source, ex.StackTrace, ex.InnerException, ex.Message, ex.Data);
returnreturnVal;
SPUserTokenGetSecurityToken(stringsitePath)
SPUserTokentoken =
null;
SPSecurity.RunWithElevatedPrivileges(delegate()
            Microsoft.SharePoint.
SPSiteportalSite =
newMicrosoft.SharePoint.SPSite(sitePath);
            token = portalSite.RootWeb.EnsureUser(
"DOMAIN\\ADMIN-USER").UserToken;
            portalSite.Dispose();
returntoken;
privatestaticvoidStartWF(SPWorkflowManagerwfManager,
SPListItemitem,
SPWorkflowAssociationassociation)
SPSecurity.RunWithElevatedPrivileges(delegate()
            wfManager.StartWorkflow(item, association, association.AssociationData,
SPWorkflowRunOptions.Synchronous);
Thank you all for your help.
Regards,

Similar Messages

  • Not able to get Out-of-the-Box Examples Index Page for running the jsp examples

    Hi
    I am a new person using weblogic first time I installed the weblogic 7.0 beta
    version on my machine.I am trying to start the weblogic server console so that
    I can configure web applications examples on my machine.
    I am getting following error and not able to view Out-of-the-Box Examples Index
    Page
    error:
    <Apr 5, 2002 12:11:39 PM IST> <Error> <SystemDataStore> <null> <Unable to listen
    on Port 7003: Address in use: JVM_Bind>
    Please help me to find the reason to have this problem
    Thank You in advance
    Vikas

    Hi.
    Please post all WLS 7.0 beta questions to the beta newsgroups -
    weblogic.developer.interest.70beta.*.
    Thanks,
    Michael
    Vikas wrote:
    Hi
    I am a new person using weblogic first time I installed the weblogic 7.0 beta
    version on my machine.I am trying to start the weblogic server console so that
    I can configure web applications examples on my machine.
    I am getting following error and not able to view Out-of-the-Box Examples Index
    Page
    error:
    <Apr 5, 2002 12:11:39 PM IST> <Error> <SystemDataStore> <null> <Unable to listen
    on Port 7003: Address in use: JVM_Bind>
    Please help me to find the reason to have this problem
    Thank You in advance
    Vikas--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Out of the box approval workflow suddenly failed on start (retrying)

    SharePoint 2010. I've been using out of the box approval workflow for several month now. I did some minor changes to it, like to who and when emails should be send, but that's all.
    Then out of a sudden it stopped working. New request status is "Failed on start (retrying)". Sometimes (!) status is "In Progress", but no tasks are created. In both cases there is nothing on workflow history and error report is also empty
    (it even cause an error "Report contains no data").
    I'm sure that I didn't change anything in a workflow. The only think that I changed was an InfoPath form, but I only added there field "Created By", so I would see in calendar later who created this request. I couldn't see how this might affect workflow
    process.
    I'm confused as I don't even know where to start searching for the solution. Why this might happen? Any ideas are very welcome!

     In my list I have a multiple choice field which is not required. When it was
    blank my workflow was failing on start! This field was not involved in a workflow directly, I included it only in the email to approver. When I deleted it from an email everything was fine.

  • After the in place upgrade from SharePoint server 2007 to 2010, the out of the box approval workflow does not prompt for additional information after check in of a major version.

    I think it has to do with the interaction between Word, InfoPath, IIS, and /or SharePoint, but I cannot put my finger on it.  Maybe client integration or authentication settings?  I have looked at it in wireshark
    and have not seen anything glaring.
    Steps to reproduce the (working) behavior:
    Set up a document library in SharePoint 2010.
    Under versioning settings, make the following changes:
    Set Require Content Approval for submitted Items to Yes
    Select Create Major and Minor (draft) versions
    Set require checkout to Yes
    Create an out of the box “approval” workflow with the following settings:
    Start this workflow to approve publishing a major version of an item.
    I then create a new document. Save it.  check it in.  it is now version 0.1.
    I then open it again. check it out.  Make a change. Close and save it.
    Check it in.
    Publish major version:
    At this point a screen is presented to me to enter workflow parameters.  This screen comes up in Enterprise 2013 and MOSS 2007, but not the migrated version of 2010:
    This is what I need help with.  It should come up in 2010.  To fix it in 2013, I had to change the IIS bindings to only have 1 entry for a port.  I did this for 2010 and it did not work.
    Any help or ideas is very appreciated.  Thanks very much in advance.

    Hi Chris,
    According to your description, my understanding is that the approval workflow cannot work when the workflow was set to start to approve publishing a major version of an item after upgrading to SharePoint 2010.
    I recommend to check the approval workflow in Workflow settings of the corresponding library to see if the Start this workflow to approve publishing a major version of an item is checked.
    For test, I recommend to create a new OOB approval workflow and set it to start to approve publishing a major version of an item in the same library to see if the workflow can work.
    Thanks
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • OIM 11gR2 - Out-of-the-box Approval Workflows

    Does anyone know of any good resources that describes the out-of-the-box approval/provisioning workflows of 11g R2? I have searched Google back and forth but found nothing. Some of the workflows are obvious by their name (such as default/BeneficiaryManagerApproval!1.0), but others are not so clear regarding their flows.
    On that same note, can one of the out-of-the-box approval workflows be configured to route to an approval group instead of single users?
    Thanks for your help!

    Instead of searching for docs in google i guess reverse-engineering on your own will be the best way to understand the approval workflows. Navigate to OIM_HOME/server/workflows/composites. It will contain all the approval workflow zip files. Unzip the required one which you want to understand and there will be a .jws file in it. Now open that in jdeveloper and open AprrovalProcess.bpel and composite.xml. It will show how the approval routes and what are the business rules written, everything. It is the best way to understand the approval workflows.
    In the same way u can make changes to the out-of-the-box approval workflows also. See this OBE tutorial to understand how you can assign the approval to a group
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/oim/oim_11g/Request_Workflow_for_Self_Registration/request_workflow_for_self_registration.htm
    Also please try the approval workflow given in the developer's guide which covers most of the basics.
    http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/request.htm#CIHFBEFB

  • S430 - touchpad not working at all out of the box

    Hi all
    I know there's a few people who have problems with the touchpad on their thinkpads, I've got another, different problem!  
    I got mine out of the box yesterday and neither the touchpad nor the red joystick controller in the keyboard work.  The buttons on the touchpad also don't work.
    Luckily I had a USB mouse at home and I've been able to the laptop up and running, but no luck trying to get the touchpad working.  I've gone through the user guide, the help guide, the lenovo website etc, but not finding anything.
    When I go into the "control panel", then "hardware and sound" and select "device manager",  the only "mice and other pointing devices" that I have is my HID-compliant mouse which seems to be the USB mouse.  The touchpad doesn't feature at all.
    If I go into "control panel" and select "mouse"  I don't actually have a tab for "UltraNav".  Since all the help out there tells me to go to that tab, I don't really know what to do!
    If I go through the Lenovo Solution Center, it tells me that the "ThinkPad UltraNav Pointing Device" is disabled and to fix it I need to go to the Device Manager.
    But, as already said, in the device manager there's nothing I can do!
    Any help would be much appreciated.
    cheers
    Harry

    Hi
    This notebook seems to belong to the PSAF5E series.
    I wonder where you have found the drivers for this series ?:|
    However, I have checked the Toshiba European page and didnt find the Vista touchpad driver especially for this series.
    BUT the page provides some touchpad drivers (two drivers) for the Equium A200 PSAEE.
    I would recommend installing the Alps Electric Touch Pad driver v7.0.301.4 and the Synaptics Touch Pad driver v. 9.1.14.0.
    By the way; its always recommended to reinstall the OS with the Toshiba recovery CD. If you dont have such CD you could order it from the ASP which is responsible for you country.

  • I can't see the workflow diagram in the out-of-the-box proposal workflow in Project Server 2010

    Hello,
    I created new project based on the template out-of-the-box proposal, but after that i can't see the following diagram ..

    Hi,
    To achieve this you can use Workflow Visualization webpart from Project Server 2010 Solution Starter Kit from
    here.
    Thanks !!!
    Sachin Vashishth MCTS

  • Not Able to Generate Out of the Report by adding the new 2 fields

    Hi,
    I'm Very new to ABAP. I have created one report. after 2 new fields added they are EKNAM and EKGRP.
    The Thing is the remaining fields are displaying in the output. The Newly added fields are not displaying the out. I was able to add this 2 fields in the head of the report. But issue is not able to get the data on these 2 fields.
    Please see the below program and any one please help me out to display the data in this report for the fields eknam and ekgrp.
    TABLES: eban,
            lfa1,
            ekko,
            t024,
            v_username.
    DATA: BEGIN OF i_req_items OCCURS 10,
            ernam LIKE eban-ernam,         "Created by
            lifnr LIKE eban-lifnr,         "Desired vendor
            ebeln LIKE eban-ebeln,         "PO Number
            ebelp LIKE eban-ebelp,         "PO Item
            eknam LIKE t024-eknam,         "Pur.Grp Name
            ekgrp LIKE t024-ekgrp,         "Pur.Grp Number
            flief LIKE eban-flief,         "Fixed vendor
            name1 LIKE lfa1-name1,         "Vendor name
            badat LIKE eban-badat,         "Creation date
            erdat LIKE eban-erdat,         "Change date
            banfn LIKE eban-banfn,         "Requisition no.
            bnfpo LIKE eban-bnfpo,         "Req. item no.
            bsart LIKE eban-bsart,         "Document type
            knttp LIKE eban-knttp,         "Acct.assgmt category
            txz01 LIKE eban-txz01,         "PO item description
            menge LIKE eban-menge,         "Quantity
            preis LIKE eban-preis,         "Price
            peinh LIKE eban-peinh,         "Price unit
            value(14) TYPE p DECIMALS 2,   "Item Value
          END OF i_req_items.
    DATA: BEGIN OF i_reqs OCCURS 10,
            ernam LIKE eban-ernam,         "Created by
            persn LIKE usr21-persnumber,   "Person number
            uname LIKE adrp-name_text,     "User name
            lifnr LIKE eban-lifnr,         "Vendor
            name1 LIKE lfa1-name1,         "Vendor name
            badat LIKE eban-badat,         "Creation date
            banfn LIKE eban-banfn,         "Requisition no.
            bnfpo LIKE eban-bnfpo,         "Req. item no.
            bsart LIKE eban-bsart,         "Document type
            knttp LIKE eban-knttp,         "Acct.assgmt category
            txz01 LIKE eban-txz01,         "PO item description
            eknam like t024-eknam,         "Purchase Grp Name
            ekgrp like t024-ekgrp,         "Purchase Grp Number
            value(14) TYPE p DECIMALS 2,   "Item Value
          END OF i_reqs.
    DATA: BEGIN OF i_req_keys OCCURS 0,
            ernam LIKE eban-ernam,         "Created by
            lifnr LIKE eban-lifnr,         "Desired vendor
            erdat LIKE eban-erdat,         "Create or Change date
            banfn LIKE eban-banfn,         "Requisition no.
            bnfpo LIKE eban-bnfpo,         "Req. item no.
            eknam like t024-eknam,         "Purchase Grp Name
            ekgrp like t024-ekgrp,         "Purchase Grp number
          END OF i_req_keys.
    DATA: BEGIN OF i_req_keeper OCCURS 0,
            ernam LIKE eban-ernam,         "Created by
            lifnr LIKE eban-lifnr,         "Desired vendor
            banfn LIKE eban-banfn,         "Requisition no
          END OF i_req_keeper.
    DATA: wa_reqitems LIKE i_req_items.
    DATA: BEGIN OF i_export OCCURS 10,
           record(150) TYPE c,
          END OF i_export.
    CONSTANTS
    CONSTANTS:
          c_doccat       LIKE eban-bstyp  VALUE 'B',
          c_creind       LIKE eban-estkz  VALUE 'R',
          c_delflag      LIKE eban-loekz  VALUE 'L',
          c_write(5)     TYPE c   VALUE 'WRITE',
          c_slash(1)     TYPE c   VALUE '/',
    *start ESPZC U8DK900439
         c_delimiter    TYPE x   VALUE '09',
           c_delimiter    TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
    *end ESPZC U8DK900439
          c_sc(1)        TYPE c   VALUE ';',
          c_x(1)         TYPE c   VALUE 'X',
          c_usd(1)       TYPE c   VALUE '2',
          c_export LIKE authb-filename VALUE '/BAY2/UBEM_SPLIT_REQS'.
    WORKING VARIABLES
    DATA: w_report_id   LIKE syst-repid,
          w_sttime      LIKE syst-uzeit,
          w_rpt_pagno   LIKE syst-pagno,
          w_rc          LIKE sy-subrc,
          w_datelow     LIKE eban-badat,
          w_datehigh    LIKE eban-badat,
          w_export      LIKE c_export,
          w_records     TYPE i,
          w_message(50) TYPE c.
    TYPES number TYPE i.
    SELECTION SCREEN / PARAMETERS
    SELECTION-SCREEN BEGIN OF BLOCK org WITH FRAME TITLE text-001.
    PARAMETERS: p_purorg LIKE eban-ekorg OBLIGATORY DEFAULT 'US02'.
    SELECT-OPTIONS: s_doctyp FOR eban-bsart,
                    s_date FOR eban-badat.
    PARAMETERS: p_timper(2) TYPE n.
    SELECTION-SCREEN: COMMENT 37(37) text-002.
    SELECTION-SCREEN END OF BLOCK org.
    SELECTION-SCREEN BEGIN OF BLOCK outp WITH FRAME TITLE text-003.
    PARAMETERS: p_onlin  RADIOBUTTON GROUP outp DEFAULT 'X',
                p_servr  RADIOBUTTON GROUP outp.
    SELECTION-SCREEN END OF BLOCK outp.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN.
      IF p_servr = c_x.
        CLEAR w_rc.
        PERFORM authority_check_dataset USING    w_export
                                        CHANGING w_rc.
        IF w_rc <> 0.
          MESSAGE e532 WITH text-006 w_export.
        ENDIF.
        CLEAR w_rc.
        PERFORM verify_unix_path_and_file CHANGING w_rc.
        IF w_rc <> 0.
          MESSAGE e531 WITH w_message.
        ENDIF.
      ENDIF.
      INITIALIZATION EVENT
    INITIALIZATION.
      PERFORM get_filename.
      MOVE  syst-uzeit  TO   w_sttime.
      MOVE  syst-repid  TO   w_report_id.
      CLEAR: w_rpt_pagno.
    START-OF-SELECTION.
      PERFORM get_data.
      IF p_onlin = c_x.
        IF w_records GT 0.
          PERFORM print_report_header.
          PERFORM write_report.
        ELSE.
          MESSAGE i531 WITH text-007.
        ENDIF.
      ELSEIF p_servr = c_x.
        PERFORM write_export.
      ENDIF.
    END-OF-SELECTION.
    ---- F O R M   R O U T I N E S -
    *&     FORM get_filename
    FORM get_filename.
      CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
          logical_filename = c_export
        IMPORTING
          file_name        = w_export
        EXCEPTIONS
          file_not_found   = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " get_filename
      FORM authority_check_dataset
    FORM authority_check_dataset USING    p_filename
                                 CHANGING p_rc.
      CALL FUNCTION 'AUTHORITY_CHECK_DATASET'
        EXPORTING
          activity         = c_write
          filename         = p_filename
        EXCEPTIONS
          no_authority     = 1
          activity_unknown = 2
          OTHERS           = 3.
      p_rc = sy-subrc.
    ENDFORM.                    "authority_check_dataset
        FORM verify_unix_path_and_file
    FORM verify_unix_path_and_file CHANGING p_rc.
    *start ESPZC U8DK900439
    OPEN DATASET w_export FOR OUTPUT IN TEXT MODE
         MESSAGE w_message.
      OPEN DATASET w_export FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
          MESSAGE w_message.
    *end ESPZC U8DK900439
      p_rc = sy-subrc.
    ENDFORM.                    "verify_unix_path_and_file
      FORM get_data
    FORM get_data.
      CLEAR w_datelow.
      CLEAR w_datehigh.
      w_datelow = s_date-low - p_timper.
    w_datehigh = s_date-high + p_timper.
      w_datehigh = s_date-high.
      SELECT ernam lifnr ebeln ebelp flief badat erdat banfn bnfpo bsart
            knttp menge preis peinh txz01
       FROM eban
       INTO CORRESPONDING FIELDS OF TABLE i_req_items
          WHERE bstyp = c_doccat
            AND estkz = c_creind
            AND knttp <> space
            AND bsart IN s_doctyp
            AND loekz <> c_delflag
            AND ekorg EQ p_purorg
           AND ( ( badat BETWEEN w_datelow and w_datehigh ) OR
            ( erdat BETWEEN w_datelow AND w_datehigh ) ).
            AND  erdat BETWEEN w_datelow AND w_datehigh.
      IF sy-subrc = 0.
        LOOP AT i_req_items.
          IF i_req_items-lifnr IS INITIAL.
            IF NOT i_req_items-flief IS INITIAL.
              MOVE i_req_items-flief TO i_req_items-lifnr.
              MODIFY i_req_items.
            ENDIF.
            IF NOT i_req_items-ebeln IS INITIAL.
              SELECT lifnr FROM ekko
                  INTO i_req_items-lifnr
                  WHERE ebeln = i_req_items-ebeln.
              ENDSELECT.
              MODIFY i_req_items.
            ENDIF.
          ENDIF.
          IF i_req_items-erdat GT i_req_items-badat.
            MOVE i_req_items-erdat TO i_req_items-badat.
            MODIFY i_req_items.
          ENDIF.
        ENDLOOP.
        PERFORM weed_out_unique_records.
        PERFORM apply_time_period.
        SORT i_req_items BY ernam lifnr banfn bnfpo.
        LOOP AT i_req_items.
          i_req_items-value = ( i_req_items-menge *
               ( i_req_items-preis / i_req_items-peinh ) ).
          MODIFY i_req_items.
        ENDLOOP.
    Getting vendor name from table LFA1 -
        CLEAR i_req_items.
        LOOP AT i_req_items.
          SELECT SINGLE name1 FROM lfa1
            INTO i_req_items-name1
              WHERE lifnr = i_req_items-lifnr.
          MODIFY i_req_items.
        ENDLOOP.
        LOOP AT i_req_items.
          MOVE-CORRESPONDING i_req_items TO i_reqs.
    Getting user name from view v_username -
          SELECT SINGLE name_text
           FROM v_username INTO i_reqs-uname
          WHERE bname = i_reqs-ernam.
          APPEND i_reqs.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE i_reqs LINES w_records.
    ENDFORM.                        "Get_data
      FORM print_report_header
    FORM print_report_header.
      ADD  1   TO   w_rpt_pagno.
      CALL FUNCTION '/BAY2/UBEXBH_BAYER_HEADR_FUN'
        EXPORTING
          f_jobname        = text-020
          f_business_group = text-021
          f_report_title   = text-022
          f_repid          = w_report_id
          f_sysid          = syst-sysid
          f_linsz          = syst-linsz
          f_pagno          = w_rpt_pagno
          f_mandt          = syst-mandt
          f_datum          = syst-datum
          f_uzeit          = w_sttime.
      FORMAT COLOR COL_HEADING.
      WRITE:  /1     text-010,      "Created by CWID & user name
              29     text-011,      "Vendor #
              38     text-012,      "Vendor Name
              69     text-013,      "Req Number
              79     text-014,      "/Item
              87     text-015,      "Created On
              98     text-017,      "A (AcctAssgmtCat)
             100(14) text-019 RIGHT-JUSTIFIED,  "Item Value
             116(30) text-018,      "Item Description
             148     text-030,      "Pur.Grp Name
             170     text-031.      "Pur.Grp Number
      FORMAT COLOR OFF.
      ULINE.
    ENDFORM.                             "print_report_header
    *&      Form  WRITE_REPORT
    FORM write_report.
      LOOP AT i_reqs.
        WRITE: /1 i_reqs-ernam,
                9(18) i_reqs-uname,
               29 i_reqs-lifnr,
               38(30) i_reqs-name1,
               69 i_reqs-banfn,
               79 c_slash,
               80 i_reqs-bnfpo,
               87 i_reqs-badat,
               98 i_reqs-knttp,
              100(14) i_reqs-value CURRENCY c_usd,
              116(30) i_reqs-txz01,
              145 i_reqs-eknam,
              160 i_reqs-ekgrp.
      ENDLOOP.
    ENDFORM.                    "write_report
    *&      Form  WRITE_EXPORT
    FORM write_export.
      DATA: l_value(14)    TYPE c,
            l_bsart(100)   TYPE c,
            l_uname(7)     TYPE c,
            l_records(5)   TYPE c,
            l_header(150)  TYPE c,
            l_params(150)  TYPE c,
            i_char         TYPE i.
      LOOP AT i_reqs.
        CLEAR l_value.
        CLEAR l_uname.
        l_value = i_reqs-value.
        l_uname = sy-uname.
        CONCATENATE: i_reqs-uname
                     i_reqs-ernam
                     i_reqs-lifnr
                     i_reqs-name1
                     i_reqs-banfn
                     i_reqs-bnfpo
                     i_reqs-badat
                     i_reqs-knttp
                     l_value
                     i_reqs-txz01 INTO i_export
                                  SEPARATED BY c_delimiter.
        APPEND i_export.
      ENDLOOP.
      CONCATENATE: text-008   "Created By Name
                   text-009   "CWID
                   text-011   "Vendor No
                   text-012   "Vendor Name
                   text-013   "Req Number
                   text-023   "Item
                   text-015   "Created On
                   text-017   "A
                   text-019   "Item Value
                   text-018   "Item Description
                   text-030   "Purchase Grp name
                   text-031   "Purchase Grp number
                   INTO l_header SEPARATED BY c_delimiter.
      INSERT l_header INTO i_export INDEX 1.
      IF sy-batch IS INITIAL.
        MOVE sy-uname TO l_uname.
      ELSE.
        MOVE text-024 TO l_uname.
      ENDIF.
      PERFORM collect_bsart CHANGING l_bsart
                                     i_char.
      l_records = w_records.
      CONCATENATE: sy-sysid
                   p_purorg
                   l_bsart(i_char)
                   s_date-low
                   s_date-high
                   p_timper
                   l_uname
                   sy-datum
                   l_records INTO l_params
                             SEPARATED BY c_delimiter.
      INSERT l_params INTO i_export INDEX 1.
      LOOP AT i_export.
        CONDENSE i_export NO-GAPS.
        TRANSFER i_export TO w_export.
      ENDLOOP.
      CLOSE DATASET w_export.
      MESSAGE s533 WITH text-028 w_export text-029.
    ENDFORM.                    "write_export
    *&      FORM collect_bsart
    FORM collect_bsart CHANGING p_bsart
                                p_char.
      CLEAR p_bsart.
      LOOP AT s_doctyp.
        IF sy-tabix = 1.
          p_bsart = s_doctyp-low.
        ELSE.
          CONCATENATE: p_bsart c_sc s_doctyp-low INTO p_bsart.
        ENDIF.
      ENDLOOP.
      CONDENSE p_bsart NO-GAPS.
      p_char = strlen( p_bsart ).
    ENDFORM.                      "collect_bsart
    *&      Form  WEED_OUT_UNIQUE_RECORDS
    FORM weed_out_unique_records.
      DATA: i_l_req_items LIKE i_req_items OCCURS 0 WITH HEADER LINE.
      DATA: i_l_req_final_items LIKE i_req_items OCCURS 0 WITH HEADER LINE.
      DATA: l_count TYPE i,
            l_sy_tabix LIKE sy-tabix,
            l_banfn    LIKE eban-banfn.
      REFRESH i_l_req_items.
      REFRESH i_l_req_final_items.
      CLEAR l_banfn.
      i_l_req_items[]       = i_req_items[].
      i_l_req_final_items[] = i_req_items[].
      SORT i_req_items         BY ernam lifnr.
      SORT i_l_req_items       BY ernam lifnr.
      SORT i_l_req_final_items BY ernam lifnr.
      LOOP AT i_l_req_items.
        l_banfn = i_l_req_items-banfn.
        CLEAR l_count.
        LOOP AT i_req_items
            WHERE ernam = i_l_req_items-ernam
              AND lifnr = i_l_req_items-lifnr.
          IF i_req_items-banfn <> l_banfn.
            ADD +1 TO l_count.
          ENDIF.
        ENDLOOP.
        IF NOT ( l_count > 0 ).
          LOOP AT i_l_req_final_items
            WHERE ernam = i_l_req_items-ernam
              AND lifnr = i_l_req_items-lifnr.
            DELETE i_l_req_final_items.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
      REFRESH i_req_items.
      i_req_items[] = i_l_req_final_items[].
    ENDFORM.                    " WEED_OUT_UNIQUE_RECORDS
    *&      Form  APPLY_TIME_PERIOD
    FORM apply_time_period.
      DATA: l_i_req_keys LIKE i_req_keys.
      DATA: l_days_diff          TYPE p,
            l_no_of_key_recs     TYPE i,
            l_next_item          LIKE sy-tabix,
            l_finished_with_keys TYPE c VALUE 'N',
            l_add_line           TYPE c VALUE 'N',
            l_count              TYPE i,
            l_req_ernam          LIKE eban-ernam,
            l_req_lifnr          LIKE lfa1-lifnr,
            l_req_banfn          LIKE eban-banfn,
            l_save_tabix         like sy-tabix.
      REFRESH: i_req_keys, i_req_keeper.
      LOOP AT i_req_items.
        MOVE-CORRESPONDING i_req_items TO
                           i_req_keys.
        IF i_req_items-erdat IS INITIAL.
          i_req_keys-erdat = i_req_items-badat.
        ENDIF.
        APPEND i_req_keys.
      ENDLOOP.
      SORT i_req_keys BY ernam lifnr erdat.
      CLEAR l_no_of_key_recs.
      DESCRIBE TABLE i_req_keys LINES l_no_of_key_recs.
      LOOP AT i_req_keys.
        IF l_add_line = 'Y'.
          MOVE-CORRESPONDING i_req_keys
                          TO i_req_keeper.
          APPEND i_req_keeper.
          l_add_line = 'N'.
        ENDIF.
        IF l_finished_with_keys = 'Y'.
          EXIT.
        ENDIF.
        CLEAR l_next_item.
        l_save_tabix = sy-tabix.
        COMPUTE l_next_item = sy-tabix + 1.
        IF l_next_item = l_no_of_key_recs.
          l_finished_with_keys = 'Y'.
        ENDIF.
        clear: l_i_req_keys.
        READ TABLE i_req_keys INDEX l_next_item
            INTO l_i_req_keys.
        sy-tabix = l_save_tabix.
        CLEAR l_days_diff.
        l_days_diff = l_i_req_keys-erdat -
                      i_req_keys-erdat.
        IF l_i_req_keys-ernam  =
           i_req_keys-ernam                  AND
           l_i_req_keys-lifnr  =
           i_req_keys-lifnr                  AND
           l_i_req_keys-banfn  <>
           i_req_keys-banfn                  AND
           l_days_diff         <= p_timper.
          MOVE-CORRESPONDING i_req_keys
                          TO i_req_keeper.
          APPEND i_req_keeper.
          l_add_line = 'Y'.
        ENDIF.
      ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM i_req_keeper
                            COMPARING ALL FIELDS.
      SORT i_req_keeper BY ernam lifnr banfn.
      LOOP AT i_req_items.
        CLEAR l_count.
        CLEAR: l_req_ernam,
               l_req_lifnr,
               l_req_banfn.
        l_req_ernam = i_req_items-ernam.
        l_req_lifnr = i_req_items-lifnr.
        l_req_banfn = i_req_items-banfn.
        LOOP AT i_req_keeper
            WHERE ernam = i_req_items-ernam
              AND lifnr = i_req_items-lifnr
              AND banfn = i_req_items-banfn.
          ADD +1 TO l_count.
        ENDLOOP.
        IF NOT ( l_count > 0 ).
          LOOP AT i_req_items
            WHERE ernam = l_req_ernam
              AND lifnr = l_req_lifnr
              AND banfn = l_req_banfn.
            DELETE i_req_items.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " APPLY_TIME_PERIOD

    Rajesh,
    Put a breakpoint and try to debug the report step by step.
    You will findout the reason very easily.
    Whenever you have a select and are trying to append into an internal table, keep checking your internal table if it is been populated with the correct records.
    This way, you will findout the cause and can correct is accordingly.
    Thanks,
    Suresh Ganti

  • Mac pro suddenly is not able to start after accepting the password

    for some reason after the last time i did a shutdown the mac now does not start up. I enter the password ,( correctly , i checked for caps lock etc..) it seems to accept it and then it blinks and takes me back to the login . The same thing happens on the guest account I had set up. different password entered correctly.
    OS is the lastest 10.7 with all the updates.

    yes , that was probaly the case, though swore i had used shift when starting. Anyway I then tried it again in safe mode but same result. I got into the hard drive and was able to track down the system log finally .
    I saw the following :
    May  7 16:43:19 aMac-Pro-4 SecurityAgent[117]: Login Window login proceeding
    May  7 16:43:20 aMac-Pro-4 loginwindow[62]: Login Window - Returned from Security Agent
    May  7 16:43:20 aMac-Pro-4 loginwindow[62]: AuthorizationRef returned an error (100022), with username = MYUSERNAME
    May  7 16:43:20 aMac-Pro-4 loginwindow[62]: This indicates that a SecurityAgent plugin has returned something other than errAuthorizationDenied (usually cancelled) after the auth record is set up.
    May  7 16:43:20 aMac-Pro-4 com.apple.loginwindow[62]: AuthorizationRef returned an error (100022), with username = MYUSERNAME
    May  7 16:43:20 aMac-Pro-4 com.apple.loginwindow[62]: This indicates that a SecurityAgent plugin has returned something other than errAuthorizationDenied (usually cancelled) after the auth record is set up.
    looking around for this 100022 error i found a solution that worked for someone else with the same issue and tried it:
    I was able to fix this by using the terminal (either in recovery or singler user mode) and removing the file /var/audit/current. It's supposed to be a symbolic link pointing to the most recent file, but it seems like it gets corrupted.
    So for the single-user fix:
    Reboot and hold Command+S for singler user mode.
    Once you get a command prompt mount the partition for write access
    /sbin/mount -uw /
    Then remove that file.
    rm /var/audit/current
    Sure enough i removed the corrupted file and it works like always, I can boot type in my password and I'm back in action.
    Now I am just left wondering how the corruption happened?  any ideas?
    Thanks for all of you who looked at this
    Rich

  • On the Wall Street Journal website, I am not able to print out of the print format. Never had a problem before with this.

    I click on the print icon under an article in the Wall Street Journal. A new window opens with the article in print format. When I print, I get blank paginated pages equaling the length of the article. On the top left hand corner of the page will appear the title of the article; on the top right hand corner will appear the web address of the article; on the bottom left hand corner will appear the pagination; and on the bottom right hand corner will be the date and time of the printing. This is just how any article would print; the only difference being that I'm not getting the content of the article printed.
    This has only started a couple of days ago. I do not have this issue with any other publication, yet this problem doesn't exist with other browsers.

    I don't have a WSJ account to test... Here is some general advice:
    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    (1) Bypass Firefox's Cache
    Use Ctrl+Shift+r to reload the page fresh from the server.
    Alternately, you also can clear Firefox's cache completely using:
    orange Firefox button (or Tools menu) > Options > Advanced
    On the Network mini-tab > Cached Web Content : "Clear Now"
    If you have a large hard drive, this might take a few minutes.
    (2) Remove the site's cookies (save any pending work first). While viewing a page on the site:
    * right-click and choose View Page Info > Security > "View Cookies"
    * Alt+t (open the classic Tools menu) > Page Info > Security > "View Cookies"
    This will open a window listing the site's cookies, which you can remove individually.
    Then try reloading the page and logging back in. Does that help?

  • Will a new IPAD work out of the box without syncing it to a computer?

    While I understand the reason for syncing an IPAD to your computer via ITUNES, I was wondering if the IPAD will work out of the box without syncing? I bought an IPAD for my wife for Christmas and she wants to sync it to her work computer (her own small business). She's new to Apple and she doesn't have an ITUNES account yet. By the way, she knows she's getting an IPAD for Christmas. We don't want to go to her work on Christmas day to get her IPAD "going."
    Question: Can she open the IPAD on Christmas day and have it work or will we have to get her an ITUNES account and have her sync it to her work computer prior to Christmas for it to work on Christmas day?
    I would prefer to keep it boxed up until Christmas but I'd like her to be able to use it on Christmas day and then after Christmas go to her work to download ITUNES and sync it to her computer.

    I purchased an iPad with 3G for a family member without a computer with Internet connection who lives in a rural area where 3G is available. I shipped the iPad however upon receipt the only thing he could do with it was charge it. Due to physical limitations related to a medical condition he rarely leaves his residence. The marketing for the iPad implies a stand alone capable device, however, until I was able to visit several months after shipping the iPad the family member was not able to use it. During my visit I took the iPad to an AT&T store and they were able to set it so it showed the icons and allowed setup of Interner access. I can understand the Wi-Fi version likely being purchased by someone that already has a computer with Internet access, but the 3G should be able to funciton out of the box as a stand alone unit and it does not.

  • Where is the SP 2010 out of the box workflow status value stored?

    I created an out of the box Approval - SharePoint 2010 workflow (TEST1) on a custom list. When I created this out of the box workflow, I specified a name for the task (TEST1 Tasks) and history (TEST1 History) list. 
    The workflow is creating tasks, sending emails, and the task emails lead me to a screen where I can approve or reject the requests.
    However, TEST1 - the list that contains the items created - doesn't have a status column.  The TEST1 Tasks has a status column. But I would prefer the people working with the workflow just look at TEST1 and not the Tasks or History lists.
    What is the preferred way to create one of these list workflows so that the admins only have to look at the specific tasks that have been submitted and they can see which have been approved or not?
    Thank you
     

    Thank you for your reply. Initially, I didn't have content approval turned on, had workflow approval turned on, but didn't have a status column. I also had an error in the history list that the status could not be created.
    When I turned on the content approval, then I got a status column, but now my list has a warning across the top telling the user that their request won't be public until approved.
    I don't really WANT a document approval workflow. But I don't see how to set up what I do want.
    What I need is a simple custom list - a few lookup columns, the rest static data columns, that describe an action that is being requested. That request (ala the list item) is what needs to be approved or rejected. There is no publishing needed in this workflow.
    The approval workflow was the closest I could see for setting up such a simple request workflow.

  • Sql services are not able to start in server

    We have rebooted inactive the server due to rolling maintenance.
    Sql is not running and sql services are not able to start. Getting the below error message while starting the services.
    please suggest how to fix?

    Could you try:
    To resolve the problem, use these steps:
    Change the startup account of both the MSSQLSERVER and SQLServerAgent to use the Local System account.
    Restart the computer.
    https://support.microsoft.com/en-us/kb/307288
    Or check  NetLogon service is running

  • Out of the box adapters

    Please correct me if I am wrong 
    UCCnet adapter is part of xi out of the box
    File / JMS / JDBC / IDOC / RFC / CIDX / RNIF adapters are not part of xi out of the box.
    thanks
    kumar

    Palnati,
    Out of box is nothing but additional advantages.
    <i>UCCnet adapter is part of xi out of the box</i>  --- It dont come up with XI. If you purchase by default you dont have this.
    File / JMS / JDBC / IDOC / RFC adapters are part of xi.
    CIDX / RNIF is also not part of XI standard installation.
    This all depneds upon clients requirements. First they will analyze all their requirements and will purchase the necessary adapters.
    ---Satish

  • Just started up my Mac Mini out of the box, using a USB windows keyboard, it will not recognize letters so I am unable to enter serial number.  Anything I can do to get the mini mac right out of the box to recognize the windows keyboard?

    Just started up my Mac Mini out of the box, using a USB windows keyboard, it will not recognize letters so I am unable to enter serial number.  Anything I can do to get the mini mac right out of the box to recognize the windows keyboard?  Do I have to buy an Apple Keyboard to get it to work right out of the box?

    Is this a normal USB keyboard or is there anything specialized about it? Does this keyboard require you to install any special software to use it on a Windows box? Or is it usually a plug & play keyboard?
    Normally if a Mac does not recognize a keyboard it asks you to press certain keys to identify the keyboard. What is happening on screen with this keyboard? What serial number are you referring to?

Maybe you are looking for

  • Problems with using Deskjet 3745 on 2-PC home network

    I have an old PC running Windows XP SP3 and a new one running Windows 7, but only one printer. The network connecting the PCs is on an ADSL router with to its own external Iomega network drive with a USB port. To make the printer usable on both PCs,

  • How do I remove a Apple account from iTunes

    My Mother-in-law had one of her grandchildren (not mine) plug in their iPod touch into her iMac, and download all kinds of games and music with their apple account. She got an iPad, and it automatically registered it with that other account, and she

  • X61 - Vista Business - Client Security Solution Error - There was a problem connecting to the TPM

    During startup my x61 has been displaying the following message, 'Client Security Solution' - "There was a problem connecting to the TPM (security device) ont his computer. It is possile that anti-virus or firewall software is blocking the connection

  • Planning : migration security of business rules

    Hello, Unfortunetly the migrator for business rules (v. 9.2.0.3) don't migrate the security. Do somebody have a solution to migrate the securtiy with the business rules ? And, is there a solution to associate the BR with the forms automatically ? Tha

  • Charging the 9360

    Hi My Curve 9360 charges fine using the supplied mains charger and from my laptop's USB ports, but not from any third party USB wall chargers I have tried. The wall chargers I have are 5v 500mA, which as I understand it, is the same output as a compu