When and where to use REUSE_ALV_GRID_DISPLAY,CL_GUI_ALV_GRID,CL_SALV_TABLE

Hi All,
I am not trying to ask a interview question here.
I have come across many links ,many programs that talk about ALV display like REUSE_ALV_GRID_DISPLAY,CL_GUI_ALV_GRID,CL_SALV_TABLE but i am not able to clearly understand why is one more advantageous than another one and in what scenarios we need to use each one.
Can somebody help me /others who need similar clarification regarding these things
Thanks
Bala Duvvuri

Hi
1.REUSE_ALV_GRID_DISPLAY is used for displaying alv using functional module.It is more of a procedural approach.If you have used it in any of your programs that you would know that in order to do anythng in alv like displaying header or handling any event or anything else  you have to make respective function(form)  and internal tables and pass that function or internal table in the respective parameters of REUSE_ALV_GRID_DISPLAY.
2.CL_GUI_ALV_GRID is the oops approach for displaying alv.In this we don't use any functional modules.Instead of this we use the concept of classes and objects.
3.CL_SALV_TABLE is the also the oops approach but more efficient and advanced as compared to the above one.It is the main class used to create the simple 2D table it create a reference variable for this class.In this there is no need to create field catalog , table def. eveything can be handled dynamically....It is preferred to use this approach for alv.
Thanks

Similar Messages

  • When to use REUSE_ALV_GRID_DISPLAY,CL_GUI_ALV_GRID,CL_SALV_TABLE

    Hi All,
    I am not trying to ask a interview question here.
    I have come across many links ,many programs that talk about ALV display like REUSE_ALV_GRID_DISPLAY,CL_GUI_ALV_GRID,CL_SALV_TABLE but i am not able to clearly understand why is one more advantageous than another one and in what scenarios we need to use each one.
    Can somebody help me /others who need similar clarification regarding these things
    Thanks
    Bala Duvvuri

    Sorry question posted in wrong forum
    Thanks
    Bala Duvvuri

  • When and where to use Dbms_Error_Code, Error_Code and SqlCode.

    I have gone thru some docs and books on dev to understand error messages in Developer. After reading i am more confused reg the difference between
    Dbms_Error_Code, Error_Code and SqlCode.
    Can any one tell me concisely the difference and the situation where these are used.
    This is my understanding so far.....
    DBMS_ERROR_CODE and DBMS_ERROR_TEXT return the last Oracle Server error code and message due to an implicit DML within form application.
    SQLCODE and SQLERRM return the last Oracle Server error code and message due to an explicit DML within a form application.
    So why use ERROR_CODE at all?
    Below is an extract from the Oracle help Docs...
    When an implicit DML raises an error, it is handled with an ON-ERROR trigger using the ERROR_CODE function. This function contains the last Oracle Form error code. These errors are prefixed with FRM-.
    Okay but why not just use DBMS_ERROR_CODE instead of ERROR_CODE?
    Example: /*
    ** Built-in: DBMS_ERROR_CODE,DBMS_ERROR_TEXT
    ** Example: Reword certain Oracle Forms error messages by
    ** evaluating the DBMS error code that caused them
    ** Trigger: On-Error
    DECLARE
    errcode NUMBER := ERROR_CODE;
    dbmserrcode NUMBER;
    dbmserrtext VARCHAR2(200);
    BEGIN
    IF errcode = 40508 THEN
    ** Oracle Forms had a problem INSERTing, so
    ** look at the Database error which
    ** caused the problem.
    dbmserrcode := DBMS_ERROR_CODE;
    dbmserrtext := DBMS_ERROR_TEXT;
    IF dbmserrcode = -1438 THEN
    ** ORA-01438 is "value too large for column"
    Message('Your number is too large. Try again.');
    ELSIF dbmserrcode = -1400 THEN
    ** ORA-01400 is "Mandatory column is NULL"
    Message('You forgot to provide a value. Try again.');
    ELSE
    ** Printout a generic message with the database
    ** error string in it.
    Message('Insert failed because of '||dbmserrtext);
    END IF;
    END IF;
    END;Regards
    Gus

    Sorry Steve as wonderful as your code example may be you are putting the cart before the horse as far as the purpose of this thread goes. I don't need guidance on HOW to use certain error functions at least not until i know WHEN i should use them and thats why i started this thread. There are 3 different sets of Oracle functions below for use in forms but not enough guidance in the docs as to when to use them for the newcomer to forms. All i need is a simple definition as to when these functions should be used appropriately in forms. The rest I will find out for myself when i start using forms properly (including the use of your wonderful code). At the moment i just want to pass the Forms exam and to have a better understanding of what i am doing.
    DBMS_ERROR_CODE & DBMS_ERROR_TEXT
    SQLCODE & SQLERRM
    ERROR_CODE & ERROR_TEXT
    I've got one person saying this....
    DBMS_ERROR_TEXT and DBMS_ERROR_CODE built-ins are intended to be used in a form-level ON-ERROR trigger.
    SQLCODE and SQLERRM functions are intended to be used in a WHEN OTHERS exception handler.
    and another saying ...
    Use error_code to handle Forms error
    Use dbms_error_code to handle database error
    .. then i've got your code which predominantly uses ERROR_CODE.
    Then the STS test papers say this...
    When an implicit DML raises an error, it is handled with an ON-ERROR trigger using the ERROR_CODE function. This function contains the last Oracle Form error code. These errors are prefixed with FRM-.
    Example:
    IF ERROR_CODE = 40508 THEN
      MESSAGE ('Invalid insert');
      RAISE FORM_TRIGGER_FAILURE;
    END IF;DBMS_ERROR_CODE and DBMS_ERROR_TEXT return the last Oracle Server error code and message due to an implicit DML within form application. These errors are prefixed with ORA-.
    SQLCODE and SQLERRM return the last Oracle Server error code and message due to an explicit DML within a form application. These functions must be used in the exception handler of the program unit that issues the DML command.
    A little Confusing to say the least!!!
    Okay, so is this correct...
    SQLCODE and SQLERRM are used with explicit DML within a form application and are used in the exception handler of the program unit that issues the DML command.
    When an implicit DML raises an error, it is handled with an ON-ERROR trigger using the ERROR_CODE function. These errors are prefixed with FRM-.
    DBMS_ERROR_CODE and DBMS_ERROR_TEXT are also used with implicit DML within form application. These errors are prefixed with ORA-.
    So why use DBMS_ERROR_CODE and DBMS_ERROR_TEXT if ERROR_CODE and ERROR_TEXT are to be used in ON-ERROR triggers and if an implicit DML error arises then whats the difference between ERROR_CODE FRM- errors and DBMS_ERROR_CODE ORA- errors? Apart from one being a form error and the other being a server error, what different things do they tell us? If an implicit DML error ocurrs would this generate ORA- and FRM- errors at the same time.
    Cheers
    Gus
    Message was edited by:
    gusora

  • Advantages,Dis-advantages,when and where -use java.lang.Void Wrapper  class

    Hi All,
    I like to know when and where to use the wrapper class java.lang.Void and when it is particulary needed.if anyone could give me some examples it will be better.
    Thanks in advance,
    Kathir

    I like to know when and where to use the wrapper class java.lang.VoidWhy? If you don't need it, you don't have to use it.
    and when it is particulary needed.It is needed when you want to represent the concept of a void return value.
    if anyone could give me some examples it will be better.
    Method wait = Object.class.getMethod("wait",null);
    if (wait.getReturnType() == Void.TYPE) {
      System.out.println("Object.wait() returns null");
    }

  • When and Where and how to use Proxies

    hi
    New to Xi Can anyone explain When and Where and how to use Proxies
    Mohit

    Proxies: are interfaces which will get executed in the application system.They can be created only in the system from message interfaces using the proxy generation functions.
    The biggest advantage of the proxy is that it always by passes the Adapter Engine and will directly interact with the application system and Integration engine - so it will and should give us a better performance.
    The literal definition of a proxy is an object / process authorized to act for another; an agent or a substitute. In simpler terms, proxies in the XI context are objects used to encapsulate the creation (from a sender system) or parsing of XML (at a receiver system) as well as the communication with the relevant runtime components required to send or receive those messages. The Proxy Runtime controls these objects / processes, and can itself be controlled by the applications it communicates with.
    The Proxy currently has the following components available:
    1. ABAP Proxy – Communication using XI or Web Services
    2. Java Proxy– Communication using XI (J2EE)
    JAVA Proxies:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
    ABAP Proxies:
    /people/sap.user72/blog/2005/12/13/integration-builders-through-proxy-server-part--2
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    /people/arulraja.ma/blog/2006/08/18/xi-reliable-messaging-150-eoio-in-abap-proxies
    /people/stefan.grube/blog/2006/07/28/xi-debug-your-inbound-abap-proxy-implementation
    /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
    /people/sukumar.natarajan/blog/2007/01/07/how-to-raise-alerts-from-abap-proxy
    /people/sravya.talanki2/blog/2006/07/28/smarter-approach-for-coding-abap-proxies
    ON SDN TV
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=abap%20proxy%20xi&cat=sdn_all&start=11#
    Proxies communicate with the XI server by means of native SOAP calls over HTTP .RFC does not, so you have to convert from SOAP to RFC calls and vice versa. So XML conversion is required.
    ABAP Proxies uses Webservice and Http Protocols. And if you use RFC it is mainly meant for Sync. call. But Proxies is used for both Sync and Async.
    If you use ABAP Proxy , you can reduce the overhead calling the function again and again.
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies - Activate Proxy
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies - ABAP Server Proxy
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy - ABAP Client Proxy
    Re: JDBC Sender select/update problem
    If u generate proxy for outbound interface then its client proxy and for inbound interface its server proxy.
    In client proxy u can call the method to send messages but u can't modify it but in server proxy its possible to write a user code within the method to execute proxy.
    CLIENT PROXY:
    A WSDL description from a UDDI server (or an Internet page) is usually used to make a service executable in the Internet and to describe the interface of this service. You require a client proxy and not a server proxy to call this service by using the Web service infrastructure.
    SERVER PROXY:
    You can only generate ABAP server proxies from a WSDL description if they originate in the Integration Repository.You can also generate server proxies for Java and client proxies for ABAP from message interfaces.

  • How can and where i use the function "HTMLDB_UTIL.CLEAR_PAGE_CACHE "

    how can and where i use the function "HTMLDB_UTIL.CLEAR_PAGE_CACHE " ?
    where is the place to put this function?

    i have notice that sometime, during visual a report of a table, order by data insert desc, some record are not displayed on some client.
    Only whe we clear the cache of internet explorer than this record can view.
    I have an idea that a clear page when i call the report may be solve the problem.
    Thank's.
    ------------------------

  • What is correlation ? when and how to use it in BPEL process?

    Hi,
    What is correlation ? when and how to use it in BPEL process?
    Thanks

    Hi:
    Take a look at this entry http://blog.andrade.inf.br/2010/03/oracle-bpel-11g-correlation-sets.html
    thx
    best

  • When and where IDOC is triggered for TCode MD04

    Please guide me when and where IDOC is triggered for TCode MD04. In my case it is triggering even though I am trying to save a PO with error or on hold.

    Hi,
    Idoc triggers when we save or change the PO. It depends on the message control settings in the partner profile. Check the message control settings.
    thanks
    sarvesh

  • What is info type 1957 and where its used?

    What is info type 1957 and where its used?

    I have used this infotype.
    check out this link
    P1957 Infotype 1957 - Obsolete, DO NOT USE - SAP Structure - ABAP

  • Oracle BI what is cubes and dimention and where we use cubes and dimention

    Dear ,
    I am working on Oracle BI.
    what is cubes and dimentionS and where we use cubes and dimention
    Please give a link where i get stuff regarding cubes and dimentions.
    thanks

    Possibly you are lost in the wrong forum category ...
    Post your query in:
    Hyperion EPM

  • How can i know when and where my iphone replaced and

    how can i know when and where my iphone repalced by new one

    Seriously? You had your phone replaced under warranty, & you have no idea where or when you did this?
    Well, no one here would have any idea. As a start, plug the SN in here:
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • When and why (how) use the exit RSR00003 (EXIT_SAPLRRS2_001)

    Boa tarde, expert´s ...
    I tried to find documentation about exit RSR00003, but I didn´t found ...
    I want know when and why a have to use this exit ...
    Muito obrigado,

    Hello,
    The exit is only for Internal SAP use this is why you don't find any documentation for it. So you don't need
    to use it, see the information in the SAP note 153562.
    Best Regards,
    Des

  • When and Why we use BAPI, RFC and IDOC.. in XI

    Hi,
            Could any one tell me why we some time use BAPI, and some times use RFC and some times use IDOC while communicating with the SAP systems.
    Is there any differences while using the same.
    regards,
    Sunil

    Sunil,
    RFC and BAPI are same as per the technical point of view both are remote enabled function module..
    BAPI is provided by SAP while RFC is created by a developer..
    IDoc is another proprietary technology of SAP for exchnaging messages .
    Difference lies here :
    1. For RFC/BAPI you need to use RFc adapter
    while for IDoc you need to use IDoc adapter..
    2. For RFC you need to create RFC destinations not for Idoc
    3. For Idoc you also need to manage Partners Profiles..inn R3..
    These are few differences in using RFC/BAPI and Idoc...not the only ones..
    Feel free for any clarification..
    Regards,

  • When and why to use performSelector - iOS

    I have been trying to figure out why and how to use performSelector. I did come across https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundatio n/Protocols/NSObject_Protocol/Reference/NSObject.html
    However, I am not able to fully understand it.
    Would anyone be able to help me out in explaining this?

    performSelector is useful for loosely coupled code. Useful also as callbacks from code that executes in background threads.

  • How to use the user and role API's and where to use it

    Hi All,
    I have configured SSO for my UCM11g. Now my application authenticates through the Oracle SSO login page. Currently it is working with SQL authenticator.
    Now, i have to use LDAP authenticator. when i will configure the LDAP authenticator, i have to use the user and role API's to fetch the user profile information from LDAP. i have got the API's which will be used to fetch the respected information, but i am not getting as where i will write those java programs and how this API will be used in my application. what settings i need to do on it so that application uses the API's. ?
    Please can anyone help me on this.
    thanks,
    Saurabh

    Hi, Mithu,
    Thanks a lot for your help in advance.
    I have carefully read the document: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6b66d7ea-0c01-0010-14af-b3ee523210b5.
    Now, I think I have to set the processor of every actions in every process if I use the GP for processing the workflow.
    I am better to hope that I can set the processor to the role for every actions in every process in the runtime through get the organizational structure in the WDA(webdynpro for java or webdynpro for java). Thus, the customer don't set the processor to the role for every action in every process when runing in the GP.   I don't know how to do this. 
    Whether the function is not supported in the GP? If so, I have to config two organizational structure: in the R/3 and in the Portal. I don't think our customer don't receipt this solution.
    Do you give me some hints? Thanks a lot.  My email: [email protected]
    Thanks again.
    Thanks & Regards,
    Tao

Maybe you are looking for