How to reduce these code using oop in AS3

i have 8 movie clip and i use it as a navigation buttons and when clicked it should go to different links. i use these codes but i think these codes are not pure oop so can any one help me to reduce programming using oop but works in same way as it is doing right now.
the codes are follows
function buttonmode(link:MovieClip):void{
link.buttonMode = true;
buttonmode(rec1_mc);
buttonmode(rec2_mc);
buttonmode(rec3_mc);
buttonmode(rec4_mc);
buttonmode(rec5_mc);
buttonmode(rec6_mc);
buttonmode(rec7_mc);
buttonmode(rec8_mc);
function navigate1(e:MouseEvent):void{
navigateToURL(new URLRequest("http://www.ebpearls.com" ),"_self");
function navigate2(e:MouseEvent):void{
trace("Button 2 is Clicked");
function navigate3(e:MouseEvent):void{
trace("Button 3 is Clicked");
function navigate4(e:MouseEvent):void{
trace("Button 4 is Clicked");
function navigate5(e:MouseEvent):void{
trace("Button 5 is Clicked");
function navigate6(e:MouseEvent):void{
trace("Button 6 is Clicked");
function navigate7(e:MouseEvent):void{
trace("Button 7 is Clicked");
function navigate8(e:MouseEvent):void{
trace("Button 8 is Clicked");
rec1_mc.addEventListener(MouseEvent.CLICK,navigate1);
rec2_mc.addEventListener(MouseEvent.CLICK,navigate2);
rec3_mc.addEventListener(MouseEvent.CLICK,navigate3);
rec4_mc.addEventListener(MouseEvent.CLICK,navigate4);
rec5_mc.addEventListener(MouseEvent.CLICK,navigate5);
rec6_mc.addEventListener(MouseEvent.CLICK,navigate6);
rec7_mc.addEventListener(MouseEvent.CLICK,navigate7);
rec8_mc.addEventListener(MouseEvent.CLICK,navigate8);

I think the more OO way is like this:
1. Create AbstractButton class and save it in a file called AbstractButton.as in the same folder the FLA file resides:
package
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    public class AbstractButton extends MovieClip
        public function AbstractButton()
            super();
            this.stop();
            this.buttonMode = true;
            this.addEventListener(MouseEvent.ROLL_OVER, onRollOver);
            this.addEventListener(MouseEvent.ROLL_OUT, onRollOut);
            this.addEventListener(MouseEvent.CLICK, onClick);
        protected function onRollOver(e:MouseEvent):void
            // rollOver behaviour, e.g. this.gotoAndStop(2);
        protected function onRollOut(e:MouseEvent):void
             // rollOut behaviour, e.g.  this.gotoAndStop(1);
        protected function onClick(e:MouseEvent = null):void
            var data:Object = new Object();
            data.id = this.name;
            var evt:NavEvent = new NavEvent(data, NavEvent.NAV_EVENT, true, true);
            dispatchEvent(evt);           
2. Link button symbol in your library to the AbstractButton class: right click on it (in library), click Properties, in Linkage section mark Export for ActionScript box and put AbstractButton as Class, Base class field leave empty. If you use more than one button symbols form your library, do the same thing with them.
3. Create NavEvent class, save it in NavEvent.as file in the same  folder:
package
     import flash.events.Event;
    public class NavEvent extends Event
         public static const NAV_EVENT:String = "NavEvent";
         public var data:Object;
         public function NavEvent(data:Object, type:String,  bubbles:Boolean, cancelable:Boolean)
             this.data = data;
             super(NAV_EVENT, true, true);
4. Drag your buttons on the stage, give them instance names as you did.
5. On your main timeline (or in document class if you're using it) use the following code to controll button clicks. Here e.data.id carries the instance name of clicked button.
this.root.addEventListener(NavEvent.NAV_EVENT, handleNavEvent);
function handleNavEvent(e:NavEvent):void
    switch (e.data.id)
        case "rec1_mc":          
            navigateToURL(new URLRequest("http://www.ebpearls.com" ),"_self");
            break;
        case "rec2_mc":
            trace("2 clicked");
            break;
        case "rec3_mc":
            trace("3 clicked");
            break;
          // and so on       

Similar Messages

  • How to find company code using sales doc. No

    Hi,
         I need to print company code, how to find company code using sales doc no. I don't find it VBAK.
    Cheers
    Senthil

    Dear Senthil
    You can find in table VBAK itself - Field BUKRS_VF
    thanks
    G. Lakshmipathi

  • Please help 'Translate' These codes from AS2 to AS3 for me

    Hi, i need help 'translating' these codes from Action Script 2 to Action Script 3. Please Do it for me:
    toc    loadText = new LoadVars();
        loadText.load("Curie.txt");
        loadText.onLoad = function(success) {
            if (success) {
                // trace(success);
                Curie.html = true;
                Curie.htmlText = this.Curie;
    Please translate it for me, i need it ASAP thanks
    Kenneth

    Thank you for helping me
    Kenneth
    Date: Thu, 15 Oct 2009 05:49:14 -0600
    From: [email protected]
    To: [email protected]
    Subject: Please help 'Translate' These codes from AS2 to AS3 for me
    Take a look at that:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/migration.html
    There is a LoadVars section on that.
    There is also a tutorial here:
    http://www.republicofcode.com/tutorials/flash/as3externaltext/
    Cheers,
    CaioToOn!
    >

  • How to reduce background noise using garageband?

    I have a video file that contains quite a bit of background noise (just basic camera noise mostly) and I was wondering how to reduce or remove that using Garageband. I have read in other discussions that I could use the graphic equalizer, but I don't know what that is or how to use it. Does anyone have any ideas as to how I could get rid of this background noise?

    oz-macnut wrote:
    Ryan
    I'd suggest looping a piece of silence in your sound in Garageband (using the c key to turn cycling on) and listening to just the background noise. Then open a 31-band EQ as an effect on the track and start pulling down frequencies. If it is mainly hissing and rumble, you might be able to eliminate much of it using EQ.
    Another solution is to open the Visual EQ and check the analyze box, and then loop/cycle play back your track so it loops just the silence with noise. This will allow you to see in the Visual EQ window what frequencies make up your background noise. Then I'd suggest using a 31-band EQ and gently start pulling down the frequencies that are dominant in your noise. Go carefully and listen as you do it, you might be affecting they sound that you want.
    To avoid making the audio you want sound thin and hollow, think about these aspects:
    For male voices, most of the wanted sound is between 125 Hz and 8 KHz
    For female voices: between 300 Hz and 12 KHz
    So basically drag the faders on the EQ on the frequencies outside this range. I'd suggest a 45 to 60 degree slope down on the EQ, so it's not a harsh transition.
    It does depend on your source audio. Is it music? Speech? I use the above as a guide You have to experiment and listen as you go. It helps to turn the EQ on and off during playback to hear the before and after your adjustments too...
    This is great, oz.
    But do you have a video showing how it is done ?
    My source are vocal singing ...
    Thanks

  • How to synchronize source code using distributed NWDI Servers?

    Hello,
    I am facing a bit of a challenge trying to find documentation regarding the replication of source code using NWDI/DTR in a distributed environment. By distributed I mean independent instances in different geographical locations.
    Scenario
    Our customer product (DCs/SCs/etc) will be developed by two teams. These teams are far away from each other, and a local dedicated NWDI instance for each team is a must, due to the distance plus the big size of the product. It should be possible for the teams to work on a same Track. We use a NWDI 7.31 instance.
    I have been looking into the documentation and so far I found no guide on how to keep both repository updated with each other changes.
    The following links make notes of the scenario but are not addressing the solution properly.
    Distributed Development
    A synchronization of changes might have to be done between:
    Workspaces present in the same repository.
    Workspaces present in different repositories.
    Developepment Infrastructure (DI) Architecture
    Central source file management – in the Design Time Repository (DTR), a file storage in a database with export mechanisms that allow you to synchronize the instances of the DTR in a distributed development.
    Solution?
    Does NWDI offers any tool to solve this kind of requirement? Am I missing any documentation?
    Or, NWDI doesn't have a solution for this kind of scenario?
    And by the way, I would expect a "smooth" integration between the servers, like automatic asynchronous replication, with proper managment of conflicts and all the other delightful paradigms of source control.
    Are we talking about exporting source code and importing it on the other side? Would this be the only alternative, and how is it done?
    Thanks in advance.

    A lot of obfuscators, rather than use one-letter method names, use keywords for names. This has the benefit of not decompiling to valid Java
    Well, thats only true if you have a bug in your decompiler. My decompiler (jad) handles keywords by adding additional letters (underscores and stuff).
    The problem is solved by an obfuscator. Compiled c++ code can be disassembled in the same way as obfuscated java byte code. So, if you were satisfied with the protection of your C++ code, then you should be just as satisfied with obfuscated java byte code.

  • How to calculate commodity code  using Tabe MARC and field STAWN.

    Hi All,
    how to calculate commodity code
    This attribute is stored at the Material/Plant level.  For each material, this attribute must be evaluated at all applicable plants. 
    u2022     If ALL values are the same, output the value to the report
    u2022     If all values are NOT the same, output u201CNot Consistentu201D in the column for the material
    The table to be used is MARC
    and the SAP technical field name is STAWN

    Hi Debrup,
    try this ... i have put down code here ... test it and make changes as needed.
    data:
    t_marc type standard table of marc with header line,
    lv_matnr like marc-matnr,
    lv_same type c.
    select MATNR WERKS STAWN
    from MARC
    into corresponding fields of table t_marc.
    sort t_marc by matnr werks stawn.
    loop at t_marc.
    at new matnr.
    clear lv_same.
    lv_matnr = t_marc-matnr.
    endat.
    at new stwan.
    * material is same but STWAN changed so flag change
    if lv_matnr = t_marc-matnr.
    lv_same = 'F'. " False.
    endif.
    endat.
    at end of matnr.
    if lv_same is intial.
    write : t_marc-matnr,t_marc-stwan.
    else.
    write : t_marc-matnr, 'Not Consistent'.
    endif.
    endat.
    endloop.
    hope this helps.
    Franc

  • How to organize these code(about event drive)

    The subject: In my Swing class, I create a TextArea object for displaying the content received from a socket. When my socket received some data, I want to show it in the TextArea immediately. But how do I organize the code to realize this function? I need the standard java solution. Who can give me some advice?
    //bow
    Sirius

    You can merge Events by simply dragging one to another
    You can move photos from one Event to another by flagging them, then selecting the target Event and going Events menu -> Add Photos to selected Events
    You can create Events by flagging the photos and simply going Events -> Create Event Flagged Photos.
    If you want to maintain your existing groupings them import each group, one at a time.
    iPhoto Menu -> Preferences -> general: What have you chosen for 'Autosplit Events'
    Other possibilities for using iphoto:
    I use Events simply as big buckets of Photos: Spring 08, July - Nov 06 are typical Events in my Library. I use keywords and Smart Albums extensively. I title the pics broadly.
    I keyword on a
    Who
    What
    Where basis (The When is in the photos's Exif metadata). I also rate the pics on a 1 - 5 star basis.
    Using this system I can find pretty much find any pic in my 50k library in a couple of seconds.
    So, for example, I have a batch of pics titled 'Seattle 08' and a  typical keywording might include: John, Anne, Landscape, mountain, trees, snow. With a rating included it's so very easy to find the best pics we took at Mount Rainier.
    File -> New Smart Album
    set it to 'All"
    title contains Seattle
    keyword is mountain
    keyword is snow
    rating is 5 stars
    Or, want a chronological album of John from birth to today?
    New Smart Album
    Keyword is John
    Set the View options to Sort By Date Ascending
    Want only the best pics?
    add Rating is greater than 4 stars
    The best thing about this system is that it's dynamic. If I add 50 more pics of John  to the Library tomorrow, as I keyword and rate them they are added to the Smart Album.
    In the end, organisation is about finding the pics. The point is to make locating that pic or batch of pics findable fast. This system works for me.

  • How to get company code using material number

    Dear all,
              I have material number & plant on selection screen, but how do I get the company code details using MARA-MATNR ?

    HI,
    You can use a cmobination of T001K and MARC Table.
    T001K table is assignment of Plants to a company code and MARC is a table with combination of Material and Plant.
    Regds,
    Anil
    Edited by: Anil Katoch on Jul 23, 2009 6:24 AM

  • Personas: how to call Transaction code using a Script Button?

    Hi,
    I want to use a script button to run to certain UI based on the given transaction code. I am thinking there might be some ways to do so:
    Option 1:
        Somehow one can let the script button call the T-code in script, say, IW21, but how to write such script?
    Option 2:
        In the script of the script button, use "Push" or "Click" to cause an action on the launch button which contains the T-code, say /nIW21.
    But on my PC, this does not work. Why?
    pls help asap!
    Thx a lot!
    Br,
    Dong

    Knowledge sharing:
    Hi,
    I have found exact answer to this question: in the script of a script button, one can first set the T-code to the /okdc component, then call "press Enter" action. By this way, any script button can be used to triggle an action for a T-code. One can set teh /okdc as "hidden". Hope this will help other newers.
    Br,
    Dong

  • Inner join with if statement , how to combine these code ?

    Hello everyone, I have 2 group of code here. This 2 group of code is working without error. But I face a problem , I need to group up this 2 group of code. Please take a look, thank you This is the first code i create.
    SELECT r.Name , r.Restaurant_ID, f.feature, r.Price_Range, r.Cuisine_ID, c.Cuisine,
        s.State_ID, s.State, l.Location_ID, l.Area, l.State_ID, r.Name, r.Location_ID
    FROM Restaurants r, Bridge1_Restaurant_Features b, Features f, Cuisine c, State s, Location l
            where 0=0
            AND b.Feature_ID = f.Feature_ID
            AND b.Restaurant_ID = r.Restaurant_ID
            AND r.Cuisine_ID = c.Cuisine_ID
            AND r.Location_ID = l.Location_ID
            AND l.State_ID = s.State_ID
            <cfif ARGUMENTS.Feature_ID IS NOT "">
            AND b.Feature_ID IN (#ARGUMENTS.Feature_ID#)
            </cfif>
            <cfif ARGUMENTS.Price_Range IS NOT "">
            AND r.Price_Range IN (#ARGUMENTS.Price_Range#)
            </cfif>
            <cfif ARGUMENTS.Cuisine IS NOT "">
            AND r.Cuisine_ID = (#ARGUMENTS.Cuisine#)
            </cfif>
            <cfif val(ARGUMENTS.LocationID2) IS #val(ARGUMENTS.StateID)#>
            AND l.State_ID = #val(ARGUMENTS.LocationID2)#
            <cfelse>
                AND l.Location_ID = #val(ARGUMENTS.LocationID2)#
            </cfif>
    Then, I notice the feature_ID i need to use another logic to show the result. The code is like this
    SELECT r.Restaurant_ID, r.Name, f.Feature
    FROM   Restaurants r
    INNER JOIN Bridge1_Restaurant_Features b ON b.Restaurant_ID = r.Restaurant_ID
    INNER JOIN Features f ON b.Feature_ID = f.Feature_ID
    INNER JOIN
         SELECT Restaurant_ID, COUNT(Feature_ID) AS FeatureCount
         FROM   Bridge1_Restaurant_Features
         <!--- find matching features --->
         WHERE  Feature_ID IN ( <cfqueryparam value="#ARGUMENTS.Feature_ID#" cfsqltype="cf_sql_integer" list="true"> )
        GROUP BY Restaurant_ID
        <!--- having ALL of the requested features --->
         HAVING COUNT(Feature_ID) = <cfqueryparam value="#listLen(ARGUMENTS.Feature_ID)#" cfsqltype="cf_sql_integer">
    ) ck ON ck.Restaurant_ID = r.Restaurant_Id
    I want combine this 2 group together. The second group have to replace
    <cfif ARGUMENTS.Feature_ID IS NOT "">
        AND f.Feature_ID IN (#ARGUMENTS.Feature_ID#)
    </cfif>
    I try few way to group this 2 code, but fail to make it. The code i try is on below, it get error.
    SELECT r.Name , r.Restaurant_ID, f.feature, r.Price_Range, r.Cuisine_ID, c.Cuisine,
            s.State_ID, s.State, l.Location_ID, l.Area, l.State_ID,  r.Location_ID
            FROM Restaurants r, Features f, Cuisine c, State s, Location l
            INNER JOIN Bridge1_Restaurant_Features b ON b.Restaurant_ID = r.Restaurant_ID
            INNER JOIN Features f ON b.Feature_ID = f.Feature_ID
            AND r.Cuisine_ID = c.Cuisine_ID
            AND r.Location_ID = l.Location_ID
            AND l.State_ID = s.State_ID
            <cfif ARGUMENTS.Feature_ID IS NOT "">
            INNER JOIN
                 SELECT Restaurant_ID, COUNT(Feature_ID) AS FeatureCount
                 FROM   Bridge1_Restaurant_Features
                 <!--- find matching features --->
                 WHERE  Feature_ID IN ( <cfqueryparam value="#ARGUMENTS.Feature_ID#" cfsqltype="cf_sql_integer" list="true"> )
                GROUP BY Restaurant_ID
                <!--- having ALL of the requested features --->
                 HAVING COUNT(Feature_ID) = <cfqueryparam value="#listLen(ARGUMENTS.Feature_ID)#" cfsqltype="cf_sql_integer">
            ) ck ON ck.Restaurant_ID = r.Restaurant_Id
            </cfif>
            <cfif ARGUMENTS.Price_Range IS NOT "">
            AND r.Price_Range IN (#ARGUMENTS.Price_Range#)
            </cfif>
            <cfif ARGUMENTS.Cuisine IS NOT "">
            AND r.Cuisine_ID = (#ARGUMENTS.Cuisine#)
            </cfif>
            <cfif val(ARGUMENTS.LocationID2) IS #val(ARGUMENTS.StateID)#>
            AND l.State_ID = #val(ARGUMENTS.LocationID2)#
            <cfelse>
                AND l.Location_ID = #val(ARGUMENTS.LocationID2)#
            </cfif>

    Yeah Adam I am listen to you ! But Finally i solve it.
    This is the code i solve .
    SELECT r.Restaurant_ID, r.Name, f.Feature, r.Price_Range, r.Cuisine_ID, c.Cuisine,
                        l.Location_ID, l.Area, s.State
              FROM   Restaurants r
              <cfif ARGUMENTS.Feature_ID IS NOT "">
              INNER JOIN
                   SELECT Restaurant_ID, COUNT(Feature_ID) AS FeatureCount
                   FROM   Bridge1_Restaurant_Features
                   <!--- find matching features --->
                   WHERE  Feature_ID IN ( <cfqueryparam value="#ARGUMENTS.Feature_ID#" cfsqltype="cf_sql_integer" list="true"> )
                  GROUP BY Restaurant_ID
                  <!--- having ALL of the requested features --->
                   HAVING COUNT(Feature_ID) = <cfqueryparam value="#listLen(ARGUMENTS.Feature_ID)#" cfsqltype="cf_sql_integer">
              ) ck ON ck.Restaurant_ID = r.Restaurant_Id
              </cfif>
              INNER JOIN Location l ON r.Location_ID = l.Location_ID
              INNER JOIN State s ON l.State_ID = s.State_ID
              INNER JOIN Cuisine c ON r.Cuisine_ID = c.Cuisine_ID
              INNER JOIN Bridge1_Restaurant_Features b ON b.Restaurant_ID = r.Restaurant_ID
              INNER JOIN Features f ON b.Feature_ID = f.Feature_ID
              <cfif ARGUMENTS.Cuisine IS NOT "">
              AND r.Cuisine_ID = (#ARGUMENTS.Cuisine#)
              </cfif>
              <cfif ARGUMENTS.Price_Range IS NOT "">
              AND r.Price_Range IN (#ARGUMENTS.Price_Range#)
              </cfif>
              <cfif val(ARGUMENTS.LocationID2) IS #val(ARGUMENTS.StateID)#>
              AND l.State_ID = #val(ARGUMENTS.LocationID2)#
              <cfelse>
                   AND l.Location_ID = #val(ARGUMENTS.LocationID2)#
              </cfif>
    Is it the code can be improve more ?

  • How to generate html-code using csv input with JSP or JAVA???

    Hello,
    I want to read out a .csv-file and generate html-code dynmically with JSP in an EP6 Application. The problem is, that the csv-file can’t be located or openend.
    BTW if every knows a good tutorial or weblog for this, please post the link.
    It’s located in a par-archive under:
    />dist>files
    I tried various methods, in the doContent mehtod or with JSP. Everytime same result.
    Here part of the code I tried in the doContent():
    public class CSV extends AbstractPortalComponent
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
            String strWRoot = request.getWebResourcePath();
            String contentCSV="", line="";
            String linesep = System.getProperty("line.separator");
            File fileLoadCSV = new File(strWRoot+"/files/ma_infosysteme.csv");
            boolean exCSV = fileLoadCSV.exists();
            boolean reCSV = fileLoadCSV.canRead();
            int a=0;
            if(exCSV&&reCSV){
                response.write("ok");
                try {
                  BufferedReader inputCSV = new BufferedReader(new FileReader(fileLoadCSV));
                  while((line=inputCSV.readLine())!=null){
                    contentCSV=contentCSVlinelinesep;
                    a++;
                  inputCSV.close(); 
                catch(IOException ioex){
                    System.out.println("Fehler");  
            else {
                response.write("not ok");
            response.write("<br>Wroot: "+strWRoot);
            response.write("<br>File: "+fileLoadCSV);
            response.write("<br>exists: "+exCSV);
            response.write("<br>read: "+reCSV);
            response.write("<br>Input: "+contentCSV);
    The Output is:
    not ok
    Wroot: /irj/portalapps/DHTML
    File: \irj\portalapps\DHTML\files\ma_infosysteme.csv
    exists: false
    read: false
    Input:
    So thanks to everyone who can give me a good hint.
    Bye.

    Without really looking too much into this it looks like the problem is with the way in which you are trying to open the file. I believe that when creating a File object you need to use a physical path. By using the getWebResourcePath() method you are retrieving the URL to this file and not the physical path name. There is another method (can't remember the exact name) called getPublicResourcePath() (or something similar) which will return the physical path to this file, i.e. c:\usr\sap\.....etc. If you try it this way it may well work
    I hope this helps
    D

  • How To debug ABAP code using sapui5 application on NWBC

    Hi All
    I am working on NWBC with SAP_PAO_HRPROFESSIONAL_3 Role. This role contains SAPUI5 application. I am trying debug the ABAP code called while executing this application.
    Please help me how to get into ABAP debugger while executing this application.
    Thank you
    Ujj

    HI Ujj,
    First thing to do is look at the role and see which UI5 application is being executed. The UI5 application will be running in the web container of NWBC, you can make it open in a standalone browser (hold down the CTRL key in NWBC and go to the Help Menu) and then turn on the debugging tools (F12) in the browser. There you will see which Gateway services are being called. You will need to set your ABAP breakpoint in the implementation of the Gateway services. Find the class in SE80.
    Hth,
    Simon

  • To use the transformation process I hear you have to code using OOP, True?

    I've heard that to use the transformation process all update rules, routines must be writtend with OOP and you can't use  the older coding method.  Is this true

    Prefferably Yes Routines hav to be migrated accordingly to OO ABAP.
    <b>Look at</b>
    Re: Doubt Migration of update rules to Transformations ?
    Re: Steps for Copying routine?

  • How to send USSD code using computer/PC

    Hi every one. I am new in J2ME, I ask for help on how to send USSD comand from computer through modem to BTS.

    1. Goto Computer 1, email yourself the file as an attachment.
    2. Goto Computer 2, check your email.
    3. Download the emailed file attachment.
    4. Done
    ( no code required )

  • How to reduce the code while passing.

    hi,
    I am passing the below statemnt to pass the field name and description to the sub_fieldcat.
    since the report has got 100 fields i need to write for all the 100 fields like this, is there any possiblity to pass the field name and the description with less coding
    PERFORM SUB_FIELDCAT USING '' 'BUDAT' 'Posting Date' G_COL 'X'.
    ADD 1 TO G_COL.
    FORM SUB_FIELDCAT USING L_TABNAME TYPE SLIS_TABNAME
                            L_FNAME TYPE SLIS_FIELDNAME
                            L_SEL TYPE DD03P-SCRTEXT_L
                            L_COL TYPE I
                            L_KEY TYPE C.
      I_FIELDCATTAB_WA-REF_TABNAME = L_TABNAME.
      I_FIELDCATTAB_WA-FIELDNAME   = L_FNAME.
      I_FIELDCATTAB_WA-SELTEXT_L   = L_SEL.
      I_FIELDCATTAB_WA-COL_POS     = L_COL.
      I_FIELDCATTAB_WA-KEY         = L_KEY.
      APPEND I_FIELDCATTAB_WA TO I_FIELDCATTAB.
    ENDFORM.             " SUB_FIELDCAT

    Hi Anitha,
    1. To the FM
       we just need to pass the
       internal table Name
    ( There is no need to use the parameter
    I_STRUCTURE_NAME )
    I_INTERNAL_TABNAME Is very important.
    2. While declaring the internal table,
       u can use any number of fields.
       But make sure they are
       declare using LIKE
      eg.
       bukrs like t001-bukrs
      (do not use type)
    3. Rest the FM will take care !
    PS:
    Important parameters are:
    i_program_name,
    i_internal_tabname     = 'ITAB'
    i_inclname             = prg
    where prg is sy-repid
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = prg
          i_internal_tabname     = 'ITAB'
          i_inclname             = prg
        CHANGING
          ct_fieldcat            = alvfc
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    regards,
    amit m.
    Message was edited by: Amit Mittal
    Message was edited by: Amit Mittal

Maybe you are looking for

  • Can i get a refund on mac  os lion

    Hello I Bought mac os lion ages ago and had forgoten to download it my macbook asks me for my password when i download a software and i dont remembe rmy password for a year so i could not downlaod this.

  • How long does it takes to install boot camp?

    Hi, I am short in time so i would like to know how much time does it takes to install bootcamp, by this i mean partitioning, installing windows xp and the drivers. Thanx

  • Will iBooks author support webgl in widgets?

    It would be great to include interactive 3D games in iBooks Author widgets. But Javascript is going to need some help to accomplish this. Does anyone know if webgl will be supported or if there some other way of rendering 3D graphics in the iBooks wi

  • Creating a marquee sign in Illustrator?

    I'm having the hardest time creating a marquee style image in illustator.. (something like this: http://img2.etsystatic.com/004/0/6043957/il_fullxfull.361553430_blus.jpg) So far i've been able to make the rectangle witht he curved angles, but can't s

  • How does one turn off the appletv

    How does one turn off an Apple tv?  I think it's 3d generation.