Different ways to Datasource Enhancement

I know DS enhancement can be done through ABAP Statement CASE,ENDCASE,WHEN. I came to know that this is old technique to enhance the datasource as it makes the code quite messy if several developers work on the same code.
I came across one document on SDN where we create a new program for each datasource which is independent from other enhancement.
I just want to know how this program works and the difference between this technique and old technique as i have limited ABAP knowledge.
What are the exact challenges that we come across when we use CASE,ENDCASE,WHEN statements.
Edited by: Murali K on Jun 1, 2010 6:31 AM

Hi Murli,
1) Datasource enhancement previously was done using CMOD Still many organizatins continue with this approach.
Here you can get option to write code for your appended field in ur Standard datsource where you can write select statements etc.
2) Now SAP is recommending to Write Codes using BADI .this approach helps to maintain individual implementations for each data source enhancement
This methods advantage over previous CMOD method is that ,in CMOD a single include will contain all the ABAP coding (this will create problem in marinating the versions for developers).specially while you are transporting the CMOD code to test and prod systems.
With the new BADI method you can avoid this problem as individual implementations can be transported independently without creating conflicts.
Thanks and Regards
Arun

Similar Messages

  • Wt are different ways to find enhancement spots(User Exits) in ECC 6.0??

    Hi Friends,
    How are you all doing??
    Friends relevant  answers are awarded points. Pls give solutions..
    What are the different ways to find the enhancement spots (i mean user exit points) in ECC 6.0??
    I want to find the enhancement spot in sale order transaction (va01/va02) after save happening or else after commit happen. In that i need to call the badi method on_costing_component. So friends could you give solution for this.

    Hi
    You can see this document for knowing the Userexits for a given Trxn.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/abap-code-samples/userexits%20in%20a%20transaction.doc">Listing UserExits in Transactions</a>
    Regards
    Raj

  • Creating BADI for datasource enhancement in CRM.

    Hi,
    I am working on SAP BI/BW. This is the first time I am working in CRM system with CRM datasources. Facing some problem for datasource enhancement as never done it before in the CRM system. Is there anyone who can help in in creating BADI for datasource enhancement in CRM.
    Thanks in advance
    Moumita

    Hi Prasad Reddy,
    This are the available badis and exits for this t.code:
    Enhancement/ Business Add-in            Description
    Enhancement
    MGA00001                                Material Master (Industry): Checks and Enhancements
    MGA00002                                Material Master (Industry): Number Assignment
    MGA00003                                Material Master (Industry and Retail): Number Display
    Business Add-in
    MG_MASS_NEWSEG                          User-Specific Fields & Segments in Mass Maintenance
    MATGRP_SKU_UPD
    CDT_CHECK_MATERIAL                      Checks for Existence of a Material in a CDT
    BADI_MM_MATNR
    BADI_MAT_F_SPEC_SEL                     BAdI for Material Special Field Selection
    BADI_MATNR_CHECK_PVS
    BADI_MATERIAL_REF                       Addition of customer-defined default data for material
    BADI_MATERIAL_OD
    BADI_MATERIAL_CHECK                     Enhanced checks for material master table
    BADI_GTIN_VARIANT
    BADI_EAN_SYSTEMATIC
    o.of Exits:          3
    o.of BADis:         11
    Find the Exact  exits and badis for ur requirement.
    How to fine the exact badi:
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any
    transaction
    Rgds,
    P.Naganjana Reddy
    if you follow this 7 steps, you will find a suitable BADI.

  • Different ways to find Customer exit, User Exit & Badi

    Dear All,
    What are the different ways by which we can find  Customer Exit, User Exit & Badi for a given transaction code
    Thanks
    Ravindra suvarna

    <b>use  this report  u  can  find associate badi and  user exit both for  perticular transaction</b>&----
    *& Report  ZNEGI16                                                     *
    REPORT  ZNEGI16                                 .
    TABLES : TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA : FIELD1(30).
    DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS : P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA wa_tadir type tadir.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'PROG'
    AND OBJ_NAME = TSTC-PGMNA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM TRDIR
    WHERE NAME = TSTC-PGMNA.
    IF TRDIR-SUBC EQ 'F'.
    SELECT SINGLE * FROM TFDIR
    WHERE PNAME = TSTC-PGMNA.
    SELECT SINGLE * FROM ENLFDIR
    WHERE FUNCNAME = TFDIR-FUNCNAME.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'FUGR'
    AND OBJ_NAME EQ ENLFDIR-AREA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    ENDIF.
    ENDIF.
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT in ('SMOD', 'SXSD')
    AND DEVCLASS = V_DEVCLASS.
    SELECT SINGLE * FROM TSTCT
    WHERE SPRSL EQ SY-LANGU
    AND TCODE EQ P_TCODE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE:/(19) 'Transaction Code - ',
    20(20) P_TCODE,
    45(50) TSTCT-TTEXT.
    SKIP.
    IF NOT JTAB[] IS INITIAL.
    WRITE:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    endcase.

  • Different ways to implement OM Module

    Hi All,
    I am new to this, Please let me know all the 5 different ways to implement OM and PA module in HCM

    Basics of OM
    OM is mainly used to perform numerous business and human resources processes. As the first step an organizational plan is created. The organizational plan is a functional structure representing the enterprise. In OM, the current organizational plan can be created and additional organizational plans are created as archives (this provides a clear picture of the organization at any point in time:past, present or future). Organizational Management is the basis for additional Human Resources components and functions as well as for SAP Business Workflow.
    OM is installed before Personnel Development(PD), Recruitment, Compensation Management (CM/ECM), Workflow, Time Management, Security, ESS/MSS etc. OM structure provides the foundation for these modules and streamlines business processes. For example MSS setup can be such that the manager will be able to view only the details of those working under him/her - the details of persons working under the manager are picked up from OM. Similarly data from OM is used when WF has to route the work of approving the leave of an employee to his/her manager.
    OM is based on the objects and their relationships. Jobs, tasks, positions, etc are the objects. These objects are created in OM. The relationship between various objects is also stored in OM.
    Transaction codes
    PPOM - Change org Unit
    PO03 - Maintain Jobs
    P013 - Maintain Position
    PO10 - Maintain Organizational Unit
    PP01 - Maintain Plan Data (menu-guided)
    PP02 - Maintain Plan Data (Open)
    PP03 - Maintain Plan Data (Event-guided)
    PP05 - Number Ranges
    PP06 - Number Ranges Maintenance HR Data
    PP07 - Tasks/Descriptions
    PP69 - Choose Text for Organizational Unit
    PP90 - Setup Organization
    PP01 - Change Cost Center Assignment
    PP02 - Display Cost Center Assignment
    PP03 - Change Reporting Structure
    PP04 - Display Reporting Structure
    PP05 - Change Object indicators (O/S)
    PP06 - Change Object indicators OS
    PPOA - Display Menu Interface (with dyn.)
    PPOC - Create Organizational Unit
    PPOM - Maintain Organizational Plan
    PPOS - Display Organizational Plan
    PQ01 - Events for Work Center
    PQ02 - Events for Training Program
    PQ03 - Events for Job
    PQ04 - Events for Business Event Type
    PQ06 - Local Events
    PQ07 - Resource Events
    PQ08 - Events for External Person
    PQ09 - Events for Business Event Group
    PQ10 - Events for Organizational Unit
    PQ11 - Events for Qualification
    PQ12 - Resource Type Events
    PQ13 - Events for Position
    PQ14 - Events for Task
    PQ15 - Events for Company
    PSO5 - PD : Administration Tool
    PSOA - Work Center Reporting
    PSOC - Job Reporting
    PSOG - Org Mgmt General Reporting
    PSO1 - Tools Integration PA-PD
    PSOO - Organizational Unit Reporting
    PSOS - Position Reporting
    PSOT - Task Reporting
    Configuration steps apart from steps which were given by Teja
    IMGPersonnel management Organizational management  Basic settings  Maintain number ranges  set up number assignment for all plan versions
    Maintain object type:
    IMGPersonnel management  Organizational management  Basic settings  Data model enhancement  maintain object type
    Maintain infotypes
    IMGPersonnel management Organizational management  Basic settings  Data model enhancementu2014infotype maintenance  maintain infotypes
    Relationaship maintenance:
    IMGPersonnel management Organisational management  Basic settings  Data model enhancement  Relationship maintenance  maintain relationships
    Maintain evaluation paths:
    IMGPersonnel management Organisational management  Basic settings Maintain evaluation paths
    Maintain personnel actions:
    IMGPersonnel management Organisational management  Basic settings Maintain personnel actions
    Activate inheritance of account assignment features
    IMGPersonnel management Organisational management  Basic settings Activate inheritance of account assignment features
    Setup integration with Personnel Administration
    IMGPersonnel management Organisational management  Basic settings Integration  Setup integration with PA
    Transfer data from Pa
    IMGPersonnel management Organisational management  Basic settings integration  transfer data from PA
    Perepare integration with Pa
    MGPersonnel management Organisational management  Basic settings integration Prepare integration with PA
    Transfer data to PA
    IMGPersonnel management Organisational management  Basic settings integration Transfer data to PA
    Check integration consistency
    IMGPersonnel management Organisational management  Basic settings integration Check integration consistency

  • Text datasource enhancement

    hello guys
    I am trying to enhance text datasourcein R3 and got this problem.
    I am trying to load texts for infoobject 'material number' fromR3 table MAKT.....I created view on fields MANDT,MATNR,MAKTX (client,material number,material description) and then created generic datasource onthis.now I replicated and loaded texts to Infoobject 'Material Number'  in BW.
    Now I want to enhance text datasource in R3 so that I will add field MAKTG (material description in capital letters) from MAKT table...I added append structure in extract structure...then I want to write code in CMOD....Here I choose RSAP0001 enhancement...then EXIT_SAPLRSAP003 for enhancing text datasource...here there is no code provided by SAP...so wrote my own code..and activated and then unchecked 'hide field' ....saved the datasource....nowcame to Extractor Checker RSA3 to check if code is working....I am able to see the new field MAKTG but its not populated..it means my code or my way of doing enhancement is wrong...Can anyone please suggest any solution....
    here is my code:
    data: l_s_ZOXID30088 like ZOXID30088 ,
           L_TABIX LIKE SY-TABIX.
    case I_CHABASNM.
    when 'MATNR'.
    LOOP AT  C_T_TEXTS INTO L_S_ZOXID30088.
    L_TABIX = SY-TABIX.
    SELECT SINGLE MAKTG FROM MAKT INTO L_S_ZOXID30088-ZZMAKTG WHERE MATNR =
    L_S_ZOXID30088-MATNR..
    MODIFY C_T_TEXTS FROM  L_S_ZOXID30088 INDEX L_TABIX .
    ENDLOOP.
    ENDCASE.
    Thanx,
    S
    Edited by: SChandx200 on Sep 11, 2009 6:37 AM

    Hi,
    Just check once if the function module EXIT_SAPLRSAP_003 is active...
    Becuse after writing code int he include ZXRSAU03 you will have to activate the funciton module...
    This has to be done the first time when you implement the include...
    If still it doesnt work.. You can put a break point in your code and then debug from RSA3 to chk whey it isnt working...

  • BI server generating  query in a different way between two instances

    Hi All,
    We have executed a report in dev,test instances,BI server generated query in a different way in two instances where as dev BI server is on AIX operating system(recently we migrated from windows),test instance is on still on Windows environment.
    For a report below are the queries
    DEV(AIX)
    WITH
    SAWITH0 AS (select sum(T316025.SALES_QUOTA) as c1,
    T329697.DIVISION_DESC as c2,
    T329697.AREA_DESC as c3,
    T329697.TERRITORY_DESC as c4,
    case when T329697.ACCOUNT_NUM is null then T329697.BILL_TO_PARTY_NAME else concat(concat(concat(T329697.BILL_TO_PARTY_NAME, '('), T329697.ACCOUNT_NUM), ')') end as c5,
    T150993.X_CONS_MAJOR_GROUP as c6,
    T66755.PER_NAME_ENT_YEAR as c7
    from
    W_DAY_D T66755 /* Dim_W_DAY_D_Common */ ,
    W_PRODUCT_D T67704 /* Dim_W_PRODUCT_D */ ,
    WC_SLX_DATA_F T316025 /* Fact_WC_SLX_DATA_F */ ,
    WC_CUSTOMER_HIERARCHY_D T329697 /* Dim_WC_Customer_Hierarchy_D_With_Error */ ,
    OBIEE_SECURITY_LOCATION_SALES T339204,
    W_PROD_CAT_DH T150993 /* Dim_W_PROD_CAT_DH_General */
    where ( T66755.ROW_WID = T316025.DAY_WID and T316025.CUSTOMER_HIERARCHY_WID = T329697.ROW_WID and T67704.ROW_WID = T316025.PRODUCT_WID and T67704.PROD_CAT2_WID = T150993.ROW_WID and T329697.TERRITORY_CODE = nvl(T339204.LOCATION , T329697.TERRITORY_CODE) and T329697.AREA_DESC = 'GROCERY AREA - EAST' and T329697.DIVISION_DESC = 'DOMESTIC SALES DIVISION' and T339204.USER_NAME = upper('Administrator') and case when T329697.ACCOUNT_NUM is null then T329697.BILL_TO_PARTY_NAME else concat(concat(concat(T329697.BILL_TO_PARTY_NAME, '('), T329697.ACCOUNT_NUM), ')') end = 'JETRO CASH AND CARRY ENTERPRISES INC(10313)' and (T66755.PER_NAME_ENT_YEAR in ('2011', '2012')) and (T329697.TERRITORY_DESC in ('BOSTON', 'CHARLOTTE', 'FLORIDA', 'GREAT LAKES', 'MID-SOUTH', 'NEW YORK', 'WHITE ROSE')) )
    group by T66755.PER_NAME_ENT_YEAR, T150993.X_CONS_MAJOR_GROUP, T329697.TERRITORY_DESC, T329697.AREA_DESC, T329697.DIVISION_DESC, case when T329697.ACCOUNT_NUM is null then T329697.BILL_TO_PARTY_NAME else concat(concat(concat(T329697.BILL_TO_PARTY_NAME, '('), T329697.ACCOUNT_NUM), ')') end )
    select distinct SAWITH0.c2 as c1,
    SAWITH0.c3 as c2,
    SAWITH0.c4 as c3,
    SAWITH0.c5 as c4,
    SAWITH0.c5 as c5,
    SAWITH0.c6 as c6,
    SAWITH0.c7 as c7,
    SAWITH0.c1 as c8
    from
    SAWITH0
    order by c1, c6
    Test(Windows)
    select distinct D1.c2 as c1,
    D1.c3 as c2,
    D1.c4 as c3,
    D1.c5 as c4,
    D1.c5 as c5,
    D1.c6 as c6,
    D1.c7 as c7,
    D1.c1 as c8
    from
    (select sum(T316025.SALES_QUOTA) as c1,
    T329697.DIVISION_DESC as c2,
    T329697.AREA_DESC as c3,
    T329697.TERRITORY_DESC as c4,
    case when T329697.ACCOUNT_NUM is null then T329697.BILL_TO_PARTY_NAME else concat(concat(concat(T329697.BILL_TO_PARTY_NAME, '('), T329697.ACCOUNT_NUM), ')') end as c5,
    T150993.X_CONS_MAJOR_GROUP as c6,
    T66755.PER_NAME_ENT_YEAR as c7
    from
    W_DAY_D T66755 /* Dim_W_DAY_D_Common */ ,
    W_PRODUCT_D T67704 /* Dim_W_PRODUCT_D */ ,
    WC_SLX_DATA_F T316025 /* Fact_WC_SLX_DATA_F */ ,
    WC_CUSTOMER_HIERARCHY_D T329697 /* Dim_WC_Customer_Hierarchy_D_With_Error */ ,
    OBIEE_SECURITY_LOCATION_SALES T339204,
    W_PROD_CAT_DH T150993 /* Dim_W_PROD_CAT_DH_General */
    where ( T66755.ROW_WID = T316025.DAY_WID and T316025.CUSTOMER_HIERARCHY_WID = T329697.ROW_WID and T67704.ROW_WID = T316025.PRODUCT_WID and T67704.PROD_CAT2_WID = T150993.ROW_WID and T329697.TERRITORY_CODE = nvl(T339204.LOCATION , T329697.TERRITORY_CODE) and T329697.AREA_DESC = 'GROCERY AREA - EAST' and T329697.DIVISION_DESC = 'DOMESTIC SALES DIVISION' and T339204.USER_NAME = upper('Administrator') and case when T329697.ACCOUNT_NUM is null then T329697.BILL_TO_PARTY_NAME else concat(concat(concat(T329697.BILL_TO_PARTY_NAME, '('), T329697.ACCOUNT_NUM), ')') end = 'JETRO CASH AND CARRY ENTERPRISES INC(10313)' and (T66755.PER_NAME_ENT_YEAR in ('2011', '2012')) and (T329697.TERRITORY_DESC in ('BOSTON', 'CHARLOTTE', 'FLORIDA', 'GREAT LAKES', 'MID-SOUTH', 'NEW YORK', 'WHITE ROSE')) )
    group by T66755.PER_NAME_ENT_YEAR, T150993.X_CONS_MAJOR_GROUP, T329697.TERRITORY_DESC, T329697.AREA_DESC, T329697.DIVISION_DESC, case when T329697.ACCOUNT_NUM is null then T329697.BILL_TO_PARTY_NAME else concat(concat(concat(T329697.BILL_TO_PARTY_NAME, '('), T329697.ACCOUNT_NUM), ')') end
    ) D1
    order by c1, c6
    If we observe test query is very simple and easy to back track but in Dev it is appending like sawwith0,sawwith1 etc..looking difficult.
    Is there in any configuration to change to generate query like Test(with out SAWWITH0).
    NOTE:Any how results are same in both instances.
    Please help me to resolve this issue.
    Thank You,
    Anil Kumar.

    Anil,
    Are your database settings the same in both of the rpds dev and test?
    Check wether you didn't change anything to the default. Open your RDP double click on the Database in the physical layer and go to Feature you can check all the settings there
    Adil

  • Different ways to setup applets... what's best?

    Alright. I need some help deciding how to setup an applet. I'm a high school student and I'm going to be in a competition on Saturday that will be using Java applets. I've been trying to get my hands on as much info about it as I can, but I've seen so many different ways of displaying things on an applet that I'm not sure what to do anymore.
    So here's the deal. In a book I have, they set up applets like this:
    import javax.swing.*;
    public class Example extends JApplet
       public void init()
          getContentPane().add(new ExamplePanel ());
          set size (300, 300)
    }And the other class:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ExamplePanel extends JPanel
       private vars
       public ExamplePanel ()
          set up listeners and set background
       public void paintComponent (Graphics page)
          super.paintComponent (page);
          paint stuff
       event methods
    }I'm pretty sure this works fine, but while on the Java website, looking for examples, I noticed that sun sets up applets like this:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Example extends JPanel implements listener interfaces
       protected and private vars
       public Example ()
          set up panels, labels, basically any JComponent stuff
          create listeners
          use add(...) to put stuff on applet
       event methods
       private static void createAndShowGUI()
            JFrame frame = new JFrame ("Example");
            frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
            JComponent newContentPane = new Example();
            newContentPane.setOpaque (true);
            frame.setContentPane (newContentPane);
            frame.pack();
            frame.setVisible(true);
        public static void main()
            javax.swing.SwingUtilities.invokeLater(new Runnable()
                public void run()
                    createAndShowGUI();
    }I don't know which way is better, but we don't have much time so I need something that's easy. The problem with the second one is that I don't know how to draw shapes on the second one and I might need to do that. I tried using paintComponent in it and things just got screwy. If anyone knows of a better way, please let me know. And since that one was developed directly from Sun, I'm guessing it's more efficient, so I would like to use that one if I can just learn how to use it as easily as the first.
    Also, if anyone knows a completely different way to do this that's better, please let me know.

    The second Example class shows an important issue: swing is not thread safe, and thus all GUI operations, including creating the GUI itself, must be done in the event dispatch thread. Read more about it at http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html#EDT.
    The second class Example does also not seem to be an applet, that is why main() is used instead of init(). But even in init() you are not guaranteed that the current thread is the EDT - it is choosen by the browser you are using - and you should thus use invokeLater() there as well.
    Appart from that, a component should not care if it is displayed in an applet or in an application.

  • A different way to deal with "unknown" user after upgrade from Tiger.

    It's a known issue that doing upgrade and install or archive and install from Tiger to Leopard, produces a lot of folders with "unknown" group in their "get info" panel. This has to do with a different group structure in Tiger and Leopard.
    In Tiger, every user has their own private group with the same name as the username. That group is set to be user's primary group.
    In leopard, every new user with an account is a member of the group staff (gid=20) which is not present in Tiger. Leopard doesn't fully understand Tiger's private group structure, hence the "unknown" group. This causes various problems such as Finder crashes when trying to change the permissions and ownership in the get info window.
    Apple's proposed way of dealing with this is described [here|http://docs.info.apple.com/article.html?artnum=307128].
    However, this method doesn't change the existing group structure and doesn't resolve all the problems.
    I'd like to suggest a different way of dealing with it.
    1. create a new admin user (if you don't have one already), log out of your primary account and log into the new one.
    2. enter the following in terminal:
    *sudo dscl . delete /users/"username"*
    where username is the short name of the user on the main account (not the one you are currently logged into).
    This will delete that user.
    3. Log out/in.
    4. go to system preferences->accounts and create a new user with the name and short name exactly as the one you've deleted in step 2.
    You'll be get a popup saying that a home directory by this name already exists and asking if you want to use it. Say "Yes".
    That's it. Your main user will be recreated using the native group structure of Leopard with gid=20(staff). Permissions on your home directory will be reset with correct group and ownership.
    I tested the process on my powerbook after an upgrade and install from Tiger to leopard and it worked without a hitch.
    I like this method better than Apple's because it completely gets rid of Tiger's group structure which was creating all the confusion. The only downside as far as I can see is that you might have to manually change the group ownership on some files belonging to the main user that sit outside your home directory.
    I would appreciate any comments on this.

    hmm, I confess, I did this before installing 10.5.2 so i can't say for sure. However, I've dealt with a few people (see e.g. this [thread|http://discussions.apple.com/thread.jspa?messageID=7012957]) who are running 10.5.2 and still have this issue. I don't know what if anything 10.5.2 did about this but I'm quite sure that it didn't change the group structure inherited from Tiger.
    Message was edited by: V.K.

  • Two separate versions of the same file corrupted in different ways...

    I was working on a Photoshop CS4 file last night that was created in CS4 and has only been opened on this machine in CS4. I saved the file and closed Photoshop. When I open the file today, all my layers are gone, flattened into one Background layer, and the image looks like colored TV static. On top of that, the separate, older version of this file with a different name (created earlier in the week on the same machine in the same CS4) will not open at all - I get the error message, "Could not complete your request because the file is empty" and the file size has mysteriously shrunk to 76 KB from 20+ MB. What happened?! I'm guessing these files are corrupted beyond recovery, but why and how did this happen? Has anyone had this or a similar problem? I want to know how to prevent this from happening in the future. Please help! Thank you. =)

    Thanks for the suggestion, Chris.
    Same issue, new question - don't ask me why I did this, but while both Photoshop and the now corrupted file were open, I changed the name of the folder containing the file, then continued to save the open version of the file without first closing it and reopening it from the newly renamed folder. Could this have caused both files in that folder to become corrupted in different ways? The other file that gives me the "file is empty" error was not open at the time, but it was in that folder. I'm thinking maybe by changing the path to the files while Photoshop was running, that could have triggered this. ?? I have 3 1TB internal drives raided to read as 1 drive, so I'm really hoping that one of these disks is not dying on me as you suggested. I was also backing up an external drive using BackBlaze when this all occurred - any possible connection? How can I find out if one of my three raided drives (and which one) might be going bad?
    Thanks!!

  • Multiple iPhoto libraries to manage photostreams in different ways

    My wife and I both have iPhone's. I have a 5s and she a 5. We share an iCloud account so that all photos she takes and ones I take go into one photostream and then automatically get loaded on my iMac hard drive. This way we are sure to not lose any photos.
    This works great for that purpose. However, I would like to create an iPhoto library that will only upload photos taken with my iPhone.
    I know I can create multiple iPhoto libraries, but I would like to have the ability to manage preferences for each so that they manage photos in different ways.
    Is there a way to do this?
    Thanks in advance for any suggestions you may offer.
    Keith

    I know I can create multiple iPhoto libraries, but I would like to have the ability to manage preferences for each so that they manage photos in different ways.
    Keith, the problem is, that only one iPhoto ibrary can be associated with the photo stream on any device, see e.g.  http://documentation.apple.com/en/aperture/usermanual/index.html#chapter=14%26se ction=2%26tasks=true
    Photo Stream is designed to work with one Aperture or iPhoto library at a time. However, it’s easy to switch the library Photo Stream uses to upload and download photos.
    If you enable the photo stream in a different library, the photo stream will be removed from the earlier library. You would continually have to reanable the photo straem when switching between libraries, and each time the stream would be reset. This way, auto matic import will not work reliably, because the photo stream would only be seeing the current ly stored photos in iCloud.
    Have you considered to use the Shared Photo Streams for specific purposes? I am using the Shared Photo Streams as thematic iCloud albums, for wildlife photos, family photos, etc.
    iCloud: Using and troubleshooting Shared Photo Streams
    -- Léonie

  • Creating BADI for datasource enhancement in CRM system

    Hi,
    I am working on SAP BI/BW. This is the first time I am working in CRM system with CRM datasources. Facing some problem for datasource enhancement as never done it before in the CRM system. Is there anyone who can help in in creating BADI for datasource enhancement in CRM.
    Thanks in advance
    Moumita

    Hi Kushal,
    You can find the BADI name by,
    Go to Transaction SE24
    Enter the Object Type CL_EXITHANDLER and click on Display.
    Double Click on method "GET_INSTANCE".
    Put a Break-point on Call method cl_exithandler=>get_class_name_by_interface
    Run RSA3 transaction and execute the DataSource.
    The execution will stop at the break point.
    Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    Thanks,
    Kokila

  • What are the different ways to upload file data to SAP? Please help

    Hi Experts,
       I have to transfer huge file data (few lakhs records) to SAP business transaction. What are the different ways to do the same? I have heard of BDC and LSMW. But are there any more options?
    Which option is best suited for huge file data?
    Is LSMW an old technology and SAP will not support it any more?
    Kindly answer my queries at the earliest.
    I will be greatful to you if you can help me.
    Thanks
    Gopal

    for uplodig data to non sap we have 2 methodes
    i) if u know bapi u will use lasm
    2) bdc
    but u mentioned so many records isthere
    best thing is u will uplode all record sto al11 using XI interface
    then u have to write bdc / lsmw  program
    beter to go for lsmw before that u will find bapi
    if u will unable to find bapi
    u have to create bapi and use it in lasmw
    ofter that u have schedule the lsmw program as a bockground
    then u have to create a job for it
    and release from sm 37
    then u have to moniter through bd87
    if u want to go through i will help u.
    if it is usefull to u pls give points
    Saimedha

  • What are the Different Ways of receiving Acknowlegements ?

    Hi Experts,
    Can you please let me know what are the Different Ways of receiving Acknowlegements from target system as a response to the Message sent from source system.
    As when we send Idoc to target system acknowledgement is sent through XI to Source system, what are the configuration steps required for it. Can we use Webservice or link which can be provided to target/customer system and acknowledgement is confirmed using this medium. Please suggest any possible option.
    Where I can find the related information or standard document about the same.
    Please guide.
    Regards,
    Nitin

    Hi ,
    Can you please let me know what are the Different Ways of receiving Acknowlegements from target system as a response to the Message sent from source system.
    System acknowledgments used by the runtime environment to confirm that an asynchronous message has reached the receiver.
    Application acknowledgments used to confirm that the asynchronous message has been successfully processed at the receiver
    These are of positive or Negative.
    As when we send Idoc to target system acknowledgement is sent through XI to Source system, what are the configuration steps required for it. Can we use Webservice or link which can be provided to target/customer system and acknowledgement is confirmed using this medium. Please suggest any possible option.
    This is based on your souce system to accept the ack, what is the protocol used to communicate with the source system.
    http://help.sap.com/saphelp_nw04/helpdata/EN/55/65c844539349e9b1450581ab44a5e6/frameset.htm
    Regards
    Harsha Paruchuri

  • What are the different ways to back up your photos from iphoto using a MacBook Pro which does not have a disk drive?

    What are the different ways to back up your photos from iphoto using a MacBook Pro which does not have a disk drive?

    Note - that no internet backup service has been proven to be safe and effective for backing up the iPhoto library - unless you personally have backup uyp an iPhoto library and restored it sucussfuly form one it should not be recommended - a large number of people have lost their photos trying it
    LN

Maybe you are looking for