Extend or delegate ABAP OO class

Hi,
How could I extend or delegate ABAP OO class in workflow. I have a scenario whereby I make copy of Standard workflow WS61000090 which uses ABAP class as workflow Objects. In one of the task, I need to put my logic with zmethod. I am in ECC 6.0 environment.
Any Help is appreciated.
Thanks.
Bijay

Hi Bijay,
I encountered the same problem previously with leave requests (WS12300111) whose class (CL_PT_REQ_WF_ATTRIBS) was marked as final so I couldn't change or extend it. In addition, the workflow triggering logic coudn't be touched.
Thus, I had two options:
1. Create custom class for leave requests
- in this option I would have had to rewrite the CL_PT_REQ_WF_ATTRIBS class and instantiate it in my workflow
2. Create static class for leave request utilities
- in this option I created a static (=no instances to be created) class with a few static methods with e.g. the request ID as an import parameter
- and called the methods from my workflow
I chose to go with option 2 since I only had a few methods I needed and was under time constraints. If there would then be other needs in the future for extracting/updating leave request data the class would then allow for further enhancements.
I don't know what would be the most elegant way of going forward, but at least for me the static class/methods approach has worked all right. It just feels kind of silly to make a custom class completely rewriting the original abap class functionality to make it work. Especially because there might be upgrade changes to the class in the future...
Best regards,
Mikko

Similar Messages

  • Acces dynamic configuration variable (e.g. filename) in ABAP mapping class

    Hi experts
    I am searching for a possibility to acces a dynamic configuration variable (DCV) in an ABAP mapping class. Since I could not find a solution in SDN and other sources, I hope somebody in this forum can help me.
    What I already found is the following code which can be used to set a DCV, but what I would be interested in is how to read a DCV.
    Any help is appreciated.
    Markus
    METHOD if_mapping~execute.
    DATA l_record type mpp_dynamic.
    * copy payload
    result = source.
    * add an adapter specific attribute
    l_record-namespace = 'http://sap.com/xi/XI/System/File'.
    l_record-name = 'FileName'.
    l_record-value = 'test.xml'.
    dynamic_configuration->add_record( l_record ).
    ENDMETHOD.

    Hi Markus,
    you can find everything in my blogs
    /people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
    Regards,
    michal

  • How can I call a ABAP proxy class from BADI? PLease help

    hi Experts,
        I have a scenario where I have to call a ABAP proxy class from a BADI. How can I do this? Does anybody has sample code for the same?
    Please help.
    Thanks
    Gopal

    Hi,
       You can call a method of a class from BADI. Here are the steps.
       1) In the BADI implementation create a object for the proxy class.
       2) Call the Execute_Synchronous method.
        You can define a BADI by using SE18 and you can implement it by using SE19.
    Sample code...
    ================================================
      METHOD ZIF_EX_VBADI~CONVERTUPPER.
      DATA: OBJ TYPE REF TO ZTESTCLASS.
      DATA: IT_DATA  TYPE ZIN_MT,
                IT_RES   TYPE ZOUT_MT,
                SEXCEPTION TYPE REF TO CX_AI_SYSTEM_FAULT.
      TRY.
          CREATE OBJECT OBJ
             EXPORTING
                 LOGICAL_PORT_NAME = 'TESTPORT'.
      CATCH CX_AI_SYSTEM_FAULT INTO SEXCEPTION.
      ENDTRY.
    ENDMETHOD.
    ================================================
    Thanks,
    Vivek LR

  • How to use CL_PROXY_BASIS instead of CL_PROXY_CLIENT your ABAP Proxy class?

    Hello experts,
    I have a scenario where a new basis release was done in my development and testing SAP boxes (Basis Release 710 I believe) which means from then on when generating an ABAP Proxy class the inheriting class will be used is CL_PROXY_CLIENT as opposed to the previous CL_PROXY_BASIS.
    This causes a problem though because the target date for the project, which uses this ABAP proxy, is supposed to be in the production system before the date when the basis release will be done in the production system.  Obviously this will cause delays in my project since if I were to move my objects to production before the basis release a dump/syntax error will occur in production because the class CL_PROXY_CLIENT is not expected be production yet.
    The next plan is to try to use CL_PROXY_BASIS instead of CL_PROXY_CLIENT, by editing my ABAP Proxy Class be force. My question is, what steps do I need to take so that I can change these classes so CL_PROXY_BASIS will be referenced/used instead of CL_PROXY_CLIENT ?
    I hope to hear from all of you soon.
    Regards

    >
    Rich Heilman wrote:
    > Bad idea.  Your dev and prod boxes should be at the same basis level at all times. 
    >
    Which release and SP level are you still on?

  • XML to internal table conversion within ABAP mapping class

    I am doing a ABAP mapping for file to Idoc. My requirement is to convert XML file into ABAP internal table (within ABAP mapping class). Is there any standard FM, method, transformation etc, which can be used here.
    Thanks, Dehra

    Dehra,
    Have you seen this weblogs which talks about this:
    /people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
    /people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    /people/r.eijpe/blog/2006/02/20/xml-dom-processing-in-abap-part-iiib150-xml-dom-within-sap-xi-abap-mapping
    Hope this helps you....
    ---Satish

  • ABAP proxy class - data structure

    I generated a ABAP Proxy Class and the data structure I want to use is put automatically under item structure which has 0...unbounded type.
    1. How can I get rid of this item structure as it will create another unnecessary level for my mapping
    2. If my source structure has only 3 level, and the target structure has more than 3 (including item), how to map it?
    e.g.
    Source structure: Level 1(occurrence 1) > Level 2(1)> Level 3(0..1)
    Target structure: Level 1(1])--> Level 2(0...1) --> item (0..unbounded) ---> Level 4(0..1)
    I need to map level 3 from my source to level 4 in target, but it didn't seem to work.
    Thanks.

    --->1. How can I get rid of this item structure as it will create another unnecessary level for my mapping
    You can delete the proxy at Application Server.....make necessary changes at XI Message Interface and again generate the proxy...
    -->Source structure: Level 1(occurrence 1) > Level 2(1)> Level 3(0..1)
    Target structure: Level 1(1])--> Level 2(0...1) --> item (0..unbounded) ---> Level 4(0..1)
    For this you need to make use of context change features of XI Mapping.
    Regards,

  • Custom proces type based on ABAP OO class

    Hy,
    I have a process type and in one method of its asoociated ABAP OO class I have to check if their process chains are running or not.
      I know how to make the tests, but the problem is that I have to integrate them in one method. I'm lookink for a solution to adapt the process type from :
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/509f3ae6-e36e-2910-48a8-ab43dc167dd9   
    Any suggestions about what should I keep or not and in which method should I put my tests?
    Thank you.

    Hello,
    Sorry, not sure where my brain was. Actually I do know: at two clients with projects going live this month, so apologies for a rushed and inaccurate response. It's CL_SWF_EVT_EVENT.
    Jocelyn's blog I referred to includes a code sample using the same class on how to raise an event with an object key.
    Regarding your second question: No you don't need to do any binding. Just use an instance of your object and it will wait for an event with the same key. The WF part is very straightforward and works exactly like BOR, it's just raising event that can't be done with the WAPI.
    Cheers,
    Mike

  • ABAP OO Class and Change Documents

    I have created a class based on the IF_WORKFLOW interface.  I created a couple of events.  I created a workflow task assigned to a custom method of the class.  I setup the Material Change Document to trigger the class event when there is a change.  The workflow task does trigger when I change a material, but I don't know how to pass the key of the Change Document (matnr) to the workflow task/method using the ABAP OO Class interface.  Any help?
    Thanks,
    Kenneth

    Thanks for the reply Florin.  Yes, I have seen Joclyn Dart's Whitepaper and blogs.  They are very helpful, but I haven't seen much information within them about Change Documents.  I tried your suggestions, but the material key is still not being filled when I trigger the change document and workflow task using tcode MM02.
    Here is what I have done:
    Created an Attribute 'Material' type mara-matnr and checked 'Key Attribute'.
    Created an Attribute M_POR type SIBFLPOR.
    Here are the methods:
    Constructor with parameter 'Material' *
    METHOD constructor.
      me->m_por-catid = 'CL'.
      me->m_por-typeid = 'ZMM_WF_MATTEC'.
      me->m_por-instid = me->material.
    ENDMETHOD.
    Find_by_lpor with parameters LPOR and RESULT (default params) *
    METHOD bi_persistent~find_by_lpor.
      DATA: p_material TYPE matnr.
      MOVE lpor-instid TO p_material.
      TRY.
          CREATE OBJECT result
            TYPE
              zmm_wf_mattec
            EXPORTING
              material      = p_material.
        CATCH cx_bo_error .
          EXIT.
      ENDTRY.
    LPOR with parameter RESULT (default param) *
    method BI_PERSISTENT~LPOR.
    result = me->m_por.
    endmethod.
    ENDMETHOD.
    Custom method MAT_CHANGED with parameter 'Material' * (not coded yet)
    This is the task being triggered by the Change Documents *
    METHOD mat_changed.
    ENDMETHOD.
    Edited by: Kenneth Moore on Nov 4, 2008 11:00 AM

  • How to enter Enhancement Mode of ABAP OO Classes: Add Methods, Pre-Methods.

    Hello,
    do you know how to enter the enhancement mode of the class builder?
    I want to enhance a standard global ABAP OO class by implicit enhancements for inserting methods, attributes or pre- and post-methods - as described in  <a href="http://help.sap.com/saphelp_nw70/helpdata/en/58/4fb541d3d52d31e10000000a155106/content.htm">Online help</a>.
    I start the SE24 on my NW 7.0, but there is no menu <i>Edit-> Enhancement Operations-> Enhance Class/Interface </i> as written in <a href="http://help.sap.com/saphelp_nw70/helpdata/en/86/b83142680d5c33e10000000a155106/content.htm">Online Help</a>.
    When I press the <i>Display</i> button, there is no enhancement button (the spiral), and the sub entries of menu <i>Edit-> Enhancement Operations</i>, like <i>Insert Pre-Method</i> are inactive (gray).
    In SE80 I don't find them too. The only implicit enhancements I found are on the beginning and end of methods implementation code.
    Do you have experience enhancing classes?
    Best regards
    Michael Umlauff

    Hallo Michael,
    You first have to go in se80 or se24
    Then menu Class-> Enhance
    Then you will be able to use Edit-> Enhancement Operations-> Insert Pre-Post Methodes
    Regards,
    Walter

  • Integration of BOR functionality into a ABAP-OO Class

    Hi together,
    we are planning a WebDynpro application in which we are using about ten ABAP-OO classes. The functionality of that classes are using BOR-Objects. Since we are using the M-V-C pattern, we like to create Entities, e.g. "Business Partner" within our model. There is already a BOR "BP" existing. We like to use this BOS-Object for implementing the ABAP-OO Entity Class. By doing it that way, we are sure that the new object will satisfy any SAP compliance.
    Is there a standard way to integrate the functionality of BOR-Objects into an ABAP-OO Class?
    Best regards
        Thomas Wetzler

    Hi,
    have a look how SAP is handling this, for example in class CL_ATTACHMENT_LIST.
    There is an include CNTN01_SWC with the definitions of the data-types and macros you need to handle the BOR-objects and containers.
    Include this in the local class-implementations of your global class. Then you can handle the BOR-objects inside the methods as usual.
    Regards
    Dirk

  • How to indicate a message by a planning function type in an ABAP-OO-Class

    Hello,
    I integrated a message with following statement " MESSAGE i003(upf1) WITH v1 v2." in an ABAP-OO-Class, which is used by a Planning Function Type. The function type works but it´s not indecated after executing the Planning Sequence, neither from web template nor in the planning modeller.
    Does anybody know this problem/behavior?
    Thank for response
    Andreas

    Hi Joerg,
    how about this:
    data: l_dummy type char100.
    MESSAGE i003(upf1) WITH v1 v2  into l_dummy.
    i_r_msg->add_msg( ).
    You do not need to take special care about the variables. Just raise the message as you want it to be raised. The only thing you need to do is to raise the message into a string (..into l_dummy). The interface IF_RSPLFA_MSG and the implemetation of add_msg is going to read the standard message variables (SY-MSGNO, SY-MSGID, SY-MSGTY, MSGV1 ...). You just need to throw the message
    and call  i_r_msg->add_msg( ) e.g. in the execute method of your customer planning function.
    Please give it a try and take a look at it in the debugger.
    Hope this helps.
    Matthias Nutt
    SAP Consulting Switzerland

  • Terminating event and abap oo class

    Hi, gurus,
    I 'd like to know how the terminating event works.
    for example,  i define a custom abap oo class (which has been implemented the interface of IF_WORKFLOW), and i want to use it as the terminating event of a standard task.
    could you please tell me how does it works?
    1. there must be an instance defined in the container of the task?
       which must be instanciated in the run time?
    2. then in another abap report, i simply raise the event defined as the terminating event, using the same key, then the pending task will be terminated?
    could you pls provide more information on this ?
    thanks and best regards.
    Jun

    Hi Jun Zhang,
    An event that is used to stop a workflow or task, or change the behavior of an already started workflow is called Terminating Event.
    If the event linkage is active and the linkage rules are satisfied, the status of the work item is set to COMPLETED.
    Defining Event Linkage  Terminating event linkage consists of 2 parts.
    Type linkage which specifies business object type, event name, generic name for event receiver (WORKITEM for terminating events of tasks or EVENTITEM for wait for event steps)
    Instance linkage which identifies the particular receivers (I.e. work item Ids) per object instance.
    Terminating event linkages can be seen in SWE3.
    For terminating events, along with Business object and Event a Container Element should be specified that holds the Object Instance.
    Terminating Event for Workflow is available from Release 6.10 only. This is defined in Basic Data of Workflow Builder.
    Binding Definition is optional for Terminating Events. Binding can be defined b/n event container and workflow container to pass event information to the workflow if required. That is the only way of passing information from an asynchronous method to the task that started it.
    Thanks and Regards,
    Prabhakar Dharmala

  • Extending System Center Operations Manager Classes & Discovery SCOM 2007 R2

    I want to add some additional attributes to SCOM that are populated from information in another database.....for example.
    I have a CMDB that contains information about the support level for each server (i.e. gold, silver, bronze), i want to be able to display this information in the SCOM console.  This needs to cover both Windows and Unix/linux servers.
    I have played around with creating a custom MP and have created a new class, and custom script discovery using a vbscript to query the CMDB SQL database containing the info that i want....I have got to the point where i can see the new column in SCOM console
    but cannot get it to populate with any data.
    any help would be appreciated.
    thanks

    Hi,
    Here are some good articles about extending SCOM classes, please go through them:
    Extending System Center Operations Manager Classes & Discovery
    http://blogs.technet.com/b/stufox/archive/2008/07/23/extending-system-center-operations-manager-classes-discovery.aspx
    Extending Windows Computer Class using Visual Studio Authoring Extensions (VSAE)
    http://blogs.technet.com/b/emreguclu/archive/2012/11/07/extending-windows-computer-class-using-visual-studio-authoring-extensions-vsae.aspx
    http://blogs.msdn.com/b/steverac/archive/2011/09/16/extending-a-class-in-the-authoring-console.aspxRegards,
    Ya Li
    Regards, Yan Li

  • How to call a ABAP proxy class from a BADI? Please help!

    hi Experts,
        I have a scenario where I have to call a ABAP proxy class from a BADI. How can I do this? Does anybody has sample code for the same?
    Please help.
    Thanks
    Gopal

    Hi Gopal,
    Check this out
    DATA: ref_obj    TYPE REF TO zmfg_production_ord.----> BADI
    * Instantiate the proxy class
        CREATE OBJECT ref_obj.
        TRY.
            CALL METHOD ref_obj->execute_asynchronous
              EXPORTING
                output = it_output.     "Output Structure
            COMMIT WORK.
          CATCH cx_ai_system_fault INTO ref_sysexception.
        ENDTRY.
        IF  ref_sysexception IS INITIAL.
          WRITE : / 'Error Message'.
        ENDIF.
    Edited by: Raj on May 28, 2008 4:52 PM

  • Recursion in abap proxy class

    Hi experts.
    I create an abap proxy class via SE80, because we won't use XI. After import a local WSDL file, I generated the proxy class. But my problem is I can't active it. I see there are many errors in warings tab, they are 'Item is part of recursion'.  Any one knows how to solve these problem?

    Hi,
    Kindly inspect wsdl and you will find data type which is referring to itself. Such recursion in my knowledge not yet supported. Possible workaround is to download wsdl and modify tags to remove recursive effect (may be create a copy of tag give another name and then refer it as data type).
    Regards,
    gourav

Maybe you are looking for

  • Understanding statistics from a Cisco WLC?

    Hello, From the "Monitor" page on our Cisco WLC.  If you go to "Access Points" from the left side then choose one of the Radios like 802.11b/g/n.  That will list all the APs connected with your controller. 1) First question, some of the APs listed sh

  • HT4906 Photo Stream not working

    I have iphoto 9.  Suddenly Photo Stream is not working...no photos taken are coming to my desktop from iPhone 4 or iPad 2.  In system preferences, iCloud, it says I need to update, but software update says everything is up to date.  I am confused.  D

  • Java.lang.RuntimeException: java.lang.OutOfMemoryError: PermGen space

    Hi All ..we are running with the following configuration. Solaris Version 5.10 ./prtconf System Configuration: Sun Microsystems sun4v Memory size: 8184 Megabytes App Server Version, Sun Java System Application Server Enterprise Edition 8.1_02 (build

  • What are the RECOMMENED system requirements to run Premiere Elements 11?

    I'm picking up a new pc and I'd rather it be overpowered than underpowered.

  • ITunes displaying list of applications installed on Iphone

    Since changing over from syncing on my Work PC to My home PC I noticed that the list of applications I have installed on my iPhone no longer appear when I select Applications from the left hand menu on iTunes. These application all still work on my i