Event handling through iterator :

Hi Experts,
I am in Account Identification tab of CRM WebUI. I confirm my BP and go to "More Fields tab".
My Requirement is i need to customize Telephone table view in Component ICCMP_BP_DETAIL/BuPaTele.
i want to make few of the columns in the table view greyed out. Even though a person press edit button, it should not get enabled.
But at the same time when i press the "Insert" Button to make new telephone entry it should enable the new row
to make entry in it.
I tried the same with GET_I method for the particular column, but it is making all the entries greyed out.
Is there any way to handle this through iterator, i mean for Insert button it should give me enabled option.
I am new in this. Please suggest me.
Thanks,
Chitrakant

Hi Chitrakant,
Let me try to help.
Take extension field for example, in program
CL_CRMCMP_B_BUPATELE_CN00
GET_I_EXTENSION
ITERATOR->TABIX is the index number of the entries in the telephone table.
for example if there is 5 entries existing, when I click on INSERT, all the 5 entries will go into GET_I_EXTENSION, and there will be an entry with TABIX = 6, and you may try to identify whether this is the final entry and only for this entry 
rv_disabled = 'FALSE'.
to enable the edit.
Regarding how to identify whether this is the newly added, didn't have it in mind yet. Excuse me for this.
Hongyan

Similar Messages

  • Event handling through SM62 in 6.0

    Hi All
    How can I create Background process event in 6.0? As when I am saving it after putting the event name and description it is not showing the name in the Background Process list.

    Solved

  • Unable to search user in preproccess event handler through request based

    User oiminternal does not have access to SEARCH entity of t<Feb 20, 2013 5:53:51 PM EST> <Warning> <oracle.adfinternal.view.faces.renderkit .rich.NavigationPaneRenderer> <BEA-000000> <ILLEGAL_COMPONENT_HIERARCHY : A chil d component that is not a commandNavigationItem (or a separator when hint=choice ) was found.>
    <Feb 20, 2013 5:54:53 PM EST> <Warning> <oracle.iam.callbacks.common> <IAM-20301 46> <[CALLBACKMSG] Are applicable policies present for this async eventhandler ? : false>
    inside demo execution single
    executeEvent{FA Territory=null, Employee Number=null, usr_locale=null, Middle Na                                                                             me=null, Date Format=null, Display Name={base=req8 re8}, Mobile=null, usr_timezo ne=null, LDAP Organization=null, Currency=null, End Date=null, Pager=null, Time Format=null, PO Box=null, Color Contrast=null, Country=null, Accessibility Mode= null, Xellerate Type=false, Email=null, Common Name=req8 re8, Last Name=re8, Sta rt Date=null, First Name=req8, Locality Name=null, usr_manager_key=null, Number Format=null, Street=null, Embedded Help=null, Department Number=null, Hire Date= null, Home Postal Address=null, Telephone Number=null, User Name Preferred Langu age=null, Font Size=null, Description=null, Home Phone=null, LDAP Organization U nit=null, Fax=null, Postal Code=null, act_key=3, User [email protected], Title=null, Generation Qualifier=null, Postal Address=null, State=null, Initial s=null, Role=OTHER, usr_password=8892:qupQumwOa9Tzu7PxKLIogA==, Password Generat ed=1, FA Language=null}
    parameter received arereq8 re8--req8---null
    in side generate Emailcname-firstName-String firstName-lastName-String lastName- postFix-NRMA
    email to be verified part1--cname.StringlastNameNRMA
    empCode in is valid email empNumber from File cname.StringlastNameNRMA
    Searching users with Email=cname.StringlastNameNRMA
    exception 29oracle.iam.platform.authz.exception.AccessDeniedException: You do no t have permission to search the following user attributes: Email.
    <Feb 20, 2013 5:54:54 PM EST> <Error> <oracle.iam.request.impl> <IAM-2050521> <U ser oiminternal does not have access to SEARCH entity of type APPROVAL_POLICY.>
    <Feb 20, 2013 5:54:54 PM EST> <Error> <oracle.iam.request.impl> <IAM-2050014> <A n error occurred while initiating approvals for request 52. The corresponding er ror message is User oiminternal does not have access to SEARCH entity of type AP PROVAL_POLICY..>
    <Feb 20, 2013 5:54:54 PM EST> <Error> <oracle.iam.request.impl> <IAM-2050534> <A n error occurred while evaluating a set of approval policies for the approval pr ocess.>
    <Feb 20, 2013 5:54:54 PM EST> <Error> <oracle.iam.request.impl> <IAM-2050014> <A n error occurred while initiating approvals for request 52. The corresponding er ror message is oracle.iam.request.exception.ApprovalPolicyAccessDeniedException: User oiminternal does not have access to SEARCH entity of type APPROVAL_POLICY. .>
    ype APPROVAL_POLICY.

    Hi,
    You need to apply one off patch to resolve this issue. Please find below metalink id for your reference.
    IAM-2050014 Oiminternal Does Not Have Access To SEARCH Entity Of Type APPROVAL_POLICY [ID 1493089.1]
    Patch Number:14036801
    Mark if this helps.
    Regards,
    Kishore

  • How to add event handler for outlook build in control through programmatically

    Hi,<o:p></o:p>
         There is requirement in my plug in where i need to intercept outlook native attach file method.If user attach more than specified
    exchange limit , i need to perform some operatoin. I found  that there is way to add "Onaction" method for built in control  like this " <command idMso="AttachFile" onAction="CatchExchangeWarning"/> ".
    I have to do the same thing via programmatically .I need to attach this event handler through programmatically since my add is not developed by xml file.
    <o:p>Thanks</o:p>

    Hello,
    It looks like you are interested in the
    BeforeAttachmentAdd event of Outlook items. It is fired before an attachment is added to an instance of the parent object. So, you can analyze the attachment object passed as a parameter and set then Cancel argument - set
    it to true to cancel the operation; otherwise, set to false to allow the Attachment to
    be added.
    Also the Outlook object model provides the
    AttachmentAdd event for Outlook items. It is fired when an attachment has been added to an instance of the parent object. You can also analyze the attachment object passed as a parameter to the event handler. You will not be able to
    cancel the action in that case.

  • Event handling - output doubled?!

    hi, i'm trying to implement some event handling through an extension of the MouseAdapter class, but the output comes out twice for some reason. code is as follows:
    note: for some reason an 'i' enclosed in square brackets isn't shown in these forums, but makes things italic... any idea how to change that?!
    public void mouseClicked(MouseEvent e)
    p = e.getPoint() ;
    for(int i = 0 ; i < myproj.length ; i++)
    rect = myproj.getDshape() ;
    System.out.println(rect.toString()) ;
    if (rect.contains(p))
    System.out.println(i) ;
    System.out.println(myproj.length) ;
    System.out.println("clicked one!") ;
    System.out.println(p.toString()) ;
    System.out.println(myproj[i].getDname() + " : " + myproj[i].getStrength() + " : " + myproj[i].getDom()) ;
    wanted++ ;
    System.out.println("Count: " + counter) ;
    counter++ ;
    } // end class MyEventHandler
    however, when i click in one of the 2 rectangles on my applet, the following output is printed:
    java.awt.Rectangle[x=521,y=50,width=25,height=25]
    0
    2
    clicked one!
    java.awt.Point[x=541,y=62]
    tom : 4.51 : 1
    Count: 0
    java.awt.Rectangle[x=571,y=80,width=25,height=25]
    java.awt.Rectangle[x=521,y=50,width=25,height=25]
    0
    2
    clicked one!
    java.awt.Point[x=541,y=62]
    tom : 4.51 : 1
    Count: 1
    java.awt.Rectangle[x=571,y=80,width=25,height=25]
    anyone got any ideas why it does this twice? i have also tried this with mousepressed and mousereleased as well as mouseclicked, but the same occurs...

    You're probably adding the mouseListener to your component twice, but you don't show that part of the code so it's hard to tell for sure.
    'i' enclosed in square brackets isn't shown in these forums, but makes things italicClick on the help link at the top of the page. It explains some formatting codes you can use to make your code easier to read.
    ... - italic
    ... - highlights java keywords and comments

  • [svn:osmf:] 17548: Remove left-over event handler, which could trigger an unnecessary event if a player loaded plugins through the config XML file and manually  (e.g.

    Revision: 17548
    Revision: 17548
    Author:   [email protected]
    Date:     2010-09-01 14:09:14 -0700 (Wed, 01 Sep 2010)
    Log Message:
    Remove left-over event handler, which could trigger an unnecessary event if a player loaded plugins through the config XML file and manually (e.g. for static plugins).
    Modified Paths:
        osmf/trunk/libs/samples/ChromeLibrary/org/osmf/chrome/configuration/PluginsParser.as

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • Event handling in portal through sap netweaver.

    Hi...
    Please let me know..how to evoke event handling in iviews..thru sap netweaver in ep.

    Hi,
    For iview event handling you can use EPCF (<b>Enterprise Portal Client Framework (EPCF) provides an infrastructure for scripting used in iViews and by the portal</b>.)
    http://help.sap.com/saphelp_nw04s/helpdata/en/ce/3e98408d953154e10000000a1550b0/frameset.htm
    /** The below link is a link to a PDF of EPCF details **/
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/771fa290-0201-0010-3d93-865e66cc6d7e
    Go to this link and download the pdf.This could be some help to you.
    Thanks
    Ritu
    /Helpfull answer will be rewarded with points/

  • First time data is not transported to pop up window through event handler

    Hi all,
    I am using NWDS 7.0, Now I want to open a pop up on click of a action link.
    There are two DCs DC-A and DC-B.
    I am calling action from DC-A to DC-B. DC-B contains view of pop up window.
    In DC-A I am using intreface controller of DC-B by using used coponents.
    Now In the DC-B used components I have created one fireplugin which is connected ith pop up view of DC-B and that firplugin is called from DC-A action to transport data from Dc-A to DC-B.
    Problem : when I click first time to open pop-up window then event handler is not called but the windows opened. When I close that window and again open the transported data start displaying on pop up window.
    So can you please help me that why first time data is not transported to pop up window.
    Thanks
    Kaushal

    You'll need to use an OARawTextBean. Oracle doesn't support opening links in new windows using OAFormattedTextBean. Just be aware that you'll need to set the CSS class in the HTML as well if you need it formatted a certain way.

  • Is there any way to send value to my attribute through event handler method

    While I give value to the img array it does not print while I call object for this class. Is there any way that I could give value for img attribute
    // Attribute
    public var img:Array;
    // Constructor
    public function ReadXML(myfile:String) {
                img=new Array();
                xmlFile=myfile;
                var loader:URLLoader=new URLLoader;
                var url:URLRequest=new URLRequest(xmlFile);
                loader.addEventListener(Event.COMPLETE,onXMLLoad);
                loader.load(url);
    // Event handling Method
            function onXMLLoad(event:Event):Array {
                var xml:XML=new XML(event.target.data);
                //trace(xml);
                //trace("Number of Contacts : " + xml..person.length());
                //trace("First contact’s favorite food : " + xml.contacts.person[0].@favoriteFood);
                img["height"]=100;
                img["width"]=200;
                return img;

    what are you trying to do?
    if img has anything to do with an image, explain.
    if img is supposed to be an associate array, use:
    var img:Object;
    img=new Object();
    etc

  • Custom event handling

    Hi,
    Please could someone help? I've been working my way through
    the examples in the book 'essential guide to flex 2 and
    actionscript 3.0'. When working through the example in chapter 10
    I've been unable to get the custom CartEvent event of type
    bookSelected to run.
    I've stored the
    small set of files in a
    zip... please could someone tell me where I'm going wrong?
    Thanks.
    Craig

    The most common definition for fireXXXEvent...public void fireXXXEvent(XXXEvent event) {
        synchronized (xxxListenerList) {
            Iterator i = xxxListenerList.iterator();
            while (i.hasNext()) {
                ((XXXListener) i.next()).xxx(event);
    }Firing the event is simple. Firing the event in a dedicated event-handling thread (a-la AWT) is less simple - set up an event queue (a-la java.awt.EventQueue) to oversee the event handling thread.
    Depending on your circumstances, chances are you won't need a separate thread. In fact, unless you specifically require multi-threading, things will be much simpler if you stick to a single thread.
    There's nothing magical about events - it is simply a useful logical representation of a physical model.

  • Javascript embedded in button pl/sql event handler not being executed

    Javascript calls not working from pl/sql button event handler. What am I missing? Are specific settings needed to execute javascript from pl/sql proceedures?
    Example: Want to toggle target='_blank' off and on in a button pl/sql event handler to open url call in new window & then reset when processing submit is done & the app returns to the form.
    portal form button's pl/sql submit handler:
    begin
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    end ;
    Putting the following in the button's javascript on_click event handler works great:
    this.form.target='_blank'
    to force opening new window with a call in the button's submit pl/sql code via:
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    but then the target='_blank' is left on when the submit is done & we return to the form.
    putting the above javascript as a function (called fcn_newpage) elsewhere (e.g., after form opens) & calling in the submit pl/sql with
    htp.p('fcn_newpage') ;
    also doesn't work.
    Metalink thought this was an application issue instead of a bug, so thought I'd see if anyone knows what's going wrong here. (Portal 9.0.4.1)

    thanks for your discussion of my post.
    Please clarify:
    "htp.p('fcn_newwindow') sends a string":
    What would you suggest the proper syntax for a function fcn_newwindow() call from a pl/sql javascript block that differs from
    htp.p('<script language="Javascript">') ;
    htp.p('fcn_newwindow');
    htp.p('</script>');
    or more simply
    htp.p('fcn_newwindow') ;
    More generally, what I'm trying to figure out is under what conditions javascript is executed, if ever, in the pl/sql of a button (either the submit or custom event handler, depending on the button).
    I've seen lots of posts asking how to do a simple htp.p('alert("THIS IS TROUBLE")') ; in a pl/sql event handler for a button on a form, but no description of how this can be done successfully.
    In addition to alerts, in my case, I'd like to call a javascript fcn from a pl/sql event handle that would pass a URL (e.g., http://www.oracle.com) where the javascript fcn executed
    window.open(URL). The API call to set_target(URL) in pl/sql has no ability to open in a new window, so calling that is inadequate to my needs and I must resort to javascript.
    Its clear in the PL/SQL of a button, you can effect form components since p_session..set_target & p_session.get_target set or get the contents of form components.
    So to see if javascript ever works, I tried to focus on something simple that only had to set what amounts to an enviromental variable when we returned to the form after a post. I chose to try to change the html value of TARGET from javascript in the PL/SQL button because it doesn't need to be implemented until we finish the post and return to the form.
    So I focused on a hack, setting this.form.TARGET='_blank' in the on_click event handler that forced every subsequent URL call or refresh of the form to be a new window. I then wanted to turn off opening new windows once I'd opened the URL call in a new window by setting TARGET='' in the portal form. I can achieve what I want by coding this.form.TARGET='' in the javascript (on_focus, on_change, or on_mousedown, ...) of every form component that might refresh the form. However, that is a ridiculous hack when a simple htp.p('<script>') ; htp.p('this.form.target=""') ; htp.p('</script>') ; at the end of the button's pl/sql event handle should do the same thing reliably if javascript ever works in the pl/sql event handler.
    If we didn't have access to form components through p_session calls, I'd assume it was a scope issue (what is available from the pl/sql event handler). But unless my syntax is just off, when, if ever, can javascript be used in a portal form's pl/sql event handler for a button?
    if I code a javascript funtion in the forms' pl/sql before displaying form:
    htp.p('<script language="JavaScript">') ;
    htp.p('function fcn_new_window(URL)') ;
    htp.p('window.open(URL)' ) ;
    htp.p('</script>') ;
    the function can be called from a button's on_click javascript event handler:
    fcn_new_window('http://www.oracle.com')
    but from the same button's pl/sql submit event handler this call doesn't work: htp.p('fcn_new_window("http://www.oracle.com")')
    So my questions remain: Is there other syntax I need, or does javascript ever work properly from the pl/sql of a form button's event handler? If it doesn't work, isn't this a bug that should be fixed by Oracle?
    I can probably figure out hacks to make things work the way I need, but executing javascript from pl/sql event handlers seems to be the expected way to affect portal html pages (forms, reports, ...) and it seems not to work as expected. I don't feel I should have to implement hacks for something as simple as calling a javascript function from pl/sql when almost every example I've found in metalink or the forums or Oracle Press's "portal bible" suggests using javascript from pl/sql via the utility htp.p() to effect web page components in portal.
    My TAR on the subject, while still open, returned the result basically: "We can reproduce your situation. Everything looks okay to us, but we can't explain how to use javascript where you want or point you to any documentation that would solve your problem or expain why it should not work the way you want it to. We don't feel its a technical issue. Why don't you post the problem on the portal applications forum."
    I'm hoping I'm just missing something fundamental and everything will work if I implement it a little differently. So if anyone sees my error, please let me know.
    by the way, not sure this is germain, but in reference to your comment:
    "redirections in pl/sql procedures give a peculiar result. in a pl/sql procedure, usually, portals give the last redirection statement and ignore anything else coming after it."
    if I try to raise an alert:
    htp.p('alert("you screwed up")');
    return;
    in a pl/sql event handler, it still doesn't raise the alert, even though its the last thing implemented in the event handler. But if I set the value of a text box using p_session..set_value_as_string() at the same spot, it correctly sets the text box value when I return to the form.

  • How to Call Event Handler Method in Another view

    Hi Experts,
                       Can anybody tell me how to call Event handler Method which is declared in View A ,it Should be Called in
      view B,Thanks in Advance.
    Thanks & Regards
    Santhosh

    hi,
    1)    You can make the method EH_ONSELECT as public and static and call this method in viewGS_CM/ADDDOC  using syntax
        impl class name of view GS_CM/DOCTREE=>EH_ONSELECT "method name.
                 or
    2)The view GS_CM/ADDDOC which contains EH_ONSELECT method has been already enhanced, so I can't execute such kind of operation one more time.
                         or
    3)If both views or viewarea containing that view are under same window , then you can get the instance ofGS_CM/DOCTREE from view GS_CM/ADDDOC  through the main window controller.
    lr_window = me->view_manager->get_window_controller( ).
        lv_viewname = 'GS_CM/DOCTREE '.
      lr_viewctrl ?=  lr_window ->get_subcontroller_by_viewname( lv_viewname ).
    Now you can access the method of view GS_CM/DOCTREE .
    Let me know in case you face any issues.
    Message was edited by: Laure Cetin
    Please do not ask for points, this is against the Rules of Engagement: http://scn.sap.com/docs/DOC-18590

  • Question related to PO Event Handler

    Hi Experts
    I am facing issues related to PO Header Event Handler:
    1. When I make change to Statistical Delivery Date under Delivery Schedule tab in ECC, The PO Header EH is getting deleted in EM. May I know the reason behind this? Please suggest how to avoid this.
    2. When I am deleting one of PO Items, the PO Header EH is also getting deleted in EM. When I undelete the PO Item, my PO Item EH is active again but PO Header Eh is still in deleted status. Please suggest how to correct this.
    I really appreciate your quick answers to this.
    Regards
    Ravi

    Hi Steffen
    When we tried to analyse through debugging, for the first issue, we found that the standard application tables PURCHASE_ORDER_HEADER_NEW and PURCHASE_ORDER_HEADER_OLD delivered by SAP for BPT ESC_PURORD, are not having the value D for DeleteVal. column. When we have put this manually for testing purpose, the issues are resolved. But we do not know the impact of putting this value here as standard SAP did not deliver it that way.
    When we observed tables of other BPT, this value D is there. Please throw some light on this before we go ahead and make changes.
    Thanks
    Ravi

  • BSP extension "download" - event handling problem

    Folks,
    First of all, I apologize if the answer is already out there, but I spent quite some time to find the solution for my problem but finally gave up:
    I implemented the Download extension from Brian's and Tom's book. Since I am using an MVC based app, I put the event handling in the DO_HANDLE_EVENT of a controller instead of the OnInputProcessing event of a page. Here's how my app is designed:
    I have a main controller that has an execute button to trigger a data selection based on some selection criteria. The result of this selection is displayed by means of a subcontroller with tableviews that are wrapped into my “zdownload” extension. Everything works fine: I make my selections, execute the app through the button of the main controller and get my result shown in the tableviews. I push the download icon, select my file format (XLS, HTML etc), get the dialog to choose whether to download or to display the file, perfect!
    But now – after I processed the download successfully - if I click the execute button in the main controller again, I still get the download dialog. It looks like the created event for the download does not get cleared. As I mentioned, I searched through SDN, but all I found were referrals to the call of DISPATCH_INPUT( ) in DO_REQUEST of the main controller, but unfortunately this one is already implemented.
    Any ideas?
    Thanks,
    Guenther

    There is an attribute of the download extension called display_url. You pass a value to the extension telling it what cached URL contains the binary content for your download.  if this display_url attribute has a value assigned to it, then the element will render an iFrame to call the URl.  However if the display_url attribute is empty, it won't render the iFrame.  I suspect that you have a stateful application and after your download event you aren't clearing whatever field that you pass into the display_url attribute.

  • Event handling in oops alv

    hi experts,
    event double click.
    when double click  on vbeln it should go to va03 transaction . how would i do that in oops alv.

    hai,
    you can go through code below .
    *& Report  Z_CLARIFY                                                   *
    REPORT  Z_CLARIFY                               .
    DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: L_VALID TYPE C,
          V_FLAG,
          V_DATA_CHANGE,
          V_ROW TYPE LVC_S_ROW,
          V_COLUMN TYPE LVC_S_COL,
          V_ROW_NUM TYPE LVC_S_ROID.
    DATA: IT_ROW_NO TYPE LVC_T_ROID,
          X_ROW_NO TYPE LVC_S_ROID.
    DATA:BEGIN OF  ITAB OCCURS 0,
         VBELN LIKE LIKP-VBELN,
         POSNR LIKE LIPS-POSNR,
         CELLCOLOR TYPE LVC_T_SCOL, "required for color
         DROP(10),
         END OF ITAB.
    *The Below Definitions Must.....
    DATA:
    Reference to document
           DG_DYNDOC_ID       TYPE REF TO CL_DD_DOCUMENT,
    Reference to split container
           DG_SPLITTER          TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
    Reference to grid container
           DG_PARENT_GRID     TYPE REF TO CL_GUI_CONTAINER,
    Reference to html container
           DG_HTML_CNTRL        TYPE REF TO CL_GUI_HTML_VIEWER,
    Reference to html container
           DG_PARENT_HTML     TYPE REF TO CL_GUI_CONTAINER.
    "up to here
          CLASS lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
    **Hot spot Handler
        HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                          IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
    **Double Click Handler
        HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                                         IMPORTING E_ROW E_COLUMN ES_ROW_NO,
        TOP_OF_PAGE FOR EVENT TOP_OF_PAGE              "event handler
                             OF CL_GUI_ALV_GRID
                             IMPORTING E_DYNDOC_ID.
           END_OF_LIST FOR EVENT end_of_list              "event handler
                            OF CL_GUI_ALV_GRID
                            IMPORTING E_DYNDOC_ID.
    ENDCLASS.                    "lcl_event_handler DEFINITION
          CLASS lcl_event_handler IMPLEMENTATION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    *Handle Hotspot Click
      METHOD HANDLE_HOTSPOT_CLICK .
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW_ID.
        V_COLUMN = E_COLUMN_ID.
        V_ROW_NUM = ES_ROW_NO.
       MESSAGE I000 WITH V_ROW 'clicked'.
        CLEAR IT_ROW_NO[].
        X_ROW_NO-ROW_ID = V_ROW.
        APPEND X_ROW_NO TO IT_ROW_NO .
        CALL METHOD G_GRID->SET_SELECTED_ROWS
          EXPORTING
            IT_ROW_NO = IT_ROW_NO.
      ENDMETHOD.                    "lcl_event_handler
    *Handle Double Click
      METHOD  HANDLE_DOUBLE_CLICK.
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW.
        V_COLUMN = E_COLUMN.
        V_ROW_NUM = ES_ROW_NO.
        IF E_COLUMN = 'VBELN'.
          SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
          CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
        ENDIF.
        IF E_COLUMN = 'POSNR'.
          SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
          CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN."
        ENDIF.
      ENDMETHOD.                    "handle_double_click
    METHOD END_OF_LIST.                   "implementation
    Top-of-page event
       PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
    ENDMETHOD.                            "top_of_page
        METHOD TOP_OF_PAGE.                   "implementation
    Top-of-page event
        PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
      ENDMETHOD.                            "top_of_page
    ENDCLASS.                    "LCL_EVENT_HANDLER IMPLEMENTATION
    *&             Global Definitions
    DATA:      G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
    "Container1
                G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
    DATA: OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM,
          G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST',
          GS_LAYOUT TYPE LVC_S_LAYO.
    data: v_lines type i.
    data: v_line(3) type c.
    *- Fieldcatalog for First and second Report
    DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT,
          X_FIELDCAT TYPE LVC_S_FCAT,
          LS_VARI  TYPE DISVARIANT.
                   START-OF_SELECTION
    START-OF-SELECTION.
      SELECT VBELN
             POSNR
             FROM LIPS
             UP TO 20 ROWS
             INTO CORRESPONDING FIELDS OF TABLE ITAB.
    describe table itab lines v_lines.
    END-OF-SELECTION.
      IF NOT ITAB[] IS INITIAL.
        CALL SCREEN 100.
      ELSE.
       MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
      ENDIF.
    *&      Form  CREATE_AND_INIT_ALV
          text
    FORM CREATE_AND_INIT_ALV .
      DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
      "attention.....from here
      "split your container here...into two parts
      "create the container
      CREATE OBJECT G_CUSTOM_CONTAINER
               EXPORTING CONTAINER_NAME = 'SCR100_CUST'.
      "this is for top of page
    Create TOP-Document
      CREATE OBJECT DG_DYNDOC_ID
                       EXPORTING STYLE = 'ALV_GRID'.
    Create Splitter for custom_container
      CREATE OBJECT DG_SPLITTER
                 EXPORTING PARENT  = G_CUSTOM_CONTAINER
                           ROWS    = 2
                           COLUMNS = 1.
    Split the custom_container to two containers and move the reference
    to receiving containers g_parent_html and g_parent_grid
      "i am allocating the space for grid and top of page
      CALL METHOD DG_SPLITTER->GET_CONTAINER
        EXPORTING
          ROW       = 1
          COLUMN    = 1
        RECEIVING
          CONTAINER = DG_PARENT_HTML.
      CALL METHOD DG_SPLITTER->GET_CONTAINER
        EXPORTING
          ROW       = 2
          COLUMN    = 1
        RECEIVING
          CONTAINER = DG_PARENT_GRID.
    CALL METHOD DG_SPLITTER->GET_CONTAINER
       EXPORTING
         ROW       = 2
         COLUMN    = 1
       RECEIVING
         CONTAINER = DG_PARENT_HTML.
    CALL METHOD DG_SPLITTER->GET_CONTAINER
       EXPORTING
         ROW       = 1
         COLUMN    = 1
       RECEIVING
         CONTAINER = DG_PARENT_GRID.
      "you can set the height of it
    Set height for g_parent_html
      CALL METHOD DG_SPLITTER->SET_ROW_HEIGHT
        EXPORTING
          ID     = 1
          HEIGHT = 5.
      "from here as usual..you need to specify parent as splitter part
      "which we alloted for grid
      CREATE OBJECT G_GRID
             EXPORTING I_PARENT = DG_PARENT_GRID.
    Set a titlebar for the grid control
      CLEAR GS_LAYOUT.
      GS_LAYOUT-GRID_TITLE = TEXT-003.
      GS_LAYOUT-ZEBRA = SPACE.
      GS_LAYOUT-CWIDTH_OPT = 'X'.
      GS_LAYOUT-NO_ROWMARK = 'X'.
      GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
      CREATE OBJECT G_HANDLER.
      SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
      SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
    SET HANDLER G_HANDLER->END_OF_LIST FOR G_GRID.
      SET HANDLER G_HANDLER->TOP_OF_PAGE FOR G_GRID.
      DATA: LS_CELLCOLOR TYPE LVC_S_SCOL. "required for color
      DATA: L_INDEX TYPE SY-TABIX.
      "Here i am changing the color of line 1,5,10...
      "so you can change the color of font conditionally
      LOOP AT ITAB.
        L_INDEX = SY-TABIX.
        IF L_INDEX = 1 OR L_INDEX = 5 OR L_INDEX = 10.
          LS_CELLCOLOR-FNAME = 'VBELN'.
          LS_CELLCOLOR-COLOR-COL = '6'.
          LS_CELLCOLOR-COLOR-INT = '0'.
          LS_CELLCOLOR-COLOR-INV = '1'.
          APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
          MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
          LS_CELLCOLOR-FNAME = 'POSNR'.
          LS_CELLCOLOR-COLOR-COL = '6'.
          LS_CELLCOLOR-COLOR-INT = '0'.
          LS_CELLCOLOR-COLOR-INV = '1'.
          APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
          MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
        ENDIF.
      ENDLOOP.
    setting focus for created grid control
      CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
        EXPORTING
          CONTROL = G_GRID.
    Build fieldcat and set editable for date and reason code
    edit enabled. Assign a handle for the dropdown listbox.
      PERFORM BUILD_FIELDCAT.
      PERFORM  SET_DRDN_TABLE.
    Optionally restrict generic functions to 'change only'.
      (The user shall not be able to add new lines).
      PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
    **Vaiant to save the layout
      LS_VARI-REPORT      = SY-REPID.
      LS_VARI-HANDLE      = SPACE.
      LS_VARI-LOG_GROUP   = SPACE.
      LS_VARI-USERNAME    = SPACE.
      LS_VARI-VARIANT     = SPACE.
      LS_VARI-TEXT        = SPACE.
      LS_VARI-DEPENDVARS  = SPACE.
    **Calling the Method for ALV output
      CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          IS_VARIANT           = LS_VARI
          IS_LAYOUT            = GS_LAYOUT
          I_SAVE               = 'A'
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = ITAB[].
      "do these..{
    Initializing document
      CALL METHOD DG_DYNDOC_ID->INITIALIZE_DOCUMENT.
    Processing events
      CALL METHOD G_GRID->LIST_PROCESSING_EVENTS
        EXPORTING
          I_EVENT_NAME = 'TOP_OF_PAGE'
          I_DYNDOC_ID  = DG_DYNDOC_ID.
      "end }
    Set editable cells to ready for input initially
      CALL METHOD G_GRID->SET_READY_FOR_INPUT
        EXPORTING
          I_READY_FOR_INPUT = 1.
    ENDFORM.                               "CREATE_AND_INIT_ALV
    *&      Form  EXCLUDE_TB_FUNCTIONS
          text
         -->PT_EXCLUDE text
    FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
    Only allow to change data not to create new entries (exclude
    generic functions).
      DATA LS_EXCLUDE TYPE UI_FUNC.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
    *&      Form  build_fieldcat
          Fieldcatalog
    FORM BUILD_FIELDCAT .
      DATA: L_POS TYPE I.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
      X_FIELDCAT-FIELDNAME = 'VBELN'.
      X_FIELDCAT-TABNAME = 'IT_FINAL'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-NO_ZERO    = 'X'.
      X_FIELDCAT-OUTPUTLEN = '10'.
      X_FIELDCAT-HOTSPOT = 'X'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Item'(025).
      X_FIELDCAT-FIELDNAME = 'POSNR'.
      X_FIELDCAT-TABNAME = 'IT_FINAL'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Drop'(025).
      X_FIELDCAT-FIELDNAME = 'DROP'.
      X_FIELDCAT-TABNAME = 'IT_FINAL'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      X_FIELDCAT-EDIT = 'X'.
      X_FIELDCAT-DRDN_HNDL = '1'.
      X_FIELDCAT-DRDN_ALIAS = 'X'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
    ENDFORM.                    " build_fieldcat
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF G_CUSTOM_CONTAINER IS INITIAL.
    **Initializing the grid and calling the fm to Display the O/P
        PERFORM CREATE_AND_INIT_ALV.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    there are many such examples
    goto->se38->type bcalv* and press f4, u can see many examples.
    Reward points if helpful.
    Thanks and regards
    Swetha Singh.

Maybe you are looking for

  • DPS Single for small deployment

    Hi all, I'm hoping you can help me figure out how best to go about makeing something happen for a client. I need to get a single folio out, but only to 5 ipads. I know I could just use adobe content viewer, but that looks sloppy and the recipeients o

  • Freezing Issue

    I just downloaded the latest version of iTunes today, and when I try to open it the application freezes. It shows up in my running processes on my computer, but it does not actually open. I have repaired the install as well as uninstalled/reinstalled

  • Cannot Connect to Nokia Suite

    Hi, As my Nokia was running bit slow, i did a hard reset by pressing *#7370#, the phone was not connected to PC. After the phone was restarted, I cannot connect to the Nokia Suite on my laptop. It seems it cannot even realise that a phone is connecte

  • Database Migration To ASM

    Hi i am using oracle 10.2 in windows 2003 server in test environment when i tried to migrate the database from os file system to ASM it give me the following error Error Examine and correct the following error(s), then retry the operation. Remote Ope

  • RCA input connector?

    On Sun Ray 1, 100, 150 models, there is an RCA connector on the rear for video input. However, I can't find much documentation on how to use this. The only application that I've been able to find that says it can work with this input is SunForum (a v