Adding user to the oracle database using database link - is it possible?

Hi, i wolud like to manage my databases using one client. I easilly operate on my distriubuted tables but i have problem with creating users in distribiuted database. Is it possible to create users in distributed database using database links? or it have to be done locally using some stored procedures or sth similar?

The SQL syntax of the CREATE USER statement doesn't support DB links, the only way to do it would be with stored procedures. There might be an Oracle SP for that or for generic remote execution of SQL, but I'm not familiar with such.

Similar Messages

  • Set User preferences in oracle portal’s database in portal environment

    Hi All,
    I need to set User preferences in oracle portal’s database in portal environment.
    I need to get some oracle PL/SQL API for the said purpose.
    In user preferences I need to save Preference name and preference value.
    Can any one have idea?
    Regards
    Amit Tiwari

    http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1014/index.html
    and http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1014/wwpre_api_name.html
    Patrick.

  • What is the difference between using the command "dsmgmt" and the "Managed By" tab when adding users to the local administrators Account on a Read-Only Domain Controller?

    When I use the
    "dsmgmt" command to add a user to the local administrators account of a RODC I can actually see the user when I use the "Show Role Administrators" parameter. However, I can't see the members of the
    group added to the "Managed By" tab of the RODC object in AD. Even though, the users added using
    "dsmgmt" and by the "Managed By" tab can all log in locally and have admin rights to the RODC. Are there any differences between these two ways of adding users to the local administrators account? 

    Hi,
    For groups, managedBy is an administrative convenience to designate “group admins”. Whatever principal listed in
    managedBy gets permission to update a group’s membership (the actual security is updated on the group’s AD object to allow this).
    In Win2008 and later managedBy also became the way you delegated local administration on an RODC, allowing branch admins to install patches, manage shares, etc. (http://technet.microsoft.com/en-us/library/cc755310(WS.10).aspx). 
    On the RODC, this is updating the RepairAdmin registry value within RODCRoles.
    So the difference between them should be only the way they do the same thing.
    For more details, please refer to the below article:
    http://blogs.technet.com/b/askds/archive/2011/06/24/friday-mail-sack-wahoo-edition.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to install the Oracle Enterprise Manager Database Tuning ?

    Hi,
    How to install the Oracle Enterprise Manager Database Tuning with the Oracle Tuning Pack
    Release 9.0.1
    And where to get download this.
    Thank u..!

    The only way you can get 9iR1 release software is by asking it to your Oracle representative. The oldest 9i release available for public download is 9iR2.
    You could try the administrative 9iR2 client, it can work with 9iR1 releases.
    ~ Madrid.

  • Online backup of the Oracle Collaboration Suite Database automatically ever

    Hi everybody!
    How to perform an online backup of the Oracle Collaboration Suite Database automatically every half-hour (every 10 minutes)?
    Thanks a lot for your helps.

    Hi,
    Take a look at the Backup and Recovery Basics book in the Administration section of the Database library. This will explain how ArchiveLog works.
    richard

  • How can i create a new and tableless database using database configuration

    How can i create a new and tableless database using database configuration

    How can i create a new and tableless database using database configuration
    Just don't install the sample schemas. See the installation guide
    http://docs.oracle.com/cd/E11882_01/server.112/e10831/installation.htm
    Using the Database Configuration Assistant
    When you install Oracle Database with the Oracle Universal Installer, the sample schemas are installed by default if you select the Basic Installation option. Selecting the sample schemas option installs all five schemas (HR, OE, PM, IX, and SH) in the database. If you choose not to install the sample schemas at that time, you can add them later by following the instructions in section "Manually Installing Sample Schemas".
    Choose a custom install and don't install the sample schemas.
    All other schems/tables installed are REQUIRED by Oracle

  • Problem opening reports with a user in the Oracle Directory.

    I have already followed all the steps in the user's guide to run reports with a user in the Oracle Directory.
    I accessed the enterprise security manager and created the mandatory xml publisher roles, besides I created another role. I added user A to the new role I created.
    I accessed then the administrator tab in XML publisher. I went to roles and the role I created was there. When I tried to add a folder. I'm able to add the folder there. I click on apply and then when I enter in the security Settings again the folder is not there anymore.
    I get the following error in the log:
    [021207_103218621][][EXCEPTION] oracle.apps.xdo.servlet.resources.ResourceNotFoundException: /opt/oracle/infra2/j2ee/home/xmlpublisher
    /Admin/Security/security.xml
    When I access xml publisher with the user A, who belongs to the new role I'm working with, I'm not able to see any folder, nor anything else.
    Do you have any ideas about what could be going wrong?
    Thanks,
    Joaquin

    Can you replay how? I have been facing this problem for nearly 3 months without any solution. Please help me.
    Debarati

  • How do I ensure user name is shown rather than 'another user' on the 'File in Use' dialog box?

    How can I ensure user names are shown rather than just 'another user' on the 'File in Use' dialog box that appears when attempting to edit a checked out document in Microsoft Word/Excel? 
    All suggestions welcome. 

    If I recall correctly, that dialog is generated by the Office client product supporting that file type. There would be no way to modify it.
    Trevor Seward
    Follow or contact me at...
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to generate oracle sequence using Database Designer Transformer

    I created Entity Relationship Diagram.I can generate Table relavant to that every entity.(using Database Design Transformer).Normaly the Database Design Transformer tries to find a suitable unique key that can be used as the primary key. If it cannot find one, it creates a surrogate primary key.it create sequence for that surrogate key.But I didn't want that.I want generate sequence only the attribute that have primary key.how can i do

    So a digital pulse??

  • Error apdapting database using database utility(transaction se11)

    Hello;
         We have a several z* tables of an aplicattion running for a year in a production enviroment. We have to change 4 data elements used in these tables.
       These elements were QUAN 4 decimals 0 and we have to pass to QUAN 4 decimals 2. I have change the data element in the devolopment enviroment by adjusting these tables with database utility(transaction se11) without problems. The values were transformed adding 2 decimals.
       I try to do the same in the quality eviroment(production copy) and appears an error adapting these fields. The tables have a lot of registers (more  than 100.000 ) the error DBIF_RSQL_SQL_ERROR; the table appears in the dicctionary but it is not created in the ORACLE.
         Do you know how can I finish this step?. It is possible these transformation QUAN 4 decimals 0 to QUAN 4 decimals 2?? In development I have not problem.
       Thanks in advanced.

    Hi Thomas;
    I have analysed the short dump; I and the "error analysis"; and debugged where it fails. ... and I can't find a solution...
    I paste the code where it fails...
             INSERT QCM8ZSD11 CLIENT SPECIFIED                      
                FROM TABLE QCM8ZSD11_TAB ACCEPTING DUPLICATE KEYS.  
    The temporal table generated is QCM8ZSD11 and the original the ZSD11.
    It fails in the 5 step.
       1 Initialization                                                                      
       2 Dropping of indexes, renaming of original table                                     
       3 No action                                                                               
    4 Activation of transparent table                                                     
       5 Conversion of data to new table, deletion of renamed table                          
       6 Creation of sec. indexes                                                                               
    Adjustment terminated in step 5                                                                               
    Initial table                         Table type                 Status                  
    ZSD11                                 Transparent                Renamed                 
    Renamed original table                                                                   
    QCMZSD11                              transparent                Existent                
    Tgt.table                                                                               
    ZSD11                                 Transparent                Renamed                                                                               
    Thanks in advanced.

  • I cannot log into the oracle account using GNOME interface

    I'm receiving the following message when trying to log into the oracle OS account with the GNOME interface turned on:
    GDM could not write to your authorization file. This could mean that you are out of disk space or that your home directory could not be opened for writing. In any case, it is not possible to log in. Please contact your system administrator.
    I can successfully ssh into the oracle account via a terminal window session.
    df -h on the host does not show a problem with disk space:
    [root@oel1 ~]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00
    3.9G 2.6G 1.1G 71% /
    /dev/xvda1 99M 13M 81M 14% /boot
    tmpfs 513M 0 513M 0% /dev/shm
    /dev/mapper/VolGroup00-u02
    20G 173M 19G 1% /u02
    /dev/mapper/VolGroup00-u03
    20G 1.9G 17G 10% /u03
    /dev/mapper/VolGroup00-u01
    20G 44M 19G 1% /u01
    /dev/mapper/VolGroup00-orabin
    7.9G 147M 7.4G 2% /orabin
    /dev/mapper/VolGroup00-tmp
    2.0G 68M 1.9G 4% /tmp
    /dev/mapper/VolGroup00-home
    2.0G 68M 1.9G 4% /home
    Some searching on the internet indicated that the .Xauthority file was the problem.
    I noticed that there was no .Xauthority file in the /home/oracle directory. I logged into the oracle OS account via a terminal session and issued the command mkxauth -c. This created an .Xauthority file in my /home/oracle directory. The file has the following permissions which look like they match other hosts we have the Oracle Database running on:
    -rw------- 1 oracle oinstall 265 2011-03-08 13:32 /home/oracle/.Xauthority
    Any heal is greatly appreciated.
    JS

    Thanks for the replies. I obviously had something screwed up in my environment in terms of file permissions.
    I decided that since I am new to Oracle VM and management of the Oracle Enterprise Linux VM templates, and that this was a new instance of the OEL5 template installation, I would start over. So I unzipped the OEL5 template, copied over my vm.cfg file which configures the template instance and brought up a new copy of the OEL5 VM instance. I then logged into it as root, changed the oracle account password and started the GNOME interface with telinit 5 command.
    I was then able to log in successfully to the oracle account via the GNOME interface.
    Thanks for the replies.
    John S.

  • Two users (on the same Mac) using same RAID simultaneously?

    O.K. I know you should never never ever connect two different Macs to the same RAID unless using Xsan. . .
    How about connecting two users on the same Mac simultaneously?
    In other words, can I have one user manipulating data on the RAID in the background while reading the data using a second user (on the same Mac)?
    Thanks,
    Ed

    That depends on the application in question.
    Since all the data requests are coming from the same Mac, you don't have the issues you would have if you had two different machines talking at the same time.
    However, it now depends on whether the application(s) you're using supports file locks.
    As long as the application that's manipulating the data properly locks the part of the file it's working on, and that the application you're using to read the file reads the locks and knows whether or not it's OK to use that part of the file, you should be OK.

  • How connect the oracle/Linux using ODBC

    I want to connect the Oracle which install on Linux using Odbc, so my win98 machine can connect with the oracle.
    But I don't know how to do ? May I install some Odbc driver in the Linux machine? and install odbc driver in my win98 machine?
    my email: [email protected]

    You may use this way:
    1. Start on the server (Linux) Net*8 listener (lsnrctl start)
    2. Install on the client (win98) Net*8 and configure it (Net8 Easy Configuration)
    3. Install on the client (win98) ODBC drivers for ORACLE (by ORACLE or others) and configure it

  • Can multiple users on the same PC use Elements 11

    I can access Elements 11 as myself but other users on the same PC can see the images but when the image is clicked it comes as a missing file. 

    Nothing to do with the software itself, you need to adjust your user privileges and file permissions and possibly manually reinstate some file associations stuff. Refer to some basics here:
    Installation Preparations
    Mylenium

  • Error whil adding Header to the ALV grid using OO

    Hi Guys,
                 I want to display the Header for the ALV grid using Splitter .
    when i am doing like that .I am getting  a screen on the top of that screen I am getting a EMPTY screen .I don't know why likat.
    What i need is just to display a Grid with header?Can anybody Please help me reagarding this problem.
    the Code is Below.
    *& Report  Z_TEST_PGM
    REPORT  Z_TEST_PGM NO STANDARD PAGE HEADING
                                      LINE-SIZE 120 MESSAGE-ID zotc.
    Tables : CKMLMV003 , CKMLMV001.
    TYPE-POOLS: slis.
    Types : Begin of t_CKMLMV003_out,
                 WERKS type CKMLMV003-WERKS,
                 MATNR type CKMLMV003-MATNR,
                 MISCH_VERH type CKMLMV003-MISCH_VERH,
                 KALNR_BAL type CKMLMV003-KALNR_BAL,
                 GJAHR type CKMLMV003-GJAHR,
                 PERIO type CKMLMV003-PERIO,
                 MGTYP type CKMLMV003-MGTYP,
            End of t_CKMLMV003_out,
            Begin of t_CKMLMV001_out,
                 MATNR type CKMLMV001-MATNR,
                 KALNR type CKMLMV001-KALNR,
                 LIFNR_ND type CKMLMV001-LIFNR_ND,
                 EKORG_ND type CKMLMV001-EKORG_ND,
            End of t_CKMLMV001_out,
            Begin of t_CKMLMV003_Temp,
                 MATNR type CKMLMV003-MATNR,
                 GJAHR type CKMLMV003-GJAHR,
                 PERIO type CKMLMV003-PERIO,
            End of t_CKMLMV003_Temp,
            Begin of t_Final_out,
                 MATNR type CKMLMV003-MATNR,
                 GJAHR type CKMLMV003-GJAHR,
                 PERIO type CKMLMV003-PERIO,
                 WERKS type CKMLMV003-WERKS,
                 LIFNR_ND1 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH1 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND2 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH2 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND3 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH3 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND4 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH4 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND5 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH5 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND6 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH6 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND7 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH7 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND8 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH8 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND9 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH9 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND10 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH10 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND11 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH11 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND12 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH12 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND13 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH13 type CKMLMV003-MISCH_VERH,
             End of t_Final_out,
           Begin of t_Final_out1,
                 MATNR type CKMLMV003-MATNR,
                 GJAHR type CKMLMV003-GJAHR,
                 PERIO type CKMLMV003-PERIO,
                 LIFNR_ND1 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH1 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND2 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH2 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND3 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH3 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND4 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH4 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND5 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH5 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND6 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH6 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND7 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH7 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND8 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH8 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND9 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH9 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND10 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH10 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND11 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH11 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND12 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH12 type CKMLMV003-MISCH_VERH,
                 LIFNR_ND13 type CKMLMV001-LIFNR_ND,
                 MISCH_VERH13 type CKMLMV003-MISCH_VERH,
             End of t_Final_out1.
                          Global Structures                              *
    Data : i_CKMLMV003_str   type   t_CKMLMV003_out,
           i_CKMLMV001_str   type   t_CKMLMV001_out,
           i_Final_str   type  t_Final_out,
           i_Final_str1   type  t_Final_out,
           i_CKMLMV003_Temp type   t_CKMLMV003_Temp.
                              Global Internal Tables                        *
    Data : i_CKMLMV003_out   type standard table of  t_CKMLMV003_out,
           i_CKMLMV001_out  type standard table of  t_CKMLMV001_out,
           i_Final_out   type standard table of  t_Final_out,
           i_Final_out1   type standard table of  t_Final_out.
    ALV Report Internal tables    *
    DATA : t_fieldcatalog TYPE slis_t_fieldcat_alv,
           s_fieldcatalog TYPE slis_fieldcat_alv,
           t_basic_fieldcatalog TYPE slis_t_fieldcat_alv,
           s_basic_fieldcatalog TYPE slis_fieldcat_alv,
           t_sort  TYPE slis_t_sortinfo_alv,
           v_repid TYPE sy-repid.
    *ALV Header declarations
    Data: t_header type slis_t_listheader,
          i_header_str type slis_listheader,
          i_line_event_str TYPE slis_alv_event,
          i_events TYPE slis_t_event,
          wa_layout  type slis_layout_alv.
    Data : grid1 type ref to cl_gui_alv_grid,
           g_custom_container1 type ref to cl_gui_custom_container,
           grid2 type ref to cl_gui_alv_grid,
           g_custom_container2 type ref to cl_gui_custom_container,
           i_FCAT TYPE  LVC_T_FCAT,
           i_FCAT_str type lvc_s_fcat,
    Structure  for layout
          i_layout_s   TYPE  lvc_s_layo,
           gt_final1 type table of  t_Final_out.
    DATA: CCCONTAINER1 TYPE SCRFNAME VALUE 'CCCONTAINER1',
          CCCONTAINER2 TYPE SCRFNAME VALUE 'CCCONTAINER2',
          G_PARENT_TOP TYPE REF TO CL_GUI_CONTAINER ,
          G_SPLITTER   TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
          G_DYNDOC_ID  TYPE REF TO CL_DD_DOCUMENT,
          G_PARENT_GRID TYPE REF TO CL_GUI_CONTAINER.
                          Global Variables                              *
    Data :cnt(4) type n value '0',
          g_plant type CKMLMV003-WERKS ,
          g_QuanTStr type CKMLMV003-MGTYP ,
          g_PurchOrg type CKMLMV001-EKORG_ND,
          flag type n value '0',
          g_cnt6 type n value '0',
          g_cnt7 type n value '0',
          g_cnt8 type n value '0',
          g_cnt9 type n value '0',
          g_cnt10 type n value '0',
          g_cnt11 type n value '0',
          g_cnt12 type n value '0',
          g_cnt13 type n value '0'.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-011.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) TEXT-006 for field s_matnr.
    Select-Options : S_MATNR for CKMLMV003-MATNR .
    SELECTION-SCREEN: END OF LINE.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) TEXT-007 for field S_WERKS.
    SELECT-OPTIONS:S_WERKS for CKMLMV003-WERKS Default '2003'.
    SELECTION-SCREEN: END OF LINE.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) TEXT-008 for field S_GJAHR.
    SELECT-OPTIONS:S_GJAHR for CKMLMv003-GJAHR default Sy-DATUM(4) .
    SELECTION-SCREEN: END OF LINE.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) TEXT-009 for field S_PERIO.
    SELECT-OPTIONS:S_PERIO for CKMLMV003-PERIO .
    SELECTION-SCREEN: END OF LINE.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(25) TEXT-010 for field P_MGTYP.
    Parameters : P_MGTYP type CKMLMV003-MGTYP .
    SELECTION-SCREEN: END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1 .
    At Selection-Screen on s_matnr .
      Perform Validate_MatNumber.
    At Selection-Screen on s_werks .
      Perform Validate_CostingPlant.
    At Selection-Screen on s_GJAHR .
      Perform Validate_FiscalYear.
    At Selection-Screen on s_PERIO .
      Perform Validate_Period.
    At Selection-Screen on p_MGTYP .
      Perform Validate_QuantityStrType.
    *&      Form  Validate_MatNumber
          text
    Form Validate_MatNumber.
      DATA l_MATNR TYPE CKMLMV003-MATNR.
      IF NOT S_MATNR[] IS INITIAL .
        CLEAR L_MATNR.
        SELECT  single MATNR FROM CKMLMV003
          INTO l_MATNR
          WHERE MATNR = s_MATNR-LOW or MATNR = s_MATNR-HIGH.
       ENDSELECT.
        IF sy-subrc NE 0.
          MESSAGE e999 WITH
                  'Enter a Valid Material Number'(001).
        ENDIF.
      ENDIF.
    ENDFORM.                    "Validate_MatNumber
    *&      Form  Validate_CostingPlant
          text
    Form Validate_CostingPlant.
      DATA l_werks TYPE CKMLMV003-WERKS.
      IF NOT S_WERKS[] IS INITIAL .
        CLEAR L_WERKS.
        SELECT single  WERKS FROM T001W
          INTO l_WERKS
          WHERE WERKS =  s_WERKS-low or  WERKS =  s_WERKS-high.
       ENDSELECT.
        IF sy-subrc NE 0.
          MESSAGE e999 WITH
                  'Enter a Valid Costing Plant'(002).
        ENDIF.
      ENDIF.
    ENDFORM.                    "Validate_CostingPlant
    *&      Form  Validate_FiscalYear
          text
    Form Validate_FiscalYear.
      DATA l_GJAHR TYPE CKMLMV003-GJAHR.
      IF NOT S_GJAHR-low IS INITIAL or S_GJAHR-high IS INITIAL.
        CLEAR L_GJAHR.
       SELECT SINGLE GJAHR FROM CKMLMV003
         INTO l_GJAHR
         WHERE GJAHR LE sy-DATUM(4) .
       IF NOT S_GJAHR-low LE sy-DATUM(4) or S_GJAHR-high LE sy-DATUM(4).
         MESSAGE e999 WITH
                 'Enter a Valid Fiscal year'(003).
       ENDIF.
      ENDIF.
    ENDFORM.                    "Validate_FiscalYear
    *&      Form  Validate_Period
          text
    Form Validate_Period.
      DATA l_PERIO TYPE CKMLMV003-PERIO.
      IF NOT S_PERIO[] IS INITIAL .
        CLEAR L_PERIO.
        SELECT single PERIO FROM CKMLMV003
          INTO l_PERIO
          WHERE PERIO GE 1 and PERIO LE 12 .
       ENDSELECT.
        IF sy-subrc NE 0.
          MESSAGE e999 WITH
                  'Enter a Valid Period'(004).
        ENDIF.
      ENDIF.
    ENDFORM.                    "Validate_Period
    *&      Form  Validate_QuantityStrType
          text
    Form Validate_QuantityStrType.
      DATA l_MGTYP TYPE CKMLMV003-MGTYP.
      IF NOT p_MGTYP IS INITIAL.
        CLEAR L_MGTYP.
        SELECT SINGLE MGTYP FROM CKMLMV003
          INTO l_MGTYP
          WHERE MGTYP = p_MGTYP .
        IF sy-subrc NE 0.
          MESSAGE e999 WITH
                  'Enter a Valid Quantity Structure Type'(005).
        ENDIF.
      ENDIF.
    ENDFORM.                    "Validate_QuantityStrType
    INITIALIZATION of Fields
    Class LCL_EVENT_HANDLER DEFINITION.
      Public section.
        Methods:
        TOP_OF_PAGE for Event TOP_OF_PAGE OF CL_GUI_ALV_GRID
                                IMPORTING E_DYNDOC_ID.
    ENDCLASS.                    "LCL_EVENT_HANDLER DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    METHOD TOP_OF_PAGE.
    Top-of-page event <br />
    PERFORM EVENT_TOP_OF_PAGE USING G_DYNDOC_ID.
    ENDMETHOD.                            "top_of_page
    ENDCLASS.       "LCL_EVENT_HANDLER IMPLEMENTATION
    Data : G_HANDLER TYPE REF TO LCL_EVENT_HANDLER.
    Initialization.
      v_repid = sy-repid.
    Start-of-Selection.
      Perform get_CKMLMV003.
      Perform get_CKMLMV001.
      Perform Get_Finaldata.
    Perform Layout_FieldCatalog.
      call screen '101'.
    Perform  ALVGrid_Final_Display.
    *&      Form  Layout_FieldCatalog
          text
    Form Layout_FieldCatalog.
      s_fieldcatalog-col_pos = 1.
      s_fieldcatalog-fieldname = 'MATNR'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-024.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 2.
      s_fieldcatalog-fieldname = 'GJAHR'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-012.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 3.
      s_fieldcatalog-fieldname = 'PERIO'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-013.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 4.
      s_fieldcatalog-fieldname = 'WERKS'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-025.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 5.
      s_fieldcatalog-fieldname = 'LIFNR_ND1'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-014.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 6.
      s_fieldcatalog-fieldname = 'MISCH_VERH1'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-015.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 7.
      s_fieldcatalog-fieldname = 'LIFNR_ND2'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-016.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 8.
      s_fieldcatalog-fieldname = 'MISCH_VERH2'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-017.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 9.
      s_fieldcatalog-fieldname = 'LIFNR_ND3'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-018.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 10.
      s_fieldcatalog-fieldname = 'MISCH_VERH3'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-019.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 11.
      s_fieldcatalog-fieldname = 'LIFNR_ND4'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-020.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 12.
      s_fieldcatalog-fieldname = 'MISCH_VERH4'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-021.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 13.
      s_fieldcatalog-fieldname = 'LIFNR_ND5'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-022.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      s_fieldcatalog-col_pos = 14.
      s_fieldcatalog-fieldname = 'MISCH_VERH5'.
      s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
      s_fieldcatalog-seltext_l = Text-023.
      append s_fieldcatalog to t_fieldcatalog.
      clear s_fieldcatalog.
      if g_cnt6 <> '0'.
        s_fieldcatalog-col_pos = 14.
        s_fieldcatalog-fieldname = 'LIFNR_ND6'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-022.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
        s_fieldcatalog-col_pos = 15.
        s_fieldcatalog-fieldname = 'MISCH_VERH6'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-023.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
      ENDIF.
      if g_cnt7 <> '0'.
        s_fieldcatalog-col_pos = 16.
        s_fieldcatalog-fieldname = 'LIFNR_ND7'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-022.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
        s_fieldcatalog-col_pos = 17.
        s_fieldcatalog-fieldname = 'MISCH_VERH7'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-023.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
      ENDIF.
      if g_cnt8 <> '0'.
        s_fieldcatalog-col_pos = 18.
        s_fieldcatalog-fieldname = 'LIFNR_ND8'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-022.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
        s_fieldcatalog-col_pos = 19.
        s_fieldcatalog-fieldname = 'MISCH_VERH8'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-023.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
      ENDIF.
      if g_cnt9 <> '0'.
        s_fieldcatalog-col_pos = 20.
        s_fieldcatalog-fieldname = 'LIFNR_ND9'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-022.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
        s_fieldcatalog-col_pos = 21.
        s_fieldcatalog-fieldname = 'MISCH_VERH9'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-023.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
      ENDIF.
      if g_cnt10 <> '0'.
        s_fieldcatalog-col_pos = 22.
        s_fieldcatalog-fieldname = 'LIFNR_ND10'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-022.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
        s_fieldcatalog-col_pos = 23.
        s_fieldcatalog-fieldname = 'MISCH_VERH10'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-023.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
      ENDIF.
      if g_cnt11 <> '0'.
        s_fieldcatalog-col_pos = 24.
        s_fieldcatalog-fieldname = 'LIFNR_ND11'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-022.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
        s_fieldcatalog-col_pos = 25.
        s_fieldcatalog-fieldname = 'MISCH_VERH11'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-023.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
      ENDIF.
      if g_cnt12 <> '0'.
        s_fieldcatalog-col_pos = 26.
        s_fieldcatalog-fieldname = 'LIFNR_ND12'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-022.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
        s_fieldcatalog-col_pos = 27.
        s_fieldcatalog-fieldname = 'MISCH_VERH12'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-023.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
      ENDIF.
      if g_cnt13 <> '0'.
        s_fieldcatalog-col_pos = 29.
        s_fieldcatalog-fieldname = 'LIFNR_ND13'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-022.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
        s_fieldcatalog-col_pos = 30.
        s_fieldcatalog-fieldname = 'MISCH_VERH13'.
        s_fieldcatalog-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        s_fieldcatalog-seltext_l = Text-023.
        append s_fieldcatalog to t_fieldcatalog.
        clear s_fieldcatalog.
      ENDIF.
    ENDFORM.                    "Layout_FieldCatalog
    *&      Form  get_CKMLMV003
          text
    Form get_CKMLMV003.
      Select WERKS
             MATNR
             MISCH_VERH
             KALNR_BAL
             GJAHR
             PERIO
             MGTYP
             from CKMLMV003
             into table i_CKMLMV003_out
             Where ( MATNR in s_MATNR and
                     WERKS in s_WERKS and
                     GJAHR in s_GJAHR and
                     PERIO in s_PERIO and
                     MGTYP = p_MGTYP ).
      Sort i_CKMLMV003_out by MATNR  KALNR_BAL.
    ENDFORM.                    "get_CKMLMV003
    *&      Form  get_CKMLMV001
          text
    Form get_CKMLMV001.
      If Not i_CKMLMV003_out is Initial.
        Select MATNR
               KALNR
               LIFNR_ND
               EKORG_ND
               from CKMLMV001
               into Table i_CKMLMV001_out
               for all entries in i_CKMLMV003_out
               Where ( KALNR = i_CKMLMV003_out-KALNR_BAL
                      and WERKS = i_CKMLMV003_out-WERKS
                      and MATNR = i_CKMLMV003_out-MATNR ).
        sort i_CKMLMV001_out by MATNR  KALNR.
      ENDIF.
    ENDFORM.                    "get_CKMLMV001
    *&      Form  Get_Finaldata
          text
    Form Get_Finaldata.
      Loop at  i_CKMLMV001_out into i_CKMLMV001_str.
        Loop at  i_CKMLMV003_out into i_CKMLMV003_str.
          If ( i_CKMLMV001_str-KALNR = i_CKMLMV003_str-KALNR_BAL  and i_CKMLMV003_str-MATNR = i_CKMLMV001_str-MATNR  ) .
            If ( flag = 0 ).
              g_plant = i_CKMLMV003_str-WERKS.
              g_PurchOrg = i_CKMLMV001_str-EKORG_ND.
              g_quantstr = i_CKMLMV003_str-MGTYP.
              flag = 1.
            ENDIF.
            Move i_CKMLMV003_str-MATNR  to  i_Final_str-MATNR.
            Move i_CKMLMV003_str-WERKS  to  i_Final_str-WERKS.
            Move i_CKMLMV003_str-GJAHR  to  i_Final_str-GJAHR.
            Move i_CKMLMV003_str-PERIO  to  i_Final_str-PERIO.
            Move i_CKMLMV003_str-MISCH_VERH  to  i_Final_str-MISCH_VERH1.
            Move i_CKMLMV001_str-LIFNR_ND  to  i_Final_str-LIFNR_ND1.
           Move-Corresponding i_CKMLMV003_str to i_CKMLMV003_temp.
            Append i_Final_str to i_Final_out.
            Clear : i_CKMLMV003_str   .
          ENDIF.
        ENDLOOP.
        Clear : i_CKMLMV001_str ,  i_Final_str , i_CKMLMV003_temp.
      ENDLOOP.
      Sort i_Final_out by WERKS MATNR GJAHR  PERIO .
      Loop at i_Final_out into i_Final_str.
        if i_Final_str-MATNR = i_Final_str1-MATNR and i_Final_str-GJAHR = i_Final_str1-GJAHR and i_Final_str-PERIO = i_Final_str1-PERIO and i_Final_str-WERKS = i_Final_str1-WERKS.
          cnt = cnt + 1.
          Case cnt.
            When 2.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH2.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND2.
            When 3.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH3.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND3.
            When 4.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH4.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND4.
            When 5.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH5.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND5.
            When 6.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH6.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND6.
              g_cnt6 = 1.
            When 7.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH7.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND7.
              g_cnt7 = 1.
            When 8.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH8.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND8.
              g_cnt8 = 1.
            When 9.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH9.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND9.
              g_cnt9 = 1.
            When 10.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH10.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND10.
              g_cnt10 = 1.
            When 11.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH11.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND11.
              g_cnt11 = 1.
            When 12.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH12.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND12.
              g_cnt12 = 1.
            When 13.
              Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH13.
              Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND13.
              g_cnt13 = 1.
          ENDCASE.
        ELSE.
          if cnt GE 1 .
            append i_Final_str1 to i_Final_out1.
            Clear : i_Final_str1.
          ENDIF.
          Move-Corresponding i_Final_str to i_Final_str1.
          cnt = 0.
          cnt = cnt + 1.
        ENDIF.
        Clear :  i_Final_str.
      Endloop.
      append i_Final_str1 to i_Final_out1.
       if i_Final_str-MATNR = i_Final_str1-MATNR and i_Final_str-GJAHR = i_Final_str1-GJAHR and i_Final_str-PERIO = i_Final_str1-PERIO .
         cnt = cnt + 1.
         Case cnt.
           When 2.
             Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH2.
             Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND2.
           When 3.
             Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH3.
             Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND3.
           When 4.
             Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH4.
             Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND4.
           When 5.
             Move i_Final_str-MISCH_VERH1  to  i_Final_str1-MISCH_VERH5.
             Move i_Final_str-LIFNR_ND1  to  i_Final_str1-LIFNR_ND5.
         ENDCASE.
    **Move-Corresponding i_Final_str to i_Final_str1.
       ELSE.
         if cnt GE 1 .
           append i_Final_str1 to i_Final_out1.
           Clear : i_Final_str1.
         ENDIF.
         Move-Corresponding i_Final_str to i_Final_str1.
         cnt = 0.
         cnt = cnt + 1.
       ENDIF.
       Clear :  i_Final_str.
    Endloop.
    append i_Final_str1 to i_Final_out1.
    ENDFORM.                    "Get_Finaldata
    *&      Form  top_of_page
          text
    Form top_of_page.
      clear t_header.
      refresh t_header.
      i_header_str-typ = 'H'.
      I_header_Str-info = Text-035.
      append I_header_str to t_header.
      clear I_header_str.
    Date
      I_header_str-typ = 'S'.
      I_header_str-key = Text-036.
      CONCATENATE sy-datum+6(2) '.'
      sy-datum+4(2) '.'
      sy-datum(4) INTO I_header_str-info. "todays date
      append I_header_str to t_header.
      clear: I_header_str.
      i_header_str-typ = 'S'.
      I_header_Str-Key = 'Quantity Structure Type :'.
      I_header_Str-info = g_QuantStr.
      append I_header_str to t_header.
      clear I_header_str.
      i_header_str-typ = 'S'.
      I_header_Str-Key = 'Purchase Org :'.
      I_header_Str-info = g_PurchOrg.
      append I_header_str to t_header.
      clear I_header_str.
      i_header_str-typ = 'S'.
      I_header_Str-Key = 'Plant :'.
      I_header_Str-info = g_Plant.
      append I_header_str to t_header.
      clear I_header_str.
      CLEAR i_line_event_str.
      i_line_event_str-name = 'TOP_OF_PAGE'.
      APPEND i_line_event_str TO i_events.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header.
    i_logo = 'Z_LOGO'.
    ENDFORM.                    "top_of_page
    *&      ALVGrid_Final_Display
    Form ALVGrid_Final_Display.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program     = v_repid
           i_DEFAULt              = c_valx
          i_callback_top_of_page = 'TOP_OF_PAGE'
           i_Save                 = c_valx
          it_fieldcat            = t_fieldcatalog
           it_sort                = t_sort
          it_events              = I_events
        TABLES
          t_outtab               = i_final_out1.
    ENDFORM.                    "ALVGrid_Final_Display
    *&      Form  ALVGRID_OO_Display
          text
    Form ALVGRID_OO_Display.
      i_FCAT_str-col_pos = 1.
      i_FCAT_str-fieldname = 'MATNR'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
    i_fcat_str-seltext = 'MATERIAL'.
      i_fcat_str-scrtext_m = Text-024.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 2.
      i_FCAT_str-fieldname = 'GJAHR'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_fcat_str-scrtext_m = Text-012.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 3.
      i_FCAT_str-fieldname = 'PERIO'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_fcat_str-scrtext_m = Text-013.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 4.
      i_FCAT_str-fieldname = 'WERKS'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_FCAT_str-scrtext_m = Text-025.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 5.
      i_FCAT_str-fieldname = 'LIFNR_ND1'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_fcat_str-scrtext_m = Text-014.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 6.
      i_FCAT_str-fieldname = 'MISCH_VERH1'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_FCAT_str-scrtext_m = Text-015.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 7.
      i_FCAT_str-fieldname = 'LIFNR_ND2'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_FCAT_str-scrtext_m = Text-016.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 8.
      i_FCAT_str-fieldname = 'MISCH_VERH2'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_FCAT_str-scrtext_m = Text-017.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 9.
      i_FCAT_str-fieldname = 'LIFNR_ND3'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_FCAT_str-scrtext_m = Text-018.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 10.
      i_FCAT_str-fieldname = 'MISCH_VERH3'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_FCAT_str-scrtext_m = Text-019.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 11.
      i_FCAT_str-fieldname = 'LIFNR_ND4'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_FCAT_str-scrtext_m = Text-020.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 12.
      i_FCAT_str-fieldname = 'MISCH_VERH4'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_FCAT_str-scrtext_m = Text-021.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 13.
      i_FCAT_str-fieldname = 'LIFNR_ND5'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_FCAT_str-scrtext_m = Text-022.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
      i_FCAT_str-col_pos = 14.
      i_FCAT_str-fieldname = 'MISCH_VERH5'.
      i_FCAT_str-tabname = 'I_FINAL_OUT1'.
      i_FCAT_str-scrtext_m = Text-023.
      append i_FCAT_str to i_FCAT.
      clear i_FCAT_str.
       if g_cnt6 <> '0'.
        i_FCAT_str-col_pos = 15.
        i_FCAT_str-fieldname = 'LIFNR_ND6'.
        i_FCAT_str-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        i_FCAT_str-scrtext_m = Text-022.
        append i_FCAT_str to i_FCAT.
        clear i_FCAT_str.
        i_FCAT_str-col_pos = 16.
        i_FCAT_str-fieldname = 'MISCH_VERH6'.
        i_FCAT_str-tabname = 'I_FINAL_OUT1'.
       s_fieldcatalog-NO_OUT = 'X'.
        i_FCAT_str-scrtext_m = Text-023.
        append i_FCAT_str to i_FCAT.
        clear i_FCAT_str.
      ENDIF.
    *if  not grid1 is Initial.
    If sy-SUBRC = 0.
      Call Method grid1->set_table_for_first_display
        CHANGING
          it_outtab                     = i_final_out1[]
          it_fieldcatalog               = I_FCAT
        EXCEPTIONS
          Invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          Others                        = 4.
      If sy-subrc <> 0.
      ENDIF.
    CALL METHOD G_DYNDOC_ID->INITIALIZE_DOCUMENT
        EXPORTING
        BACKGROUND_COLOR = CL_DD_AREA=>COL_TEXTAREA.
    Processing events <br />
      CALL METHOD GRID1->LIST_PROCESSING_EVENTS
        EXPORTING
        I_EVENT_NAME = 'TOP_OF_PAGE'
        I_DYNDOC_ID = G_DYNDOC_ID.
    Call Method grid2->set_table_for_first_display
       CHANGING
         it_outtab                     = i_final_out1[]
         it_fieldcatalog               = I_FCAT
       EXCEPTIONS
         Invalid_parameter_combination = 1
         program_error                 = 2
         too_many_lines                = 3
         Others                        = 4.
    If sy-subrc <> 0.
    ENDIF.
       ENDIF.
      ENDIF.
    Endform.                    "ALVGRID_OO_Display
    Form EVENT_TOP_OF_PAGE using  DG_DYNDOC_ID
                          TYPE REF TO CL_DD_DOCUMENT.
    DATA : DL_TEXT(255) TYPE C.
      CALL METHOD DG_DYNDOC_ID->ADD_TEXT
        EXPORTING
        TEXT = 'Flight Details'
        SAP_STYLE = CL_DD_AREA=>HEADING
        SAP_FONTSIZE = CL_DD_AREA=>LARGE
        SAP_COLOR = CL_DD_AREA=>LIST_HEADING_INT.
    Endform.
    *&      Module  STATUS_0101  OUTPUT
          text
    MODULE STATUS_0101 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    SET PF-STATUS 'STATUS'.
    SET TITLEBAR 'TITLE'.
      Create Object G_DYNDOC_ID
            EXPORTING STYLE = 'ALV_GRID'.
      if g_custom_container1 is initial .
        create object g_custom_container1
            Exporting
                Container_name = CCCONTAINER1
            Exceptions
                cntl_error = 1
                cntl_system_error = 2
                create_error = 3
                lifetime_error = 4
                Others = 5.
       Create Object G_SPLITTER
              Exporting PARENT = g_custom_container1.
      CALL METHOD G_SPLITTER->GET_CONTAINER
        EXPORTING
        ROW = 1
        COLUMN = 1
        RECEIVING
        CONTAINER = G_PARENT_TOP.
    *Assigning the Part 2 to GRID
      CALL METHOD G_SPLITTER->GET_CONTAINER
        EXPORTING
        ROW = 2
        COLUMN = 1
        RECEIVING
        CONTAINER = g_parent_grid.

    Hi,
    Check if any event is triggered from the event handler class, upon selection.
    Usually, the events are handled on double click or on hotspot etc.
    Regards,
    Satish Kanteti

Maybe you are looking for

  • Creation of OORACLE 8i/8iR2 database failed

    Hi, I'm having troubles creating databases with Oracle 8i/8iR2, I've used Oracle Universal Installer which returned : "ORA-03114: not connected to ORACLE", I've also tried using "svrmgrl" and Here I got :"ORA-27146: post/wait initialization failed" f

  • JAX-WS Source datatype

    Hi. I have a JAX-WS web service: @WebMethod public javax.xml.transform.Source sendWithReply(                @WebParam(name = "InputWithReply") javax.xml.transform.Source s) {           System.out.println("InputWithReply");           com.sun.xml.inter

  • Windows Vista Sidebar destination.msi issue

    When I try to start Windows Sidebar I get popups searching for destination.msi folder. How do I fix this?

  • Using Music with iPhoto Slideshow

    I can not access my music library when creating a slideshow. All I get is the default cheezy guitar music. Is there an easy answer to this? Thanks

  • Time Capsule slow file transfer

    I am having experiencing extremely slow file transfers compared to my Airport Extreme. Renewing leases temporarily helps, but only temporarily. Slowness does not coincide with Time Machine activity. Mac Pro connected via gigabit ethernet, MacBook Pro