on 06-11-2014 4:22 PM
Hi,
I have the requirement to more or less combine the work order assignment types 1 and 2. I have to fetch the operations based on its assigned personal number, but at the same time I have to fetch a work order and all the operations if the Agentry user is the work order header responsible.
Unfortunately this is a single value parameter so I set the assignment type to 2. Now I thought it would be really easy to fetch the work orders based on the assignment type 1 since there is a BADI available after each assignment call method:
WHEN '2'. "Operation level
me->get_assignment2(
EXPORTING
iref_rfc_oo_data = iref_rfc_oo_data
IMPORTING
et_return = lt_return
et_wo_object = lt_wo_object ).
IF NOT gref_badi_wo IS INITIAL.
CALL BADI gref_badi_wo->get_assignment_type2
EXPORTING
iref_mdo_data = me->oref_mdo_data
CHANGING
ct_wo_object = lt_wo_object.
ENDIF.
So inside the BADI gref_badi_wo->get_assignment_type2, I wanted to call the me->get_assignment1 method, and then join the 2 internal tables values.
But the problem is once the BADI is called it is not possible to call this method since we only have the OREF_MDO_DATA object which has the original class as a inaccessible private attribute. I could try to copy and adapt the me->get_assignment1 code but there are some attributes that are not accessible inside the BADI. Do you see a simple and elegant solution to this requirement?
I would like to avoid creating a new Z handler class inheriting from the standard one...
Thank you.
Tags edited by: Michael Appleby
Hi,
I just wanted to close this old thread since what I did long ago to solve the issue is to replicate the me->get_assignment1 inside the me->get_assignment2 BADI method code. It is not just a copy paste since from the BADI you don't have access to some MDO handler private data.
But it is possible to replicate all the fetch process except when doing a delta with exchange since I couldn't easily get the necessary data from the main MDO. But even if you get all the work orders ID's, after the BADI the standard code checks the exchange table again and rules out the unnecessary WO ID's.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Marcal , You can also do like , add one more assignment with 2 . and get both values data and manipulate based on requirement . use between in agentry framwork when you add new rule in assignment type. Thanks & Regards, Kunal Varaiya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.