on 07-23-2014 7:15 AM
hello all,
i have created a workflow class and two methods (constructor, display) and 1 attribute PLANT (instance,public) in it.
i am using this class and display method in task t code PFTC.
While executing this task from SWUS , i am getting this error.Object instance 1000 does not exist.
As i was going through this blog. i have created everything exactly just like it is mentioned there.
But still i am getting this error. please guide me to detect where i am mistaken.
this is class screen-shot and error i am facing while executing the task.
The methods which are implemented using the interface are emtpy(don't contain any source code lines).
Hi,
It may not be a workflow issue.
Did you first try instantiating the class through SE24, using value 1000? (Click on the test icon
Did you specify that WERKS is a key attribute, in the attribute tab?
cheers
Paul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhishek,
The input value 1000 does not exist in the system, so it is showing that error, provide a existing value to that element ( you can use F4 help to find that).
Regards,
Murali Krishna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry i forgot to mention that input value 1000 does exist in our system.
i have also tried F4 help. it is showing all existing plants in our system, but still it is not accepting values select from f4 help.
Also to add information,
I have executed class using F8 option in class builder, and it is working perfect.
source code of display method.(i am trying to view plant in display method just like in blog).
method DISPLAY.
break-point.
data: ls_vt001w type v_t001w.
CLEAR ls_vT001W.
ls_VT001W-MANDT = SY-MANDT.
ls_VT001W-WERKS = me->PLANT.
CALL FUNCTION 'VIEW_MAINTENANCE_SINGLE_ENTRY'
EXPORTING
ACTION = 'SHOW'
VIEW_NAME = 'V_T001W'
CHANGING
ENTRY = ls_vT001W.
endmethod.
ibrahim,
i wish u have replied ask that couple of hours back when i bagging my head on desk.
the problem was (empty implementation of method FIND_BY_LPOR )
now i have coded that after lot of search on various threads and jocelyn blogs.
But still i don't understand i thing,
My LPOR method is still empty (empty implementation) and as jocelyn said in her blog to write following lines:
method BI_PERSISTENT~LPOR.
result = me->m_por.
endmethod.
as i am having empty implementation of method LPOR , so , how come so i am not getting dump somewhere.
please shed some light on importance of these lines as weel as method LPOR.
Hi,
Since you have made your Display method as Instance Method, you need to implement your FIND_BY_LPOR method. because in this method you will get the instance, and then you can use me-.WERKS in display method.
so in FIND_BY_LPOR method call your coonstructor (having one importing paramter iv_werks for WERKS) for creating object passing werks.
then in your constructor set me->plant = iv_werks. After your constructur gets executed you will have me->plant value populated for use in display method.
Dont forget to mark Plant as KEY attribute.
Regards,
ibrahim
Ibrahim,
may be this is very simple concept.
but it would be really helpful if you can explain,case scenario.
if we create our method as instance method -> then we need to implement static method FIND_BY_LPOR and LPOR. (WHY... in case of if we have made instance method).
Similarly,
if we create our method as static method -> then we need not to implement static method FIND_BY_LPOR and LPOR. (WHY... in case of if we have made static method).
Also,
i have executed task using this class by making PLANT as key attribute and by un checking that as key attribute.
nothing happes, so why u have said this as important to make PLANT as key attribute.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.