RFC FM to ABAP Class

Hi,
Can we write RFC Function module into ABAP Class.
For better performance We'd like to instead of calling RFC FM use Classes. Is it suggestable this process, classes will be useful as RFC FM.
Thanks and Regards,
Prabhakar Dharmala

With introduction with SOA, you'll create "pesistence Service" with persistence object, that enables
the calls via RFC... but is a different logic...
Bye

Similar Messages

  • File to Proxy Scenario using ABAP Class and DB Multi Connect

    Hello Friends,
    I have a scenario below and a proposed solution. I would like some input as to whether i am headed the right way.
    Scenario: Thousands of records come in from the legacy accounting system. The fields of these records need to be mapped to SAP fields using cross-reference tables stored in DB2. Finally, summarize the records by deleting a few fields and feed to R/3.
    Solution i proposed:
    (1) File Adapter is used to send the file
    (2) Although JDBC adapter comes first to mind but since i need to access the DB2 tables multiple times for each record i propose to use an ABAP class for the mapping. Within the ABAP class the intent is to open an database connection to DB2, read the relevant cross tables using native SQL and finally generate the output XML.
    (3) Reciever is Proxy which feeds this generated XML to SAP for creating posting via BAPI_ACC_DOCUMENT_POST
    Question: Is the above solution correct or is there a better method to implement this scenario?
    Please let me know.
    Thanks,
    Minhaj.

    Looks fine. Few observations -
    1. Whether it is ABAP class or Mapping in RFC lookup, you are making multiple trips to the database.
    2. It looks like PI is being used only for reading the file and converting it to XML.
    3. If using PI is not mandatory, then a complete ABAP class on ECC it self would be faster than swtching between PI Java, PI ABAP then round trips to DB2 finally data push to ECC.
    If you could look at something like fetching all the required RFC look up data in one go and then map the fields according, might save u on processor and network resources.
    VJ

  • Abap class in portal application?

    hi all,
    I know how to call rfc function modules from portal applications. but as you all know ABAP is now a days written using classes and methods(Object Oriented), I would like to know how to access this classes and methods from a portal application.
    please help me in this regard as my client has urgent need for this. is it mandatory to write an RFC enabled BAPI as a wrapper to the ABAP class.
    Rgds

    Hi Yogi,
    if you want to access BAPIs, you can do that by using JCA or if you are using EP6 SP2 JCo.
    There are JCA&JCo Code samples under the download section available.
    Kai

  • Calling ABAP class methods from JAVA application

    Hi All,
    I want to fetch ITS related information (SITSPMON Tcode) in my JAVA application. But i didnt find much BAPIs for the same. While debugging I came accross few class methods with help of which I can get the required information. So is there any way we can call and execute methods of ABAP classes through java application?
    for e.g. I want to call GET_VERSION method of CL_ITSP_UTIL class.
    Thanks,
    Arati.

    Hi,
    Yes, as per my knowledge the only way to interact is using BAPI exposed as RFCs. So try to invoke those class methods in one CUSTOM BAPI and expose that BAPI as RFC and consume that RFC to get those details.
    Regards,
    Charan

  • Automatic generation of ABAP-classes from Function Groups?

    Hey there,
    is there a way of having (SE24)-ABAP-Classes generatetd outomaticaly by providing an existing function group?
    I think, the following mapping shold be possible::
    - the function group is the class
    - its function modules are public (static) methods
    - any form-routines are private methods
    -> I don't want to to that boring work myself, some tool should be able to do that just fine, right? So, is there such a tool?
    Thanks, regards
    Joachim

    Sorry, sounds like the only two people who answered are not aware of such a tool...
    There is one additional point, which I hadn't thought about initially. With ABAP OO you also have a much stricter syntax and many more statement variants that are obsolete and thus cannot be used. This is another hindrance for writing such a tool (but of course not impossible, I just kind of doubt that any reasonable programmer would write such a thing).
    Anyhow, I never understood why SAP is pushing OO so much (declaring all non-OO as obsolete), even going as far as implementing stricter syntax checks for OO. In my opinion a much better option would've been to implement some flag that switches on the more strict syntax checks, similarly to the Unicode check they've introduced. Coding in OO or non-OO, both have its use. Rules from SAP to code everything in OO even in cases where OO doesn't work seems straight silly as a general recommendation: E.g. if I have to code an RFC module, why would I want to bloat my code by introducing a class for implementing the functionality so that the RFC is just a wrapper around the class (unless the additional class gives me some real benefit)?
    As much as I appreciate using OO classes supplied by SAP, I often have difficulties seeing objects in the requirements that I have to code (which might of course just be a reflection of my programming skills). A class with just some static methods is often an indication of poor OO design, i.e. there is no reasonable/tangible object and all you have is a utility class with a collection of various methods. To me it's important that the code is well structured, doesn't have any side effects, etc. This can be achieved with non-OO coding as well as OO, but switching from non-OO to OO doesn't guarantee at all that the code is any better.
    In the end, if you just have a single function group, I'd recommend to do the translation manually and try to apply good OO design principles (instead of a straightforward 1-to-1 translation). E.g. for a class with just static methods (which I'd expect an automated translation would result in) one might want to take a peek at [singletons are evil|http://www.c2.com/cgi/wiki?SingletonsAreEvil] versus [singletons are good|http://www.c2.com/cgi/wiki?SingletonsAreGood]. I know it's silly advice if you're a seasoned OO programmer; but if not, I think your time is much better spent by thinking about the design and then applying it instead of using some automated tools where you'd later have to anyhow do some refactoring...

  • BAPI diff Method in ABAP class

    Dear friends
    Coul any1 tel me hw BAPI differed frm a method whic used in an ABAP class , BAPI is also a method of a BOR.
    And is it possible to replace a BAPI using a method of an ABAP class..
    cheers
    sakthi

    Hello Sakthi
    The concept of BOR methods is purely semantic and has nothing to do with ABAP-OO.
    The so-called method of business objects are implemented by BAPIs.
    The cannot be replaced by ABAP class methods. In particular, BAPIs are RFC-enabled whereas class methods cannot (yet) be called remotely.
    Regards,
       Uwe

  • ABAP Class as web service

    Hi All,
    Is there any way to expose a ABAP class as a web service. I know we can create a FM or BAPI and expose them as web service.
    Ex : If I have a SalesOrder class and this class has methods like getOrder(),getDetails(),getItems()  etc etc
    Now I would like to create a service where the above methods are methods inside the service.
    (We don't have XI in our landscape)
    Please correct me if my assumption is wrong.
    Thanks ,Anilkumar

    i think you need to embedd the class/methods in a rfc enabled fm to create a webservice.
    Rajeev

  • [WF Attributes] DDIC vs ABAP class

    Hi,
    I am having a hard time understanding which CL (ABAP Class) does not behave like DDIC structure.
    I use both in my Workflow but I cannot manage to pass data (meaning reference) and trigger the Workflow
    - from the FM 'SAP_WAPI_START_WORKFLOW'
    - from an event
    Am I forced to use the IF_WORKFLOW (I don't see why I have to use the FIND_BY_LPOR method ??) ?
    -> if the static method FIND_BY_LPOR is returning the value, what has gone all the job in the first place ?)
    I have simply created a customer-specific class that would avoid me adding new structure to the Workflow container and the Workflow Tasks again and again... simply extend the class and the element will all follow.
    Many thanks in advance for your help.
    Best regards,
    Guillaume

    Hello Guillaume,
    I know this is closed but an interesting discussion nevertheless. The first part I am confused about is what exactly you are trying to accomplish and why:
    >
    Guillaume Garcia wrote:
    I have simply created a customer-specific class that would avoid me adding new structure to the Workflow container and the Workflow Tasks again and again... simply extend the class and the element will all follow.
    Why can you not do this with a DDIC structure? I use this a lot. Particularly useful if you work with MOVE CORRESPONDING in your code. Just extend the structure and new fields are automatically transported (if they exist in the DB of course).
    OO in WF is generally used in the same way as a BOR. The distinction is Business Object versus an OO class as you would use in an ABAP program.
    >
    Karri Kemppi wrote:
    As far as I know (and understand your point) it is not possible. Maybe someone disagrees with me, but I am happy to hear about that. The object instantiates itself whenever it is needed in the workflow. And during the instantiation you need to populate the attributes of the object, etc...
    Correct, but.... if you are really determined, there are some tricks you can use: Who cares whether your object really exists in the DB, as long as your FIND_BY_LPOR always returns an instance. If this is always the same instance it can work. The thing to be careful of is that you MUST have an unbroken chain of tasks that execute in the same logon/RFC session. Once that session ends (e.g. by switching users/background tasks) the data is gone. Needless to say you need to know exactly what you're doing.
    Cheers,
    Mike

  • Abap class to write strings

    Hello all,
    Does anybody knows if exists an abap-class to write strings in SAP console ? I'm looking something similar of  System.out.println() in JAVA.
    Regards,
    Arthur

    Hi
    as per my knowledge its not possible to write ABAP classes in console like java..but we can run the programs through the console for that follow the below syntax..its very time consuming process..
    check the below syntax it may be helpful for you...
    C:\Program Files\SAP620\SAPGUI\rfcsdk\bin>startrfc
    RFC command line interface
    Syntax :
             startrfc [connect options] <function options>
    where
    function options =
              -F <function module
              -E <parameter>=<value>
              -T <table name>,<width>,[r=<file>][,w=<file>]
                 where <file> is a path name to read from (r)
                 or write to (w) the internal table.
                 If <file> is -, stdin or stdout is used
    Thanks&Regards
    Sreenivas Pachva

  • Create model from abap class

    Hi, I have a problem, I want create a model from an abap class.
    It is possible?, if the answer is yes, ¿how can i do it?

    As Menon said, even I think that it may not be possible to create a model from an abap class. But if it is a requirement to use an abap class in webdynpro I think you can do a work around:
    1.  Create a RFC function module which will contain the instance variable of required abap class.
    2.  This RFC can be imported, and using the variable in the RFC module u can call its methods.
    I haven't worked as such.  But, this may be one way. I am not sure abt it.
    Regards,
    Aparna .P

  • ABAP class mapping in PI (7.0)

    I just switched from XI (3.0) to PI (7.0).
    I tried to move one of my interfaces, but in Interface Mapping there is no "ABAP-class" option. How to use ABAP mapping in PI?

    Hi Mariuszu
    you need to enable it as described here
    in the exchange profile
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    or you can ask us directly via mail
    Regards,
    michal

  • Shooping cart creation in SRM 7.0 using web dynpro ABAP classes.

    Hi,
    We have recently upgraded to SRM 7.0 from SRM 4.0. We are using customized portal application for the creation of the shopping cart.I am planning to create custom FM which will use the standard Web dynpro ABAP classes to create the shopping cart.
    Could you please guide with the classes that are need to be implemented and the sequence of the classes used in the shopping cart creation.
    I think these are the classes that are used in the standard web dynpro ABAP component.
    CL_FPM_EVENT ->                  Creates an instance of this class based on an event ID.
    CL_BADI_FLT_DATA_TRANS_AND_DB -> Data Handling: Transport and Database.
    CL_EXITHANDLER ->               Class for Ext. Services Within Framework of Exit Technique.
    CL_EX_BBP_DOC_CHANGE_BADI ->     BAdI Class CL_EX_BBP_DOC_CHANGE_BADI.
    CL_BBP_OBJECTS_ACCESS ->         Access Functions for Object Types.
    /SAPSRM/CL_PDO_BO_SC ->          Shopping Cart BO.
    Your expert comments will be appreciated...
    Regards,
    Naresh

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • ABAP Class not displaying in operation mapping.

    HI,
    I have created abap class using se24 for throwing exception message in sxmb_moni, this abap class needs to be called in operation mapping, even though i have activated this abap class in PI environtment, i couldnt see the abap class option in the operation mapping.
    Could any one please let me know any change profiles requirements are required,
    Thanks,
    --Sai

    Hi Sai,
    Yes, you do have to register ABAP Class Mapping in the Exchange Profile to see this option in the Operation Mapping. Follow these step-by-step configuration guidelines:
    http://www.riyaz.net/sap/xipi-how-to-register-abap-mapping-in-exchange-profile/624/
    Hope this helps,
    Greg

  • Calling Portal event from ABAP class

    Hi Experts,
    I need a following clarificatrion, Please help,
    1. Is it possible to call a webdynpro method from a normal ABAP class?
    2. If no, we need a functionality of a class 'CL_WDR_HTTP_EXT_MIME_HANDLER' having method 'DO_DOMAIN_RELAX_HTML'.
    Is there any alternative method which can be used in ABAP having the same functionality.
    3. Is there any ways with which we can call portal event from ABAP class?
    Thanks,
    Shabir

    >1. Is it possible to call a webdynpro method from a normal ABAP class?
    I wouldn't necessarily recommend this approach. You shouldn't try to trigger events or any of the standard WDDO* methods from outside the WD Component itself.  That said, you can pass the object reference (like the WD_COMP_CONTROLLER object reference or the View Object Reference) into methods of normal classes.  Be careful if you are finding yourself calling a lot of your added methods from outside WD.  This is probably a sign that these methods should be in the Assistance Class or some other Class functioning as a Model Object.
    >2. If no, we need a functionality of a class 'CL_WDR_HTTP_EXT_MIME_HANDLER' having method 'DO_DOMAIN_RELAX_HTML'.
    Is there any alternative method which can be used in ABAP having the same functionality.
    What exactly do you want to do here?  Do you just want to get the relaxation script?  For what purpose?  You should never need to inject the relaxation script into WDA. 
    >3. Is there any ways with which we can call portal event from ABAP class?
    To what purpose.  Do you just want to delegate the triggering of the event that is inside WD Component to be called from a class?  If so you can pass the portal API object reference into a class from the WD Component.  However this only works while running within WD.
    How is this class used?  Are you running in WD?  Are you trying to generate some HTML code that runs in the portal independent of WD?

  • How to call the rfc in webdynpro abap..?

    Dear Experts,
    I need to add two numbers using RFC in webdynpro abap.
    First we have to give the input then click the submit button.. The result will be shown in next screen with addition of two numbers...  Please help me in this...
    Thanks.

    Calling an RFC Function module in Web Dynpro ABAP is nothing different from Classical ABAP
    use Pattern button to call function module and use DESTINATION syntax to specify the RFC destination
    http://www.octavia.de/fileadmin/octavia_files/content_bilder/Hauptnavigation/SAP_NetWeaver/WebDynpro/Web_Dynpro_Part_II.pdf?PHPSESSID=c528a60bf8857431c0fa6f6595639da7
    In Above document, page no 7, there is a wizard for Service call, in that 4th step is select service where
    you can specify the function module name and the rfc destination name
    Abhi

Maybe you are looking for

  • Image Justification for Internet Explorer

    I am trying to justify the images altrnately right and then left at http://www.theforrestproject.org/xcertification.html It looks fine in Google Chrome but looks awful in Internet Explorer with large gaps in the text. I would appreciate assistance to

  • Post Install Activities Problem - Checking RFC Destination

    I "successfully" installed Web AS 6.4 SR1 ABAP Non-Unicode.  I am following the instructions in SAP Web Application Server 6.40 SR1 ABAP on Windows: MS SQL Server guide.  The Post Installation instructions (2.2.6) require that I Check the RFC Destina

  • Exporting from a MAC in FCP to a WMV file

    Hi, Having some issues with exporting a WMV file on Final Cut 5. It will only export a 30 second clip. I have been reading that I need to buy Flip4Mac or Quicktime Pro to convert a Quicktime file into a full lenth WMV file. Do I really need to purcha

  • Hard Drive Not Mounting, but showing connected in Disk Utility

    I accidentally locked myself out of my external hard drive. While it was connected, I went into the Info and went under "Ownership & Permissions" and unchecked the Ignore ownership on this volume and I clicked the You Can drop box and changed it to N

  • CS3 Trial needed (though there has been CS6 released)

    I worked with Indesign CS3 on a mac, which died recently. I have the workfiles and a replacement computer (PC this time) but no installer DVD, only the key And it seems that there is no copy of a CS3 Indesign trial out there on the www which I need i