How to do OOPs in ABAP.

requesting you all,
Every reply will be awarded, if answered for atleast a question in useful manner.
1) Apart from Normal abap progrmming where we use abap-oops? say some applicatons please as detail as possible.
2) How to difine and implement classes?
a. if i want to dispaly get records from a database table and display.
b. if want to do calculations on the retrived data.
3) I am not sure about this, some where i have seen implementing objects as internal table which stores couple of records. How to do this?.
4) give some sample codes with little bit descriptions please.
Regards
Praveen

Check the following example,
You can check these simple ABAP OBJECTs programs.
ABAP_OBJECTS_ENJOY_0           Template for Solutions of ABAP Object Enjoy Course
ABAP_OBJECTS_ENJOY_1           Model Solution 1: ABAP Objects Enjoy Course      
ABAP_OBJECTS_ENJOY_2           Model Solution 2: ABAP Objects Enjoy Course      
ABAP_OBJECTS_ENJOY_3           Model Solution 3: ABAP Objects Enjoy Course      
ABAP_OBJECTS_ENJOY_4           Model Solution 4: ABAP Objects Enjoy Course      
ABAP_OBJECTS_ENJOY_5           Model Solution 5: ABAP Objects Enjoy Course      
DEMO_ABAP_OBJECTS              Complete Demonstration for ABAP Objects          
DEMO_ABAP_OBJECTS_CONTROLS     GUI Controls on Screen                           
DEMO_ABAP_OBJECTS_EVENTS       Demonstration of Events in ABAP Objects          
DEMO_ABAP_OBJECTS_GENERAL      ABAP Objects Demonstration                       
DEMO_ABAP_OBJECTS_INTERFACES   Demonstration of Interfaces in ABAP Objects      
DEMO_ABAP_OBJECTS_METHODS      Demonstration of Methods in ABAP Objects         
DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen   
regards

Similar Messages

  • How to copy/download  all ABAP programs in a text with a single report  ?

    How to copy/download  all ABAP programs in a text format with a single report/TC  ?
    How to copy/download  ABAP source code with all include programs ?....
    we need to search & copy all include programs everytime....

    Hi,
    check this link
    downloading programs
    Regards

  • How to call Webservice in abap Program

    Hi Guys,
    How can i call a abap webservice located in another server(CRM) in Bpc BADI.Is this web service is thing is possible??

    Hi,
    For calling a web service first you have to Create Proxy object using web service URL or WSDL file.
    and create logical port for that URL.
    This will generate Class and method in your system.
    After that you can use this class and method to call this web service.
    Regards,
    Arpit

  • Why and how to use events in abap objects

    Dear all,
      Please explain me why and how to use events in abap objects with real time example
    regards
    pankaj giri

    Hi Pankaj,
    I will try to explain why to use events... How to use is a different topic.. which others have already answered...
    This is same from your prev. post...
    Events :
    Technically speaking :
    " Events are notifications an object receives from, or transmits to, other objects or applications. Events allow objects to perform actions whenever a specific occurrence takes place. Microsoft Windows is an event-driven operating system, events can come from other objects, applications, or user input such as mouse clicks or key presses. "
    Lets say you have an ALV - An editable one ...
    Lats say - Once you press some button  you want some kind of validation to be done.
    How to do this ?
    Raise an Event - Which is handled by a method and write the validation code.
    Now you might argue, that I can do it in this way : Capture the function code - and call the validate method.
    Yes, in this case it can be done.. But lets say .. you change a field in the ALV and you want the validation to be done as soon as he is done with typing.
    Where is the function code here ? No function code... But there is an event here - The data changed event.
    So you can raise a data changed event that can be handled and will do the validation.
    It is not user friendly that you ask the user to press a button (to get the function code) for validation each time he enters a data.
    The events can be raised by a system, or by a program also. So in this case the data changed event is raised by a system that you can handle.
    Also, Lets say on a particular action you want some code to trigger. (You can take the same example of validation code). In this case the code to trigger is in a separate class. The object of which is not available here at this moment. (This case happens very frequently).
    Advantage with events : Event handlers can be in a separate class also.
    e.g : In the middle of some business logic .. you encounter a error. You want to send this information to the UI (to user - in form of a pop up) and then continue with some processing.
    In many cases - A direct method call to trigger the pop up is not done. Because (in ideal cases) the engine must not interact with UI directly - Because the UI could be some other application - like a windows UI but the error comes from some SAP program.
    So - A event is raised from the engine that is handled in the UI and a pop up is triggered.
    Here -- I would have different classes (lets say for different Operating Systems). And all these classes must register to the event ERROR raised in application.
    And these different classes for different Operation systems will have different code to raise a pop-up.
    Now you can imagine : If you coded a pop-up for Windows (in your application logic) .. it will not work for Mac or Linux. But of you raise a event.. that is handled separately by a different UI classes for Win, Linux or Mac  they will catch this event and process accordingly.
    May be I complicated this explanation .... but I couldn't think of a simpler and concrete example.
    Cheers.
    Varun.

  • How to create popup in ABAP webdynpro.

    Hi,
    I found lot of examples to create a popup/ model window for java webdynpro.
    Could anyone give a pointer to an example which explains how to create popup in ABAP webdynpro??
    Kind Regards
    Shahul

    Hi Thomas:
    It worked fine the 1st time. Second time when the user clicks on the button to open up the popup it dumps.
    Here is the code in the action for popup:
    data: l_cmp_api type ref to if_wd_Component,
            l_window_manager type ref to if_wd_window_manager,
            l_api type ref to if_wd_View_controller,
            l_text type string_table.
      l_cmp_api = wd_comp_controller->wd_get_api( ).
      l_window_manager = l_cmp_api->get_window_manager( ).
      if wd_this->m_popup is initial.
        wd_this->m_popup = l_window_manager->create_window(
                 window_name = 'DOCQSOW'
                 button_kind = if_wd_window=>co_buttons_ok
                 message_type = if_wd_window=>co_msg_type_none ).
               component_usage_name = 'DOCQUERY_USAGE_1'
        l_api = wd_this->wd_get_api( ).
        wd_this->m_popup->subscribe_to_button_event(
              button = if_wd_window=>co_button_ok
              button_text = 'Transfer'
              action_name = 'POPUP_CLOSED'
              action_view = l_api  ) .
        wd_this->m_popup->SET_REMOVE_ON_CLOSE( abap_true ).
       endif.
      wd_this->m_popup->open( ).
    Second time when the popup tries to open, I get the following error:
    Method: RENDER_WINDOW of program CL_WDR_WINDOW_RENDERER========CP
    Method: RENDER_WINDOW of program CL_WDR_CLIENT_SSR=============CP
    Method: RENDER_POPUP_WINDOWS of program CL_WDR_CLIENT_SSR=============CP
    Method: RENDER_WINDOWS of program CL_WDR_CLIENT_SSR=============CP
    Method: IF_WDR_RESPONSE_RENDERER~RENDER_VIEWS of program CL_WDR_CLIENT_SSR=============CP
    Method: IF_WDR_RESPONSE_RENDERER~RENDER_USER_INTERFACE_UPDATES of program CL_WDR_CLIENT_SSR=============CP
    Method: IF_WDR_CLIENT~SEND_RESPONSE of program CL_WDR_CLIENT_ABSTRACT_HTTP===CP
    Method: IF_WDR_CLIENT~SEND_RESPONSE of program CL_WDR_CLIENT_SSR=============CP
    Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Is there a way to destroy the instance of the m_popup?
    Any help is appreciated!
    Thanks

  • How to add breakpoint in abap code

    when use <i><b>java</b></i> call abap code ,
    how to add breakpoint in abap code?

    Hi,
    To start the ABAP debugger from your java client you have to set the JCO client to debug mode:
    e.g.
    yourJCOClient.setAbabDebugMode(true)
    (hope thats the right method name:-)).
    And don't forget to set also a break point of type "External" in the function module you call from your java client. For debuging, the user which calls the FM has to be a SAP User of type "<b>Dialog"</b> and has to be the rights to call RFCs, ...

  • How to use wildcards in ABAP query where condition?

    Hi,
    Please tell me how to use wildcards in ABAP qurey where condition.
    e.g. select * from mara where matnr = * (wildcard we need to use.
    Thanks & Regards,
    Gaurav T

    Do you want to query asterix * ?
    select * from mara where matnr = '*'.  "then just put it in apstrophes
    or you want certain part of string be used as * ?
    select * from mara where matnr like '%*'  "then use % sign before it
    or maybe you want something like this
    select * from mara where matnr like '%1' . "then it will look for all materials having '1' inside it
    Regards
    Marcin

  • How we can see the abap memory data

    How we can see the abap-memory data
    fine the code below
    import lsind
             report_title
             table_name
             report_field
             change_display
             show_hide
             conversion_exits
             table_description
             form_program
             select_form
             update_form
             line_size
             line_count
             records[]
             fields[]
             header_fields[]
             select_fields[]
             xrep[]
             from memory id 'LZUT5U11'.
    Regards
    santhosh
    mail-id : [email protected]

    Dear Santosh,
    ABAP MEMORY:
    A logical memory model illustrates how the main memory is distributed from the view of executable programs. A distinction is made here between external sessions and internal sessions .
    An external session is usually linked to an R/3 window. You can create an external session by choosing System/Create session, or by entering /o in the command field. An external session is broken down further into internal sessions. Program data is only visible within an internal session. Each external session can include up to 20 internal sessions (stacks).
    Every program you start runs in an internal session.
    All "squares" with rounded "corners" displayed in the status diagram represent a set of data objects in the main memory.
    The data in the main memory is only visible to the program concerned.
    CALL TRANSACTION and SUBMIT AND RETURN open a new internal session that forms a new program context. The internal sessions in an external session form a memory stack. The new session is added to the top of the stack.
    When a program has finished running, the top internal session in the stack is removed, and the calling program resumes processing.
    The same occurs when the system processes a LEAVE PROGRAM statement.
    LEAVE TO TRANSACTION removes all internal sessions from the stack and opens a new one containing the program context of the calling program.
    The ABAP memory is initialized after the program is called. In other words, you cannot transfer any data to a program called with LEAVE TO TRANSACTION via the ABAP memory.
    SUBMIT replaces the internal session of the program performing the call with the internal session of the program that has been called. The new internal session contains the program context of the called program with which it is performed.
    When a function module is called, the following steps are executed:
    A check is made to establish whether your program has called a function module of the same function group previously.
    If this is not the case, the system loads the associated function group to the internal session of the calling program as an additional program group. This initializes its global data.
    If your program used a function module of the same function group before the current call, the function module that you have called up at present can access the global data of the function group. The function group is not reloaded.
    Within the internal session, all of the function modules that you call from the same group access the global data of that group.
    If, in a new internal session, you call a function module from the same function group as in internal session 1, a new set of global data is initialized for the second internal session. This means that the data accessed by function modules called in session 2 may be different from that accessed by the function modules in session 1.
    You can call function modules asynchronously as well as synchronously. To do so, you must extend the function module call using the addition STARTING NEW TASK ''. Here, '' is a symbolic name in the calling program that identifies the external session, in which the called program is executed.
    Function modules that you call using the addition STARTING NEW TASK '' are executed independently of the calling program. The calling program is not interrupted.
    To make function modules available for local asynchronous calls, you must identify them as executable remotely (processing type: Remote-enabled module).
    There are various ways of transferring data between programs that are running in different program contexts (internal sessions). You can use:
    (1) The interface of the called program (standard selection screen, or interface of a
    subroutine, function module, or dialog module)
    (2) ABAP memory
    (3) SAP memory
    (4) Database tables
    (5) Local files on your presentation server.
    For further information about transferring data between an ABAP program and your presentation server, refer to the documentation for the function modules WS_UPLOAD and WS_DOWNLOAD.
    Function modules have an interface, which you can use to pass data between the calling program and the function module itself (there is also a comparable mechanism for ABAP subroutines). If a function module supports RFC, certain restrictions apply to its interface.
    If you are calling an ABAP program that has a standard selection screen, you can pass values to the input fields. There are two options here:
    By using a variant of the standard selection screen in the program call
    By passing actual values for the input fields in the program call
    If you want to call a report program without displaying its selection screen (default setting), but still want to pass values to its input fields, there is a variety of techniques that you can use.
    The WITH addition allows you to assign values to the parameters and select-options fields on the standard selection screen.
    If the selection screen is to be displayed when the program is called, use the addition: VIA SELECTION-SCREEN.
    Use the pattern button in the ABAP Editor to insert a program call via SUBMIT. The structure shows you the names of data objects that you can complete with the standard selection screen.
    For further information on working with variants and further syntax variants for the WITH addition, see the key word documentation in the ABAP Editor for SUBMIT.
    You can use SAP memory and ABAP memory to pass data between different programs.
    The SAP memory is a user-specific memory area for storing field values. It is available in all of the open sessions in a user's terminal session, and is reset when the terminal session ends. You can use its contents as default values for screen fields. All external sessions can access SAP memory. This means that it is only of limited use for passing data between internal sessions.
    The ABAP memory is also user-specific, and is local to each external session. You can use it to pass any ABAP variables (fields, structures, internal tables, complex objects) between the internal sessions of a single external session.
    Each external session has its own ABAP memory. When you end an external session (/i in the command field), the corresponding ABAP memory is released automatically.
    To copy a set of ABAP variables and their current values (data cluster) to the ABAP memory, use the EXPORT TO MEMORY ID statement. The (up to 32 characters) is used to identify the different data clusters.
    If you repeat an EXPORT TO MEMORY ID statement to an existing data cluster, the new data overwrites the old.
    To copy data from ABAP memory to the corresponding fields of an ABAP program, use the IMPORT FROM MEMORY ID statement.
    The fields, structures, internal tables, and complex objects in a data cluster in ABAP memory must be declared identically in both the program from which you exported the data and the program into which you import it.
    To release a data cluster, use the FREE MEMORY ID statement.
    You can import just parts of a data cluster with IMPORT, since the objects are named in the cluster.
    In the SAP memory, you can define memory areas (SET/GET parameters, or parameter IDs), which you can then address by a name of up to 20 characters.
    You can fill these memory areas either using the contents of input/output fields on screens, or using the ABAP statement:
    SET PARAMETER ID '' FIELD .
    The memory area with the name now has the value .
    You can use the contents of a memory area to display a default value in an input field on a screen.
    You can also read the memory areas from the SAP memory using the ABAP statement GET PARAMETER ID FIELD . The field then contains the value from parameter .
    The link between an input/output field and a memory area in SAP memory is inherited from the data element on which the field is based. You can enable the set parameter or get parameter attributes in the input/output field attributes.
    Once you have set the Set parameter attribute for an input/output field, you can fill it with default values from SAP memory. This is particularly useful for transactions that you call from another program without displaying the initial screen. For this purpose, you must activate the Set parameter functionality for the input fields of the first screen of the transaction.
    You can:
    (1) Copy the data that is to be used for the first screen of the transaction to be called to the parameter ID in the SAP memory. To do so, use the statement SET PARAMETER immediately before calling the transaction.
    (2) Start the transaction using CALL TRANSACTION or LEAVE TO
    TRANSACTION . If you do not want to display the initial screen, use the AND
    SKIP FIRST SCREEN addition.
    (3) The system program that starts the transaction fills the input fields that do not already have default values and for which the Get parameter attribute has been set with values from SAP memory.
    The Technical information for the input fields in the transaction you want to call contains the names of the parameter IDs that you need to use.
    Parameter IDs should be entered in table TPARA. This happens automatically if you create them via the Object navigator.
    Programs that you call using the statements SUBMIT , LEAVE TO TRANSACTION , SUBMIT AND RETURN, or CALL TRANSACTION run in their own SAP LUW, and update requests receive their own update key.
    When you use SUBMIT and LEAVE TO TRANSACTION , the SAP LUW of the calling program ends. If no COMMIT WORK statement occurred before the program call, the update requests in the log table remain incomplete and cannot be processed. They can no longer be executed. The same applies to inline changes that you make using PERFORM &#8230; ON COMMIT.
    Data that you have written to the database using inline changes is committed the next time a new screen is displayed.
    If you use SUBMIT AND RETURN or CALL TRANSACTION to insert a program and then return to the calling program, the SAP LUW of the calling program is resumed when the called program ends. The LUW processing of calling and called programs is independent.
    In other words, inline changes are committed the next time a new screen is displayed. Update requests and calls using PERFORM ... ON COMMIT require an independent COMMIT WORK statement in the SAP LUW in which they are running.
    Function modules run in the same SAP LUW as the program that calls them.
    If you call transactions with nested calls, each transaction needs its own COMMIT WORK, since each transaction maps its own SAP LUW.
    The same applies to calling executable programs, which are called using SUBMIT AND RETURN.
    The statement CALL TRANSACTION allows you to
    Shorten the user dialog when calling using CALL TRANSACTION USING .
    Determine the type of update (asynchronous, local, or synchronous) for the transaction called. For this purpose, use the addition CALL TRANSACTION USING UPDATE 'update_mode', where update_mode can have the values a (asynchronous), L (local), or S (synchronous).
    Combining the two options enables you to call several transactions in sequence (logical chain), to reduce their screen sequence, and to postpone processing of the SAP LUW 2 until processing of the SAP LUW 1 has been completed.
    When you call a function module asynchronously using the CALL FUNCTION STARTING NEW TASK ' ' statement, it runs in its own SAP LUW.
    Programs that are executed with a SUBMIT AND RETURN or CALL
    TRANSACTION statement starts their own LUW processing. You can use these to perform nested (complex) LUW processing.
    You can use function modules as modularization units within an SAP LUW.
    Function modules that are called asynchronously are suitable for programs that allow parallel processing of some of their components.
    All techniques are suitable for including programs with purely display functions.
    Note that a function module called with CALL FUNCTION STARTING NEW TASK is executed as a new logon. It, therefore, sees a separate SAP memory area. You can use the interface of the function module for data transfers.
    Example: In your program, you want to call a display transaction that is displayed in a separate window (amodal). To do so, you encapsulate the transaction call in a function module, which you set as to Remote-enabled module. You use the function module interface to accept values that you write to the SAP memory. You then call up the transaction in the function module using CALL TRANSACTION AND SKIP FIRST SCREEN. You call the function module itself asynchronously.
    Type &#8216;E' locks for nested program calls may be requested more than once from the same object. This behavior can be described as follows:
    Lock entries from function modules called synchronously increment the cumulative counter, And are therefore successful.
    Lock entries from programs called with CALL TRANSACTION or SUBMIT
    AND
    RETURN is refused. The object to be locked by the called program is displayed as already Locked by another user.
    Programs that you call using SUBMIT or LEAVE TO TRANSACTION cannot come into conflict with lock entries from the calling program, since the old program ends when the call is made. When a program ends, the system deletes all of the lock entries that it had set.
    Lock requests belonging to the same user from different R/3 windows or logons are treated as lock requests from other users.
    Regards,
    Rajesh.
    Please reward points if found helpful.

  • Work schedule: Approval field for a position - How to get it in ABAP?

    Hi all,
    could you please help me to find out how to get in a ABAP report the value of field Approval
    (RHCSHORA-CPROZT) that is shown in the Work Schedule tab in OM (PPOSE tx), starting
    from a position id? E.g. 100,00 (% of Standard value)
    Thanks in advance, bye.
    Angelo

    Hi,
    Are you asking about staffing Percentage?
    Check Table HRP1001 with relation ship A008 .
    get Weighting Percentage.
    Regards,
    Manoj.

  • How to start working in ABAP

    Hi,
    I have a friend who is a Singapore PR.
    She worked in non-SAP in IT for the past 10 yrs.
    Recently she learned ABAP(not certified).
    She dont have the experience working in a company.
    she has ABAP knowledge and can do the job.
    How can she break into the market? Will anyone share your experience how you started working in ABAP without the experience.
    Thank you so much for your reply.

    I too beleive that if you are having about 10 years of experience as an IT guy , then definately one would have developed that understanding of the function as well .
    In ABAP what i have experienced is that if you are having that business clarity or fucntion knowledge the you would think in a more effective way as compared to a newbie . As you would be aware what the problems coule be and what new would cropp in over a period of time .
    As a fresher yes you can start in ABAP but it would make your friend diffrent from the masses based on his 10 years of experience .
    Good luck .....

  • How to find hardcoded in ABAP programs

    Dear Experts,
    Please tell me how to find hardcoded in ABAP programs.

    Hi Sam,
    Generally in Abap program hardcoded strings are declared in single quotes '         .
    for ex :
    write : 'Report heading'. " search for  '   in the entire program.
    press FIND button in menu bar and type single quote  '  . and select radio button ' IN MAIN PROGRAM '
    Regards,
    Aby.

  • Urgent: how to import or transport abap class from dev to q

    How to import/transport custom abap class from dev to q.
    Any suggestions points will be awarded.
    Thanks in advance.
    MK

    hi M K,
    try SE24, your class, and go to menu 'Go to' -> object directory entry,
    click pencil icon and give your package name, will raise request.
    SE10 to release and STMS from prod to import.
    hope this helps.

  • How to translate std. ABAP report in german language to English in SAP

    Dear All,
    How to translate std. ABAP code in German language to English in SAP ?

    Hi,
    code does not need to be translated.
    Data elment descriptions, documentation, text elements, etc. can be translated in the transaction se63.
    Also you can translate almost each single object in the editor in the menue  goto-translation.
    Regards,
    Gianpietro

  • Hi guru's i  am learning ,iknow alv classical ,interactive how to use oops.

    hi guru's i know alv classical ,interactive how to use oops concept in that ,
    some one is telling oops using of oops to dovelope alv grid , actually i don't know alv grid,
    plz explain to me brefley diffrence between alv and alv grid...plz...

    Hi,
    This is the sample report for the oops concept. kindly go through that one. U will get some idea about that one.
    REPORT  YMS_CHECKBOXOOPSALV NO STANDARD PAGE HEADING.
    TYPE-POOLS: slis.
    DATA: BEGIN OF i_data OCCURS 0,
    qmnum LIKE qmel-qmnum,
    qmart LIKE qmel-qmart,
    qmtxt LIKE qmel-qmtxt,
    ws_row TYPE i,
    ws_char(5) TYPE c,
    chk,
    END OF i_data.
    DATA: report_id LIKE sy-repid.
    DATA: ws_title TYPE lvc_title VALUE 'An ALV Report'.
    DATA: i_layout TYPE slis_layout_alv.
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: i_events TYPE slis_t_event.
    DATA: i_header TYPE slis_t_listheader.
    DATA: i_extab TYPE slis_t_extab.
    SELECT qmnum
    qmart
    qmtxt
    INTO TABLE i_data
    FROM qmel
    WHERE qmnum <= '00030000010'.
    LOOP AT i_data.
    i_data-ws_row = sy-tabix.
    i_data-ws_char = 'AAAAA'.
    MODIFY i_data.
    ENDLOOP.
    report_id = sy-repid.
    PERFORM f1000_layout_init CHANGING i_layout.
    PERFORM f2000_fieldcat_init CHANGING i_fieldcat.
    PERFORM f3000_build_header CHANGING i_header.
    PERFORM f4000_events_init CHANGING i_events.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    i_callback_program = report_id
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_CALLBACK_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    i_structure_name = ' '
    I_BACKGROUND_ID = ' '
    i_grid_title = ws_title
    I_GRID_SETTINGS =
    is_layout = i_layout
    it_fieldcat = i_fieldcat
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    i_save = 'A'
    IS_VARIANT =
    it_events = i_events
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IT_ALV_GRAPHICS =
    IT_ADD_FIELDCAT =
    IT_HYPERLINK =
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = i_data
    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.
    *& Form F1000_Layout_Init
    FORM f1000_layout_init USING i_layout TYPE slis_layout_alv.
    CLEAR i_layout.
    i_layout-colwidth_optimize = 'X'.
    i_layout-edit = 'X'.
    ENDFORM. " F1000_Layout_Init
    *& Form f2000_fieldcat_init
    FORM f2000_fieldcat_init CHANGING i_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: line_fieldcat TYPE slis_fieldcat_alv.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'QMNUM'. " The field name and the table
    line_fieldcat-tabname = 'I_DATA'. " name are the two minimum req.
    line_fieldcat-key = 'X'. " Specifies the column as a key (Blue)
    line_fieldcat-seltext_m = 'Notification No.'. " Column Header
    APPEND line_fieldcat TO i_fieldcat.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'QMART'.
    line_fieldcat-ref_tabname = 'I_DATA'.
    line_fieldcat-hotspot = 'X'. " Shows the field as a hotspot.
    line_fieldcat-seltext_m = 'Notif Type'.
    APPEND line_fieldcat TO i_fieldcat.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'QMTXT'.
    line_fieldcat-tabname = 'I_DATA'.
    line_fieldcat-seltext_m = 'Description'.
    APPEND line_fieldcat TO i_fieldcat.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'WS_ROW'.
    line_fieldcat-tabname = 'I_DATA'.
    line_fieldcat-seltext_m = 'Row Number'.
    APPEND line_fieldcat TO i_fieldcat.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'WS_CHAR'.
    line_fieldcat-tabname = 'I_DATA'.
    line_fieldcat-seltext_l = 'Test Character Field'.
    line_fieldcat-datatype = 'CHAR'.
    line_fieldcat-outputlen = '15'. " You can specify the width of a
    APPEND line_fieldcat TO i_fieldcat. " column.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'CHK'.
    line_fieldcat-tabname = 'I_DATA'.
    line_fieldcat-seltext_l = 'Checkbox'.
    line_fieldcat-checkbox = 'X'. " Display this field as a checkbox
    line_fieldcat-edit = 'X'. " This option ensures that you can
    " edit the checkbox. Else it will
    " be protected.
    APPEND line_fieldcat TO i_fieldcat.
    ENDFORM. " f2000_fieldcat_init
    *& Form f3000_build_header
    FORM f3000_build_header USING i_header TYPE slis_t_listheader.
    DATA: gs_line TYPE slis_listheader.
    CLEAR gs_line.
    gs_line-typ = 'H'.
    gs_line-info = 'This is line of type HEADER'.
    APPEND gs_line TO i_header.
    CLEAR gs_line.
    gs_line-typ = 'S'.
    gs_line-key = 'STATUS 1'.
    gs_line-info = 'This is line of type STATUS'.
    APPEND gs_line TO i_header.
    gs_line-key = 'STATUS 2'.
    gs_line-info = 'This is also line of type STATUS'.
    APPEND gs_line TO i_header.
    CLEAR gs_line.
    gs_line-typ = 'A'.
    gs_line-info = 'This is line of type ACTION'.
    APPEND gs_line TO i_header.
    ENDFORM. " f3000_build_header
    *& Form f4000_events_init
    FORM f4000_events_init CHANGING i_events TYPE slis_t_event.
    DATA: line_event TYPE slis_alv_event.
    CLEAR line_event.
    line_event-name = 'TOP_OF_PAGE'.
    line_event-form = 'F4100_TOP_OF_PAGE'.
    APPEND line_event TO i_events.
    CLEAR line_event.
    line_event-name = 'PF_STATUS_SET'.
    line_event-form = 'F4200_PF_STATUS_SET'.
    APPEND line_event TO i_events.
    ENDFORM. " f3000_events_init
    FORM F4100_TOP_OF_PAGE *
    FORM f4100_top_of_page.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = i_header.
    ENDFORM.
    FORM F4200_PF_STATUS_SET *
    FORM f4200_pf_status_set USING i_extab TYPE slis_t_extab.
    REFRESH i_extab.
    PERFORM f4210_exclude_fcodes CHANGING i_extab.
    SET PF-STATUS 'STANDARD' OF PROGRAM 'SAPLSALV' EXCLUDING i_extab.
    ENDFORM.
    *& Form f4210_exclude_fcodes
    FORM f4210_exclude_fcodes USING i_extab TYPE slis_t_extab.
    DATA: ws_fcode TYPE slis_extab.
    CLEAR ws_fcode.
    ws_fcode = '&EB9'. " Call up Report.
    APPEND ws_fcode TO i_extab.
    ws_fcode = '&ABC'. " ABC Analysis.
    APPEND ws_fcode TO i_extab.
    ws_fcode = '&NFO'. " Info Select.
    APPEND ws_fcode TO i_extab.
    ws_fcode = '&LFO'. " Information.
    APPEND ws_fcode TO i_extab.
    ENDFORM. " f4210_exclude_fcodes
    Thanks,
    Sankar M

  • How could JAVA API and ABAP API useful to MDM.

    Hi Experts,
    How could JAVA API and ABAP API useful to MDM, and any coding in Java or ABAP is required in MDM.

    Hi Reema,
    Java API and ABAP API are verry usefull to MDM to integrate MDM with other SAP componants like SAP R\3, EP etc. :
    It dose not required any coding in MDM infact in JAVA API coding can be done on NWDS(Netweaver Developer Studio).And for ABAP API coding is done on SAP R\3 System in ABAP editor.
    JAVA API:
    By using Java API MDM client operations can be performed.For one need to install NWDS and to deploy some .jar files and with the help of standard classes and interfaces it can be connected to MDM server and various operations like create repository ,connect to repository ,Data mainuplation etc.
    ABAP API:
    Suppose you have an Expert abaper and you want him to perform MDM operations.In that case he need not to learn MDM basic Data types infact by doing some settings on R\3 and MDM server side an ABAPer  can perform
    MDM Cnsole and MDM Data Manager level operations.
    you can go through these links
    http://help.sap.com/javadocs/MDM/SP06/overview-summary.html
    /people/bv.pillai/blog/2006/11/28/installing-mdmtech-add-on-and-configuring-the-mdm4a-mdm-for-abap-api
    Here the coding is done on SAP R\3 system.
    hope it will give you some idea about Java API and ABAP API
    Reward if helpful
    Thanks ,
    Vinay Yadav

Maybe you are looking for

  • Cannot deploy BPEL Process from Jdeveloper

    Hello, I am using JDeveloper 10.1.3.2 on my laptop. I have Oracle SOA Suite 10.1.3 deployed and running on my laptop as well (port 8888) (running MS Vista). Some background: I can access my app server at http://127.0.0.1:8888, http://localhost:8888,

  • Issue in maintaining Long Text in Message Class

    Hi For Note implementation 1413492, I have to maintain long text, when I click on Long Text , I get a pop-up Create Modification , with 2 options for Template Type (1) Original Text (2) Template (With Headers) Can anyone let me know how to proceed fu

  • TREX creation process fails - directory name is invalid

    Hello All, I've installed a TREX instance to be linked up to two SRM instances (SRD and SRT).  I had done this successfully on a prior server, but recently we got a new server to run TREX on. When I reinstalled TREX on the new server, I have success

  • "Content Editing" is not available when I go to the Tools sidebar--how can I access these features?

    "Content Editing" is not available when I go to the Tools sidebar--how can I access these features?  I'm using Acrobat X 10.1.7.  Thanks.

  • Combining items with different fields

    I have users that want to built a report that shows all the products in the same table. Problem is certain fields will only be populated for certain products. For example, a table with 15 fields, first 5 are constant across both products, 2nd 5 only