ABAP OO Class and Change Documents

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

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

Similar Messages

  • MM02 - Enable options change number, change overview and change documents

    I am with the following problem: I enter the transaction MM02, I enter the material 1000765, I select the view "Classification". Later I access the environment option from the menu bar and options for change number, change overwiew and change documents are disabled.
    How do I enable these options change number, change overview and change documents?
    Regards,
    Sérgio Salomã

    Hi Sergio,
    If we activate the change documents for classification data, then we will be able to see the CHANGE DOCUMENTS for characteristic values through CL20N transaction (CL20N via menu ENVIRONMENT --> Change Documents) or MM02.
    For reference please check SAP Note 65124.
    For enabling change documents for classification data in SPRO --> Cross-Application Components --> Classification System --> Classes --> Maintain Object Types and Class Types.
    In this enter into MARA table entry. Inside that corresponding to the respective CLASS TYPE (say 001) enable the CHANGE DOCS check box in Classifications part (For enabling this please check SAP Note 65124). Then for this CLASS TYPE (say 001) inside the OBJECTS folder, enable the CHANGE DOCS CLASS checkbox also.
    Now in MM02 and in CL20N under menu Environment --> Change Documents you can view all the changes done to that characteristic values.
    Once the change documents is activated, then we can get the change documents details in CDHDR and CDPOS tables. The OBJECTCLAS may be "CLASSIFY". We can also use the "CLLA_CHANGE_DOC_CLASSIFICATION" function module to fetch the data from these tables.
    Hope this helps in solving your issue.
    Thanks and Regards,
    Harish kumar.

  • Configuring BW to Report Change Requests and Change Documents

    We upgraded to Solution Manager 4.0 on DB2 and need to extract the Change Request and Change Document tables to BW for reporting. We know that there is an internal Transaction Monitor, but we need to also report using BEx Analyzer for users who will not log into Solution Manager.
    We found one table CRMD_ORDERADM_H for some Change Request fields, but cannot find the tables for the rest. Does someone know the tables where these fields reside?  Thank you.
    <u><b>CHANGE REQUEST</b></u>
    <b><u>Screen Name     Table</u></b>
    Priority     
    Category     
    Description     CRMD_ORDERADM_H
    Sold-to Party     
    Requester                      COMT_PARTNER_TO_DISPLAY
    Change Manager     
    Change Advisory Board     
    Ibase     
    Product     
    Subject     
    External Reference     CRMD_SALES
    Date     
    Change Request ID     CRMD_ORDERADM_H
    Decision Date     
    Implementation Date     
    Time of Entry     
    Change Request Log     
    Description of Change     
    Change Request Status     
    <u><b>CHANGE DOCUMENT</b></u>
    <u><b>Screen Name     Table</b></u>
    Change Document ID     
    Status     
    Description     
    IT Operator     
    Implementation Date     
    Time of Entry     
    Overview

    We upgraded to Solution Manager 4.0 on DB2 and need to extract the Change Request and Change Document tables to BW for reporting. We know that there is an internal Transaction Monitor, but we need to also report using BEx Analyzer for users who will not log into Solution Manager.
    We found one table CRMD_ORDERADM_H for some Change Request fields, but cannot find the tables for the rest. Does someone know the tables where these fields reside?  Thank you.
    <u><b>CHANGE REQUEST</b></u>
    <b><u>Screen Name     Table</u></b>
    Priority     
    Category     
    Description     CRMD_ORDERADM_H
    Sold-to Party     
    Requester                      COMT_PARTNER_TO_DISPLAY
    Change Manager     
    Change Advisory Board     
    Ibase     
    Product     
    Subject     
    External Reference     CRMD_SALES
    Date     
    Change Request ID     CRMD_ORDERADM_H
    Decision Date     
    Implementation Date     
    Time of Entry     
    Change Request Log     
    Description of Change     
    Change Request Status     
    <u><b>CHANGE DOCUMENT</b></u>
    <u><b>Screen Name     Table</b></u>
    Change Document ID     
    Status     
    Description     
    IT Operator     
    Implementation Date     
    Time of Entry     
    Overview

  • Urgent: Extraction of CRM Survey  and change documents

    Hi BW Experts,
    My requirement is to extract CRM Survey which is linked to Activities as XML file and Change documents from CRM to BW. I know what are the datasources we need to use inorder to extract the Survey data to BW some of them are : 0SVY_DATA_1;0SVY_QUEST_TEXT and 0SVY_ANSWER_TEXT but I am confused in mapping Survey questions to BW as they may be of 200 char do we need to split them or is there anyother way we can map please would anyone suggest me steps to extract the Survey data from CRM to BW i.e from activation to Cube mainly I am worried about how do we map Survey questions to BW objects.
    And also I need to extract Change documents,i.e changes made to the created opportunity,activity transactions, from CRM to BW as the changes are not stored in DB tables but we can view them in extras menu->change documents I think they are linked to transaction number but i donot know how to pull them to BW.Would anyone put some light on it. I appreciate it in advance.
    Thanks in advance
    Regards
    Kishore.

    Hi Kishore,
    I have no experience in CRM extraction in BW.
    Did you try to use 'Propose Transfer Rules' function to map objects from extract structure to the comm structure. I am assuming that you have activated all the required Business Content and replicated your extract structures.
    Why do you want to map field by field? May be I did not understand your question?

  • Project version and Change documents

    Hi,
    1) What is the difference between project version and Change documents?
    2) For Network say 100000, how to create different versions ( version 1,2,3.....)
    Regards,
    Prasad

    Hi ,
    Given below is the scenario:
    The project is having WBS and network created using assembly processing. The network say 10000 has got activities with work center (WC) and activity types 1,2 and 3.
    The requirement is:
    For the same network 10000 with the above activity types, Is it possible to create different work centers WC1, WC2 AND WC3 for Version 1, 2 and 3.
    ie,
    Network -
    work center----
    version
    10000  -
       WC----
    Nil
    10000--WC1--
    Version 1
    10000--WC2--
    Version 2
    10000--WC3--
    Version 3
    if it is possible, can any body tell me the procedure for the same.
    Regards,
    Prasad

  • PO Line item deletion and change documents

    Hello All
    We have cases where when we delete certain lines of a Purchase order, a change document gets created while for certain other lines it doesn't. Has anyone expereienced this issue before ? Any solutions on how to resolve it please ?

    Yes we find such problems in purchase orders such as
    - deleting PO line item
    - Add PO line item
    - change qty
    We had restricted through ABAP program plus release indicator.
    Check..,,,
    Vijay

  • Entry Document and Change Document in SAP FM

    Dear Expert,
    In SAP FM when we enter a budget through FMBB, system create the entry document and creates change document automatically with the original document
    could you please explain what is the difference between 2 documents. and justify system behavior when system creates 2 change documents for the same entry document (sometimes)
    Thanks & Regards

    Hi Richa,
    a good place to start would be the Master Guide to NW 7.4 SR1 on SAP Market Place which is here.
    The guide goes through everything for planning a NW installation including of course Portal and planning the Landscape design and architectura questions.
    Best regards,
    Andy.

  • PM orders and change documents

    Hi all,
    I have to activate change documents fuctionality in order to know how changes PM order and what does.
    I don't find the customizing path to activate this functionality: may anyone halp me?
    Thanks.

    Hi
    Change documents records the changes to the order header  are displayed in the form of an action log. Therefore, if you want to know who released or completed an order, you must enter an X here for the relevant order type
    Change document is activate for the combination of plnning plant and order type.
    Path-
    Plant Maintenance and Customer Service>Maintenance and Service Orders>Functions and Settings for Order Types-->Define Change Docs, Collective Purc. Req. Indicator, Operation No. Interval
    Regards
    Anil Kumar

  • BC4J Classes and API Document

    Folks,
    We need to make a quick decision whether we will build our application using BC4J as our J2EE framework. I have gone through some documents from Oracle web site and Jdeveloper's tutorial and BC4J samples. But I fail to see any published class diagrams or APIs for this framework. Are there any published documents (UML, API, etc)? Without those, how can we be confident that we are going to build something correctly? Could you please share your insights on this?
    Have you build any real applications or products using BC4J? Are you aware of real large applications built based on BC4J?
    Thanks,
    Yibing

    Yibling,
    We supply full JavaDoc with the BC4J framework, so in the normal JavaDoc way you can click on the
    packages page and see the class hierarchy. BC4J comes with online help/documentation that explains the concepts and details details how to use the features as well, but alas that does not include a UML diagram.
    If I were going to use a UML diagram to try and explain the key interfaces in the oracle.jbo.* package and how they relate and what are some key methods on them, I might use our UML modeler in JDeveloper to produce a diagram like this:
    In fact, I just did :-)

  • Access and change documents property with KM API

    Hi,
    I am trying to access KM with the KM API to change some document properties.
    I tried following cod, but I get errors for the IUser:
    IService service = PortalRuntime.getRuntimeResources().getService(IUserManagementService.KEY);
    com.sapportals.portal.security.usermanagement.IUser user =  WPUMFactory.getUserFactory().getEP5User((IUser)request.getUser().getUser());
    IResourceContext context = new ResourceContext(user);
    RID path = RID.getRID("/documents/Access/mydoc.doc");
    IResource res;
    res = ResourceFactory.getInstance().getResource(path, context);
    response.write("ResourceDisplay Name"+res.getDisplayName());
    IPropertyName propName;
    propName = new PropertyName("http://sapportals.com/xmlns/cm/rendering","displayname");
    IMutablePropertyMap map = new MutablePropertyMap();
    IProperty property;
    response.write(map.get(propName).toString());
    property = new Property(propName, "Asia");
    map.put(property);
    res.setProperty(property);
    Does anybody have an example code? Or can anybody help me?
    Thank you
    Regards
    Ismail

    Hi,
    This should work:
    com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getEP5User(request.getUser());
    Make sure you added a sharing reference for "com.sap.km.application" in your portalapp.xml.
    Best regards,
    Avishai Zamir

  • ChaRM Change Request and Change Documents if withdraw

    Hi groupies,
    my problem is this:
    we did copy the standard transaction sdcr etc. to zdcr etc.
    If I release a zdcr a new transaction zdmi (normal correction) will be created. I switch into the new transaction type zdmi and  withdraw the transaction zdmi. Now I go back into the transaction zdcr. In the Standard SDCR you must release the SDCR again. But in my case the status is still "released". What is the problem? Know anyone the problem?
    nico

    Hi.
    Search for customizing section "Make settings for Change Transaction Types"
    Select ZDMI and assign the following:
    Assign Action: SET_PREDOC for user status "withdrawn" (check table TJ30 or the corresponding status profile via customizing). It's something like "E0xx"
    Specify Status Attributes: Fill in the appropriate information, especially user status ("E0xx" - same as above), transaction type (ZDCR), Statusprofile (status profile used for ZDCR, i.e. ZDCRHEAD) and user status which ZDCR should be reset to (i.e. "E0001 to be approved" or "E0003 rejected")
    If you just want to be able to create another ZDMI you could also add an action condition to your ZDCR.
    (Tx: SPPFCADM -> CRMD_ORDER -> Condition Configuration)
    Hope this helps.
    /cheers

  • Query on variances and changed documents?

    Hi Friends
    To what documents on SuS side tolerances can be appled and what tolerances are available for these documents.
    Is there a link of Version Control with WFL. What impact Version Control is there on purchasers side and suppliers side when they are using SuS.Please let me know
    Regards
    Andrew
    Edited by: andrewleeod on Dec 17, 2009 3:16 PM

    Hi All,
    Can you please help me understanding the use of
    BTCTRNS1 and BTCTRNS2 in process chain scheduling and de-scheduling. As if we say the
    BTCTRNS1 will suspend all the job which are released then what about the job which are still not released. Is that means that those job will run as usual. If no shall we good to use these TWO program in our production system for de-scheduling and scheduling of Process chain. As scheduling and de-scheduling huge number of PC is really time taking.
    Any quick answer on this will be appreciated.
    Thank you in advance.
    Kind Regards,
    Chandan Praharaj.

  • ABAP Classes and BADIs for HR

    Hi all,
    Can anyone give me a list of classes SAP has released for HR use by customers and all utility ABAP classes. Also any utility abap classes that would be useful for future. I am only interested in those relevant for ECC 5 and up.
    Could you supply the BADIs or Enhancement Spots for HR too.
    Thanks
    Wayne

    The BADI's I have found most useful are the BADI exits that duplicate the existing PA30 PAI / PBO User exits.  If you trace back to where the exits are called you will find the BADI call within a few lines of code - but the difference is that the BADI is called outside one layer of IF logic, so it gets called in some circumstances where the user exits do not - I think this was to do with certain change or copy data situations.
    Can't remember the name of the BADI, and do not have a system available to check at present, but it was not hard to find when I looked in the system.
    Others I have used are as exits in the HR to FI posting interface, and also some in the travel to vendor interface.  There is also an exit for customising the PERNR search help - cannot remember if this was a class or a FM.
    For moving data inside the user exits in a unicode compliant way there are classes for moving data from the flat PRELP character structure to individual infotype structures - CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN and CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP.
    For general unicode compliant constants such as a Tab character there is class CL_ABAP_CHAR_UTILITIES with attributes like CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    Also if you go to SE38, select the Blue "Online Help" button, and then go to the ABAP Overview, you will find under the ABAP by Theme branch an entry "ABAP System Classes and Interfaces" which documents 20+ general ABAP classes
    Hope this helps
    Andrew

  • ABAP proxy class - data structure

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

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

  • Could you please send me the material Opps concepts Classes and Methods

    Hi Experts,
    I am working on Opps concepts.I am new to this concept.
    Could you please send me the detailed presentation on Abap oops.
    Thanks inadvance,
    Regards,
    Rekha.

    Hi this will help u.
    OOPs ABAP uses Classes and Interfaces which uses Methods and events.
    If you have Java skills it is advantage for you.
    There are Local classes as well as Global Classes.
    Local classes we can work in SE38 straight away.
    But mostly it is better to use the Global classes.
    Global Classes or Interfaces are to be created in SE24.
    SAP already given some predefined classes and Interfaces.
    This OOPS concepts very useful for writing BADI's also.
    So first create a class in SE 24.
    Define attributes, Methods for that class.
    Define parameters for that Method.
    You can define event handlers also to handle the messages.
    After creation in each method write the code.
    Methods are similar to ABAP PERFORM -FORM statements.
    After the creation of CLass and methods come to SE38 and create the program.
    In the program create a object type ref to that class and with the help of that Object call the methods of that Class and display the data.
    Example:
    REPORT sapmz_hf_alv_grid .
    Type pool for icons - used in the toolbar
    TYPE-POOLS: icon.
    TABLES: zsflight.
    To allow the declaration of o_event_receiver before the
    lcl_event_receiver class is defined, decale it as deferred in the
    start of the program
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    G L O B A L I N T E R N A L T A B L E S
    *DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
    To include a traffic light and/or color a line the structure of the
    table must include fields for the traffic light and/or the color
    TYPES: BEGIN OF st_sflight.
    INCLUDE STRUCTURE zsflight.
    Field for traffic light
    TYPES: traffic_light TYPE c.
    Field for line color
    types: line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    G L O B A L D A T A
    DATA: ok_code LIKE sy-ucomm,
    Work area for internal table
    g_wa_sflight TYPE st_sflight,
    ALV control: Layout structure
    gs_layout TYPE lvc_s_layo.
    Declare reference variables to the ALV grid and the container
    DATA:
    go_grid TYPE REF TO cl_gui_alv_grid,
    go_custom_container TYPE REF TO cl_gui_custom_container,
    o_event_receiver TYPE REF TO lcl_event_receiver.
    DATA:
    Work area for screen 200
    g_screen200 LIKE zsflight.
    Data for storing information about selected rows in the grid
    DATA:
    Internal table
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    C L A S S E S
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
    METHODS:
    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING
    e_object e_interactive,
    handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
    IMPORTING e_ucomm.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    METHOD handle_toolbar.
    Event handler method for event toolbar.
    CONSTANTS:
    Constants for button type
    c_button_normal TYPE i VALUE 0,
    c_menu_and_default_button TYPE i VALUE 1,
    c_menu TYPE i VALUE 2,
    c_separator TYPE i VALUE 3,
    c_radio_button TYPE i VALUE 4,
    c_checkbox TYPE i VALUE 5,
    c_menu_entry TYPE i VALUE 6.
    DATA:
    ls_toolbar TYPE stb_button.
    Append seperator to the normal toolbar
    CLEAR ls_toolbar.
    MOVE c_separator TO ls_toolbar-butn_type..
    APPEND ls_toolbar TO e_object->mt_toolbar.
    Append a new button that to the toolbar. Use E_OBJECT of
    event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
    This class has one attribute MT_TOOLBAR which is of table type
    TTB_BUTTON. The structure is STB_BUTTON
    CLEAR ls_toolbar.
    MOVE 'CHANGE' TO ls_toolbar-function.
    MOVE icon_change TO ls_toolbar-icon.
    MOVE 'Change flight' TO ls_toolbar-quickinfo.
    MOVE 'Change' TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.
    APPEND ls_toolbar TO e_object->mt_toolbar.
    ENDMETHOD.
    METHOD handle_user_command.
    Handle own functions defined in the toolbar
    CASE e_ucomm.
    WHEN 'CHANGE'.
    PERFORM change_flight.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMETHOD.
    ENDCLASS.
    S T A R T - O F - S E L E C T I O N.
    START-OF-SELECTION.
    SET SCREEN '100'.
    *& Module USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
    CASE ok_code.
    WHEN 'EXIT'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module STATUS_0100 OUTPUT
    MODULE status_0100 OUTPUT.
    DATA:
    For parameter IS_VARIANT that is sued to set up options for storing
    the grid layout as a variant in method set_table_for_first_display
    l_layout TYPE disvariant,
    Utillity field
    l_lines TYPE i.
    After returning from screen 200 the line that was selected before
    going to screen 200, should be selected again. The table gi_index_rows
    was the output table from the GET_SELECTED_ROWS method in form
    CHANGE_FLIGHT
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines > 0.
    CALL METHOD go_grid->set_selected_rows
    EXPORTING
    it_index_rows = gi_index_rows.
    CALL METHOD cl_gui_cfw=>flush.
    REFRESH gi_index_rows.
    ENDIF.
    Read data and create objects
    IF go_custom_container IS INITIAL.
    Read data from datbase table
    PERFORM get_data.
    Create objects for container and ALV grid
    CREATE OBJECT go_custom_container
    EXPORTING container_name = 'ALV_CONTAINER'.
    CREATE OBJECT go_grid
    EXPORTING
    i_parent = go_custom_container.
    Create object for event_receiver class
    and set handlers
    CREATE OBJECT o_event_receiver.
    SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
    SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
    Layout (Variant) for ALV grid
    l_layout-report = sy-repid. "Layout fo report
    Setup the grid layout using a variable of structure lvc_s_layo
    Set grid title
    gs_layout-grid_title = 'Flights'.
    Selection mode - Single row without buttons
    (This is the default mode
    gs_layout-sel_mode = 'B'.
    Name of the exception field (Traffic light field) and the color
    field + set the exception and color field of the table
    gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
    gs_layout-info_fname = 'LINE_COLOR'.
    LOOP AT gi_sflight INTO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    Value of traffic light field
    g_wa_sflight-traffic_light = '1'.
    Value of color field:
    C = Color, 6=Color 1=Intesified on, 0: Inverse display off
    g_wa_sflight-line_color = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
    g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    ENDIF.
    MODIFY gi_sflight FROM g_wa_sflight.
    ENDLOOP.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING i_structure_name = 'SFLIGHT'
    is_variant = l_layout
    i_save = 'A'
    is_layout = gs_layout
    CHANGING it_outtab = gi_sflight.
    *-- End of grid setup -
    Raise event toolbar to show the modified toolbar
    CALL METHOD go_grid->set_toolbar_interactive.
    Set focus to the grid. This is not necessary in this
    example as there is only one control on the screen
    CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid.
    ENDIF.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0200 INPUT
    MODULE user_command_0200 INPUT.
    CASE ok_code.
    WHEN 'EXIT200'.
    LEAVE TO SCREEN 100.
    WHEN'SAVE'.
    PERFORM save_changes.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0200 INPUT
    *& Form get_data
    FORM get_data.
    Read data from table SFLIGHT
    SELECT *
    FROM zsflight
    INTO TABLE gi_sflight.
    ENDFORM. " load_data_into_grid
    *& Form change_flight
    Reads the contents of the selected row in the grid, ans transfers
    the data to screen 200, where it can be changed and saved.
    FORM change_flight.
    DATA:l_lines TYPE i.
    REFRESH gi_index_rows.
    CLEAR g_selected_row.
    Read index of selected rows
    CALL METHOD go_grid->get_selected_rows
    IMPORTING
    et_index_rows = gi_index_rows.
    Check if any row are selected at all. If not
    table gi_index_rows will be empty
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines = 0.
    CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
    EXPORTING
    textline1 = 'You must choose a line'.
    EXIT.
    ENDIF.
    Read indexes of selected rows. In this example only one
    row can be selected as we are using gs_layout-sel_mode = 'B',
    so it is only ncessary to read the first entry in
    table gi_index_rows
    LOOP AT gi_index_rows INTO g_selected_row.
    IF sy-tabix = 1.
    READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
    ENDIF.
    ENDLOOP.
    Transfer data from the selected row to screenm 200 and show
    screen 200
    CLEAR g_screen200.
    MOVE-CORRESPONDING g_wa_sflight TO g_screen200.
    LEAVE TO SCREEN '200'.
    ENDFORM. " change_flight
    *& Form save_changes
    Changes made in screen 200 are written to the datbase table
    zsflight, and to the grid table gi_sflight, and the grid is
    updated with method refresh_table_display to display the changes
    FORM save_changes.
    DATA: l_traffic_light TYPE c.
    Update traffic light field
    Update database table
    MODIFY zsflight FROM g_screen200.
    Update grid table , traffic light field and color field.
    Note that it is necessary to use structure g_wa_sflight
    for the update, as the screen structure does not have a
    traffic light field
    MOVE-CORRESPONDING g_screen200 TO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    g_wa_sflight-traffic_light = '1'.
    C = Color, 6=Color 1=Intesified on, 0: Inverse display off
    g_wa_sflight-line_color = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
    g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    clear g_wa_sflight-line_color.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    clear g_wa_sflight-line_color.
    ENDIF.
    MODIFY gi_sflight INDEX g_selected_row-index FROM g_wa_sflight.
    Refresh grid
    CALL METHOD go_grid->refresh_table_display.
    CALL METHOD cl_gui_cfw=>flush.
    LEAVE TO SCREEN '100'.
    ENDFORM. " save_changes
    chk this blog
    /people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
    with regards,
    Hema.
    pls give points if helpful.

Maybe you are looking for

  • Fill a text file from java code

    Hello, I've written a java code to insert some informations in a database and I also want to save the same informations in text files (.txt). Thanks you for your suggestions or your advice of a tutorial that can help me to perform successfully this t

  • Tabular form with select list not updating

    I have created a tabular form with a dynamic select list select primary_key, column1, htmldb_item.select_list_from_query(10,column2, 'select descr d, column_value r from lookup_table where column_value = '||column1) column2 from main_table The select

  • I cannot find an option in iphone4s to lock on GSM (2g) network. Similar option is available in iPhone 4.

    I cannot find an option in iphone4s to lock on GSM (2g) network. Similar option is available in iPhone 4.

  • Drop menus with mask and invisible movie clip

    please see this navigation interface: http://www.hearightnow/yogamater/ when the mouse is outside of the drop menus, the drop menus "hide" behind the outside of a mask, when the mouse enters the drop menus, they move up. An invisible movie clip the t

  • TextEdit Default Font/Background Color

    I'm hoping to set TextEdit to have all new plain text documents open with a specific font and background color.  When I make changes in the New Document tab of the application's preferences, clicking the "Change-" button by "Plain text font" allows m