Workflow with item type and item key  is in progress. Abort existing workfl

Dear all,
I'm using the below code from the submit button event to launch the workflow. The workflow works fine when I submit for the first time, when i try to submit for the second time from the same session it throws me the error as Workflow with item type and item key is in progress. Abort existing workflow.
Where I am struck,Kindly send me any solution.
I am using below code in oaf
public void workflow(OAPageContext pageContext,
String headerId,
String empName,
String userName
String wfItemType = "XXSample";
String wfProcess = "XXSample";
String wfItemKey = headerId;
OANavigation wfClass = new OANavigation();
// Create Workflow Process
wfClass.createProcess(pageContext, wfItemType, wfProcess, wfItemKey);
System.out.println("Workflow created");
wfClass.setItemAttrText(pageContext,
wfItemType,
wfItemKey,
"XXHDRID",
headerId);
wfClass.setItemAttrText(pageContext,
wfItemType,
wfItemKey,
"XXEMPNAME",
employeeName);
wfClass.setItemOwner(pageContext, wfItemType, wfItemKey,username);
wfClass.startProcess(pageContext, wfItemType, wfProcess, wfItemKey);
System.out.println("Workflow started");
Thanks,
Kumar.

Item type and item key forms unique record for the workflow session, you cannot have 2 instances of the workflow running for the same header id, in your case. Check if the process exists for the header id. If so, display a warning message without launching another workflow session, else start the workflow process.
Thanks
Shree

Similar Messages

  • Link material type and item category.

    Hi,
    Can you brief me on how following setting in SPRO works?
    Plant maintenance - Maintenance and service processing - Maintenance and service order - General data - Define default values for componenet item category
    When i checked, this setting is to link item category with the material type and item category is defined based on the material type and maintenance plant. But what is the relation in term of the order type i.e. whenever i create any order with a specifica order type, the default item category should get reflected on the componenets tab of the order?
    Is it possible?
    Can you guide me how to do this setting.
    Thansks

    Hi,
    Yes it is posible to make all order types item category mark as stcok item "L" as default value. Very well u can set it at following menu path under PM&CS Node
    Maintenance and Service Orders
    Functions and Settings for Order Types
    General Data
    Define Default Values for Component Item Categories
    Ramesh

  • Item  Type and Service Type in Sales Order

    Hi All,
    How do i enter Item Type and Service Type in single sales order..?
    Any suggestion please...

    Hi
    If you select the Item type you have choose the list of Items else  it is service type you can give service description and choose belongs to G/L Acc.
    Or You can create a service as a Item with Item group as Service.
    Hope it helps you.
    By
    Kalai

  • Reqirement type and item category

    dear friends,
    can u please tell me the link between requirement type and item category?
    i want to use the special stock for the delivery and as well as purchase requirement in case stock is not there...
    i m getting the right combination.
    plzz help....

    Hi Deepak,
    This is strategy for Determining the Requirements Type
    .  First, an attempt is made to find a requirements type using the  strategy group in the material master.
    .  If the strategy group has not been maintained, the system will determine it using the MRP group.
    .  If the MRP group has not been defined, the system uses the material  type instead of the MRP group when accessing the corresponding control tables.
    .  If no requirements type is found here, the system assumes a special rule and attempts to find a requirements type with the aid of the  item category and the MRP type.
    .  If this is not possible, a last attempt is made to find a requirements type with the item category only.
    .  If the last attempt fails, the system declares the transaction as not relevant for the availability check or transfer of requirements.
    Regards
    San

  • Order type, Invoice type and Item categories for Nota Fiscal Brazil

    Hi eveyone,
    we have a company in Brazil implemented in SAP using a different SD Order type, Invoice Type and Item categories
    as our mother company in Switzerland. Reason of that is because of the nota fiscal customization for Brazilian legal requirements.
    We startet with a Project worldwide to rollout a global template within sales and distribution and are facing now exactly
    the problem with those different order type, item categories and Invoice type.
    Our local SAP partner in Brazil told as based on best practise we should have different types.
    I checked the customization and it seems I can't use e.g.: the same Order type for Brazil and Switzerland because
    the activation flag for nota fiscal is linked to the order type and no sales organization can be setted to slplitt the different processes.
    Someone knows if there are some possibilities (maybe trough user exits or badi's) to use globally the same dovument types, item categoreis... globally?
    Thanks in advance
    Gaspare Guttadauro

    Hi Gaspare Guttadauro,
    I would strongly recommend to use the different document types and item categories as suggested by SAP. Since Brazil do have one of the complex taxation process in place hence to determine correct pricing the different document type will be required. Also functionalities  like CFOP determination and nota fiscal relevance can be maintained.
    Please feel free to revert the forum in case of any doubts.
    Cheers
    Atul

  • Difference between Material type and Item category

    What is the difference between Material type and Item category?
    We can differentiate different kind of materails according to material type then why do we have Item category which is also more or less on the same lines.
    Both can be considered as a terminology in SAP to group similar kind of materials.
    Please let me know the exact difference between the two?

    Dear Christino
    We can list out so many differences.
    When you create a material master record, the material type you choose determines:
    - Whether the material is intended for a specific purpose, for example, as a configurable material or process material
    - Whether the material number can be assigned internally or externally
    - The number range from which the material number is taken
    - Which screens appear and in what sequence
    - Which departmental data you may enter
    - What procurement type the material has; that is, whether it is manufactured in-house or procured externally, or both
    Together with the plant, the material type determines the material's inventory management requirement; that is:
    - Whether changes in quantity are updated in the material master record
    - Whether changes in value are also updated in the stock accounts in financial accounting
    In addition, the accounts affected by a material entering or leaving the warehouse depend on the material type.
    -Most importantly, Users can be authorized to create materials of specific material types but not based on item category
    - Item category will define whether the material should be valuated for stock or it should be considered as non-stock
    - Pricing is carried out based on Item Category and not based on Material type
    thanks
    G. Lakshmipathi

  • Order type and Item category group

    Can anyone tell me which is the relation between order type and Item category group from material master ??
    In fact the problem is that I have created a material and when I want to create new sales order it gives me this errror:
    "No item category available (Table T184 ZORDER ZITGR)"
    Is there a tranzaction where I can assign Item category group ZITGR to sale order type ZORDER or something like that??
    What should i do?

    Hi Dan,
    Goto T-Code VOV4 and maintain the table
    Sales Doc type + Item Category Group + Usage + Higher level Item Category = Item Category
    TA + NORM + Nil + Nil = TAN
    If you have Customized your own Document Type and Item Category Group and Item Category then give your
    Sales Doc type (ZORDER)+ Item Category Group (ZITGR)+ Usage + Higher level Item Category = Item Category (ZTAN)
    Reward if helpful
    Regards PAVAN

  • Disable the Item Availability Button based on Order type and Item category

    Hi ,
    My requirement is to disable the Item availability check button in VA01 based on the Order Type & Item category. Is there any user Exits/ Badi / FM available for this.
    Thanks in advance.
    Srinivas.

    Hi,
    Although it is an old post I need to answer for people who search an answer to the same type of question. To hide a field
    you can use transaction variant 'tcode:SHD0'. But it is not based on Order type and Item category. May be you can use
    USEREXIT_FIELD_MODIFICATION form in user-exit MV45AFZZ. You can loop at screen and set screen-active = 0 in fields
    where you want them to be inactive.

  • A question about item "type and release" of  source system creation

    Hello expert,
    I have a question about item "type and release" of  source system creation.
    As we know,when we create a web servie source system,there will display a pop-up which includes three items as "logical system","source system"and "type and release".
    About the item "type and release",when we push "F4" button,there will be three default selections as below:
    "ORA 115     Oracle Applications 11i
    TLF 205     Tealeaf 2.05B
    XPD 020     SAP xPD".
    Who can tell me when and how should I use the three selections.
    And also I attempted to input the item by some optional letters except the default three selections and it seems that I can input it freely.
    Thank you and Best Regards,
    Maggie

    Hello DMK,
    Thank you very much for your answer.It is very helpful for me.
    Can I ask you further about it?
    I got that it is a semantic description item.
    You said the default selections are set by our basis people.Would you like to tell me how should we creat a new value except the default ones for item "type and release"?Only by inputing the value in the item directly?But you see we canot see the new value item we created by ourself when we push "F4" button next time ,is that ok?Or do we have to ask basis people to define one new value item just like the default seletions before we use it.
    Also if possible would you like to describe detail about "This becomes important when you are troubleshooting certain issues especially when RFC connection problems."
    Thank you and Best Regards,
    Maggie
    Message was edited by: Maggie

  • Issue in a custom workflow with Approval Type Notification. Urgent

    Hi
    I have created a custom workflow which contains an approval notification.
    If the user approves/rejects the notification I need to update a table column as Approved or Rejected.
    I have created a function activity,say X, which calls a PL/SQL procedure.
    The issue is,
    when the user approves or rejects the notification, the function X errors out even without entering the PL/SQL procedure.
    Following is the error message
    An Error occurred in the following Workflow.
    Item Type = XXYH_UMX
    Item Key = 55
    User Key =USERKEY:55
    Error Name = -6502
    Error Message = ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Error Stack =
    Wf_Engine_Util.Function_Call(XXYH_UMX_WF_PKG.is_resp_assigned, XXYH_UMX, 55, 242407, RUN)
    Activity ID = 242407
    Activity Label = XXYH_UMX_ASSIGN_RESPONSIBILITY:XXYH_UMX_RESP_ASSIGNED
    Result Code = #EXCEPTION
    Notification ID =
    Assigned User =
    If I go the function from any other function,say Y, (bypassing approval notification) it works fine.
    Can you please help me what could be the issue?
    Thanks,
    Kamath.

    The danger in putting in one activity is that if there is any scope longer-term to expand the process to multiple activities, then it may be better to break it out into a sub-process early in the design phase.
    Generally, you get the feeling from the client fairly early on about whether they have a final design and how likely they are to complicate the process later on :)
    I wouldn't include it as a post notification function myself - it saves a tiny amount of processing time and database space, but at the cost of making it less clear what is happening. Plus you'd need to check the result in the PNF manually - putting it on a conditional branch ensures that you always know what the value is. If the lookup type changes at any stage, you would need to check a PNF to ensure that the code still remains valid; if it's on a branch then the only thing to change would be to change the label on the branch.
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://www.workflowfaq.com/blog ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • ECO number with revision level and release key

    Hi All,
    I have a requirement from client with regards to Engineering change manangement.
    The scenario is that we are maintaining BOM for materials.Whenever a change is required  for BOM a ECO number is created with release key.
    Once the BOM is changed against ECO number is created a workflow is triggered for approval.
    Then it goes through a series of approvals in the heirarchy.In each level the reviewer will propose a new value for the changed line item.
    All these changes have to be maintained in record.At the end the final approver reviews all the proposed changes and release the ECO number with the appropriate change.
    I had a thought of implementing the above scenario with ECO with revision level and release key.
    But I am unable to replicate the scenario due the fact that,when I select the ECO number with release key,I cannot select the material in Object type.
    Its disabled.Its available when I create a ECR with release key.
    Please suggest a way to create ECO number with release key and revision level for BOM.
    Regards
    Richie

    Hi,
    You create the revision level against the material (via MM02, basic data tab)) not against the serial. The serial number, by definition, would be unique to the combination of material and revision.
    Regards

  • Requirement of creation of new condition types and Account keys tax codes

    Hi,
                   In what all possible scenarios will the requirement to create new Condition types and accont keys arise for the creation of new depreciation keys.
    Thanks
    Raja.
    Edited by: Raja Gopal 345 on Aug 29, 2010 1:06 PM

    Unless you use jurisdiction codes, and no external tax system, for
    example with tax procedure TAXUSJ, there is no validity dates for the
    condition records.  You can see this differnce by comparing the tables
    A003 without jurisdiction codes and A053 with jurisdiction codes.  A053
    contains the extra fields DATBI (key field) and DATAB.  This is the
    standard functionality.
    Please have a look at the following part of note 418582:
    " Changing past percentage rates has to be inhibited in order to avoid
    database inconsistencies. For this reason, the functions which allow you
    to transport time-dependent tax codes with percentage rates from the
    past are not supported."

  • Can you explain about Higher-level item category and item usage?

    Hi all
    Can you explain about Higher-level item category and item usage?
    thanks all

    Higher level item category and Item usage are used in the item category determination.
    Let me take an example of Item Category TANN (Free of charge Item)
    Item category Determination: Sales Document type + Item Category Group + Usage + Higher Level Item Category
    TA + NORM + FREE + TAN = TANN
    Higher Level Item category: The category on which this item category is dependent. meaning for TAN , TANN is a free item. Therefor TAN is the higher level item category.
    Item Category Usage: It controls system response during document processing. The line item has an specific usage according to that usage it has to respond. Free for free items, text for text items etc.
    Regards
    AK
    Reward points if helpful

  • Sum of the items issued and items received

    Sir,
    if i want to get all the sum of the items issued and items received wrt mblnr and matnr, what shd i do??
    thanks
    Arun

    Hi
        Look at this code .It retrieves the sum of LABST field for all line lineitems for a given material No in MARD table.
    TYPES : BEGIN OF Type_Mard,
    W_MATNR TYPE MARD-MATNR,
    W_LABST TYPE MARD-LABST,
    END OF Type_MARD.
    data : ITAB_MARD TYPE TABLE OF Type_MARD,
    wa_MARD TYPE Type_MARD.
    SELECT MATNR
    SUM( LABST) INTO TABLE ITAB_MARD
    FROM MARD WHERE MATNR = p_MATNR " parameters
    AND WERKS = P_RESWK .
    Hope youll get an idea
    Thanks
    Viquar Iqbal

  • Item text and item note are not transfering from SRM to ECC on to PR

    Hello Expers!!!
    Due to some requirement we added some logic in BBP_CREATE_BE_RQ_NEW to print the used ID of the shopping cart creator on PR under item text requisitioner tab. but after moving these changes to production the item text(Vendor text) and item note(internal note) which are maintained in the shopping cart are not printing on the Purchase requisition under item text and item note tabs. these two texts were printing correctly before moving our changes.
    please suggest me how this item note and item text will print on PR. Is it a standard functionlity in SRM 5.0?
    is this because of move over changes?
    suggest me to resolve the issue....
    thanks in advance...
    Regards,
    CD Reddy

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

Maybe you are looking for

  • Can i use this download and install on multiple computers?

    Can i use this download and install on multiple computers?

  • Non english characters in bi problem

    dear all, i have problem with non English chars in bw. in r3 side my client uses non English chars which is allowed, however when i get data to bw side it gives error when i see psa , i see records which has # in it, leads to error. example : wbs ele

  • Declarative transaction not working  for oracle 10g as.

    Hi Friends, While migrating from sun app server to oracle 10g as, i have problem in declarative transactions. I created stateless and stateful beans with declarative transactions. Transactions were working fine till they were in sun app server enviro

  • External USB drives will not mount under Mountain Lion

    Since upgrading to Mountain Lion, two external USB2 drives that I have will not mount and cannot be viewed in the Finder.  The same occurs on a 2012 MacBook Air, a 2009 iMac 27 and a 2010 MacMini, all running OS X Mountain Lion version 10.8.2. Both d

  • No sound effects playing through any output device

    Hi all. I have a frustrating issue with my late 2012 Mac Mini that started a couple of days ago. Maybe it is related to a system update (I think a OS and iTunes update was available last week) but I am not sure. Have checked that all preferences are