BUS1001006 VIEWCREATED

Hello everyone,
I've made a SUB of BUS1001006, and added a new method which are calling a FM. This FM reads materialmaster and adds salesviews for all sales orgs. I use the BAPI_MATERIAL_SAVEDATA to save the views.
I'm using the event fro BUS1001006 called ViewCreated to trigger the workflow where I call my own developed method.
But here the fun part start!
When I use MM1 and creates a material with Basis and Sales views The viewcreated event is triggered twice(2 views) this means my method is called twice 2, and when each incident of my method execute the BAPI_MATERIAL_SAVEDATA, then viewcreated is again triggered and soo on....
My big question is. How do I make sure my method is only triggered 1 time only. I know its possible setting up conditions for the event, but not sure how and which condition parameters to setup.
I really hope any got an idea of this, cause I cant seem to find my way out of this challenge.

HI Henrick,
YOu can use a Workflow Start check condition in your workflow. This will restrict the trigerring of the workflow on some condition.
For this Go to Header -> Version INdependent Tab -> Start Events Tab-> Click on the Button in Column C adjoining your event to write the condition.
I think in your case you can use condition evaluating value of "Maintenance Status" attribute. Please check before using this attribute.
This should solve your problem.
Regards
Gautam

Similar Messages

  • Material master  - problem with event viewcreated

    I have created a WF with a start event ZBUS1001-ViewCreated. ZBUS1001 is a copy of object BUS1001006.
    If I trigger the event manually, or test the wf, than it works fine.
    I've linked this event properly (or just I hope), but when I start MM01 to create a new view for a material in the event trace I see the BUS1001006-VIEWCREATED and of course my WF doesn't start.
    So what mistake did I do?

    Dear Sue,
    I have checked the points what you mentioned, with the following reason:
    Q: Have you delegated your business object to the parent object, BUS1001006 ?
    A: Supertype            BUS1001006   Standard materi
    Q: Have you specified the workflow in the event linkage table (SWETYPV)?
    A:
    Object Category BO BOR Object Type                                                
    Object Type: ZBUS1001
    Event: VIEWCREATED         
    Receiver type: WS90000001                    
    Receiver Call: Function Module        
    Receiver Function Module: SWW_WI_CREATE_VIA_EVENT_IBF
    Behavior Upon Error Feedback: 0 System presetting
    Receiver Status: 0 No errors
    Q: If you have, and you trigger the event, is the workflow initiated at all, or does it show up with a stop light in the event log (SWEL).
    A: If I trigger the event with SWUE than it works fine, the wokrflow started. But, when I use MM01, than not my event triggered, but this:
    BUS1001006 VIEWCREATED     No receiver entered
    So probably I've made a mistake in event linkage, but I don't know what.
    This is my very first wf, so every help is very useful for me.
    Thans for your help,         Csaba

  • Workflow not getting triggered from MM01

    Hi,
    I understand there is a similar post but the solution is not so clear there.
    I wish to trigger a workflow whenever a material is created using tcode MM01.
    For which i am using BUS1001. (In the header data > start events tab > BO/BUS1001/CREATED binding exists and activated)
    whenever i am creating a material using MM01, and check the trace in SWEL i am getting the following info:
    BUS1001006     VIEWCREATED     25.03.2011     13:00:12          @AI@     No receiver entered
    BUS1001006     CREATED     25.03.2011     13:00:12     WS99900237     @5B@     SWW_WI_CREATE_VIA_EVENT_IBF
    Can someone please help where to enter the receiver.
    regards
    abhishek

    Hi sanju,
    I have created the event as per your suggestions but the workflow is not yet triggered from mm01.
    the event stack trace is as follows :-
    BUS1001     CREATED     28.03.2011     08:28:42     WS99900237     @5B@     SWW_WI_CREATE_VIA_EVENT
    BUS1001006     VIEWCREATED     28.03.2011     08:33:03     WS99900237     @5B@     SWW_WI_CREATE_VIA_EVENT_IBF
    BUS1001006     CREATED     28.03.2011     08:33:03     WS99900237     @5B@     SWW_WI_CREATE_VIA_EVENT
    BUS1001     CREATED     28.03.2011     08:33:03     WS99900237     @5B@     SWW_WI_CREATE_VIA_EVENT
    Linkage is activated in SWE2 and the receiver  FM is SWW_WI_CREATE_VIA_EVENT.
    still unable to get the workflow triggered.
    Secondly as per SAP suggestion the BO BUS1001006 should be used for std material master. But while i enter BUS1001006 no such methods are available in F4. (refer atttachment)
    I have checked in the BOR and i see that BUS1001006 is released and active.

  • Multiple events triggered in BUS1001006

    Hey Workflow guru's,
    I have a scenario where once the basic views are created for a material in MM01, two work-items are sent to create the Classification and Sales views for that material.
    I have delegated a Z business object from BUS1001006 and using the method CREATE to maintain the views.
    Now my problem is that once the basic views are created multiple workitems are being sent to the inbox i.e. instead of two work-items (one for Classification and one for Sales, there are two for Classification and two for Sales - identical)
    I have checked in SWEL and it displays identical line items with the object key in receiver data differing by 1.
    Appreciate any help!!!
    Thanks

    Hi Kedar,
    In SWEL under the Event Data tab the object key is the Material number ... which is identical in the two events raised. But, under the Receiver data tab the object key is the work item ID. This is the one which differs by one.
    For ex: when i created a material number 10000336, it created two events. In both the events under the Event Data tab, the object id is the material number which is the same. But, under the Receiver data tab, the object id in the first event is 7647 and in the Receiver data tab the object id for the second event is 7648. This i believe is the work-item ID and this is the one that differs.

  • Workflow for BO BUS1001006 not retreiving plantu2666

    Hi Experts,
    I have activated a workflow for material creation using BO BUS1001006 .
    It works fine , but the problem is it does not give me the plant details.
    My requirement is that i have to send the plant of the material created /changed.
    hope you offer quick solutions.
    <THREAD LOCKED. Duplicate of [Workflow for BO BUS1001006 not retreiving plant]. Please do not duplicate posts, read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] for further info>
    Edited by: Mike Pokraka on Jan 28, 2009 7:33 AM

    Hi Martina,
    If you have done that then you are almost on the verge of completion!
    Follow this binding procedure between the task container and the method container and get the results.
    In the BO method, add an output parameter that would store the plant detail.
    Now create a data element in the method code of the same type as plant detail type.
    Then use swc_set_element to store the value of the plant detail in the output parameter.
    In the workflow task, create an output parameter of the same type as the BO method output parameter.
    In the binding between the task container and the method container fetch the value of plant details from method container to task container element.
    Now pass this parameter to the workflow container and use in the send mail step in the mail text.
    Make sure to save and generate the BO after doing all the changes.
    Regards,
    Saumya

  • Trying to copy object bus1001006

    I am trying to crate a workflow for material change for that I need to copy object BUS1001006 while creating a container , I am getting an error message staying ‘Object type 'ZRSP1001' is not defined’ please guide me what could be cause of it

    I am not 100% what you are trying to achieve, but check these:
    1) Is ZRSP1001 a subtype for object BUS1001006
    2) have you delegated ZRSP1001 to BUS1001006
    3) have you changed the status of your custom object's attributes/methods to "imlemented"
    4) have you generated your custom object ZRSP1001
    All these steps can be done in transaction SWO1. If your aim is not to "replace" the standard BUS1001006 with your custom object in your workflow, you can skip steps 1) and 2). If your aim is to "replace", then check all the steps mentioned above, and then you should be able to use the standard BUS1001006 when defining the data types of your container elements in your workflow.

  • How to create MRP view using BO BUS1001006 & Method CreateViews.

    Guys,
    I need to create MRP view using BO BUS1001006 & Method CreateViews.
    i am not able to unterstand, what i need to specify to create MRP view, other than material number.
    what field i need to send for MRP view.
    Regards.
    santosh.
    Edited by: santosh koraddi on Jun 23, 2010 6:14 PM

    Hi,
    I have a similar question, have done a search and I see this sort of thing has come up a few times but with no definitive answer.... this thread seems close but don't really understand the solution (I'm not an ABAPER)
    I have a material master creation workflow under construction, it uses BUS1001006 and method createviews.
    The issues is that I want to restrict creation of certain views to certain agents, I have a fork in my workflow and its meant to split up the various views for various agents.
    The problem is that if an agent in one of the forks completes their views the workflow tries to get them to completes teh other views which they do not have authoisation to do... anyway the end result is that the workflow thinks all teh views have been created and the workflow items dissappear from the others inboxes.
    How do I setup my workflow such that each agent in each fork only has to complete the views they have authorisation to maintain and leaves work items in the inboxes of other agents for them to complete?

  • Upload Material Master using LSMW BAPI BUS1001006-SaveData

    Hi Gurus,
    I'm working with material master upload using the BAPI BUS1001006-SaveData.
    I'm wondering on how can I know what structure should I populate on step 4 of LSMW "Maintain Field Mapping and Conversion Rules".
    Seen some tutorials on material master upload but it wasn't explained there why or what structure should be populated..
    Thanks and Regards.

    I just check each structure one by one to which the field is appropriate depending on its description....

  • Method BUS1001006.CreateViews

    If you make use of Method 'CreateViews' in Business Object BUS1001006 it appears you get a bit of problem when a user tries to execute the workitem if you don't restrict the input parameter 'ViewListLine' to a single entry.
    Let's say a Material needs a couple of extra views completing, standard SAP makes sure you SAVE the current view before you move on to the next view.  But of course saving in the middle of a workitem causes a problem and you get a returned error 'the group data for the material XXX is locked by user YYY'.
    Any ideas on how to get through this?
    Of course you can loop through the uncompleted views one by one, but this is likely to get irritating for users needing to process alot of materials.

    Hi,
    Yeah, i debugged method in SWo1, it is working properly.
    Also that activity step is getting completed, after executing that code.
    But, prob is, control is not returning to main WF after executing all steps in sub WF, if i have that code.
    if i comment it, control is returning back to main WF.
    somehow, seems to be some commit work issue.
    I changed the above code & calling BAPI BAPI_MATERIAL_EDIT instead of MM02.
    it is working fine, but, i cant go directly to particular view with BAPI.
    regards.
    santosh.

  • Workflow for BO BUS1001006 not retreiving plant

    Hi Experts,
    I have activated a workflow for material creation using BO BUS1001006 .
    It works fine , but the problem is it does not give me the plant details.
    My requirement is that i have to send the plant of the material created /changed.
    from which field of bus1001006 can i get it  ?
    hope you offer quick solutions.

    Hi Martina,
    If you have done that then you are almost on the verge of completion!
    Follow this binding procedure between the task container and the method container and get the results.
    In the BO method, add an output parameter that would store the plant detail.
    Now create a data element in the method code of the same type as plant detail type.
    Then use swc_set_element to store the value of the plant detail in the output parameter.
    In the workflow task, create an output parameter of the same type as the BO method output parameter.
    In the binding between the task container and the method container fetch the value of plant details from method container to task container element.
    Now pass this parameter to the workflow container and use in the send mail step in the mail text.
    Make sure to save and generate the BO after doing all the changes.
    Regards,
    Saumya

  • Problem in BUS1001006

    Hi Experts,
    When i try to test the Business Object BUS1001006, getting following error.
    Object type 'ZRSP1001' is not defined.
    How to slove this problem.
    Thanks in Advance.
    Regards
    Nani

    Hi,
    1. Go to transaction SWO6
    2. You will find an entry with business object BUS1001006.
    3. Select the business object (BUS1001006) and click on details button (CtrlShiftF2).
    3. You will find that a subtype is assigned to the standard business object.
         Object type - BUS1001006
         Deligation Type - ZRSP1001.
    4. Come back to initial screen and select your business object and delete the entry. Your problem will be solved.
    Please make sure that deleting this doesnt effect other developments in your project. and also check if the subtype ZRSP1001 is same as that of BUS1001006 and person who ever has deligated did not add any methods or attributes.
    If you delete the entry here, all the workflows related to BUS1001006 will get effected.
    Please revert back if any further help is needed.
    Regards,
    Gautham Paspala

  • Business object BUS1001006

    Hi All,
    I wnated to know which event is triggered when material is extended from one plant to another, is it CREATED or VIEWCREATED. I am little bit of confused.
    regards
    manish

    Hi Mike,
    Thanks for your reply, i have earlier gone through that transaction and found the event VIEWCREATED is triggered , but my requirement is bit different. I have a z program which will extend the material based on source and target plant, i have to trigger the workflow when the material is extended to the plant, when i use the VIEWCREATED event it triggers the workflow for every view it creates.
    I want my workflow to trigger when last save button is pressed. I have gone through the user exits of MM01 but haven't found any one of my use. Now working with change documents.
    No success yet. Kindly suggest

  • How to insert a NOTE (GOS) foe a given Material No 4711 (BUS1001006)

    Hi,
    i'm looking for an FM or CL to insert a NOTE for a given Material No.
    I have tried SO_OBJECT_INSERT and CL_GOS_DOCUMENT_SERVICE->CREATE_NOTE, but i don't know
    the import for Material No.
    CL_GOS_DOCUMENT_SERVICE->CREATE_NOTE needs IS_OBJECT like BORIDENT.
    Thanks.
    regards, Dieter

    HI Stephen,
    I have the same prolem. I modified the 5 global tables, but I don't see the new line in the screen.
    Can you help me with some details?
    Thx!
    Mihaela

  • Workflow issue in MM

    hi there,
    Object type: BUS1001006 (i hope this is std)
    in this below parts are active:
    methodds--
    StandardMaterial.GetInternalNumber
    StandardMaterial.Create
    StandardMaterial.SaveData
    StandardMaterial.Savereplica
    StandardMaterial.MaterialGetAll
    StandardMaterial.CreateViews
    StandardMaterial.GetMissedViews
    Events:
    StandardMaterial.ViewCreated
    StandardMaterial.Created
    In work flow>triggering events tab>unde EVENT--VIEWCREATED
    when we create a new material or extends a material>goes for approval>after approval of the material-->a method is calling to update mat status..like plant specific statu(mmsta)..
    calling method is:
    FUNCTION zam_mm_material_status_chng.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(MATERIAL) LIKE  BAPIMATHEAD-MATERIAL
    *"     VALUE(IND_SECTOR) LIKE  BAPIMATHEAD-IND_SECTOR
    *"     VALUE(MATL_TYPE) LIKE  BAPIMATHEAD-MATL_TYPE
    *"     REFERENCE(NEW_STATUS) LIKE  BAPI_MARA-PUR_STATUS
    *"     REFERENCE(PLANT) LIKE  BAPI_MARC-PLANT OPTIONAL
    *"     REFERENCE(VAL_AREA) LIKE  BAPI_MBEW-VAL_AREA OPTIONAL
    *"     REFERENCE(SALES_ORG) LIKE  BAPI_MVKE-SALES_ORG OPTIONAL
    *"     REFERENCE(DISTR_CHAN) LIKE  BAPI_MVKE-DISTR_CHAN
    *"     REFERENCE(REL_TYPE) LIKE  MARC-MMSTA
    *"  EXPORTING
    *"     REFERENCE(RESULT) TYPE  BAPIRET2-TYPE
    *"     REFERENCE(MESSAGE) TYPE  BAPIRET2-MESSAGE
    *// This function module is used to change the Material Status ( Plant
    *// Sales ) using Standard BAPI.
    *// Technical  Consultant : K Vijayasekar ( IBM )
    *// Functional Consultant : Kamal Sachdeva ( WHIRLPOOL - GIS )
      DATA : t_bapimathead LIKE bapimathead,
             t_plantdata   LIKE bapi_marc,
             t_plantdatax  LIKE bapi_marcx,
             t_salesdata   LIKE bapi_mvke,
             t_salesdatax  LIKE bapi_mvkex,
             t_return      LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = material
        IMPORTING
          output = material
        EXCEPTIONS
          OTHERS = 1.
      t_bapimathead-material    = material.
      t_bapimathead-ind_sector  = ind_sector.
      t_bapimathead-matl_type   = matl_type.
      IF rel_type EQ 'E'.
        t_plantdata-plant = plant.
        t_plantdata-pur_status = new_status.
        t_plantdata-pvalidfrom = sy-datum.
        t_plantdatax-plant = plant.
        t_plantdatax-pur_status = 'X'.
        t_plantdatax-pvalidfrom = 'X'.
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
          EXPORTING
            headdata   = t_bapimathead
            plantdata  = t_plantdata
            plantdatax = t_plantdatax
          IMPORTING
            return     = t_return.
    *// Removing entries from Log table "ZWF-TEMP"  -
        DELETE  FROM zwf_temp WHERE objkey EQ material AND
                                    plant  EQ plant.
        DELETE  FROM zwf_temp WHERE objkey EQ material AND
                                    valuation_area  EQ plant.
      ELSE.
        t_salesdata-sales_org   = sales_org.
        t_salesdata-distr_chan  = distr_chan.
        t_salesdata-sal_status  = new_status.
        t_salesdata-valid_from  = sy-datum.
        t_salesdatax-sales_org  = sales_org.
        t_salesdatax-distr_chan = distr_chan.
        t_salesdatax-sal_status = 'X'.
        t_salesdatax-valid_from = 'X'.
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
          EXPORTING
            headdata   = t_bapimathead
            salesdata  = t_salesdata
            salesdatax = t_salesdatax
          IMPORTING
            return     = t_return.
        DELETE  FROM zwf_temp WHERE objkey EQ material AND
                              salesorg  EQ sales_org.
      ENDIF.
      result =  t_return-type.
      message =  t_return-message.
    ENDFUNCTION.
    plz help me how this method getting importing parameters?
    the flow of this workflow?
    when it is triggered...so on?
    pls it's urgent i need to update and give a solution to org:)

    Hi,
    This is the flow for parameter passing from workflow.
    -> Start event will initiate the Workflow container elemets (In your case viewcreated will pass the BUS1001006 to the wokflow conatiner using binding).
    -> Your workflow will conatin actvity steps(Workitem at runtime). Each activity will have its own container. So the binding will happen from workflwo conatiner to Activity step conatiner.
    -> Each activity is assigned to Business object method which will be called in turn.
    The variable from activity step conatiner will be passed to Method of business   object. (Ex Zmethod of BUS1001006 ).
    -> Method of business object will read the elements from conatiner using Macros swc_get_element etc.
    -> Now each business object method can be associated with Z function module.
    in your case 'zam_mm_material_status_chng.' . The elements read using macros in Business object method can be passed as Export and import parameters to function zam_mm_material_status_chng.
    To conclude
    <b>Start event -> Workflow -> Activity step -> Business object method -> Function modue.</b>
    Reward if helps. Feel free to ask for clarificatios.
    Thanks
    Praveen

  • Workflow ID Generation - Problem

    I have created a Workflow for Material master (T.code: MM01,  BO: BUS1001006).
    Now It's working fine. But whenever a new material is created, this workflow is getting triggered and two workflow IDs are generated for each material. How to restrict this...?
    Pls help.

    Hello Nami
    I Guess that you are using a start event for your workflow ? Have you checked in SWEL that this event isn't raised twice.
    You can control the creation of events for the material master which the use of change documents (transaction SWEC) bu please notice that the event "VIEWCREATED"  is raised whenever a view is created etc.  If you are using this event as a start event then you might easily end up in a situation where you will trigger more than one instance of your workflow.
    I will suggest that you create your own event, and the link it up in SWEC and SWE2.
    Regards
    Morten Nielsen

Maybe you are looking for

  • My iPhone 4s randomly went into recovery mode and iTunes can't get it to restore.

    Last night my iPhone randomly went into recovery mode on me. Just before I went to sleep a bunch of static lines appeared across the screen. The screen went dark and a few seconds later the Apple logo appeared. A few seconds later is disappeared. A f

  • My AS3 Quiz Widget doesn't work correctly

    First of all, yes I have set the project options to export as "AS3" and yes, the widget is also "AS3", so there should be no compatibility issues. I'm a flash programmer for 10 years now and this really brings me down to my knees whining and screamin

  • XIAPPLUSER gets blocked in BI when processing messages

    Hi, We have an integrated scenario between XI and BI. When processing messages between XI and BI the XIAPPLUSER gets random blocked. Somethimes after 4000 messages somethimes after 500 messages. We did not used this user by some other system or defin

  • Creating links using Java

    I am using Java code to develop an FAQ tool. I would like to provide links (html links) in the applet. When user clicks on the link the appropriate URL should open in the browser (same like the anchor tag of HTML.) Can anybody suggest how this can be

  • Accidentally ejected Windows driver

    In trying to eject a flash drive, I accidentally ejected the windows driver in the Finder window on the MAC side. I restarted the computer and the driver returned but now when I try to switch to windows side (using boot camp) a window says that it ca