How to view COMPONENTCONTROLLER interface 's implement class

Every WDA has COMPONENTCONTROLLER  ,and it has  interface, How to view class implemented this interface?

>
Abhimanyu Lagishetti wrote:
> WDA is stored as meta data, there are no objects generated in the system when you activate your web dynpro component, the classes are generated at runtime only
>
> Abhi
Actually that's not true.  The interfaces get built as you are editing the component and compile like any other class when you activate. They are just hidden from the class builder to keep people from messing around with them directly and to keep from cluttering up the object navigator. They have to be built as you go otherwise SAP would have had to build a special syntax checker and code parser for the ABAP Code Completion for WDA (which we didn't do).
You can view the interfaces however.  There is a button on the toolbar (or you can press CTRLSHIFTF1 or the menu path GOTO->Controller Interface).
http://www.flickr.com/photos/tjung/2740591187/
It displays the interface in a dialog window:
http://www.flickr.com/photos/tjung/2741429324/
Also in ABAP 7.1 and higher, the interace is also visible via the code completion via the implementation of the interface in WD_THIS.
http://www.flickr.com/photos/tjung/2740610915/

Similar Messages

  • Pattern b/w Remote interface & Container implementation  class

    Which pattern is followed by EJB Remote interface & Container implementation class of that interface?Is there anyting mentioned in specs?
    This questoin was asked to me by many people.I think it is Command design pattern as it hides away all the details of actual business implementation.but at same time I doubt if it is Facade?
    Anyone who knows about this?
    Thanx in advance
    Sidhu

    Rarely is software represent a single pattern, it typically represents multiple patterns.
    Which pattern is followed by EJB Remote interfaceThe remote interface is an example of a facade pattern. This presents a public interface which is an abstraction of the real interface.
    Container implementation class of that interface? The implementation is an example of what I think of as a double proxy pattern. That is acting as two distinct proxies. The first being the the remote callingof EJB standard functions via the Skelton implementation. I.E. The underlying EJB/RMI interface. The Second being a application level proxying of the business logic seen in most RL implementation.
    The use of an UID ID beans is an example of a memento.
    I think it is Command design pattern as it hides away all the
    details of actual business implementation.Not directly, though an AppServer programmer may use the Command Pattern to resolve the remote connections. The User Application Programmer may also use this pattern. The key element of Command Pattern is the Invoker executing an concrete class via abstraction or interface of a polymorphic class. You can think of this as a specialisation of the
    Martin

  • How to create an interface if the class has a nested class

    I have the following class
    public class SampleImport{
    public SampleResult import (InputSource xml) {
    SampleResult sampleResult = new SampleResult();
              //do something
              return sampleResult;
    public static class SampleResult {
              public final String sampleName;
              public SampleResult (String s) {
                   sampleName = s;
    I would like to create an interface for this class for teh following method signature 'SampleResult import(InputSource(xml))', how would I create it ?
    Any help is appreciated,
    TIA,

    public interface Nameable {
        String getName();
    public interface Importable {
        Nameable importSource (InputSource xml);
    public class SampleImport implements Importable {
        @Override public SampleResult importSource (InputSource xml) {
            SampleResult sampleResult = new SampleResult("foo");
            //do something
            return sampleResult;
        public static class SampleResult implements Nameable {
            public final String sampleName;
            public SampleResult (String s) {
                sampleName = s;
            @Override public String getName() {
                return sampleName;
    }edit: er, you do know import is a keyword?

  • Create session bean using interfaces, not implementation classes

    Hi,
    I'm using interfaces and session beans for my persistence/data layer in my adf application.
    I've created a data control for my session bean and during creation of this data control, javabean.xml files are created for the different interfaces that are used in my session bean.
    If I create bindings on these methods, interfaces in jspx-documents I will get errors because he can't find the impl-classes that implement these interfaces.
    When using interfaces in your session bean (as return values or parameters) instead of classes you need to manually create javabean.xml files for the implementation classes.
    It's required by the databindings/datacontrol that the implementation-classes are described in a javabean-format as well? Is this a spec we need to adhere to?
    Could someone verify that you need to create javabean.xml-files for as well the interfaces as the classes when you're working with interfaces in your session beans?
    regards,
    Nathalie

    A patch was released by Oracle to be able to work with Interfaces and so it's not required to work with implementation-classes.
    Patch for 5726754(Base bug 5657179)

  • Retrieve used interface from implementation class

    Hi to everyboby
    I have a remoteObject that implement 2 interface (I1, I2). These interfaces are child of common father interface (I0).
    This remote object is received unmarshalled and casted to one of the to directly implemented interface I1 or I2,
    After that I want to execute a method declared into the interface I0 on the server side, that prints out the name of the interface used during casting after the unmarshall operation on the client side.
    How can I retrieve the name of the current interface used to refer the object into the client side, from the server side?
    Anyone as suggestions?
    thank you very much
    Edited by: dj3mb3 on Jun 10, 2010 5:49 AM

    I'll try to explain in a better way ...
    I have a server with 2 different client and each client communicate to the server with a different interface.
    My needs are to recognize from the server, the type of the client that are operating, and to do this I was thinking to recognize the interface used from the client to interact with the server
    An other option is that, from the client, after retrieving the server and it's cast, a can call a method to pass to the server object, the type of the interface actually used.
    But I think this makes a bit of nonsense because When I receive the marshalled object in my opinion doesn't make sense that i have to say the object it's type (the interface used).
    the object is already alive and I think it has to know the interface used to refer it even if is on another VM
    The cast operation doesn't store nothing into the current object instance?
    local code example (I don't know if with JRMI the situation is different because the different JVM)
    Map foo = new HashTable();
    I need a method like
    foo.curretUsedInterface() ... that return "Map"
    instead of
    foo.getClass().getName() that return "HashMap"
    It's possible to obtain this information or I have to try another idea to make the server distinguish the client type?
    thank you very much for your comprehension

  • How to delete customize Implementing Class for CL_EXM_IM_FI_DOCUMNT_CHECK

    Hi All,
    I used se19 to create Enhancement Spot : ARC_FI_DOCUMNT to ZARC_FI_DOCUMNT, and I created a BAdI ZFI_DOCUMNT_CHECK from FI_DOCUMNT_CHECK in ZARC_FI_DOCUMNT, then I implemented a Implementing Class ZCL_EXM_IM_FI_DOCUMNT_CHECK for method IF_EX_FI_DOCUMNT_CHECK~CHECK_FOR_ARCHIVING.
    Finally, I deleted ZARC_FI_DOCUMNT and recreate ZARC_FI_DOCUMNT by T-Code SE19 for testing, i found Implementing Class ZCL_EXM_IM_FI_DOCUMNT_CHECK program still in the SAP, but I can't delete this Implementing Class & Program.
    How can I delete program & customize Implementing class ZCL_EXM_IM_FI_DOCUMNT_CHECK In SAP?
    Best regards,
    Eric

    Hi Eric,
    Proceed as follows.
    1. Goto T-Code SE24
    2. enter your class name
    3. click delete button
    Or you can also delete classes from SE80.
    You can find class under your Package Name->Class Library->Classes
    Regards
    Ahsan
    Edited by: Ahsan Majeed on Feb 3, 2010 12:05 PM

  • Reading global attributes from implementation class

    Hi,
    How to access
                    global attributes of implementation class
                             from getter method of context node class.
    Thanks in advance,
    Srinivas.

    Hi Srinivasa,
    Access the view controller using attribute
    owner
    , Then you can access the global attributes.
    Regards,
    Masood Imrani S.

  • Best practice for Javadoc comments in both an interface and implementation

    For the Spring project I'm writing, I have interfaces with typically 1 implementation class associated with it. This is for various good reasons. So I'm trying to be very thorough with my Javadoc comments, but I realize I'm basically copying them over from interface to implementation class. Shouldn't Javadoc have a setting or be smart enough to grab the comments from my interface if the implementation class doesn't have a comment? Unless of course there is interesting information about the implementation, it's rare the 2 sets of comments would be different.

    Thanks Thomas!! Exactly what I was looking for. Here's the JavaSE 6 version of the page you provided:
    http://java.sun.com/javase/6/docs/technotes/tools/windows/javadoc.html#inheritingcomments

  • How to find Badi implementation class & Interface

    Hi Experts,
    I want to get Badi implementation class name and interface name by passing badi implementation name.
    Is there any function module to find out??
    Thanks and regards,
    Venkat.

    Hi Venkat,
    First call the method CL_EXITHANDLER=>GET_INSTANCE by passing the BADI definition name in the EXIT_NAME parameter. Whatever you get back in the INSTANCE parameter --- just pass it through the INSTANCE parameter of CL_EXITHANDLER=>GET_CLASS_NAME_BY_INTERFACE method and you will get back implementation class name in the parameter CLASS_NAME.
    For reference on how to use these methods, see the where used list for these methods which are most commonly used in all the standard SAP programs where BADI is called.
    Cheers
    Suresh

  • How to invoke a method in application module or view objects interface?

    Hi,
    perhaps a stupid RTFM question, but
    How can i invoke a method that i have published in the application modules or view objects interfaces using uiXml with BC4J?
    Only found something how to invoke a static method (<ctrl:method class="..." method="..." />) but not how to call a method with or without parameters in AM or VO directly with a uix-element.
    Thanks in advance, Markus

    Thanks for your help Andy, but i do not understand why this has to be that complicated.
    Why shall i write a eventhandler for a simple call of a AM or VO method? That splatters the functionality over 3 files (BC4J, UIX, handler). Feature Request ;-)?
    I found a simple solution using reflection that can be used at least for parameterless methods:
    <event name="anEvent">
      <bc4j:findRootAppModule name="MyAppModule">
         <!-- Call MyAppModule.myMethod() procedure. -->
          <bc4j:setPageProperty name="MethodName" value="myMethod"/>
          <ctrl:method class="UixHelper"
                  method="invokeApplicationModuleMethod"/>
       </bc4j:findRootAppModule>
    </event>The UixHelper method:
      public static EventResult invokeApplicationModuleMethod( BajaContext context,
                                                               Page page,
                                                               PageEvent event ) {
        String methodName = page.getProperty( "MethodName" );
        ApplicationModule am = ServletBindingUtils.getApplicationModule( context );
        Method method = null;
        try {
          method = am.getClass(  ).getDeclaredMethod( methodName, null );
        } catch( NoSuchMethodException e ) {
          RuntimeException re = new RuntimeException( e );
          throw re;
        try {
          method.invoke( am, null );
        } catch( InvocationTargetException e ) {
          RuntimeException re = new RuntimeException( e );
          throw re;
        } catch( IllegalAccessException e ) {
          RuntimeException re = new RuntimeException( e );
          throw re;
        return null;
      }Need to think about how to handle parameters and return values.
    Btw. Do i need to implement the EventHandler methods synchronized?
    Regards, Markus

  • How can i change an interface to a class?

    I created an interface with name XXX.
    But when i have finished and saved it,i learn the XXX was not an interface but a class.
    Then i delete the interface XXX in SE24,and creat it for a class with the same name XXX.
    But wrong message occur " There is already an object directory entry: R3TR INTF XXX".
    How can i solve the problem and creat the class with name XXX?
    Thank you very much~~

    1)Tr-cd SM30, Table/View 'TADIR', Display.
    2)Selection by Objects, Check and Input 'R3TR', 'INTF' 'XXX' .
    3)Cursor 'XXX'.
    4)menu->Objects->Delete Object Directory.
    5)Retry Tr-cd SE24.
    You should start the interface by 'Z_IF_xxx' or 'Y_IF_xxx'.

  • How to implement classes with alv's

    hi
    how to implement classes with alv's

    Hi Jyotsna,
    check this example codes.
    *"Table declarations...................................................
    TABLES:
    EKKO, " Purchasing Document Header
    CDHDR, " Change document header
    SSCRFIELDS. " Fields on selection screens
    *"Selection screen elements............................................
    SELECT-OPTIONS:
    S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
    S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
    S_EKGRP FOR EKKO-EKGRP, " Purchasing group
    S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
    S_UDATE FOR CDHDR-UDATE. " Creation date of the change
    " document
    *" Data declarations...................................................
    Field String to hold Purchase Document Number *
    DATA:
    BEGIN OF FS_EBELN,
    EBELN(90) TYPE C, " Purchase Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
    " the Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EBELN,
    Field String to hold Purchase Document Header *
    BEGIN OF FS_EKKO,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EKKO,
    Field String to hold Account Number and name of the Vendor *
    BEGIN OF FS_LFA1,
    LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
    NAME1 TYPE LFA1-NAME1, " Name1
    END OF FS_LFA1,
    Field String to hold Change date and the name of the user *
    BEGIN OF FS_CDHDR,
    OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
    OBJECTID TYPE CDHDR-OBJECTID, " Object value
    CHANGENR TYPE CDHDR-CHANGENR, " Document change number
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    END OF FS_CDHDR,
    Field String to hold Change document items *
    BEGIN OF FS_CDPOS,
    OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
    OBJECTID(10) TYPE C, " Object Value
    CHANGENR TYPE CDPOS-CHANGENR, " Document change number
    TABNAME TYPE CDPOS-TABNAME, " Table Name
    FNAME TYPE CDPOS-FNAME, " Field Name
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_CDPOS,
    Field String to hold Date Element Name *
    BEGIN OF FS_DATAELE,
    TABNAME TYPE DD03L-TABNAME, " Table Name
    FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
    ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
    END OF FS_DATAELE,
    Field String to hold Short Text of the Date Element *
    BEGIN OF FS_TEXT,
    ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    END OF FS_TEXT,
    Field String to hold data to be displayed on the ALV grid *
    BEGIN OF FS_OUTTAB,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    WERKS TYPE LFA1-WERKS, " Plant
    NAME1 TYPE LFA1-NAME1, " Name1
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_OUTTAB,
    Internal table to hold Purchase Document Number *
    T_EBELN LIKE STANDARD TABLE
    OF FS_EBELN,
    Internal table to hold Purchase Document Header *
    T_EKKO LIKE STANDARD TABLE
    OF FS_EKKO,
    Temp Internal table to hold Purchase Document Header *
    T_EKKO_TEMP LIKE STANDARD TABLE
    OF FS_EKKO,
    Internal table to hold Account number and Name of the Vendor *
    T_LFA1 LIKE STANDARD TABLE
    OF FS_LFA1,
    Internal Table to hold Change date and the name of the user *
    T_CDHDR LIKE STANDARD TABLE
    OF FS_CDHDR,
    Internal Table to hold Change document items *
    T_CDPOS LIKE STANDARD TABLE
    OF FS_CDPOS,
    Temp. Internal Table to hold Change document items *
    T_CDPOS_TEMP LIKE STANDARD TABLE
    OF FS_CDPOS,
    Internal Table to hold Data Element Name *
    T_DATAELE LIKE STANDARD TABLE
    OF FS_DATAELE,
    Temp. Internal Table to hold Data Element Name *
    T_DATAELE_TEMP LIKE STANDARD TABLE
    OF FS_DATAELE,
    Internal Table to hold Short Text of the Date Element *
    T_TEXT LIKE STANDARD TABLE
    OF FS_TEXT,
    Internal Table to hold data to be displayed on the ALV grid *
    T_OUTTAB LIKE STANDARD TABLE
    OF FS_OUTTAB.
    C L A S S D E F I N I T I O N *
    CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
    *" Data declarations...................................................
    Work variables *
    DATA:
    W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
    W_VALUE TYPE EKKO-EBELN, " Reflected Value
    W_SPACE VALUE ' ', " Space
    W_FLAG TYPE I, " Flag Variable
    W_VARIANT TYPE DISVARIANT, " Variant
    ALV Grid
    W_GRID TYPE REF TO CL_GUI_ALV_GRID,
    Event Handler
    W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
    Field catalog table
    T_FIELDCAT TYPE LVC_T_FCAT.
    AT SELECTION-SCREEN EVENT *
    AT SELECTION-SCREEN ON S_EBELN.
    Subroutine to validate Purchase Document Number.
    PERFORM VALIDATE_PD_NUM.
    AT SELECTION-SCREEN ON S_LIFNR.
    Subroutine to validate Vendor Number.
    PERFORM VALIDATE_VEN_NUM.
    AT SELECTION-SCREEN ON S_EKGRP.
    Subroutine to validate Purchase Group.
    PERFORM VALIDATE_PUR_GRP.
    START-OF-SELECTION EVENT *
    START-OF-SELECTION.
    Subroutine to select all Purchase orders.
    PERFORM SELECT_PO.
    CHECK W_FLAG EQ 0.
    Subroutine to select Object values.
    PERFORM SELECT_OBJ_ID.
    CHECK W_FLAG EQ 0.
    Subroutine to select Changed values.
    PERFORM SELECT_CHANGED_VALUE.
    CHECK W_FLAG EQ 0.
    Subroutine to Select Purchase Orders.
    PERFORM SELECT_PUR_DOC.
    Subroutine to select Vendor Details.
    PERFORM SELECT_VENDOR.
    Subroutine to select Text for the Changed values.
    PERFORM DESCRIPTION.
    END-OF-SELECTION EVENT *
    END-OF-SELECTION.
    IF NOT T_EKKO IS INITIAL.
    Subroutine to populate the Output Table.
    PERFORM FILL_OUTTAB.
    Subroutine to build Field Catalog.
    PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
    CALL SCREEN 100.
    ENDIF. " IF NOT T_EKKO...
    CLASS LCL_EVENT_HANDLER DEFINITION
    Defining Class which handles events
    CLASS LCL_EVENT_HANDLER DEFINITION .
    PUBLIC SECTION .
    METHODS:
    HANDLE_HOTSPOT_CLICK
    FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
    IMPORTING E_ROW_ID E_COLUMN_ID.
    ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION
    Implementing the Class which can handle events
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
    *---Handle Double Click
    METHOD HANDLE_HOTSPOT_CLICK .
    Subroutine to get the HotSpot Cell information.
    PERFORM GET_CELL_INFO.
    SET PARAMETER ID 'BES' FIELD W_VALUE.
    CALL TRANSACTION 'ME23N'.
    ENDMETHOD. " HANDLE_HOTSPOT_CLICK
    ENDCLASS. " LCL_EVENT_HANDLER
    *& Module STATUS_0100 OUTPUT
    PBO Event
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'OOPS'.
    SET TITLEBAR 'TIT'.
    Subroutine to fill the Variant Structure
    PERFORM FILL_VARIANT.
    IF W_GRID IS INITIAL.
    CREATE OBJECT W_GRID
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    I_PARENT = CL_GUI_CONTAINER=>SCREEN0
    I_APPL_EVENTS =
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    ERROR_CNTL_CREATE = 1
    ERROR_CNTL_INIT = 2
    ERROR_CNTL_LINK = 3
    ERROR_DP_CREATE = 4
    OTHERS = 5.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF. " IF SY-SUBRC 0
    CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT = W_VARIANT
    I_SAVE = 'A'
    I_DEFAULT = 'X'
    IS_LAYOUT =
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    IT_OUTTAB = T_OUTTAB
    IT_FIELDCATALOG = T_FIELDCAT
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    OTHERS = 4
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF. " IF SY-SUBRC 0.
    ENDIF. " IF W_GRID IS INITIAL
    CREATE OBJECT W_EVENT_CLICK.
    SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    PAI Event
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'CANCEL'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form PREPARE_FIELD_CATALOG
    Subroutine to build the Field catalog
    <--P_T_FIELDCAT Field Catalog Table
    FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
    DATA LS_FCAT TYPE LVC_S_FCAT.
    Purchasing group...
    LS_FCAT-FIELDNAME = 'EKGRP'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Number...
    LS_FCAT-FIELDNAME = 'EBELN'.
    LS_FCAT-REF_TABLE = 'EKKO' .
    LS_FCAT-EMPHASIZE = 'C411'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-HOTSPOT = 'X'.
    APPEND LS_FCAT TO PT_FIELDCAT .
    CLEAR LS_FCAT .
    Name of Person who Created the Object...
    LS_FCAT-FIELDNAME = 'ERNAM'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-OUTPUTLEN = '15' .
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Date...
    LS_FCAT-FIELDNAME = 'BEDAT'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Vendor's account number...
    LS_FCAT-FIELDNAME = 'LIFNR'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Account Number of Vendor or Creditor...
    LS_FCAT-FIELDNAME = 'NAME1'.
    LS_FCAT-REF_TABLE = 'LFA1'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Vendor Name'(001).
    LS_FCAT-SELTEXT = 'Vendor Name'(001).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Creation date of the change document...
    LS_FCAT-FIELDNAME = 'UDATE'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Change Date'(002).
    LS_FCAT-SELTEXT = 'Change Date'(002).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    User name of the person responsible in change document...
    LS_FCAT-FIELDNAME = 'USERNAME'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Modified by'(003).
    LS_FCAT-SELTEXT = 'Modified by'(003).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Short Text Describing R/3 Repository Objects...
    LS_FCAT-FIELDNAME = 'DDTEXT'.
    LS_FCAT-REF_TABLE = 'DD04T'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '15'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Old contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_OLD'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    New contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_NEW'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    ENDFORM. " PREPARE_FIELD_CATALOG
    *& Form SELECT_PO
    Subroutine to select all the Purchase Orders
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PO .
    SELECT EBELN " Purchasing Document Number
    ERNAM " Name of Person who Created
    " the Object
    LIFNR " Vendor's account number
    EKGRP " Purchasing group
    BEDAT " Purchasing Document Date
    FROM EKKO
    PACKAGE SIZE 10000
    APPENDING TABLE T_EBELN
    WHERE EBELN IN S_EBELN
    AND BEDAT IN S_BEDAT.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S401(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDFORM. " SELECT_PO
    *& Form SELECT_OBJ_ID
    Subroutine to select Object ID
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_OBJ_ID .
    IF NOT T_EBELN IS INITIAL.
    SELECT OBJECTCLAS " Object Class
    OBJECTID " Object value
    CHANGENR " Document change number
    USERNAME " User name
    UDATE " Creation date
    FROM CDHDR
    INTO TABLE T_CDHDR
    FOR ALL ENTRIES IN T_EBELN
    WHERE OBJECTID EQ T_EBELN-EBELN
    AND UDATE IN S_UDATE
    AND TCODE IN ('ME21N','ME22N','ME23N').
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Header Not Found'(031).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EBELN IS INITIAL
    ENDFORM. " SELECT_OBJ_ID
    *& Form SELECT_CHANGED_VALUE
    Subroutine to select Changed Values
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_CHANGED_VALUE .
    IF NOT T_CDHDR IS INITIAL.
    SELECT OBJECTCLAS " Object class
    OBJECTID " Object value
    CHANGENR " Document change number
    TABNAME " Table Name
    FNAME " Field Name
    VALUE_NEW " New contents of changed field
    VALUE_OLD " Old contents of changed field
    FROM CDPOS
    PACKAGE SIZE 10000
    APPENDING TABLE T_CDPOS
    FOR ALL ENTRIES IN T_CDHDR
    WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
    AND OBJECTID EQ T_CDHDR-OBJECTID
    AND CHANGENR EQ T_CDHDR-CHANGENR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Item Not Found'(032).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_CDHDR IS INITIAL
    T_CDPOS_TEMP] = T_CDPOS[.
    ENDFORM. " SELECT_CHANGED_VALUE
    *& Form SELECT_PUR_DOC
    Subroutine to select Purchase Order Details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PUR_DOC .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_EBELN BY EBELN.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
    FS_CDPOS-OBJECTID BINARY SEARCH.
    IF SY-SUBRC NE 0.
    DELETE TABLE T_EBELN FROM FS_EBELN.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDLOOP. " LOOP AT T_CDPOS...
    LOOP AT T_EBELN INTO FS_EBELN.
    MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
    MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
    MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
    MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
    MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
    APPEND FS_EKKO TO T_EKKO.
    ENDLOOP. " LOOP AT T_EBELN...
    T_EKKO_TEMP] = T_EKKO[.
    ENDIF. " IF NOT T_CDPOS IS INITIAL
    ENDFORM. " SELECT_PUR_DOC
    *& Form SELECT_VENDOR
    Subroutine to select Vendor details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_VENDOR .
    IF NOT T_EKKO IS INITIAL.
    SORT T_EKKO_TEMP BY LIFNR.
    DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
    SELECT LIFNR " Account Number of Vendor or
    " Creditor
    NAME1 " Name 1
    FROM LFA1
    INTO TABLE T_LFA1
    FOR ALL ENTRIES IN T_EKKO_TEMP
    WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
    IF SY-SUBRC NE 0.
    MESSAGE S002(M8) WITH 'Master Details'(033).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EKKO IS INITIAL
    ENDFORM. " SELECT_VENDOR
    *& Form DESCRIPTION
    Subroutine to get the description
    There are no interface parameters to be passed to this subroutine.
    FORM DESCRIPTION .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_CDPOS_TEMP BY TABNAME FNAME.
    DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
    SELECT TABNAME " Table Name
    FIELDNAME " Field Name
    ROLLNAME " Data element
    FROM DD03L
    INTO TABLE T_DATAELE
    FOR ALL ENTRIES IN T_CDPOS_TEMP
    WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
    AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
    IF NOT T_DATAELE IS INITIAL.
    T_DATAELE_TEMP] = T_DATAELE[.
    SORT T_DATAELE_TEMP BY ROLLNAME.
    DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
    SELECT ROLLNAME " Data element
    DDTEXT " Short Text Describing R/3
    " Repository Objects
    FROM DD04T
    INTO TABLE T_TEXT
    FOR ALL ENTRIES IN T_DATAELE_TEMP
    WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
    AND DDLANGUAGE EQ SY-LANGU.
    IF SY-SUBRC NE 0.
    EXIT.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_DATAELE IS INITIAL.
    ENDIF. " IF NOT T_CDPOS IS INITIAL.
    ENDFORM. " DESCRIPTION
    *& Form FILL_OUTTAB
    Subroutine to populate the Outtab
    There are no interface parameters to be passed to this subroutine.
    FORM FILL_OUTTAB .
    SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
    SORT T_EKKO BY EBELN.
    SORT T_LFA1 BY LIFNR.
    SORT T_DATAELE BY TABNAME FIELDNAME.
    SORT T_TEXT BY ROLLNAME.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
    OBJECTCLAS = FS_CDPOS-OBJECTCLAS
    OBJECTID = FS_CDPOS-OBJECTID
    CHANGENR = FS_CDPOS-CHANGENR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
    MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
    READ TABLE T_EKKO INTO FS_EKKO WITH KEY
    EBELN = FS_CDHDR-OBJECTID
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
    MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
    MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
    MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
    MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
    READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
    LIFNR = FS_EKKO-LIFNR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
    MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
    READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
    TABNAME = FS_CDPOS-TABNAME
    FIELDNAME = FS_CDPOS-FNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    READ TABLE T_TEXT INTO FS_TEXT WITH KEY
    ROLLNAME = FS_DATAELE-ROLLNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    APPEND FS_OUTTAB TO T_OUTTAB.
    CLEAR FS_OUTTAB.
    ENDLOOP.
    ENDFORM. " FILL_OUTTAB
    *& Form GET_CELL_INFO
    Subroutine to get the Cell Information
    --> W_VALUE Holds the value of Hotspot clicked
    FORM GET_CELL_INFO .
    CALL METHOD W_GRID->GET_CURRENT_CELL
    IMPORTING
    E_ROW =
    E_VALUE = W_VALUE
    E_COL =
    ES_ROW_ID =
    ES_COL_ID =
    ES_ROW_NO =
    ENDFORM. " GET_CELL_INFO
    *& Form VALIDATE_PD_NUM
    Subroutine to validate Purchase Document Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PD_NUM .
    IF NOT S_EBELN[] IS INITIAL.
    SELECT EBELN " Purchase Document Number
    FROM EKKO
    INTO W_EBELN
    UP TO 1 ROWS
    WHERE EBELN IN S_EBELN.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E717(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EBELN[]...
    ENDFORM. " VALIDATE_PD_NUM
    *& Form VALIDATE_VEN_NUM
    Subroutine to validate Vendor Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_VEN_NUM .
    IF NOT S_LIFNR[] IS INITIAL.
    SELECT LIFNR " Vendor Number
    FROM LFA1
    INTO W_LIFNR
    UP TO 1 ROWS
    WHERE LIFNR IN S_LIFNR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E002(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_LIFNR[]...
    ENDFORM. " VALIDATE_VEN_NUM
    *& Form VALIDATE_PUR_GRP
    Subroutine to validate the Purchase Group
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PUR_GRP .
    IF NOT S_EKGRP[] IS INITIAL.
    SELECT EKGRP " Purchase Group
    FROM T024
    INTO W_EKGRP
    UP TO 1 ROWS
    WHERE EKGRP IN S_EKGRP.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E622(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EKFRP[]...
    ENDFORM. " VALIDATE_PUR_GRP
    *& Form FILL_VARIANT
    Subroutine to fill the Variant Structure
    There are no interface parameters to be passed to this subroutine
    FORM FILL_VARIANT .
    Filling the Variant structure
    W_VARIANT-REPORT = SY-REPID.
    W_VARIANT-USERNAME = SY-UNAME.
    ENDFORM. " FILL_VARIANT
    REPORT YMS_HIERSEQLISTDISPLAY .
    Program with FM REUSE_ALV_HIERSEQ_LIST_DISPLAY *
    Author : Michel PIOUD *
    Email : mpioudyahoo.fr HomePage : http://www.geocities.com/mpioud *
    TYPE-POOLS: slis. " ALV Global types
    CONSTANTS :
    c_x VALUE 'X',
    c_gt_vbap TYPE SLIS_TABNAME VALUE 'GT_VBAP',
    c_gt_vbak TYPE SLIS_TABNAME VALUE 'GT_VBAK'.
    SELECTION-SCREEN :
    SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
    PARAMETERS p_max(02) TYPE n DEFAULT '10' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN :
    SKIP, BEGIN OF LINE,COMMENT 5(27) v_2 FOR FIELD p_expand. "#EC NEEDED
    PARAMETERS p_expand AS CHECKBOX DEFAULT c_x.
    SELECTION-SCREEN END OF LINE.
    TYPES :
    1st Table
    BEGIN OF ty_vbak,
    vbeln TYPE vbak-vbeln, " Sales document
    kunnr TYPE vbak-kunnr, " Sold-to party
    netwr TYPE vbak-netwr, " Net Value of the Sales Order
    erdat TYPE vbak-erdat, " Creation date
    waerk TYPE vbak-waerk, " SD document currency
    expand TYPE xfeld,
    END OF ty_vbak,
    2nd Table
    BEGIN OF ty_vbap,
    vbeln TYPE vbap-vbeln, " Sales document
    posnr TYPE vbap-posnr, " Sales document
    matnr TYPE vbap-matnr, " Material number
    netwr TYPE vbap-netwr, " Net Value of the Sales Order
    waerk TYPE vbap-waerk, " SD document currency
    END OF ty_vbap.
    DATA :
    1st Table
    gt_vbak TYPE TABLE OF ty_vbak,
    2nd Table
    gt_vbap TYPE TABLE OF ty_vbap.
    INITIALIZATION.
    v_1 = 'Maximum of records to read'.
    v_2 = 'With ''EXPAND'' field'.
    START-OF-SELECTION.
    Read Sales Document: Header Data
    SELECT vbeln kunnr netwr waerk erdat
    FROM vbak
    UP TO p_max ROWS
    INTO CORRESPONDING FIELDS OF TABLE gt_vbak.
    IF NOT gt_vbak[] IS INITIAL.
    Read Sales Document: Item Data
    SELECT vbeln posnr matnr netwr waerk
    FROM vbap
    INTO CORRESPONDING FIELDS OF TABLE gt_vbap
    FOR ALL ENTRIES IN gt_vbak
    WHERE vbeln = gt_vbak-vbeln.
    ENDIF.
    PERFORM f_display.
    Form F_DISPLAY
    FORM f_display.
    Macro definition
    DEFINE m_fieldcat.
    ls_fieldcat-tabname = &1.
    ls_fieldcat-fieldname = &2.
    ls_fieldcat-ref_tabname = &3.
    ls_fieldcat-cfieldname = &4. " Field with currency unit
    append ls_fieldcat to lt_fieldcat.
    END-OF-DEFINITION.
    DEFINE m_sort.
    ls_sort-tabname = &1.
    ls_sort-fieldname = &2.
    ls_sort-up = c_x.
    append ls_sort to lt_sort.
    END-OF-DEFINITION.
    DATA:
    ls_layout TYPE slis_layout_alv,
    ls_keyinfo TYPE slis_keyinfo_alv,
    ls_sort TYPE slis_sortinfo_alv,
    lt_sort TYPE slis_t_sortinfo_alv," Sort table
    ls_fieldcat TYPE slis_fieldcat_alv,
    lt_fieldcat TYPE slis_t_fieldcat_alv." Field catalog
    ls_layout-group_change_edit = c_x.
    ls_layout-colwidth_optimize = c_x.
    ls_layout-zebra = c_x.
    ls_layout-detail_popup = c_x.
    ls_layout-get_selinfos = c_x.
    IF p_expand = c_x.
    ls_layout-expand_fieldname = 'EXPAND'.
    ENDIF.
    Build field catalog and sort table
    m_fieldcat c_gt_vbak 'VBELN' 'VBAK' ''.
    m_fieldcat c_gt_vbak 'KUNNR' 'VBAK' ''.
    m_fieldcat c_gt_vbak 'NETWR' 'VBAK' 'WAERK'.
    m_fieldcat c_gt_vbak 'WAERK' 'VBAK' ''.
    m_fieldcat c_gt_vbak 'ERDAT' 'VBAK' ''.
    m_fieldcat c_gt_vbap 'POSNR' 'VBAP' ''.
    m_fieldcat c_gt_vbap 'MATNR' 'VBAP' ''.
    m_fieldcat c_gt_vbap 'NETWR' 'VBAP' 'WAERK'.
    m_fieldcat c_gt_vbap 'WAERK' 'VBAP' ''.
    m_sort c_gt_vbak 'KUNNR'.
    m_sort c_gt_vbap 'NETWR'.
    ls_keyinfo-header01 = 'VBELN'.
    ls_keyinfo-item01 = 'VBELN'.
    ls_keyinfo-item02 = 'POSNR'.
    Dipslay Hierarchical list
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-cprog
    i_callback_user_command = 'USER_COMMAND'
    is_layout = ls_layout
    it_fieldcat = lt_fieldcat
    it_sort = lt_sort
    i_tabname_header = c_gt_vbak
    i_tabname_item = c_gt_vbap
    is_keyinfo = ls_keyinfo
    TABLES
    t_outtab_header = gt_vbak
    t_outtab_item = gt_vbap
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " F_LIST_DISPLAY
    Form USER_COMMAND *
    FORM user_command USING i_ucomm TYPE sy-ucomm
    is_selfield TYPE slis_selfield. "#EC CALLED
    DATA ls_vbak TYPE ty_vbak.
    CASE i_ucomm.
    WHEN '&IC1'. " Pick
    CASE is_selfield-tabname.
    WHEN c_gt_vbap.
    WHEN c_gt_vbak.
    READ TABLE gt_vbak INDEX is_selfield-tabindex INTO ls_vbak.
    IF sy-subrc EQ 0.
    Sales order number
    SET PARAMETER ID 'AUN' FIELD ls_vbak-vbeln.
    Display Sales Order
    CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDCASE.
    ENDCASE.
    ENDFORM. " USER_COMMAND
    Kindly Reward Points If You Found The Reply Helpful,
    Cheers,
    Chaitanya.

  • How to implement classes and methods in badi's ?

    how to implement classes and methods in badi's? and where i have to write the code based on the requirement?can anyone explain me briefly?

    Hi
    Every BADI by default Implements an INTERFACE which already contains some methods with parameters.
    So you have to find the relavenet method based on the related paramters (by checking the fields in that paramters) you have to double click on the method and to write the code.
    see the doc
    DEFINING THE BADI
    1) execute Tcode SE18.
    2) Specify a definition Name : ZBADI_SPFLI
    3) Press create
    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
    multiple use.
    5) Choose the interface tab
    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7) Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method level desc
    Linese;ection instance methos some desc
    8) place the cursor on the method name desc its parameters to define the interface.
    Parameter type refe field desc
    I_carrid import spfli-carrid some
    I_connid import spefi-connid some
    9) save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION
    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2) Specify aname for implementation ZIM_LINESEL
    3) Specify short desc.
    4) Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5) Specify short desc for method
    6) Dbl clk on method to insert code..(check the code in “AAA”).
    7) Save , check and activate the code.
    Some useful URL
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Now write a sample program to use this badi method..
    Look for “BBB” sample program.
    “AAA”
    data : wa_flights type sflight,
    it_flights type table of sflight.
    format color col_heading.
    write:/ 'Flight info of:', i_carrid, i_connid.
    format color col_normal.
    select * from sflight
    into corresponding fields of table it_flights
    where carrid = i_carrid
    and connid = i_connid.
    loop at it_flights into wa_flights.
    write:/ wa_flights-fldate,
    wa_flights-planetype,
    wa_flights-price currency wa_flights-currency,
    wa_flights-seatsmax,
    wa_flights-seatsocc.
    endloop.
    “BBB”
    *& Report ZBADI_TEST *
    REPORT ZBADI_TEST .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli.
    Reward points for useful Answers
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

  • How to register new interface implementation?

    Hi,
    I have the following problem:
    There exists a self written webdynpro application. This application uses a Java Interface. The administrator of the application can add new functionality to the application by adding a new line to a table. He inserts the name of a class which implements that Java interface. This class has the new functionality.
    For each interface implementation the user of the webdynpro gets a value into a list. He can select an entry from this list. This value tells to the application that it has to create an object from the related java interface implementation.
    Now I wonder how I can tell to the webdynpro application that it knows all interface implementations which will come in the future? If I do not "register" or reference the new interface implementations, then I think the webdynpro application has ClassNotFound errors.
    The developers should make there own projects for each interface implementation an deploy them. But what must be done, that the webdynpro application knows them?
    Can you please give me some suggestions?
    Thank you and best regards,
    Marcus

    You can register a Mac, but not an accessory like the Time Capsule. Keep a copy of your sales receipt.....just in case.

  • How to use the implementation class in propetty pallete

    Hi,
    I am using forms 10g....I have to insert horizontal scroll bar in text item..
    I have only class files instead of jar files ...how cani place the class file instead of jar file...
    How to use the implementation class in property palette to display the PJC
    Thanks,
    Ansaf.

    The Implementation Class must reflect the full name of the class. For instance, if the full class name is : xx.yyy.zz.class_name, then put this in the Implementation Class property of the corresponding item.
    Also, the class must be stored in the equivalent directory structure, so that, in my example: <DEV_HOME>/forms/java/xx/yyy/zz
    Francois

Maybe you are looking for

  • DAX - IF statement and filters within calculated column

    Hi all, I've got a bit of a complex formula I'm trying to run, but I'm not quite there yet.  I don't know where/how/if I can place a filter within my IF statement for a calculated column due to so many variables.  I either get errors or wrong numbers

  • How do I add Channel names to my raw data using a plugin?

    I have a Campbell Scientific datalogger which outputs raw data (no headers, etc.)  I need to add channel names and units to this data for display in DIAQdem.  I know there's a way to do it, but I haven't had the class yet (coming to the base soon) an

  • Testing a File sender Scenario

    How do I test this? I have a Scenario where the outbound adapter is a File FTP and the Poll Intervals is 60sec. Everything seems okay but I cannot see the status in sxmb_moni Is there maybe a way to manually trigger this event?

  • Problems getting Epson RX420 to print

    I have just bought the MacBook Air My Epson RX420 is installed & i can scan & do a print test but when i try to print a word document i get this message Your printer may not be set up correctlyor there may be a problem with network connection. You ma

  • New Appointment creation in Meeting Room exception

    Dear KMC experts, I have a problem while creating new appointment in the collaboration room based on template "<b>Meeting Room</b>" on SAP EP KMC SPS 14. When I fill in all the information about the appointment and click on Send button, an exception