Stuck with an error, need help.

Hi Gurus,
I am calling the workflow throught the function module SWW_wi_start_simple, I am throwing with an exception 'read_failed' Can any one say why this error being stated.
Secondly, I coded as below to start the work flow with the wf container. How can i use those conatiner variables in the workflow builder
I coded as below now , now can i use these variables directly in workflow builder or do i need to create again in the workflow builder.
Can any one say this please I am in need.
code
FUNCTION zhr_workflow_initiator.
""Local interface:
*"  IMPORTING
*"     REFERENCE(EMPLOYEENR) LIKE  PA0000-PERNR
*"     REFERENCE(PLANNAME) LIKE  T5UCA-LTEXT
*"     REFERENCE(DEPENDANCY) LIKE  T5UCF-LTEXT
INCLUDE <cntn01>.
  DATA: wis_obj TYPE swc_object.
  DATA: task  LIKE  swwvpublic-wi_rh_task VALUE 'WS90000001',
        WI_ID LIKE  swwvpublic-wi_id.
  DATA: agents LIKE swhactor OCCURS 0 WITH HEADER LINE,
        wi_container LIKE swcont OCCURS 0 WITH HEADER LINE.
  DATA:BEGIN OF benadjreakey,
            pernr      LIKE  PA0001-PERNR,
           subty      like  p0378-subty,
           objps      like  p0378-objps,
           sprps      like  p0378-sprps,
           endda      like  p0378-endda,
           begda      like  p0378-begda,
           seqnr      like  p0378-seqnr,
        END OF benadjreakey.
data: l_PLANNAME(30) TYPE c,
      l_DEPENDANCY(20)  TYPE c.
data: BENEFIT_PLAN      like T5UCA-BPLAN,
      DEPENDACY_CODE    like T5UCF-DEPCV,
      COMPANY_CODE      like PA0001-BUKRS,
      PERSONAL_AREA     like PA0001-WERKS.
"Initialize" NULL_AGENTS1
  CLEAR agents.
  REFRESH agents.
  MOVE employeenr  TO benadjreakey-pernr.
  move planname    to l_planname.
  move dependancy  to l_dependancy.
**MOVE SUBTYPE        to BENADJREAKEY-subty.
**MOVE LOCKINDICATOR  to BENADJREAKEY-sprps.
**MOVE VALIDITYEND    to BENADJREAKEY-endda.
**MOVE VALIDITYBEGIN    to BENADJREAKEY-begda.
**MOVE RECORDNUMBER    to BENADJREAKEY-seqnr.
CALL FUNCTION 'ZHR_BEN_WORFLOW_DATA'
EXPORTING
   PLANNAME         = l_planname
   PERNR            = benadjreakey-pernr
   DEPENDANCY       = l_dependancy
IMPORTING
   BENEFIT_PLAN         = benefit_plan
   DEPENDACY_CODE       = DEPENDACY_CODE
   COMPANY_CODE         = COMPANY_CODE
   PERSONAL_AREA        = PERSONAL_AREA
Get object Referance
  swc_create_object wis_obj 'BENADJREAS' benadjreakey.
  swc_set_element wi_container 'benefit_plan_code'    BENEFIT_PLAN.
  swc_set_element wi_container 'Dependancy_code'      DEPENDACY_CODE.
  swc_set_element wi_container 'Company_code'         Company_code.
  swc_set_element wi_container 'PERSONAL_AREA'        PERSONAL_AREA.
swc_set_element wi_container 'ADJUSTMENTREASON' wis_obj.
  swc_container_to_persistent wi_container.
  CALL FUNCTION 'SWW_WI_START_SIMPLE'
  EXPORTING
        task = task
  IMPORTING
        wi_id = wi_id
  TABLES
      AGENTS = AGENTS
      wi_container = wi_container
  EXCEPTIONS
        id_not_created = 1
        read_failed = 2
        execution_failed = 3.
MOVE wi_id    TO workitem_id.
  IF sy-subrc <> 0.
    WRITE / 'NO_workflow_started'.
  ENDIF.
ENDFUNCTION.
Ravi

Hi Ravi,
You were able to program the function module but you are not able to find out why the exception is raised? This sounds a bit strange to me, or do you want us to give an answer in stead of searching for one yourself?
If you didn't create these container elements in the workflow you can't use them, and it could even be that that is why your exception is raised. By putting them in a container which is used when starting the workflow, they will not be automatically created in your workflow.
And to be more up to date use FM SAP_WAPI_START_WORKFLOW as Arghadip suggested.
Regards,
Martin

Similar Messages

  • Stuck with array's NEED HELP!!!

    I have been working at this for two hours now and I need a someone else's opinion other than my own. I need to create a method that finds the row index of the row which contains the largest number divisible evenly by 6. and the column index of the column with the smallest sum. all in one method.
    This is what I have so far.
      public static int sum(int[][]arr, int numRow)
                  int[][] s;
                  s = new int[0][10];
                  int u = 0, largestevenindex = 0, largesteven = -99999, product = 0, sum = 0, i, j;
                  for(i=0;i<numRow;i++)
                    for(j=0;j<arr.length;j++)
    if(arr[i][j]%6==0 && arr[i][j]>largesteven) //To find the the row index of the largest number divisible by 6.
              largesteven = arr[i][j];
              largestevenindex = i;
         System.out.println(largesteven);
         System.out.println(largestevenindex);
         for(u=0;u<arr[i].length;u++) //I think I have to create another table and place the sums of the colums and then compare. Is there an easier way?
    s[0] = s[0][u]+arr[i][j];
         System.out.println(s[0][u]);
    return largestevenindex;
    This is the test file23 45 10 77 19 13 16
    52 34 71 19 88 65 3
    12 1 57 16 4 36 17
    9 22 31 27 8 25 12
    56 77 88 22 33 44 99
    6 21 16 89 4 37 48
    25 17 8 9 64 72 81
    95 26 5 73 18 92 66
    99 12 45 72 19 77 43
    11 71 26 34 81 7 45
    16 2 34 68 67 7 51
    19 52 4 56 51 95 12
    57 4 7 9 2 1 3
    Anyone have any tips for my code, or another way to do this. Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Your right flounder, I forget to add we are suppose to just find the product of the two index(smallest sum cloum index and largest row index divisible by 6)
             public static int sum(int[][]arr, int numRow)
                  int[][] s;
                  s = new int[0][10];
                  int u = 0, largestevenindex = 0, largesteven = -99999, product = 0, sum = 0, i, j;
                  for(i=0;i<numRow;i++)
                    for(j=0;j<arr.length;j++)
    if(arr[i][j]%6==0 && arr[i][j]>largesteven)
              largesteven = arr[i][j];
              largestevenindex = i;      
    return largestevenindex;
    This gets the row index of the highest number divisible by 6. How do I go about finding the colum index that has the smallest sum. any hints or clues. It has to be apart of this method, though.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Z77A-GD55: Boot stuck with flashing cursor (need help!)

    When I start my computer, it says A2 in the lower left of the screen, and then B2 for quite a long time. Afterwards, it's just a white cursor flashing on a black background, and nothing else happens.
    I have recently installed a third hard disk and changed my graphics card (from 2x Sapphire HD 7970 to 1x EVGA GTX 760).
    What can I do to fix this problem?

    Quote from: badboy2k on 20-August-13, 05:16:16
    A2 = IDE Detect (looking for a hard drive as you do not have a OS that could just be the issue there)
    B2 = Legacy Option ROM Initialization <---- that is a problem and may indicate you have a problem with your EVGA GeForce GTX 760 as that is usually a Graphics Card issue code (check its seated and connected properly)
    was the 3rd HDD clean (new with no OS on it) and what SATA port you got it attached to?
    I removed the graphics card and connected the screen cables to the motherboard instead, and then started the computer. I worked fine, but of course, I can't use it how I want to without a graphics card.
    I then tried to insert it again, and made sure everything was connected properly. When I then started the computer, nothing had changed, and it was still stuck at the flashing cursor.
    The new hard disk was clean, yes. I previously had my three drives connected like this:
    - SSD (240GB) and HDD (2000GB) connected to the two SATA 1&2 (6.0 Gb/s)
    - Optical drive (Bru-Ray read/write) connected to SATA 3 (3.0 Gb/s)
    When I installed the new hard disk, I connected the old 2TB to SATA 4 (3.0 Gb/s), and the new 3TB to SATA 2 (6.0 Gb/s).
    The 240GB SSD is the disk with the operating system (Win7 64), and this is still, and has always been, connected to SATA 1.
    Does anyone have any possible solutions for my problem from the information currently given?
    I haven't been able to use my dear gaming computer for four weeks now, and it's driving me crazy...

  • I need the drivers for earl 2011 macbook pro 13 inch i7 4 gigs for windows 7 64 bits i tried downloading with bootcamp butt it never completes allways ends up with an error please help

    i need the drivers for earl 2011 macbook pro 13 inch i7 4 gigs for windows 7 64 bits i tried downloading with bootcamp butt it never completes allways ends up with an error please help if any one has the drivers or knows were i can download them

    Doug...
    If you don't have it for reference, the manual might come in handy > US/Boot_Camp_Install-Setup.pdf
    After it loads, Command + F to find information regarding the drivers.

  • ASR Hyper-v (VMM) to Azure and we are stuck with this error while preparing the VMM Server

    We are stuck with this error while installing ASR provider and registering with Azure Vault, can i get some help on this
    Error:
    NO Vaults could be retried for the registration key. Please ensure that
    1, your registration key has not expired.You can re-downloading registration key from Azure site Recovery portal
    2, Your system clock is not out of sync with the selected system time zone
    System Clock is set to IST and Azure to southeastasia

    Hi,
    Could you please ensure that you have downloaded the latest registration key from the portal?
    Also ensure that the machine from where you are accessing the portal and the VMM server has the right time according to your time zone.
    Thank you,
    Ruturaj

  • Acrobat Error - need help! - Acrobat 9 Pro

    When I try to open an acrobat files my it trys to Open EVERY acrobat file on my computer and does so until I get the following message
    "There was an error opening this document.  The maximum number of files are already open.  No other files can be opened or printed until some are closed"
    Then I have to force quit.
    This just started happending a few months ago
    I am on a Mac OSX
    I need help!  Any suggestions?
    Debbie

    I  have a 10.5.8
    I am not that technical so not sure what you mean about applejack etc.
    Thanks for helping!
    Debbie
    Date: Sat, 10 Apr 2010 13:03:28 -0600
    From: [email protected]
    To: [email protected]
    Subject: Acrobat Error - need help! - Acrobat 9 Pro
    What version of OS X? Some people have luck by clearing their caches. This can be done with Applejack in 10.5. Onyx will work in SL.
    >

  • My ipod generation 5 will not come out of recovery mode. i was simply updating my software and this happened. it will not let me restore it comes up with and error. please help, thanks.

    my ipod generation 5 will not come out of recovery mode. i was simply updating my software and this happened. it will not let me restore it comes up with and error. please help, thanks.

    Hey erinoneill24,
    Thanks for using Apple Support Communities.
    Sounds like you can't update your device. You don't mention an error that it gives you. Take a look at both of these articles to troubleshoot.
    iPod displays "Use iTunes to restore" message
    http://support.apple.com/kb/ts1441?viewlocale=it_it
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808?viewlocale=de_DE_1
    If you started your device in recovery mode by mistake, restart it to exit recovery mode. Or you can just wait—after 15 minutes the device will exit recovery mode by itself.
    Have a nice day,
    Mario

  • Iphone4 upgrade ios5.0.1, done upgrade and reboot itself, iphone stuck at sos mode. need help!!

    iphone4 upgrade ios5.0.1, done upgrade and reboot itself, iphone stuck at sos mode. need help!!

    By "sos mode" do you mean recovery mode?  If so, you have to connect it to iTunes and restore it.

  • HT201210 i can't restore my iphone4 from 5.1 to 6 and it stuck in recovery mode need help

    i can't restore my iphone4 from IOS 5.12 to IOS 6 and it stuck in recovery mode need help please

    Read here > http://support.apple.com/kb/HT1808
    Hope that helps.

  • Error when extracting data with extractor 2lis_04_matnr - NEED HELP ASAP !!

    Hi experts!
    Got an error when extracting data with extractor 2lis_04_matnr.
    System says (short dump):
    DUMP TEXT START----
    Runtime error:    CONNE_IMPORT_WRONG_COMP_TYPE
    Exception:   CX_SY_IMPORT_MISMATCH_ERROR
    Error when attempting to import object "MC04P_0MAT_TAB".
    The current ABAP program "SAPLMCEX" had to be terminated because one of the statements could not be executed. This is probably due to an error in the ABAP program. When attempting to import data, it was discovered that the data type of the stored data was not the same as that specified in the program.
    An exception occurred. This exception is dealt with in more detail below. The exception, which is assigned to the class 'CX_SY_IMPORT_MISMATCH_ERROR', was neither caught nor passed along using a RAISING clause, in the procedure  "MCEX_BW_LO_API" "(FUNCTION)".                                                                             
    Since the caller of the procedure could not have expected this exception      
    to occur, the running program was terminated.                                
    The reason for the exception is:  When importing the object "MC04P_0MAT_TAB", the component no. 5 in the dataset has a different type from the corresponding component of the target object in the program "SAPLMCEX". <b>The data type is "D" in the dataset, but "C" in the program.</b>
    DUMP TEXT END----
    Please, can someone explain me how to solve it? 
    Really need help ASAP!
    Thanks in advance,
    Jaume
    Message was edited by:
            Jaume Saumell
    Message was edited by:
            Jaume Saumell

    Hi,
    Check this note: 328181
    So you need to delete entries in SM13/LBWQ for application and also detup table content.
    And then refill teh set up table.
    If you are in production clear the entries by running collective run no of times for this application 04.
    With rgds,
    Anil Kumar Sharma .P

  • Stuck with problems and no help

    hi,
    We are stuck with the following set of problems. Repeated entries to this forum have not fetced any response. If anybody can help us on any of these issues, please reply -
    1. We are not able to define any custom validator. We made our own validator that extends CompareValidor, but when we try to apply this rule to an attribute in the validation tab, we get the error - "no properties defined". Do i need to do something else besides creating a new class that extends CompareValidator and then writing my own code in the vlaidate method.
    2. While deploying our jspApplication on java web server, we are getting the message "error - null". The details are as mentioned in the Topic 'can anyone help!!!' that has been posted by Prabhdeep ().
    3. I have two tables, Customer and address. There is no FK between them (there cannot be because address is shared between many entities). In the address, i have 2 fields, BpType and BpId. BpType will contain 'C' to identity that this address is for a customer and id will have the customer id. In jdev 3.1, i have created entity and view objects for the 2 tables. also, i have made a view link. i need to put the condition Address.bpid = customer.customeid and address.bptype = 'c'. but it is not letting me put the second part of the condition. the chk on id works fine. as soon as i add a chk on type and test the application module, then while insertion of address i get the following error - "set method for BpType cannot be resolved".
    4. I have made a jsp appl based on bc4j. now, i need to put a check on any entity in such a manner that if the check fails, my jsp should ask the user that an exception is occuring and does he want to save even with the exceptional data. if he says yes, i want that the same entity should now save the data without giving an exception. How do i achieve this interaction between my entity and my jsp.
    Thanks a lot for any help,
    Aparna.

    I will answer Question #3:
    I'm not sure if I understand exactly what is
    happening. At first I thought you meant that you couldn't even add the second part of the association clause. But, later it sounds like you were able to add the second part of the clause (namely "address.bptype =
    'c'") and that you are experiencing some runtime error.
    Assuming the latter (that it is a RT problem), I take it this
    "...cannot be resolved" error is the error with code 27020.
    Under normal error conditions, you shouldn't get this error. Something "unusual" (or unforeseen by us) is happening if you are getting this error. Anyway, if you wrote your own client code, you should wrap a try/catch block around it, pick out the detail exception, and see what's going
    on. See the example code below:
    try
    ... make call that causes the exception ...
    catch(oracle.jbo.AttrSetValException ex)
    // Print stack trace for the outer ex
    ex.printStackTrace();
    // Get the inner exception
    Object[] details = ex.getDetails();
    if (details.length > 0)
    Exception innerEx = (Exception) details[0];
    // Now, print the inner exception's
    // stack.
    innerEx.printStackTrace();
    This will help shed some light on the exception and the cause of it.
    John - JDeveloper Team

  • Inbound Queues stuck with RFC errors

    Hi Experts,
    Greetings for the Day !
    We have BDOC related issue and we need your expert help ASAP in resolving the same.
    We ahev a few BDOCS lying in intermediate state in transaction SMW01, which we found using BDOC monitoring on daily basis. When we check the same in SMQR - inbound queue, we found that the queues are stuck with an RFC error message.
    We are re-activate these queues to actually resolve the intermediate bdocs. But, my query is
    1> The raeson for getting these BDOCS in intermediate state & stuck queues
    2> A permanent resolution for the same.
    Please help and  let us know if you need more details.
    Regards,
    Kanika

    Hi Kanika,
    RFC error can be due to a bad connection as well. If the server is down, there might be a problem in communication with the connected system and the queues will not be processed further. You need to reactivate or unlock to get the queues processed.
    But if there are any specific errors for which the queues are stuck do state the same, so that we can look into an actual resolution.
    Regards,
    Venkat

  • Java Error -- Need help

    I am getting the error below when i try to pass along values with the help of Java Beans...Can anyone explain what I am doing wrong if your at all familiar with an error similar to this one?
    org.apache.jasper.JasperException: /web/loginresponse.jsp(41,18) The value for the useBean class attribute org.mypackage.login.LoginHandler is invalid.
    Thanks,
    Jeff

    Well the documentation for this host appears here
    It seems they have Apache and Tomcat installed, and configured to handle this.
    The context path of each virtual site is: "/home/domain/public_html/WEB-INF".So your compiled servlet will probably need to be deployed to
    "/home/domain/public_html/WEB-INF/classes/org/mypackage/login/LoginHandler.class".

  • I just got a iPhone 5S and I forgot my passcode. I don't have Find my Iphone or icloud and my phone isnt synced with itunes, i need help.

    I just got a IPhone 5S and I forgot my passcode. I'm stuck on the disabled part. I don't have Find My IPhone or iCloud and my phone isn't synced with iTunes, I really need help.

    Hi Numento,
    Follow the instructions in this support article for "If you have never synced your device with iTunes....":
    http://support.apple.com/kb/HT1212
    Cheers and good luck!
    GB

  • Got stuck at boot. Need help.

    Guys, I need your help.
    I have created a Bootcamp partition and wanted to install windows. I guess the disk is corrupted so when the computer restarted I got stuck with a black window, the iMac will not boot from the DVD. The problem is that I cannot switch back to my Leopard partition and the DVD is stuck into the superdrive (I cannot eject it). If I restart the computer it eventually goes to the same black screen. What can I do? I have a Logitech keyboard so the "Option" button is not recognized at startup to switch to Leopard. Any idea?
    Thanks.
    Andrew

    Oh.... try to hold the "S" key for safe start-up....???

Maybe you are looking for