What is the best way to separate functionality ?

I have this project where I need to develop a component  for other flash developers to use. The scenario if you are the one who's going to use my "component" is like this:
1) you create a new project
2) you load the provided swf (or include the provided swc file) file and use the documented api (using interfaces if loaded as swf) to initiate it (for example just call the initiate function and that's it). What the component does itself is pretty much just adding a start up functionality to the website you are building, which includes: functions which make httpRequests and get data which the website will use, loading modules with fonts/graphic assets. It will also communicate the progress of these to the main application so the flex dev can display the progress to the user. At the end when the component has finished prepearing the assets you'll need for the website it notifies the main application.
3) And there is where the flex dev start his work using the api provided with the component to access the data he needs.
So what I want to do is package and keep my component source code compiled (to restrict access to the source code) and provide and easy way for the developers to use it. So I figured there 2 ways of doing that:
1) compile a module/application swf
2) complie a swc with a singleton
I started doing it with module swf when I started wondering if that's the best way to do it. I would be happy if someone could give me any thoughts on this one, pros and cons maybe why should I do that and not the other, hopefully an adobe employee will take a look too. Thanks in advance!

Actually, can I even compile swc files from flex using framework components like httpRequest and then load them as RSL ?
*UPDATE:
Seems like I can make my custom component include it in a library project, export it as swc and include that swc as RSL in my actual Flex project.
But I'm still not sure which approach is better, using RSL for this case or just a module? Does it make any difference ?
Also another question that rises in my mind is that if using RSL which class should I extend from, when this component will have no visual representation but should be able to do httpRequests and load modules/applications?
Message was edited by: FM_Flame

Similar Messages

  • What is the best way to reuse functions in MVC environment?

    I have several commands (using Cairngorm MVC) which use the
    same type of function that returns a value. I would like to have
    this function in one place, and reuse it, rather than duplicate the
    code in each command. What is the best way to do this?

    You could put it in an actionscript file, and then just
    import that file in wherever you need it.

  • What is the best way, while creating Function Module based extractor

    Hi Friends,
    I am Sreekanth.
    I have created a Functio Module based Extractor,
    To fetch data from COPA tables.
    In this extracton 3 tables are getting involved.
    1) CE3OP01 2) CE4OP01 and 3) CE1OP01.
    Logic required is as follow:
    1) get data from CE3OP01 and for all entries of this data set,
    get data from CE4OP01 and CE1OP01 and finally send the data set to BW after few manupulations.
    I have implemented the whole logic and its working fine in DEVELOPMENT box where data volume is less.
    But the same code is timing out in Quality Box, due to huge volues of data.
    Below I am copying the code that i am using . Any body can suggest me how to proceed further so that my code works with huge volumes of data.
    Now I am getting the time out error while selection data from CE3IOP01 table itself.
    FUNCTION /ds1/c_bw_zds_copa_recon.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  /DS1/FI_COPA_RECN OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
                            PROGRAM INFORMATION                          *
    RIEF ID.......: N/A                                                  *
    PROGRAM.......: /DS1/C_BW_ZDS_COPA_RECON               
    PROGRAM FUNCTION: This Function Module Extracts Cost Center, Company *
    Code, and all Amount fields form CE3OP01 table and  sectaktbo       "
    *     Current profitability segment (CO-PA)                          *
         paobjnr     "     Profitability Segment Number (CO-PA)       *
         pasubnr     "     Profitability segment changes (CO-PA)      *
         bukrs            "     Company Code
         kndnr       "     Customer from CE4Op01 table.               *
    Segrigate one record from CE3Op01 into 93 based on Value fields.    *
    PROGRAM TYPE..Function Module                                        *
    DEV. CLASS..../DS1/MI_01                                             *
    LOGICAL DB.... N/A                                                   *
                   Conventions used in the Program                       *
    *     global variables      --> g_*                                    *
    *     local variables       --> l_*                                    *
    *     constants             --> c_*                                    *
    *     internal tables       --> t_*                                    *
    *     structures            --> x_*                                    *
    *     parameters            --> p_*                                    *
    *     select-options        --> s_*                                    *
    *     ranges                --> r_*                                    *
    *     workarea          --> w_*                                    *
    *     field symbol            --> fs_*                                   *
    Declaration for Interface: Selection criteria
      STATICS: s_s_if TYPE srsc_s_if_simple,
    Maximum number of lines for DB table
      ls_s_if TYPE srsc_s_if_simple, "Static Structure
    counter
              ls_counter_datapakid LIKE sy-tabix,"Static Counter
    cursor
              ls_cursor TYPE cursor,"Static Cursor.
              ls_cursor1 TYPE cursor."Static Cursor.
    *CONSTANTS
      CONSTANTS:  lc_datasource TYPE char14 VALUE 'ZDS_COPA_RECON',
                                                 " Data Source Name
                  lc_msgtype TYPE char1 VALUE 'E',  "message type
                  lc_msgcls  TYPE char2 VALUE 'R3', "message class
                  lc_msgnum  TYPE char3 VALUE '009',"Message Number.
                  lc_001 TYPE char3 VALUE '001',
                  lc_b0 TYPE char2 VALUE 'B0',
                  lc_10 TYPE char2 VALUE '10',
                  lc_01 TYPE char2 VALUE '01',
                  lc_02 TYPE char2 VALUE '02',
                  lc_1 TYPE sy-tabix VALUE 1.
    *Data Declaration.
      DATA: lt_ce3op01  TYPE STANDARD TABLE OF x_ce3op01,
            " Internal table for ce3op01
            lt_ce3op02  TYPE STANDARD TABLE OF x_ce3op01,
            lt_ce4op01  TYPE STANDARD TABLE OF x_ce4op01,
            " Internal table for ce4op01
            lw_ce3op01  TYPE x_ce3op01,
            " Work area for ce3op01
            lw_ce3op02  TYPE x_ce3op01,                         "MOD-002
            lw_ce4op01  TYPE x_ce4op01,
            " Work area for ce4op01
            lw_e_t_data TYPE /ds1/fi_copa_recn,
      " Work area for /ds1/fi_copa_recn.
    *CE1op01
      lt_ce1op01 TYPE STANDARD TABLE OF x_ce1op01,"Internaltable
      lw_ce1op01 TYPE x_ce1op01,"Work area for CE1op01.
    **CE1op01
      lt_fldlist TYPE STANDARD TABLE OF lx_fldlist, "fields list
      lw_fldlist TYPE lx_fldlist,"  FIELDS list work area
      lt_flnmval TYPE STANDARD TABLE OF lx_flnmval,"table for splitting
      lw_flnmval TYPE lx_flnmval,"work area for spilitting
      l_index TYPE i VALUE 1, "to keep track of index.
      l_len   TYPE i,
      l_s_no_recs   TYPE sy-tabix VALUE 99,
      l_s_loop_from        TYPE sy-tabix,     "from "MOD-002
      l_s_loop_to          TYPE sy-tabix,                       "to"MOD-002
      l_norecs             TYPE sy-tabix,                       "MOD-002
      l_count              TYPE sy-tabix.                       "MOD-002
    *Field Symbols.
      FIELD-SYMBOLS:
         <fs_flnmval> TYPE lx_flnmval."Field symbol for fild values
    Selection Ranges
      RANGES:  lr_bukrs      FOR ce4op01-bukrs, " Range for company code
      lr_versi      FOR ce3op01-versi," Range for version
      lr_paledger   FOR ce3op01-paledger,"Range for paledger
      lr_vrgar      FOR ce3op01-vrgar,"Range for vrgar
      lr_gjahr      FOR ce3op01-gjahr,"Range for Fiscal year
      lr_perbl      FOR ce3op01-perbl."Range for perbl
    Initialization mode (first call by SAPI) or data transfer mode
      IF i_initflag = sbiwa_c_flag_on.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Check DataSource validity
        IF ls_counter_datapakid = 0.
          CASE i_dsource.
            WHEN lc_datasource.
            WHEN OTHERS.
              IF 1 = 2. MESSAGE e009(r3). ENDIF.                "#EC *
    this is a typical log call. Please write every error message like this
              log_write lc_msgtype "'E'                  "message type
                        lc_msgcls  "'R3'                 "message class
                        lc_msgnum  "'009'                "message number
                        i_dsource   "message variable 1
                        ' '.                 "message variable 2
              RAISE error_passed_to_mess_handler.
          ENDCASE.
          APPEND LINES OF i_t_select TO s_s_if-t_select.
          APPEND LINES OF i_t_fields TO s_s_if-t_fields.
    Fill parameter buffer for data extraction calls
          ls_s_if-requnr    = i_requnr.
          ls_s_if-dsource   = i_dsource.
          ls_s_if-maxsize   = i_maxsize.
          ls_s_if-initflag  = i_initflag.
      Company Code
          LOOP AT s_s_if-t_select  INTO  i_t_select WHERE fieldnm = c_bukrs.
            MOVE: i_t_select-sign   TO lr_bukrs-sign,
                  i_t_select-option TO lr_bukrs-option,
                  i_t_select-low    TO lr_bukrs-low,
                  i_t_select-high   TO lr_bukrs-high.
            APPEND lr_bukrs.
          ENDLOOP.
    *Version (0)
    *SRSC_S_IF_SIMPLE-T_SELECT
          LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_versi.
       LOOP AT i_t_select  INTO  s_s_if-t_select WHERE fieldnm = c_versi.
            MOVE: i_t_select-sign   TO lr_versi-sign,
                  i_t_select-option TO lr_versi-option,
                  i_t_select-low    TO lr_versi-low,
                  i_t_select-high   TO lr_versi-high.
            APPEND lr_versi.
          ENDLOOP.
    *Currency Type (company code only)
         LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_paledger.
            MOVE: i_t_select-sign   TO lr_paledger-sign,
                  i_t_select-option TO lr_paledger-option.
            IF i_t_select-low = lc_b0.
              MOVE lc_01 TO lr_paledger-low.
            ELSEIF  i_t_select-low = lc_10.
              MOVE lc_02 TO lr_paledger-low.
            ENDIF.
            APPEND lr_paledger.
          ENDLOOP.
    *Record Type
          LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_vrgar.
            MOVE: i_t_select-sign   TO lr_vrgar-sign,
                  i_t_select-option TO lr_vrgar-option,
                  i_t_select-low    TO lr_vrgar-low,
                  i_t_select-high   TO lr_vrgar-high.
            APPEND lr_vrgar.
          ENDLOOP.
    *Fiscal Year
          LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_gjahr.
            MOVE: i_t_select-sign   TO lr_gjahr-sign,
                  i_t_select-option TO lr_gjahr-option,
                  i_t_select-low    TO lr_gjahr-low,
                  i_t_select-high   TO lr_gjahr-high.
            APPEND lr_gjahr.
          ENDLOOP.
    *Period Block/Year
          LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_perbl.
            MOVE: i_t_select-sign   TO lr_perbl-sign,
                  i_t_select-option TO lr_perbl-option,
                  i_t_select-low    TO lr_perbl-low,
                  i_t_select-high   TO lr_perbl-high.
            APPEND lr_perbl.
          ENDLOOP.
    *Value Field Name.
          LOOP AT s_s_if-t_select INTO i_t_select WHERE fieldnm = c_fldnm.
            MOVE:
            i_t_select-sign   TO gr_zfldnm-sign,
            i_t_select-option TO gr_zfldnm-option,
            i_t_select-low   TO gr_zfldnm-low,
            i_t_select-high   TO gr_zfldnm-high.
            APPEND gr_zfldnm.
          ENDLOOP.
    First data package -> OPEN CURSOR
          IF ls_counter_datapakid = 0.
    *Create 93 Field names in an internal table.
         MOVE 'VV010' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV011' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV012' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV013' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV014' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV015' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV016' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV020' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV021' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV030' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV031' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV032' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV033' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV034' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV035' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV200' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV201' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV202' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV203' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV036' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV037' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV038' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV039' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV040' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV041' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV042' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV043' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV204' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV205' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV211' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV212' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV213' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV222' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV223' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV230' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV232' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV233' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV500' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV501' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV502' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV503' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV504' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV505' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV506' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV507' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV508' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV509' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV510' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV511' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV512' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV513' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV514' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV515' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV516' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV517' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV518' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV519' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV520' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV236' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV206' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV051' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV052' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV053' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV054' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV055' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV056' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV057' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV058' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV059' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV060' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV241' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV242' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV243' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV244' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV245' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV246' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV247' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV248' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV249' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV250' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV521' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV522' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV523' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV524' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV525' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV526' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV527' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV528' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV529' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV530' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV227' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV226' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
         MOVE 'VV224' TO lw_fldlist-fldnam. APPEND lw_fldlist TO lt_fldlist.
            OPEN CURSOR WITH HOLD ls_cursor FOR
                 SELECT
                 paobjnr      " Profitability Segment Number (CO-PA)
                 paledger     " Currency type for an operating concern
                 vrgar        " Record Type
                 versi        " Plan version (CO-PA)
                 gjahr            " Fiscal Year
                 perbl            " Fiscal year/period block
                 pasubnr
                 vv010001     " List Price
                 vv011001     " Formula Price
                 vv012001     " Customer Price
                 vv013001     " Manual Price
                 vv014001     " Retail Pump Price
                 vv015001     " Markup
                 vv016001     " Net Proceeds Other
                 vv020001     " Excise Duty Offset
                 vv021001     " Duties & Government
                 vv030001     " Sales Discounts
                 vv031001     " Sales Surcharges
                 vv032001     " Sales Rebates
                 vv033001     " Agents Comm Paid
                 vv034001     " RBA CR Royalties
                 vv035001     " Other Revenues
                 vv200001     " Transfer PriceSupply
                 vv201001     " Prim Tran Tariff Sup
                 vv202001     " S&Handling TariffDis
                 vv203001     " Sec Trans Tariff Dis
                 vv036001     " Proceeds from Servic
                 vv037001     " Exchanges
                 vv038001     " Throughput fees
                 vv039001     " Output Tax Offset
                 vv040001     " CR comm & Oth Oil Pr
                 vv041001     " Supplier fees
                 vv042001     " RBA Fairshare Adjust
                 vv043001     " Contr Comm Paid IG
                 vv204001     " Sec Tran Tariff Supp
                 vv205001     " Comp Stock Obligatio
                 vv211001     " Prim Tran Tar Transf
                 vv212001     " S&Handling Tar Trans
                 vv213001     " Sec Trans TariffTran
                 vv222001     " DIS:S&Handl Tar OvUn
                 vv223001     " DIS:Sec Tr TarifOvUn
                 vv230001     " Transfer Price LSC
                 vv232001     " S&Handling Tar LSC
                 vv233001     " Sec Trans Tariff LSC
                 vv500001     " 3rd Party Purchases
                 vv501001     " Transf from Oth Sect
                 vv502001     " Purchases IG
                 vv503001     " Inter-Seg Transf Pur
                 vv504001     " Import Freight
                 vv505001     " Stock Variations
                 vv506001     " Other Product Cost
                 vv507001     " Pipeline Operat Exp
                 vv508001     " Primary Transp Expen
                 vv509001     " Manufacturing Expens
                 vv510001     " Supply /Process Exp
                 vv511001     " MK Processing Plants
                 vv512001     " S&Handling Expenses
                 vv513001     " Sec Transp Expenses
                 vv514001     " Point of Sale Expens
                 vv515001     " Contr Comm Rec IG
                 vv516001     " Assoc Inc Dividend
                 vv517001     " Marketing & Sell Exp
                 vv518001     " Other Rev from Dist
                 vv519001     " Other Rev Transferrd
                 vv520001     " Stock Write-Off
                 vv236001     " Oth cost Tar LSC SMP
                 vv206001     " Prim Trp tariff Dist
                 vv051001     " CR Net Turnover
                 vv052001     " Dummy Price 2
                 vv053001     " Dummy Price 3
                 vv054001     " Dummy Price 4
                 vv055001     " Dummy Price 5
                 vv056001     " Dummy Price 6
                 vv057001     " Dummy Price 7
                 vv058001     " Dummy Price 8
                 vv059001     " Dummy Price 9
                 vv060001     " Dummy Price10
                 vv241001     " DummyTariff 1
                 vv242001     " DummyTariff 2
                 vv243001     " DummyTariff 3
                 vv244001     " DummyTariff 4
                 vv245001     " DummyTariff 5
                 vv246001     " DummyTariff 6
                 vv247001     " DummyTariff 7
                 vv248001     " DummyTariff 8
                 vv249001     " DummyTariff 9
                 vv250001     " DummyTariff10
                 vv521001     " SD&A Rebates
                 vv522001     " Dummy Cost 2
                 vv523001     " Dummy Cost 3
                 vv524001     " Dummy Cost 4
                 vv525001     " Dummy Cost 5
                 vv526001     " Dummy Cost 6
                 vv527001     " Dummy Cost 7
                 vv528001     " Dummy Cost 8
                 vv529001     " Dummy Cost 9
                 vv530001     " Dummy Cost 10
                 vv227001     " Sec Tr TarifOvUn LSC
                 vv226001     " S&Handl Tar OvUn LSC
                 vv224001     " Pr Tra TariffOvU DIS
                 FROM ce3op01
                 WHERE   paledger = lc_02 AND
                 vrgar    IN lr_vrgar AND
                 versi    IN lr_versi AND
                 perbl    IN lr_perbl AND
                 gjahr    IN lr_gjahr.
          ENDIF.
    For all other cursors.
          FETCH NEXT CURSOR ls_cursor
              APPENDING TABLE lt_ce3op02
              PACKAGE SIZE ls_s_if-maxsize.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
          SORT lt_ce3op02 BY paobjnr pasubnr paledger vrgar versi gjahr
               perbl.
          DELETE ADJACENT DUPLICATES FROM lt_ce3op02 COMPARING paobjnr.
    *Begin of MODE-002
          DESCRIBE TABLE lt_ce3op02 LINES l_norecs.
          l_s_loop_from = lc_1.
          DO.
            l_s_loop_to = l_s_loop_from + l_s_no_recs.
            LOOP AT lt_ce3op02 INTO lw_ce3op02
            FROM l_s_loop_from TO l_s_loop_to .
              APPEND lw_ce3op02 TO lt_ce3op01.
            ENDLOOP.
            SORT lt_ce3op01 BY paobjnr.
    *End of MOS-002
            SELECT
              aktbo       "     Current profitability segment (CO-PA)
              paobjnr     "     Profitability Segment Number (CO-PA)
              pasubnr     "     Profitability segment changes (CO-PA)
              kndnr       "     Customer
              artnr
              bukrs     "     Company Code
              prctr
              kokrs
           FROM ce4op01
           INTO TABLE lt_ce4op01
           FOR ALL ENTRIES IN lt_ce3op01
           WHERE paobjnr = lt_ce3op01-paobjnr AND
                 pasubnr = lt_ce3op01-pasubnr AND
                 bukrs  IN lr_bukrs.
    *CE1op01
            SELECT
            paledger
            vrgar
            versi
            perio
            paobjnr
            pasubnr
            belnr
            posnr
            rbeln
            rposn
           FROM ce1op01
           INTO TABLE lt_ce1op01
           FOR ALL ENTRIES IN lt_ce3op01
           WHERE paledger = lt_ce3op01-paledger AND
                 vrgar    = lt_ce3op01-vrgar AND
                 versi    = lt_ce3op01-versi AND
                 perio    = lt_ce3op01-perbl AND
                 paobjnr = lt_ce3op01-paobjnr AND
                 pasubnr = lt_ce3op01-pasubnr.
    **CE1op01
            LOOP AT lt_ce3op01 INTO lw_ce3op01.
              MOVE:
              lw_ce3op01-paobjnr   TO lw_flnmval-paobjnr,
             lw_ce3op01-paledger  TO lw_flnmval-paledger,
             lw_ce3op01-vrgar     TO lw_flnmval-vrgar,
                      lw_ce3op01-versi     TO lw_flnmval-versi,
                      lw_ce3op01-gjahr     TO lw_flnmval-gjahr,
                      lw_ce3op01-perbl     TO lw_flnmval-perbl.
    *appending all 93 fields as records
              MOVE lw_ce3op01-vv010001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv011001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv012001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv013001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv014001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv015001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv016001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv020001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv021001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv030001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv031001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv032001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv033001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv034001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv035001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv200001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv201001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv202001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv203001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv036001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv037001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv038001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv039001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv040001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv041001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv042001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv043001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv204001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv205001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv211001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv212001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv213001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv222001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv223001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv230001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv232001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv233001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv500001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv501001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv502001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv503001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv504001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv505001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv506001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv507001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv508001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv509001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv510001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv511001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv512001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv513001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv514001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv515001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv516001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv517001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv518001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv519001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv520001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv236001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv206001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv051001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv052001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv053001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv054001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv055001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv056001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv057001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv058001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv059001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv060001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv241001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv242001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv243001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv244001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv245001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv246001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv247001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv248001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv249001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv250001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv521001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv522001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv523001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv524001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv525001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv526001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv527001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv528001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv529001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv530001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv227001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv226001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
              MOVE lw_ce3op01-vv224001    TO lw_flnmval-zamunt.
              APPEND lw_flnmval TO lt_flnmval.
    *Segrigating all one record into 102 records is complete
            ENDLOOP.
            LOOP AT lt_flnmval ASSIGNING <fs_flnmval>.
              IF l_index > 93.
                l_index = 1.
              ENDIF.
              READ TABLE lt_fldlist INTO lw_fldlist INDEX l_index.
              IF sy-subrc = 0.
                CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                  EXPORTING
                    input  = lw_fldlist-fldnam
                  IMPORTING
                    output = <fs_flnmval>-fldnam.
              ENDIF.
              l_index = l_index + 1.
            ENDLOOP.
            SORT lt_ce4op01 BY paobjnr.
            SORT lt_ce1op01 BY paobjnr  paledger vrgar  versi.
            SORT gr_zfldnm BY low.
            DELETE lt_flnmval WHERE fldnam NOT IN gr_zfldnm.
            LOOP AT lt_flnmval INTO lw_flnmval.
              READ TABLE lt_ce4op01 INTO  lw_ce4op01 WITH KEY
                                 paobjnr = lw_flnmval-paobjnr BINARY SEARCH.
              IF sy-subrc = 0.
                MOVE :   lw_flnmval-paledger  TO lw_e_t_data-paledger,
                         lw_flnmval-vrgar     TO lw_e_t_data-vrgar,
                         lw_flnmval-versi     TO lw_e_t_data-versi ,
                         lw_flnmval-gjahr     TO lw_e_t_data-gjahr,
                         lw_flnmval-perbl     TO lw_e_t_data-perbl,
                         lw_ce4op01-bukrs     TO lw_e_t_data-bukrs,
                         lw_ce4op01-kndnr     TO lw_e_t_data-kndnr,
                         lw_ce4op01-artnr     TO lw_e_t_data-artnr,
                         lw_ce4op01-prctr     TO lw_e_t_data-prctr,
                         lw_ce4op01-kokrs     TO lw_e_t_data-kokrs,
                         lw_flnmval-fldnam   TO lw_e_t_data-zfldnm,
                         lw_flnmval-zamunt   TO lw_e_t_data-zamount.
    CE1op01
                READ TABLE lt_ce1op01 INTO lw_ce1op01 WITH KEY
                            paobjnr = lw_flnmval-paobjnr
                            paledger = lw_flnmval-paledger
                            vrgar  = lw_flnmval-vrgar
                            versi = lw_flnmval-versi BINARY SEARCH.
                IF sy-subrc = 0.
                  MOVE: lw_ce1op01-rbeln  TO lw_e_t_data-rbeln,
                        lw_ce1op01-rposn  TO lw_e_t_data-rposn.
                ENDIF.
    CE1op01
                APPEND lw_e_t_data TO gt_out_data.
              ENDIF.
            ENDLOOP.
    *Begin of MOD-002
            FREE lt_flnmval.
            REFRESH :lt_ce3op01,lt_ce4op01,lt_ce1op01.
            e_t_data[] = gt_out_data[].
            DELETE e_t_data WHERE zfldnm NOT IN gr_zfldnm.
            l_s_loop_from = l_s_loop_to + lc_1.
            l_count = l_count + 20.
            IF l_count GE l_norecs.
              EXIT.
            ENDIF.
          ENDDO.
    *End of MOD-002
          ls_counter_datapakid = ls_counter_datapakid + 1.
        ENDIF.                        "IF S_COUNTER_DATAPAKID = 0
      ELSE.
        IF i_maxsize IS INITIAL.
          RAISE error_passed_to_mess_handler.
        ENDIF.
        IF g_start IS INITIAL.
          g_start = 1.
        ELSE.
          g_start  = g_end + 1.
        ENDIF.
        g_end = g_start + i_maxsize - 1.
    Population of E_T_DATA based on Data records size
        APPEND LINES OF gt_out_data FROM g_start TO g_end TO e_t_data.
        DELETE e_t_data WHERE zfldnm NOT IN gr_zfldnm.
        IF e_t_data[] IS INITIAL.
          RAISE no_more_data.
        ENDIF.
        ls_counter_datapakid = ls_counter_datapakid + 1.
      ENDIF.
    ENDFUNCTION.
    Thanks & regards,
    Sreekanth
    +91 9740091981

    Hello Sreekanth,
    See this blog [Generic Extraction via Function Module|/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module]
    Also see this
    [Line Item Level Data Extraction for Financial Accounting and Controlling|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a7f2f294-0501-0010-11bb-80e0d67c3e4a]
    Thanks
    Chandran

  • What is the best way to keep my personal files stored in iCloud separate from my work-related files?

    What is the best way to keep my personal files stored in iCloud separate from my work-related files? It seems that I'm not allowed to link my iPad mini and my work iMac using two different accounts, so I'm wondering how to make my single personal account work for both, while keeping personal vs work files reasonably separated.
    Thanks for any suggestions.

    Is it possible for you to upgrade your account to iCloud Drive? That would mean, all Macs upgraded to Yosemite, and all mobile devices to iOS8?
    See:  iCloud Drive FAQ and iCloud: About using iWork for iOS and iCloud
    In iCloud Drive you could create two separate custom folders, one for work documents and one for private documents and organize your documents there.  Don't use the app specific folders (Keynote, Pages, Numbers, ...) , because you can only create one level of folders inside these folders.

  • (New to C# here) What is the best way to return false in a function if it cannot be executed successfully?

    In Javascript or PHP you can have a function that could return, for example, a string in case of success and false in case of failure.
    I've noticed (in the few days I've been learning C#) that you need to define a type of value that the function will return, so you need to return that type of value but in case of failure you can't return false.
    What is the best way to achieve this behavior and is there an example I can see?
    Thank you in advance,
    Juan

    Juan, be aware that returning null won't work with value types, such as an int, which can't be null. You'd have to use a nullable value type. A nullable int would be declared with a "?", such as:
    int? someOtherFunction(int param)
    if(something goes great)
    return param * 42;
    return null;
    And you have to use it like this:
    int? result = someOtherFunction(666);
    if (result != null) // you can also use result.HasValue
    // it worked, do something with the result
    // if you're doing math with the result, no problem
    int x = result * 2;
    // but if you're assigning it to another an int, you need to use this syntax
    int y = result.Value;
    Before nullable value types came along, for a method that returned an int, I'd use a value of something that wouldn't normally be returned by that method to indicate failure, such as a -1.
    ~~Bonnie DeWitt [C# MVP]
    That's something very very important to keep in mind. Can save you from a lot of headaches!
    So if you have an int function and it might return NULL, if you are doing Math with the return value you can use it directly, but if you're assigning it to another variable you have to use .Value?
    Thanks

  • What is the best way to have Mac setup for sync-ing 2 calendars?  Any way to change? When we 1st got our Macbook we unknowingly set it up wrong--as 2 separate users, with separate everything. Good for contacts and email, bad for calendar, photos, music.

    What is the best way to have Mac setup for sync-ing 2 calendars?  Any way to change?  When we first got our Macbook we unknowingly set it up as 2 separate users, with separate everything.  Now I have an iphone and I want to sync calendars but not contacts or email.  Any direction you could give would help! thx

    Anyone...anyone? Bueller...Bueller?

  • What is the best way to Optimize a SQL query : call a function or do a join?

    Hi, I want to know what is the best way to optimize a SQL query, call a function inside the SELECT statement or do a simple join?

    Hi,
    If you're even considering a join, then it will probably be faster.  As Justin said, it depends on lots of factors.
    A user-defined function is only necessary when you can't figure out how to do something in pure SQL, using joins and built-in functions.
    You might choose to have a user-defined function even though you could get the same result with a join.  That is, you realize that the function is slow, but you believe that the convenience of using a function is more important than better performance in that particular case.

  • HT5621 My husband and I both have iPhone 5. We currently share the same apple I'd. How do we get separate ones. Him keeping his and me getting a new one? What is the best way to go about doing this?

    My husband and I both have iPhone 5. We currently share the same apple I'd. How do we get separate ones. Him keeping his and me getting a new one? What is the best way to go about doing this?

    FAQ apple id http://support.apple.com/kb/HT5622?viewlocale=en_US

  • What is the best way to operate 2 separate iphones on one computer

    HI - HELP PLEASE.....
    My wife has an iphone and an itunes account registered on her computer - i have just bought an iphone and i want to register it to the same computer, create and itunes account, but we want to keep out apps & music ect seperate - what is the best way of doing this?  Thanks.
    rb999

    The best way is a matter of personal taste. The Apple support document How to use multiple iPods with one computer suggests a number of ways, each with their own pros & cons. For instance if you generally share one profile on the computer already, creating another just to support a different iTunes library may be inconvenient. Switching libraries within the same profile ought to be as easy as opening two different documents, but it isn't. If you have some cross over in your taste for music and apps you may find a shared library is actually easier to manage.
    We don't have two iPhones in the family as yet but as I understand it each device can have separate settings for syncing calendars and contacts. For example my iPhone syncs these over the air with the Exchange server at work so if/when my wife gets an iPhone it would be easy to have hers sync to our computer.
    If you go down the shared library route you can make sure your apps don't inadvertently merge by turning off Automatically sync new apps from the apps tab when you connect your device.
    For media I use the sync with selected playlists method with a slight twist. Rather than regular playlists I set the grouping field to indicate which users should receive which tracks and create smart playlists based on the content of this field.
    e.g.
    "Alice's Tracks" is "Grouping contains Alice" + "Kind contains audio"
    "Bob's Videos" is "Grouping contains Bob" + "Kind does not contain audio"
    Tracks that both Alice & Bob want on their iPods have the grouping set to "Alice/Bob"
    etc.
    I currently manage our family's five iDevices using this system, each getting a different selection to suit their tastes and the capacity of their device. An advantage of using the grouping field is that it is stored in file tags (for non-wav audio files anyway) so that it is relatively easy to recreate the playlists should the iTunes library get trashed and need rebuilding. Also useful if you move files about manually as playlist membership is preserved when you delete & re-import the tracks.
    tt2

  • I have two users on the same MAC and want to have separate ITunes libraries stored on my time capsule.  what's the best way to ensure that is done?

    I have 2 users on a MAC each with separate accounts (email, photo, ITunes) and I want to migrate my ITUnes Library over to a time capsule so that each usewr still has their own library bu don't want to duplicate songs.  What is the best way to have both Itunes pointed to separate libraries both stored on the Time Capsule?

    A bit of basics on iTunes.  iTunes does 99% of what you see through a library.itl file in the iTunes folder.  This file is a database and in it are references to the actual media files.  These files can be anywhere in theory, but if you have iTunes set to default then they are nicely organized in media folders in the iTunes folder.  You have probably moved them to some central shared location in the past, then built up two individual libraries around that central location.
    iTunes is very fussy about a person dragging files to a different location, and that goes double if the other location is on a different drive.  You can move files, but it is best to let iTunes do it so it can keep track.  If this was just for one person I'd say go into preferences, select the other drive for media location, then close preferences. My understanding (never done this before) is iTunes will then ask you if you want to move your media.  Say yes and iTunes will move it and keep track of it -- for your library.  Now when you go to the other person's library, it opens and you see loads of ! because their library is still looking for the media on the same  drive as the library is located on.  I don't think it will work (but you could always try) to re-assign the media location to the external drive because the reference in the database is to look for such-and-such a file on the internal drive.  iTunes did that for the first library as part of the move, but not for the second one.  Note that typically when you want to move a single user's collection from drive to drive we advise moving the whole iTunes folder, library files and all, to another drive, but you don't have that structure.
    So I'm not sure what to advise.  If it were me and I was absolutely gung-ho on doing this I would re-assign the media with one library.  Then edit the .xml version of the library file for the second library so it points to the new file locations and import this into a fresh iTunes library for the second user.  This isn't the perfect solution because nominally the .xml version does not 1005 replicate all the characteristics of the original .itl file (which cannot be edited).
    Or maybe some other user bas a better idea.

  • What is the best way of converting a Top Level VI into a 'sub vi' - or function ( without duplicating programming)

    Hi,
    General question here about design architecture, which i keep running into, but haven't found a really good solution.  If i write a 'Top Level VI' to do something, what is the best way of converting it into a subVI - which is call-able from other VIs, while still allowing the top level VI to have synchronised feedback/indicator updates.
    I guess the point is that when something is a top level VI you write gui logic about what happens when someone clicks buttons or whatever - which you don't want in the 'sub vi' version.
    I did at one point try having a hidden boolean button that was an input to the subVI which would let the VI know if it was supposed to be doing the front panel stuff - or simply running as a subVI.  This isn't really ideal though - since it would be better to be able to hive off the grizzly useful stuff from the fluffy - front panel updating stuff - having them together makes the VIs rather untidy.  More annoyingly though, if you have the front panel version of it running - say waiting for you to hit 'go', it breaks all the other VIs that use it as a sub vi - since they can't compile when a sub vi is already running.
    Another possibility that i tried was to basically duplicate the vi so that there was a backend part, and a front end part - and when i click 'go' the backend part is called as a sub vi.  The problem with this is that it really limits the interface that the user gets - since none of the controls on the front panel update with the results untill the sub vi is over.  I guess again i could solve this by passing references to some of the controls to update them in the subvi - but this doesn't really seem like the ideal situation if the subvi is called by something else without the same types of controls etc.
    One final idea i had was to essentially paste all the controls in the VI into a global variable file, and make the sub vi update them, and the front panel VI read from them.  This seems to 'work' - although clearly it is a work around rather than a proper solution - since i spend loads of time worrying about how i update cluster variables in the global - reading and writing.
    Does anyone have any guidance on what they do to solve this problem?
    JP

    You could run a subvis in a Subpanel on your top level.  Lets you see the current data while the subvi is running.
    --Using LV8.2, 8.6, 2009, 2012--

  • What is the best way to handle .mod files in premiere pro cs4?

    I recently got a JVC Everio GZ-MG130u and as I'm sure many of you are aware, it saves footage in the .mod format.
    I have googled this and found quite a few different solutions, but I'm just wondering if anything has changed since some of these solutions were posted, or in other words, what is the best way at this current point in time to handle .mod files in premiere pro cs4?
    As far as I know, the best thing to do is convert the .mod to .avi and then import it into premiere so it can be edited.. Is there a better way to do it than this? Also, by doing it this way, will I have separate audio and video tracks?
    Thanks.

    I have just done a bit of reading, here. All of the quotes that follow are from users who have posted in that thread.
    It seems that there isn't one solid answer on this subject. The thread that I linked to was started 2 years ago, and replied to just 4 ago, so it's relatively current.
    I noticed a couple different interesting statements:
    posted by mmontgomery:
    In the case of .MOD, you are actually getting a MPEG-2 file. The way
    video files work is that there is a codec (COmpressor/DECompressor)
    algorithm and a file wrapper (or extension). A JVC .MOD file is a
    MPEG-2 encoded file, with a .MOD extension.
    You're faced with two
    challenges, first the .MOD file type is only recognized and support by a
    few applications. I think we covered some of those already. The
    interesting thing about wrappers and extensions is that they can be
    dealt with in a variety of ways. Sometimes all you need to do to convert
    the video file to a compatible video file is to change the extension.
    In the case of .MOD files that's not enough. The .MOD wrapper apparently
    does a few more things than just bare a unique extension name. It
    requires a slightly more complicated method to convert that file. That
    is why there is supplied software and that certain third party
    applications have .MOD support.
    (posted 2 years ago)
    This seems to indicate that Ann's solution of simply re-naming the extension is not good enough, unless I am mis-interpreting what she meant.
    However, another user said:
    posted by futball8:
    I edit with Adobe Premiere Pro CS3. All I have to do is simply rename
    the .MOD files as .MPG and then import into PP CS3. It takes a small
    amount of time to conform the audio, but no file conversion is
    necessary. It's a pretty slick workflow and I've never encountered any
    problems editing them this way.
    (posted 5 months ago)
    One can only assume that simply re-naming the extension from .mod to .mpg works in some circumstances, and doesn't work in others. I assume it depends largely on the editing software being used. Perhaps there are still issues that futball8 was simply unaware of or never encountered.
    That said, there seems to be a couple of different real solutions to this problem that I have found:
    1. Simply use an editing program that supports .mod file format. While pe7 and pe8 supposedly support the .mod format, the following should be noted:
    posted by macksgarage:
    While Elements 'supports' these files, it is markedly unstable and  frequently crashes while using the files, though the application is otherwise reliable.  The solution I have arrived at is to repair the  container using ffmpeg. (see #3)
    (posted 5 months ago)
    2. Use a file conversion utility of your choice that will covert .mod to .avi, or another desired format. Import the resulting .avi file into premiere pro cs4.
    3. Use FFmpeg. This seems to be the best solution as it does not convert any audio or video:
    posted by macksgarae:
    If you are not familiar with ffmpeg, it may be a bit of a bear to
    learn, but it's not only useful for this, but functions as a video swiss
    army knife useful for splicing, muxing/demuxing, and rendering just
    about any format into just about any other format.
    ffmpeg is an open source project from the linux world, but it has
    been ported and is supported on windows.  Fetch it here and place it somewhere handy
    on your system.
    To rewrite the container into a nice, standards compliant .mpg file
    that doesn't make applications die, WITHOUT rerendering video or audio
    itself, I use this command.
    ffmpeg -i INFILE.MOD  -acodec copy - vcodec copy OUTFILE.mpg
    This not only renames the file, but actually rebuilds the container
    around unmodified video and audio data, yielding a file which works much
    more stably with Adobe applications, and presumably others as well, as
    ffmpeg's open source development goals result in very standards
    compliant files.
    (posted 5 months ago)
    Now, this seems to properly address the issues that can arise from simply renaming .mod to .mpg, as suggested by Ann. So from this point, I assume you can simply import the .mpg into Premiere Pro cs4 (or any other .mpg compliant program) and edit without issue, but it seems like I remember hearing something about Premiere not liking mpegs or something like that, so in that case, maybe it'd be better to skip this and go with option #2. But, it's been awhile since I've touched any NLE, much less premiere pro cs4, so I could be completely wrong and it may have no problems handling mpegs.
    All of the things that I've quoted here came from the same thread, so I don't know how accurate any of this is, but the people that have posted these things seem fairly knowledgeable. If someone reads all of this and can confirm or deny any of it, it would be much appreciated.
    Option 1 is not really an option for me, because I am sticking with premiere pro cs4 -- I'm not going to get another editor just because it has .mod support. That leaves me with options 2 and 3: Convert to avi, or change the file wrapper/extension properly with FFmpeg and then simply import the resulting .mpg file... Which is better? Or is there yet another solution that I am unaware of that would be even better?

  • [Flex 4.5.1] What is the best way of adopting a flex built website for mobile "as is"?

    What is the best way of adopting a flex 4.5.1 built website for mobile "as is"?
    I have a website built with flex 4.5.1 which I want to be working on mobile as it should - meaning that touch style of interactions should be working not mouse.
    The question is: Do I HAVE TO recode all of my website from Application into Mobile Application in order to be a more lightweight version of the original one, which includes: remove some functionality, pages, animation, build a separate backend and cms to control it etc.?
    OR
    Can I just define mobile skins, for my existing components to use when in mobile mode, in which I could have done some tweaking by removing some unnecessary parts and changing component interactionMode to Touch ?
    Are both options which I see possible and if yes - which one would you recommend?
    Thanks in advance!

    Thanks for the answer. Yeah I bet you figured out what I want the answer to be, but is it ? That's why I am asking here. I can see my website on my HTC Desire HD and it's working pretty well. If I reskin the parts that need a bigger hit area or the scrollers to work with touch so I don't have to scroll the actual scrollbars with my finger, remove some complex animations - everything will work just fine... The problem is that I am not sure if that is the right way to do it or if it is possible at all.
    I do get your point about not designed for mobile stuff, but while with html 5 you get the job done for web and mobile with little differences at the same time, in flash you need double time cause you'll have to build 2 projects. And since the framework is one for both web and mobile.. why not...
    I want to see the pros and cons of the both approaches I suggested. In a complex modular architecture I could easily swap one web module with a mobile module for example or change skins or components if I need more lightweight ones, but do I have to copy all that logic in to a MobileApplication, can't I do it with Application and use the MobileComponents (which are simplier and less functional) if the project actually needs them...
    I do hope you get why I am asking these questions, and I can't believe I haven't found a guide or something like that "why this and not that" when it comes to mixing web with mobile development and flex... If you have, please share the link, I would be happy to read. Or someone with the experience in what I am talking about shares some knowledge, that would be great!
    Thanks.

  • What is the best way to recycle 2010 MacBook? Also, it is completely dead and cannot erase hard drive.

    What is the best way to recycle old 2010 MacBook?  Also, it is completely dead and I cannot erase hard drive.

    Depending on where you are located, country, region, etc, you may have options should
    you wish to have it professionally restored or repaired to function properly again...
    Even an Apple Store with Genius bar could, in several locations, give the product a look
    and perhaps be able to diagnose the underlying issues. However that varies with the
    degree of failed components and what is really wrong with it. A battery and a new HDD
    could be all that's wrong with it. A diagnostic is often free, even on out-of-warranty Mac
    at the Apple Store genius bar; an appointment is advised.
    However if you only wanted someone to extract the hard disk drive and attach it to
    a 'universal USB drive adapter kit' so at to try and access any readable files on it,
    that is something that could be done at an Apple Authorized service provider; as
    some of them may even have a section of resale products such as this adapter kit.
    An example of this kind of kit includes wires, adapter parts, & a separate power supply
    so it can be used to run the hard drive's electronics. This is not intended for permanent
    use, but works like a set of patch cables to access the bare drive without an enclosure.
    https://www.ifixit.com/Store/Mac/Universal-Drive-Adapter/IF107-108-1
    Another kit example says it'd work with almost any HDD or SSD of several build types:
    http://eshop.macsales.com/item/NewerTech/U3NVSPATA/
    Companies that specialize in restoring Apple portable computers can give you an estimate
    on a repair and the good ones can do that without a fee; they will not start a repair after they
    see the computer until you get the estimate, and approve of the repair. If other items are
    found to be of interest requiring other work or parts, they will also contact you, again before
    continuing. One of these kinds of companies I know about (half a hemisphere away) is in
    the eastern US, and worth inquiring of even if you are overseas. wegenermedia.com.
    While I have no connection with any of these products or service suggestions, they do have
    some variety of good reputation (ifixit.com has DIY repair guides; macsales has parts, etc.)
    in standing, among many Mac users across a section of the planet...
    Any concerns about the data on the hard disk drive should be able to be answered by a
    local Apple independent; they also should have the universal USB drive adapter locally.
    Not sure if I answered your inquiry, but there are different ways of approaching this matter.
    Good luck & happy computing!
    edited

  • What is the best way to run windows on my mac?

    What is the best way to run windows on my mac?
    I have a particular program that i need to run, and it only runs on windows. I have a macbook pro

    As Templeton noted, it depends and will at least be somewhat subjective. 
    There are basically three options out there.  You can use a Windows emulator (Wine or the commercial version of it, Crossover Office), use Boot Camp to "dual boot" or use virtualization software (Parallels, VMWare Fusion, or VirtualBox).  Each has its advantages or disadvantages.
    The Windows emulators have the advantage of being the one option that doesn't need the purchase of a copy of Windows.  Unlike Boot Camp, but like the virtualization options, this allows you to run Windows programs and OSX programs side by side.  The big problem, though, is that it is the least compatible option--a lot of Windows software either has "issues" or will not function at all.  The Crossover website has information on which programs are known to work and how well they are known to work. 
    Boot Camp is the option that Apple ships OSX with.  You'll need a copy of Windows to install into the partition.  You'll effectively divide your disk into two parts and have two machines.  The major advantages are, first, you don't need to acquire separate software *AND* the Windows license.  As well, it's the highest performance Windows system.  What you have is truly a Windows machine.  That's both the good and the bad--you aren't going to be able to use OSX software at the same time, and you have to reboot to get back to OSX.  I've always thought it was best for someone who likes the Apple hardware and wants to use it for a Windows box--in that case Boot Camp is clearly a great solution.
    Finally there's virtualization which seems to be the most popular way to handle Windows, especially if you need to run one vertical market package.  It has the advantage of allowing you to use your OSX software at the same time, and the virtualization gives an extremely high level of compatibility.  About the only thing that won't run is a virtualization package (and there's not a lot of reason to run that in a Windows VM).  There is a performance hit compared to Boot Camp, but it's minimal for all but the most demanding applications (that being high end games). 
    It will chew up RAM on the OSX machine, but if you have at least 4 GB of RAM it will probably be manageable, especially if you only need to run one Windows program.
    You will need both a virtualization program (there are three major ones) and purchase Windows.  Two of three programs are commercial packages (Parallels and VMWare Fusion), while the other is an open source option (VirtualBox).  Virtual Box has the advantage of being free, but it's by far the least polished of the group.
    Which way is best?  As was noted, it depends.  I run VMWare Fusion on my machines, and I have used CrossOver Office for limited purposes.  I've not yet seen, in my use pattern, a reason to go to Boot Camp but I certainly can see cases where it might make sense.

Maybe you are looking for

  • Lenovo G560 - Issue with won't boot and black screen after HDD upgrade

    Lenovo G560 - Issue with won't boot and black screen after HDD upgrade.  What happen: My laptop was working fine, no blue screen issue, no funny business at all. I bought a new SSD Intel 120 GB and thought it would be a good idea to replace the HDD.

  • Read XML attributes

    I have this xml. <?xml version="1.0" encoding="UTF-8" standalone="no"?> <root>      <file name="Bohy" type="folder">           <file name=".dropbox" type="file" />           <file name="Beck" type="folder">                <file name="desktop.ini" typ

  • How to setup hotmail account in Apple Mail?

    Just got a new 17" MBP... however I'm not sure how to setup my hotmail account in Apple Mail.

  • Illustrator cs5 keeps closing on start up without error msg

    Please help.  i am running Master Collection CS5 on Win7 and my illustrator keeps closing as soon as launching it without any error msg.  it was working fine until this morning.  don't know what the problem is.  all other programs seem to be fine. th

  • Export question: menus/scene markers to disc?

    Premier Elements 13 Windows 7 Professional Export to Disc (DVD) works fine. Export to Computer (MPEG): works fine. What I'd like to do is export the DVD-style format (ideally with movie menus, but more importantly with click-to-next-scene-marker navi