‎2009 Apr 21 7:15 AM
Hi,
Can you please tell me how to call method from one class or interfce to another class.The scenario is
I have one class CL_WORKFLOW_TASK, this class have interface IF_WORKFLOW_TASK & this interface have method IF_WORKFLOW_TASK~CLOSE. Now my requirement is ,
There is another class CL_WORKFLOW_CHAIN ,this class have interface IF_WORKFLOW_CHAIN & this interface have method IF_WORKFLOW_CHAINCLOSE_ALL_PREDECESSORS. Now i have to write my code in this method but i have to use IF_WORKFLOW_TASKCLOSE method for closing the task.
Can you please give me the code for the above .
Please waiting for reply.
‎2009 Apr 21 8:55 AM
Hi,
You can use the concept of INHERITANCE in this scenario.By using this concept, you can call all the public and protected methods of class CL_WORKFLOW_TASK in the required calss CL_WORKFLOW_CHAIN as per your requirement.
Go through the Introdctory(INHERITANCE) programming from this SAPHELP link.
http://help.sap.com/saphelp_nw70/helpdata/en/1d/df5f57127111d3b9390000e8353423/content.htm
I hope, it will help in you inresolving your problem.
by
Prasad GVK.
‎2009 Apr 21 9:05 AM
Hi Mehul,
you should create an object of the IF_WORKFLOW_TASK implementing class i.e. CL_WORKFLOW_TASK.
then you can call the close method with this object. Isn't it? Because interface mehods are always public and will be visible.
Hope this helps!
Regards!
Sandip