Need help in modifying the column length

Hi Experts,
I need to modify the length of a column from char(10) to char(5), but it's showing the error of:
ALTER TABLE appr_group_table MODIFY (APPR_TBLNO CHAR(5)) It's showing the below error:
ERROR at line 1:
ORA-01441: cannot decrease column length because some value is too bigI've checked in the dbase but there is no any value of this column having more than 5 characters:
SQL> SELECT APPR_TBLNO FROM appr_group_table;
APPR_TBLNO
ANTAB
ANTAB
ANTST
SCCTR
SOTAB
SOTAB
SOTAB
SOTAB
SOTAB
SOTAB
SOTAB
11 rows selected.Thnx in advance for helping me out.....

char means fixed length variable. when you say char(10) oracle will reserve 10 places for your data. that means in your output what you are seeing as blank spaces are also considered as data. that is the reason, it is not allowing you to reduce the size.
better solution is to create new column with varchar2 or char(5) datatype and transfer this column data into new column and then drop original column.

Similar Messages

  • Need help on getting the column names of Tabletype

    I have a table Mapping with the following values: This Mapping table contains the table names (in Tabname) and the column names(colname) of various tables and values(ValuesTobeFilled) for the columns.
    I have to insert into the tables present in the Tabname field with the values present in the ValuesTobeFilled in the columns present in the Colname field.
    Note: The Mapping table need not contain all the columns of the base table. The columns that are not present can be filled with null. And this mapping table is not fixed i.e. rows can be inserted/deleted frequently.
    Sample values in mapping table:
    Tabname                        Colname        ValuesTobeFilled
    sample_items     Eno     Corresponding Expression to get the values from XML input
    sample_items     Ename     Corresponding Expression to get the values from XML input
    XXX     YYY     Corresponding Expression to get the values from XML input
    Before filling in the actual tables, I have to store the entire data temporarily and I have used a tabletype declared as follows:
    TYPE T_sample_items IS TABLE OF sample_items%ROWTYPE INDEX BY BINARY_INTEGER;
    l_sample_items T_sample_items;
    Where the table sample_items have the following columns:
    •     Eno
    •     Ename
    •     Eaddress
    •     Eemail
    So, the tabletype should be filled as:
    Eno     Ename     Eaddress     EEmail
    1     XXX     -     -
    I have declared a cursor to select the values from mapping table and I need to fill in the ValuesTobeFilled values to the corresponding table.
    CURSOR c_xpath (c_tname mapping.TABNAME%type)
    IS
    select * from mapping where tabname = c_tname;
    CURSOR c_tables
    IS
    SELECT DISTINCT TABNAME FROM mapping;
    FOR crsr IN c_tables
    LOOP
    p_tname := CRSR.TABNAME;
    FOR csr IN c_xpath(p_tname)
    LOOP
    IF l_xml_doc.EXISTSNODE(CSR.XPATH_EXP) = 1
    THEN
    l_node_value := l_xml_doc.extract(CSR.XPATH_EXP).getStringVal(); -- This is the value to be stored in the corresponding column
    ELSE
         l_node_value := NULL;
    END IF;
    IF CSR.COLUMN_NAME = ‘eno’
    THEN
         l_sample_items(1).eno := l_node_value;
    ELSIF CSR.COLUMN_NAME = ‘ename’
    THEN
         l_sample_items(1).name := l_node_value;
    END IF;
    END LOOP;
    END LOOP;      
    And I need to eliminate hard coding while comparing the column names (in the following piece of code) as the Mapping table values are subject to insertion/deletion:
    IF CSR.COLUMN_NAME = ‘eno’
    THEN
         l_sample_items(1).eno := l_node_value;
    ELSIF CSR.COLUMN_NAME = ‘ename’
    THEN
         l_sample_items(1).ename := l_node_value;
    END IF;
    I need to insert the values directly into the tabletype without this hardcoding. Please suggest me ways to compare the mapping table values with the field (column) names of the tabletype. If it is not possible using tabletype, please suggest any other ways of fixing the problem.
    Many thanks,
    Gopi

    I take it this isn't going to be a serious production system at the end of the day?
    Storing metadata in tables for extraction and insertion of data is just wrong in so many ways. It smells heavily of Entity Attribute Value modelling, which is the most wrong way to use a relational database and is known to have major performance implications and be liable to bugs and issues. The idea that EAV modelling allows for 'generic' databases where new data items can be added flexibly later on without having to change code is usually justified with an excuse of "it means we don't have to update all our tables when we want a new column" which is easily countered with "if you're adding a single column a good relational design wouldn't require you to add it to more than one table anyway in most cases".
    Just what exactly are you trying to do and why? There has to be a better way.

  • SQL Help -- Need help with pivoting the columns to rows

    I have a requierement to split the columns into multiple rows. For example:
    EMP_DEPT
    rowid empid1 ename1 dept1 empid2 ename2 dep2 empid2 ename2      dep3 empid4 ename4 dept4
    100001 1 'SCOTT' 10 2 'DAVE' 20 3 'MILLER'     10 4 SMITH 20
    100002 1 'SCOTT' 10 2 'DAVE' 20 3 'MILLER'     20      
    Note: EMP_DEPT may not always have all the 4 employee info populated for example in row 2 only 3 employees info is there
    I need to convert it and insert into EMPLOYEE table as follows:
    EMPLOYEE
    empid ename dept
    1 SCOTT 10
    2 DAVE 20
    3 MILLER 10
    4 SMITH 20
    1 SCOTT 10
    2 DAVE 20
    3 MILLER 20
    Thanks
    Kev

    Frank Thank You for your response.
    I am on oracle 10gR2.
    Posting some sample DDL and data here as requested:
    CREATE TABLE EMP
      PK          NUMBER(10),
      EMP_NAME1   VARCHAR2(100 BYTE),
      EMP_ID1     NUMBER(10),
      EMP_NAME2   VARCHAR2(100 BYTE),
      EMP_ID2     NUMBER(10),
      DEPT_NAME1  VARCHAR2(200 BYTE),
      DEPT_ID1    NUMBER(10),
      DEPT_NAME2  VARCHAR2(200 BYTE),
      DEPT_ID2    NUMBER(10)
    CREATE TABLE EMP_DEPT
    ( PK NUMBER(10),
    ENTY_TYPE VARCHAR2(100),
    ENTY_NAME VARCHAR2(100),
    ENTY_ID NUMBER(10)
    Insert into EMP
       (PK, EMP_NAME1, EMP_ID1, EMP_NAME2, EMP_ID2, DEPT_NAME1, DEPT_ID1, DEPT_NAME2, DEPT_ID2)
    Values
       (1, 'SCOTT', 10001, 'FRANK', 10002,
        'MARKETING', 10, 'ACCOUNTING', 20);
    Insert into EMP
       (PK, EMP_NAME1, EMP_ID1, EMP_NAME2, EMP_ID2, DEPT_NAME1, DEPT_ID1)
    Values
       (2, 'SCOTT1', 10003, 'FRANK1', 10004,
        'MARKETING1', 30);
    COMMIT;
    SELECT
    FROM
    EMP;
    PK     EMP_NAME1     EMP_ID1     EMP_NAME2     EMP_ID2          DEPT_NAME1     DEPT_ID1     DEPT_NAME2     DEPT_ID2
    1     SCOTT          10001     FRANK          10002          MARKETING     10          ACCOUNTING     20
    2     SCOTT1          10003     FRANK1          10004          MARKETING1     30               My requirement is to:
    SELECT from emp and INSERT INTO EMP_DEPT so that columns are broken into rows as follows
    PK ENTY_TYPE, ENTY_NAME    ENTY_ID
    1  EMPLOYEE   SCOTT        10001
    2  EMPLOYEE   FRANK        10002
    3  DEPARTMENT MARKETING    10
    4  DEPARTMENT ACCOUNTING   20    
    5  EMPLOYEE   SCOTT1       10003
    6  EMPLOYEE   FRANK1       10004
    7  DEPARTMENT MARKETING1   30          Thanks
    Kevin
    Edited by: user10210466 on Dec 8, 2010 1:37 PM

  • Need help to Modify the STD report which uses the Tcode CATS_DA.

    Hi ,
    we have a requirement as below. we need Add two Additional Fileds in the OutPut of the Std Report ( Tcode CATS_DA) .( 2 fileds are  one is Managername /Manager employee number ) ..
    Can you Please where we need to Modify the code to meet the above requirement.
    Thanks in Advance.
    Edited by: sandeep on Jul 29, 2008 12:45 PM

    Copy the report to "Z" version and plug in fields .
    Thanks,
    Saquib

  • Need help in modifying the Calls by the Telemarketing agent

    Hi Group,
    I am facing issues while updating the calls using the Function module 'CRM_CLM_CALL_MODIFY'.
    the business requirement is as under:
    - a program needs to be built which will take the calls from all the Call lists from the Current week and has to update these
      calls by using by a certain field called 'CALL_RESULT' of the Sturucture 'CRMS_CLM_CALL'.
    - I have collected all the Calls but while using the Function module 'CRM_CLM_CALL_MODIFY', I was not getting any
      exceptions, but still could not the see the updation being done to the calls in the Call lists.
    In the CRM system also, there is no sign of this Function module being used and in the SAP Market place also I could not get  a proper answer/notes to this query.
    So please let me know your inputs on this to proceed further on the updation part.
    Thanks for the help in advance.
    Regards
    Vishnu.

    Hi Group,
    This can be resolved by creating the Implicit enhancement and adding the required functionality.
    Regards,
    Vishnu.

  • Need help in modifying mapping parameters of out the box mapping

    Hi There,
    I am a new bee to dac.
    Need help in modifying mapping parameters of out the box mapping, which is invoked by DAC task.
    We got a requirement to edit mapping parameter. When I go and see parameter under mappings tab in a mapping, I could not see any values in it.
    But when I set any value, and validate it. It is successful.
    Is it right way to do it?
    What my concern is, When I initially go and see parameter values under maapings tab in a mapping, they are blank.
    Where is it storing these values?
    Thanks,
    Rag

    If you modify mapping then u have to create new task in dac and dac itself craete parameter file at run time. if you want to add more parameters then do it in dac system parameters tab.
    Thanks
    Jay.

  • Increase the column lengths of excel sheet through abap

    I developed a abap program and it was displayed the output.
      So i need to display this out put in excel sheet.
      for that I read the out put and placed in the excel,
    the only problem is the column lengths are small
    after download  i am dragging the each column,
    But i need to increase the each column by the program
       How can I ?
    I am using the following code
          lastline = new_line_c + 13.
          DO .
            READ LINE sy-index LINE VALUE INTO it_read-excel.
            APPEND it_read.
            IF sy-index > lastline.
              EXIT.
            ENDIF.
          ENDDO.
          lastline = new_line_c - 38.
          colm = ( length - 37 ) / 18.
          colm = colm + 4.
          FOR THE EXCEL CONVERTION
          INCLUDE ole2incl.
          DATA: w_cell1 TYPE ole2_object,
          w_cell2 TYPE ole2_object.
    *--- Ole data Declarations
          DATA: h_excel TYPE ole2_object, " Excel object
          h_mapl TYPE ole2_object, " list of workbooks
          h_map TYPE ole2_object, " workbook
          h_zl TYPE ole2_object, " cell
          h_f TYPE ole2_object, " font
          gs_interior TYPE ole2_object, " Pattern
          worksheet TYPE ole2_object,
          h_cell TYPE ole2_object,
          h_merge TYPE ole2_object,
          h_cell1 TYPE ole2_object,
          range TYPE ole2_object,
          h_sheet2 TYPE ole2_object,
          h_sheet3 TYPE ole2_object,
          gs_font TYPE ole2_object,
          flg_stop(1) TYPE c.
    *DATA: t_excel_bckord LIKE t_excel OCCURS 0 WITH HEADER LINE,
    *t_excel_bcklog LIKE t_excel OCCURS 0 WITH HEADER LINE,
    *t_excel_blkord LIKE t_excel OCCURS 0 WITH HEADER LINE.
          TYPES: data1(1500) TYPE c,
          ty TYPE TABLE OF data1.
          DATA: it TYPE ty WITH HEADER LINE,
          it_2 TYPE ty WITH HEADER LINE,
          it_3 TYPE ty WITH HEADER LINE,
          rec TYPE sy-tfill,
          deli(1) TYPE c,
          l_amt(18) TYPE c.
          DATA: BEGIN OF hex,
          tab TYPE x,
          END OF hex.
          FIELD-SYMBOLS: <fs> .
          CONSTANTS cns_09(2) TYPE n VALUE 09.
          ASSIGN deli TO <fs> TYPE 'X'.
          hex-tab = cns_09.
          <fs> = hex-tab.
          DATA gv_sheet_name(20) TYPE c .
    M A C R O Declaration
          DEFINE ole_check_error.
            if &1 ne 0.
              message e001(zz) with &1.
              exit.
            endif.
          END-OF-DEFINITION.
          DATA: xy TYPE i,
                xz TYPE i,
                yz TYPE i,
                ab TYPE i,
                pterm TYPE i.
          IF h_excel-header = space OR h_excel-handle = -1.
    start Excel
            CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
          ENDIF.
    PERFORM err_hdl.
    *--- get list of workbooks, initially empty
          CALL METHOD OF h_excel 'Workbooks' = h_mapl.
    PERFORM err_hdl.
          SET PROPERTY OF h_excel 'Visible' = 1.
    add a new workbook
          CALL METHOD OF h_mapl 'Add' = h_map.
    PERFORM err_hdl.
    *GV_SHEET_NAME = '1st SHEET'.
          gv_sheet_name = 'Price Comparison List'.
          GET PROPERTY OF h_excel 'ACTIVESHEET' = worksheet.
          SET PROPERTY OF worksheet 'Name' = gv_sheet_name .
          index1 = 3.
          LOOP AT it_read.
           heading
            IF sy-tabix < 4.
              it_item = it_read.
              IF  it_item CS '-----'.
                CLEAR it_item.
                APPEND it_item.
              ELSE.
                IF sy-tabix = 1.
                  it_item+0(1) = deli.
                ENDIF.
                APPEND it_item.
              ENDIF.
            ENDIF.
           headear data and item
            IF sy-tabix > 4 AND sy-tabix < descline1.
              it_item = it_read.
              IF it_item CS '----'.
              ELSE.
                REPLACE ALL OCCURRENCES OF sy-vline IN it_item WITH deli.
                APPEND it_item.
              ENDIF.
            ENDIF.
            xy = 2.
            xz = 38.
           discount etc
            IF sy-tabix >= descline1 AND sy-tabix < descline.
              it_item = it_read.
              it_item+12(1) = deli.
              it_item+22(1) = deli.
              it_item+43(1) = deli.
              WHILE xy < colm.
                xz = xz + 18.
                it_item+xz(1) = deli.
                xy = xy + 1.
              ENDWHILE.
              APPEND it_item.
            ENDIF.
          payment terms
            xy = 2.
            xz = 37.
            pterm = descline + 6.
            IF sy-tabix > descline AND sy-tabix < pterm.
              it_item = it_read.
              IF it_item CS '-----'.
                CLEAR it_item.
                APPEND it_item.
              ELSE.
                it_item+12(1) = deli.
                it_item+15(1) = deli.
                it_item+36(1) = deli.
                WHILE xy < colm.
                  xz = xz + 17.
                  it_item+xz(1) = deli.
                  xy = xy + 1.
                ENDWHILE.
                APPEND it_item.
              ENDIF.
            ENDIF.
         prepared by
            lastline = pterm + 3.
            IF sy-tabix >= pterm AND sy-tabix <= lastline.
              it_item = it_read.
              IF it_item CS '-----'.
              ELSE.
                it_item+0(1) = deli.
                it_item+54(1) = ' '.
                it_item+16(1) = deli.
                APPEND it_item.
              ENDIF.
            ENDIF.
           remaarks
            yz = lastline + 10.
            IF sy-tabix > lastline AND sy-tabix <= yz.
              it_item = it_read.
              it_item+0(1) = deli.
              it_item+54(1) = ' '.
              APPEND it_item.
            ENDIF.
      approved by
            ab = yz + 5.
            IF sy-tabix > yz AND sy-tabix < ab.
              it_item = it_read.
              IF it_item CS '-----'.
              ELSE.
                it_item+0(1) = deli.
                it_item+54(1) = ' '.
                it_item+14(1) = deli.
                APPEND it_item.
              ENDIF.
            ENDIF.
          ENDLOOP.
    *--Formatting the area of additional data 1 and doing the BOLD
          CALL METHOD OF h_excel 'Cells' = w_cell1
            EXPORTING
            #1 = 1
            #2 = 1.
          CALL METHOD OF h_excel 'Cells' = w_cell2
            EXPORTING
            #1 = 1
            #2 = colm.
          CALL METHOD OF h_excel 'Range' = h_cell
            EXPORTING
            #1 = w_cell1
            #2 = w_cell2.
    *CALL METHOD OF gs_cells 'Select' .
          GET PROPERTY OF h_cell 'Font' = gs_font .
          SET PROPERTY OF gs_font 'Bold' = 1 .
    *Bold for the second row
          CALL METHOD OF h_excel 'Cells' = w_cell1
            EXPORTING
            #1 = 2
            #2 = 1.
          CALL METHOD OF h_excel 'Cells' = w_cell2
            EXPORTING
            #1 = 1
            #2 = colm.
          CALL METHOD OF h_excel 'Range' = h_cell
            EXPORTING
            #1 = w_cell1
            #2 = w_cell2.
    *CALL METHOD OF gs_cells 'Select' .
          GET PROPERTY OF h_cell 'Font' = gs_font .
          SET PROPERTY OF gs_font 'Bold' = 1 .
    *Bold for the fourth row
          CALL METHOD OF h_excel 'Cells' = w_cell1
            EXPORTING
            #1 = 4
            #2 = 1.
          CALL METHOD OF h_excel 'Cells' = w_cell2
            EXPORTING
            #1 = 1
            #2 = colm.
          CALL METHOD OF h_excel 'Range' = h_cell
            EXPORTING
            #1 = w_cell1
            #2 = w_cell2.
    *CALL METHOD OF gs_cells 'Select' .
          GET PROPERTY OF h_cell 'Font' = gs_font .
          SET PROPERTY OF gs_font 'Bold' = 1 .
    *Bold for the fifth row
          CALL METHOD OF h_excel 'Cells' = w_cell1
            EXPORTING
            #1 = 5
            #2 = 1.
          CALL METHOD OF h_excel 'Cells' = w_cell2
            EXPORTING
            #1 = 1
            #2 = colm.
          CALL METHOD OF h_excel 'Range' = h_cell
            EXPORTING
            #1 = w_cell1
            #2 = w_cell2.
    *CALL METHOD OF gs_cells 'Select' .
          GET PROPERTY OF h_cell 'Font' = gs_font .
          SET PROPERTY OF gs_font 'Bold' = 1 .
    *Bold for the sixth row
          CALL METHOD OF h_excel 'Cells' = w_cell1
            EXPORTING
            #1 = 6
            #2 = 1.
          CALL METHOD OF h_excel 'Cells' = w_cell2
            EXPORTING
            #1 = 1
            #2 = colm.
          CALL METHOD OF h_excel 'Range' = h_cell
            EXPORTING
            #1 = w_cell1
            #2 = w_cell2.
    *CALL METHOD OF gs_cells 'Select' .
          GET PROPERTY OF h_cell 'Font' = gs_font .
          SET PROPERTY OF gs_font 'Bold' = 1 .
          DATA l_rc TYPE i.
          CALL METHOD cl_gui_frontend_services=>clipboard_export
            IMPORTING
              data                 = it_item[]
            CHANGING
              rc                   = l_rc
            EXCEPTIONS
              cntl_error           = 1
              error_no_gui         = 2
              not_supported_by_gui = 3
              OTHERS               = 4.
          CALL METHOD OF h_excel 'Cells' = w_cell1
            EXPORTING
            #1 = 1
            #2 = 1.
          CALL METHOD OF h_excel 'Cells' = w_cell2
            EXPORTING
            #1 = 1
            #2 = 1.
    PERFORM err_hdl.
          CALL METHOD OF h_excel 'Range' = range
            EXPORTING
            #1 = w_cell1
            #2 = w_cell2.
          CALL METHOD OF range 'Select'.
    PERFORM err_hdl.
          CALL METHOD OF worksheet 'Paste'.
    PERFORM err_hdl.
    CALL METHOD OF h_excel 'QUIT'.
          FREE OBJECT h_zl.
          FREE OBJECT h_mapl.
          FREE OBJECT h_map.
          FREE OBJECT h_excel.

    Hello Ravi,
    Thank you very much for your suggestions.. but still have some more doubts:
    What i want to do is :
    -->call report in background job with a selection criteria.
    -->the output of the report should be trasnsfered to excel sheet
    -->then the excel sheet should be sent to XI..
    My doubts are:
    -> is it possible with every report or we need some extra code to achieve this
    -> If yes, then how exactly it should be done. can you please explain in more detail.
    Thank you very much for your help.
    Best Regards,
    Jasmeet

  • How to decrease the column length in working time (CATS) table

    Hi all,
    Can you please tell me how we can decrease the column length in CATS table in the portal. Is it something we can do in webdynpro or in the back end.
    Thanks in advance.
    RK Reddy

    I was looking for something similar and ran across OSS Note 989453. I would recommend checking out this note to see if it helps. Apparently, there is a JAVA program error that makes the columns wider than they need to be.
    We have not yet tried this so if you happen to use it, let me know how it works for you.
    Mark Musser
    County of Sacramento

  • Need help to modify a report written using Field-Groups Concept. - Part1

    Hello ABAP Experts,
    I need your help to modify the following report with following requirement as I have least knowledge
    about the field-group concept. Thats is the reason, I am pasting the whole code. As it is part of our
    production requirement. I really appreciate your help, If its sent modifying the code required.
    Modification required in the report.
    To allow the sales representatives to see billed shipments and open orders for the current month.
    1) Selection Screen Changes:
    u2022     Add selection by Sales group and Customer group
    u2022     Add sort by:     3. Ship-to / Material
    u2022     Add another selection box
    [ ] Open Orders and Shipments with the current month
    2)      For the new selection box, subtotal sales quantity and delivery quantity.
         If delivered, make the sales quantity zero in the subtotal
    Current report displays, in Selection Screen
    Sales org:
    Person Name:
    Material:
    Plant:
    Sales Office:
    Ship to Name:
    Ship to Number:
    Sorts Report by : 1. Person Name 2. Material
    Check Boxes : 1. Open Orders 2. Delayed Orders.
    report  zorder  LINE-SIZE 170
                      LINE-COUNT 58
                      MESSAGE-ID zv
                      NO STANDARD PAGE HEADING.
    TABLES:
    cdhdr,                                 "Change Doc Header
    cdpos,                                 "Change Doc Item
    kna1,                                  "Customer master
    likp,                                  "Delivery Header
    lips,                                  "Delivery Item
    *lips,                                 "Delivery Item
    zvbpa_lfa1,                            "Vendor Master
    makt,                                  "Material Desc
    t001w,                                 "Plant
    tvkbt,                                 "Sales Office
    tvko,                                  "Sales Organizations
    vbak,                                  "Sales Header
    vbap,                                  "Sales Item
    zvvbak,                                "Sales Hdr - Time calc
    vbup,                                  "Item status
    vbep,                                  "Sales Schedule Line
    vbfa,                                  "Flow documents
    vbpa,                                  "Partners
    vbrk,                                  "Billing Header
    vbrp.                                  "Billing Item
    SELECT-OPTIONS:
      s_vkorg FOR vbak-vkorg OBLIGATORY,
      s_ernam FOR vbak-ernam,
      s_matnr FOR vbap-matnr,
      s_werks FOR vbap-werks,
      s_vkbur FOR vbak-vkbur,
      s_name1 FOR kna1-name1,
      s_kunnr FOR kna1-kunnr.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(49) text-c20.
    PARAMETERS: p_sort TYPE n DEFAULT '1'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 19(40) text-022.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 19(40) text-023.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 19(40) text-024.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN COMMENT 19(40) text-070.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN BEGIN OF BLOCK b20 WITH FRAME.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS:p_open AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(48) text-072.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS:p_delay AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(48) text-073.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b20.
    DATA:
    vbeln(11),                             "Document number
    cancel_dt TYPE d,                      "Cancellation Date
    BEGIN OF tabkey,                       "Tabkey
    mandant LIKE sy-mandt,
    vbeln LIKE vbap-vbeln,
    posnr LIKE vbap-posnr,
    END OF tabkey,
    name1_sp1 LIKE lfa1-name1,             "Sales Carrier Name
    name1_sp2 LIKE lfa1-name1,             "Delivery Carrier Name
    datum-1 TYPE d,                        "Current Dt Less 1
    datum-14 TYPE d,                       "Current Dt Less 14
    datum-90 TYPE d,                       "Current Dt Less 90
    rpt_hdr1(170),                         "Report Header 1
    rpt_hdr2(170),                         "Report Header 2
    rpt_hdr3(170),                         "Report Header 3
    cb_hdr1(170),                          "Control Break Header 1
    line_pos1 TYPE i,                      "Line Print Position HDR1
    line_pos2 TYPE i,                      "Line Print Position HDR2
    line_pos3 TYPE i,                      "Line Print Position DET2
    status,                                "Order Status
    open,                                  "Open Order
    delayed VALUE 'D',                     "Delayed Order
    v_comp(30).                            "Company Text Field
    DATA: v_flagh2.  " Flag for header 2 & 3
    DATA: ls_comwa LIKE vbco6. "Structure for flow information
    DATA: t_vbfa_tab TYPE STANDARD TABLE OF vbfa WITH HEADER LINE."Itab
    for flow information
    data: g_trans_id type vttk-tdlnr. "get transport id from flow
      information
      data  v_sales_org_cpimex type vkorg value  '3300'.
      FIELD-GROUPS:
      header,
      order.
      INSERT
      status                                 "Status
      vbak-vkbur                             "Sales Office
      vbak-ernam                             "Created By
      kna1-kunnr                             "Customer
      kna1-name1                             "Customer Name
      vbap-matnr                             "Material
      vbap-werks                             "Plant
      vbep-lddat                             "Load Dt
      vbap-vbeln                             "Sales Document
      INTO header.
      INSERT
      kna1-ort01                             "City
      kna1-regio                             "Region
      likp-traid                             "Transport ID
      lips-vbeln                             "Delivery Document
      lips-ntgew                             "Net Wt
      lips-gewei                             "Unit of Weight
      vbap-kwmeng                            "Order Qty
      vbap-vrkme                             "Sales Unit
      vbak-bstnk                             "Customer PO
      vbak-erdat                             "Sales Create Dt
      vbak-ihrez                             "PO Release
      vbak-vdatu                            "Req Delivery Dt
      vbak-vzeit                            "Req Delivery Time
      vbfa-vbeln                             "Goods issue doc
      vbrk-vbeln                             "Billing Document
      name1_sp1                              "Sales Carrier
      name1_sp2                              "Delivery Carrier
      INTO order.
    INITIALIZATION.
    AT SELECTION-SCREEN.
      IF NOT p_sort BETWEEN 1 AND 2.
        MESSAGE e022 WITH p_sort.
      ENDIF.
    * Report 1 or more of cancelled, delayed or open
      IF p_open IS INITIAL AND
         p_delay IS INITIAL.
        MESSAGE e023.
      ENDIF.
    START-OF-SELECTION.
    * Load Company Name
      WRITE 'XYZ INC'(000) TO v_comp.
    * Calculate Date Range
      datum-1 = sy-datum - 1.
      datum-14 = sy-datum - 14.
      datum-90 = sy-datum - 90.
    * Compose Parameter Header
      PERFORM parm_hdr.
    ** Compose Report Header
      v_flagh2 = 1.
      PERFORM data_selection.
    END-OF-SELECTION.
    * Determine Sort
      CASE p_sort.
        WHEN 1.
          SORT BY status vbak-ernam kna1-name1 kna1-kunnr
                  vbep-lddat vbap-vbeln.
        WHEN 2.
          SORT BY status vbap-matnr vbap-werks vbep-lddat
                  vbap-vbeln.
      ENDCASE.
      LOOP.
        AT NEW status.
          CASE status.
            WHEN delayed.
              WRITE 'Delayed Orders'(061) TO rpt_hdr1.
            WHEN OTHERS.
              WRITE 'Open Orders'(062) TO rpt_hdr1.
          ENDCASE.
          NEW-PAGE.
        ENDAT.
        AT NEW vbak-ernam.
          IF p_sort = 1.
            CLEAR cb_hdr1.
            WRITE 'CAA:'(064) TO cb_hdr1.
            WRITE vbak-ernam TO cb_hdr1+5.
            NEW-PAGE.
          ENDIF.
        ENDAT.
        AT NEW vbap-matnr.
          IF p_sort = 2.
            CLEAR makt.
            SELECT SINGLE * FROM makt
                WHERE spras = sy-langu AND
                      matnr = vbap-matnr.
            CLEAR cb_hdr1.
            WRITE 'Material:'(042) TO cb_hdr1.
            WRITE vbap-matnr TO cb_hdr1+10.
            WRITE makt-maktx TO cb_hdr1+21.
            NEW-PAGE.
          ENDIF.
        ENDAT.
        AT NEW vbap-werks.
          AT order.
            RESERVE 3 LINES.
            SKIP 1.
            NEW-LINE.
    * Indicate new open item
            WRITE vbap-vbeln TO vbeln.
    * Find Transport ID
    * Fill the structure LS_COMWA
            ls_comwa-mandt = sy-mandt.
            ls_comwa-vbeln = vbap-vbeln.
            CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
              EXPORTING
                comwa    = ls_comwa
              TABLES
                vbfa_tab = t_vbfa_tab.
            IF sy-subrc EQ 0.
              READ TABLE t_vbfa_tab WITH KEY vbtyp_n = '8'.
              IF sy-subrc EQ 0.
                SELECT SINGLE tdlnr INTO g_trans_id
                  FROM vttk WHERE tknum = t_vbfa_tab-vbeln.
                CONDENSE g_trans_id.
              ENDIF.
            ENDIF.
            IF vbak-erdat >= datum-1.
              vbeln+10 = 'N'.
            ENDIF.
            CASE p_sort.
              WHEN 1.
                WRITE 1 vbak-vkbur.
                WRITE 8 kna1-name1.
                WRITE 44 vbeln.
                WRITE 56 vbap-matnr.
                WRITE:
                    75 vbap-kwmeng LEFT-JUSTIFIED,
                     vbap-vrkme,
                    100 vbak-bstnk,
                     vbak-ihrez,
                    134 vbak-vdatu,
                        vbak-vzeit,
                    154 vbep-lddat.
                WRITE 166 vbap-werks.
                NEW-LINE.
                WRITE:
                  5  kna1-ort01,
                  41 kna1-regio.
                IF name1_sp2 IS INITIAL.
                  WRITE:
                    45 name1_sp1,
                ELSE.
                  WRITE 45 name1_sp2.
                  IF name1_sp1 = name1_sp2.
                    WRITE ' '.
                  ELSE.
                    WRITE '*'.
                  ENDIF.
                ENDIF.
                IF  vbak-vkorg =  v_sales_org_cpimex .
                  WRITE  81 g_trans_id.
                ELSE.
                  WRITE  81 likp-traid.
                ENDIF.
                WRITE:
                  102 lips-vbeln,
                  115 lips-ntgew NO-ZERO LEFT-JUSTIFIED,
                      lips-gewei,
                  140 vbfa-vbeln,
                  152 vbrk-vbeln.
              WHEN 2.
                WRITE 1 vbak-ernam.
                WRITE 14 vbak-vkbur.
                WRITE 21 kna1-name1.
                WRITE 57 vbeln.
                WRITE:
                    69 vbap-kwmeng LEFT-JUSTIFIED,
                        vbap-vrkme,
                    92 vbak-bstnk,
                        vbak-ihrez,
                    126 vbak-vdatu,
                      vbak-vzeit,
                    146 vbep-lddat.
                WRITE 162 vbap-werks.
                NEW-LINE.
                WRITE:
                  5  kna1-ort01,
                  41 kna1-regio.
                IF name1_sp2 IS INITIAL.
                  WRITE:
                    45 name1_sp1,
                ELSE.
                  WRITE 45 name1_sp2.
                  IF name1_sp1 = name1_sp2.
                    WRITE ' '.
                  ELSE.
                    WRITE '*'.
                  ENDIF.
                ENDIF.
                IF  vbak-vkorg =  v_sales_org_cpimex .
                  WRITE  81 g_trans_id.
                ELSE.
                  WRITE  81 likp-traid.
                ENDIF.
                WRITE:
                   102 lips-vbeln,
                   115 lips-ntgew NO-ZERO LEFT-JUSTIFIED,
                       lips-gewei,
                   140 vbfa-vbeln,
                   152 vbrk-vbeln.
            ENDCASE.
          ENDAT.
        ENDLOOP.
    *       FORM PARM_HDR                                                 *
    FORM parm_hdr.
      WRITE 'Program selections'(101) TO rpt_hdr1.
      WRITE 'Sign'(102) TO rpt_hdr1+29.
      WRITE 'Option'(103) TO rpt_hdr1+34.
      WRITE 'From'(104) TO rpt_hdr1+41.
      WRITE 'To'(105) TO rpt_hdr1+77.
    ENDFORM.                    "PARM_HDR
    *       FORM RPT_HDR                                                  *
    FORM rpt_hdr.
      CASE p_sort.
        WHEN 1.               "When sort by CAA
          WRITE 1'SOff'(066).
          WRITE 8'Customer'(009).
          WRITE 44'Sales Doc'(010).
          WRITE 56'Material'(031).
          WRITE 75'Sales Qty'(011).
          WRITE 100'Customer PO'(012).
          WRITE 134'Req.Del.Dt & Tm'(014).
          WRITE 154'Load Dt'(015).
          WRITE 166'Plnt'(016).
          NEW-LINE.
          WRITE 5'City'(017).
          WRITE 41'Reg'(069).
          WRITE 45'Carrier'(018).
          WRITE 81'Transport ID'(019).
          WRITE 102'Dlvry Doc'(021).
          WRITE 115'Dlvry Qty'(025).
          WRITE 140'PGI Doc'(026).
          WRITE 152'Billng Doc'(027).
        WHEN 2.               "When sort by Material
          WRITE 1'Created By'(008).
          WRITE 14'SOff'(066).
          WRITE 21'Customer'(009).
          WRITE 57'Sales Doc'(010).
          WRITE 69'Sales Qty'(011).
          WRITE 92'Customer PO'(012).
          WRITE 126'Req.Del.Dt & Tm'(014).
          WRITE 146'Load Dt'(015).
          WRITE 162'Plnt'(016).
          NEW-LINE.
          WRITE 5'City'(017).
          WRITE 41'Reg'(069).
          WRITE 45'Carrier'(018).
          WRITE 81'Transport ID'(019).
          WRITE 102'Dlvry Doc'(021).
          WRITE 115'Dlvry Qty'(025).
          WRITE 140'PGI Doc'(026).
          WRITE 152'Billng Doc'(027).
      ENDCASE.
    ENDFORM.                    "RPT_HDR
    INCLUDE zrpthdri.
    WRITE:
    / rpt_hdr1.
    ULINE.
    IF v_flagh2 <> 0.
      PERFORM rpt_hdr.  "Write secondary header
      ULINE.
    * Control Break Header
      WRITE / cb_hdr1.
    ENDIF.
    Continued in Part-2
    Thanks  a ton in advance.
    Mythili Sharma
    Edited by: Mythili sharma on Mar 30, 2009 3:32 AM
    Edited by: Rob Burbank on Mar 30, 2009 10:46 AM

    Hello ABAP Experts,
    I need your help to modify the following report with following requirement as I have least knowledge about the field-group concept. Thats is the reason, I am pasting the whole code. As it is part of our production requirement. I really appreciate your help, If its sent modifying the code required.
    Modification required in the report.
    To allow the sales representatives to see billed shipments and open orders for the current month.
    1) Selection Screen Changes:
    u2022     Add selection by Sales group and Customer group
    u2022     Add sort by:     5. Ship-to / Material
    u2022     Add another selection box
    [ ] Open Orders and Shipments with the current month
    2)      For the new selection box, subtotal sales quantity and delivery quantity.
         If delivered, make the sales quantity zero in the subtotal
    Current report displays, in Selection Screen
    Sales org:
    Person Name:
    Material:
    Plant:
    Sales Office:
    Ship to Name:
    Ship to Number:
    Sorts Report by :
    1. Person Name
    2. Material
    3. Plant
    4. Sales Office
    Check Boxes :
    1. Open Orders
    2. Delayed Orders
    3.Cancelled Orders
    PLEASE DOWNLOAD THE COMPLETE REPORT FROM THE FOLLOWING LINK
    << Link removed >>
    It would be a great help, If the program is modified according to the requirement and snd it back through send space and send link, even if u send the necessary changes to be done in the report is also appreciable.
    Thanks a ton in adanvce
    Mythili
    I wanted to close this thread as I could not put my question in a proper format. So please reply in the new thread which is posted.
    Edited by: Mythili sharma on Mar 30, 2009 2:16 PM
    Edited by: Rob Burbank on Mar 30, 2009 4:24 PM

  • I need help to modify my AS script

    I have the following script and I would like to modify it:
    1.On this file I need to type the name of some video Albums in order to be displayed in the SWF file.
    2. What I wanr is that this file read the specific folder and read the directories which they will be the names of the Albums
    How can I do this?
    One more thing is that this file was created to work with Flas CS3 and I am trying to test it with CS5.
    I really appreciate the whole help I can get.
    I don't know anything about AS2 nor AS3, I only know hoe to modify the files by following comments and other samples from all around the web.
    Thanks and I hope someone can help me, I've been trying few thing but I just stuck. So I really need help.
    //  Set the path to the External Parameters file relative to the *.swf file.
    //  If this file cannot be found or if it contains errors, the
    //  Internal Parameters(the parameters below) will be used.
    //var ParametersFile = "MyControls.xml";
    var ParametersFile = "XML_Files/MyControls.xml";
    //  Set the path to the Theme file relative to the *.swf file.
    //  If this file cannot be found or if it contains errors, the
    //  Default Grey skin will be used instead.
    //  To learn how to edit Themes, please refer to the 'Help' folder.
    // next line commented by SAMY
    //var ThemeFile = "Theme.xml";
    // NEXT LINE ADDED BY SAMY
    var ThemeFile = "FLASH_DIR/3D_GALLERY/BlueTheme.xml";
    //  To learn more about how to add albums, please refer to the
    //  'Help' folder. This line says that replace and modify the name of the title album and the xml file which is as shown here
    var AlbumLabel_1 = "Pastor Alejandro Bullon";//<-- This is the typical line that I want to be input from the external folder name *
    //var AlbumDataFile_1 = "Videos/Alejandro_B/Alejandro_Bullon.xml";
    // next line for website configuration typical
    //var AlbumDataFile_1 = "Media/Media.xml";
    //next line works fine locally
    //var AlbumDataFile_1 = "Videos/Videos_website.xml";
    var AlbumDataFile_1 = "FLASH_DIR/3D_GALLERY/Videos/Alejandro_B/Alejandro_B.xml";
    var AlbumLabel_2 = "Pastor Stephen Bohr";// <--  *
    // next line commented by samy
    var AlbumDataFile_2 = "FLASH_DIR/3D_GALLERY/Videos/Stephen_B/Stephen_Bohr.xml";
    // next line added by samy for website configuration typical for all albums
    //var AlbumDataFile_2 = "Videos/Videos.xml";
    var AlbumLabel_3 = "Pastor Caleb Jara";
    var AlbumDataFile_3 = "FLASH_DIR/3D_GALLERY/Videos/Caleb_Jara/Caleb_Jara.xml";
    //var AlbumDataFile_3 = "City/City.xml";
    var AlbumLabel_4 = "Pastor Doug_Batchellor";
    var AlbumDataFile_4 = "FLASH_DIR/3D_GALLERY/Videos/Doug_B/Doug_Batchellor.xml";
    //var AlbumDataFile_4 = "FLASH_DIR/3D_GALLERY/City/City.xml";
    var AlbumLabel_5 = "Musica";
    var AlbumDataFile_5 = "FLASH_DIR/3D_GALLERY/Musica/Musica.xml";
    //var AlbumDataFile_5 = "Landscape/Landscape.xml";
    var AlbumLabel_6 = "Powerpoint";
    var AlbumDataFile_6 = "FLASH_DIR/3D_GALLERY/Powerpoint/Powerpoint.xml";
    var AlbumLabel_7 = "Escuela Sabatica '10";
    var AlbumDataFile_7 = "FLASH_DIR/3D_GALLERY/Escuela_Sab/Esc_Sab_2010.xml";
    var AlbumLabel_8 = "Escuela Sabatica '11";
    var AlbumDataFile_8 = "FLASH_DIR/3D_GALLERY/Escuela_Sab/Esc_Sab_2011.xml";
    var AlbumLabel_9 = "Test Nature";
    var AlbumDataFile_9 = "Nature/Nature.xml";
    //  Select wether to enable or disable error messages created
    //  due to 'file not found' , 'format not supported' or 'corrupted
    //  XML files' type of errors.
    //  Note: There error messages are automatically disabled when you
    //  export your *.swf file.
    var EnableErrorMessages = "yes";//[Yes  , No]
    //  Set parameters for items.
    var ItemWidth = 170;
    var ItemHeight= 130;
    var ShowItemNumber = "yes";
    //var ShowItemNumber = "no";
    //  Select fitting technique , stretch the thumb picture to fit the item
    //  or crop it from the top left.
    var ThumbFittingMethod = "stretch";
    //  Select what to do when the file preview is clicked, either to enlarge
    //  the preview or navigate to the URL provided for the current item in
    //  the XML data file of the current album
    var WhenPreviewIsClicked = "Enlarge";//[Enlarge  , GetUrl]
    //  Select the window target, '_blank' to open a new window or '_self' to
    //  navigate to the URL in the same window
    var WindowTarget = "_blank";
    //  Select wether to show the information of the item or not
    var ShowItemInfo = "yes";
    //  Select wether to show the albums menu or not
    var ShowAlbumsMenu = "yes";
    //  Select wether to show the video controller or not
    var ShowVideoController = "yes";
    //  Select wether to show the autoplay option or not
    //var ShowAutoplayButton="no";
    var ShowAutoplayButton="yes";
    //  Set the delay time for autoplay, this will be used for pictures only
    var AutoplayDelayTime = 5;
    //  Set the spinning speed of a single wheel
    //var WheelSpinningSpeed = 5;
    var WheelSpinningSpeed = 2;
    //  Select direction of scrolling of pages
    var DefaultDirection = "LeftToRight";
    //  Select wether you want to disable one of the wheels
    var DisableWheel = "none";
    //  Set the maximum number of items to be loaded on a single wheel
    var MaximumLoadOnEachWheel = 10;
    //  Select how you want the wheel to interact with the mouse
    //  Refer to the 'Help' folder for more information.
    var ScrollingStyle = "2";
    //  Select wether to enable tool tips or not.
    var EnableToolTips = "yes";
    //  Set the delay time for the tool tips to appear
    var ToolTipsDelayTime = 1;
    //  This is like a shortcut, set this parameter to 'Name' to display
    //  the name of the item as a tool tip.......
    var ToolTipsContent = "tooltips";//[ToolTips , Name , FileType]
    //  Select wether to enable or disable visual effects.
    var EnableDepthOfField = "yes";
    var EnableMotionBlur = "yes";
    Message was edited by: samy4movies

    This is a web-based app. And the application is for a carrousel video gallery.
    I already figure out the auto XML generator with php, but I think I want to get all in one process. Meaning that I only want to upload my videos and run php codes by themselves and not to worry in adding or modifying the *.fla file everytime that I insert a new folder ("Album").
    This is the link for the project I am working 
    http://anaheimspanish.net/index.php?option=com_content&view=article&id=98&Itemid=124
    It's called 3D Video Gallery, I bought the component through a website for flash components, but their support is not very good, that's why I want to fix as much as I need.
    Thanks in advance for your help
    If you need a full zip project to test it, let me know.

  • Need help in finding the number of occurrences of a pattern.

    Hi All,
    I need help in finding the number of occurrences of a pattern in a table's column's data.
    Consider sample data - one row's column from a table:
    "S-S-S-A-S-S-P-S-S-B-S-A-P-S-S-C"
    My requirement is:
    I should get the count of S's which are immediately preceded by A or P.
    for the above data i should get count as 3+2+1=6 (S-S-S-A, S-S-P, S-A)
    The pattern data is stored as VARCHAR2 type.
    Thanks in advance,
    Girish G
    Edited by: Girish G on Jul 21, 2011 11:22 PM

    I am sure there exists a better way then this one:
    SQL> with dt as
      2  (select 'S-S-S-A-S-S-P-S-S-B-S-A-P-S-S-C' str from dual)
      3  SELECT SUM(Regexp_count(Regexp_substr(str, '(S\-?)+(A|P)+', 1,
      4                                     Regexp_count(str, '(S\-?)+(A|P)+') - (
      5                                                  LEVEL - 1 )), 'S')) len
      6  FROM   dt
      7  CONNECT BY LEVEL <= Regexp_count(str, '(S\-?)+(A|P)+')
      8  /
           LEN
             6

  • Need help in optimising the performance of a query

    Need help in optimising the performance of a query. Below is the query that is executed on TABLE_A, TABLE_B and TABLE_C with record counts as 10M, 10m and 42 (only) respectively and it takes around 5-7 minutes to get 40 records:
    SELECT DISTINCT a.T_ID_, a.FIRSTNAME, b.T_CODE, b.PRODUCT,
    CASE WHEN TRUNC(b.DATE) +90 = TRUNC(SYSDATE) THEN -90 WHEN TRUNC(b.DATE) +30 = TRUNC(SYSDATE) THEN -30 ELSE 0 END AS T_DATE FROM TABLE_B b
    INNER JOIN TABLE_A a ON (a.T_ID_ = b.T_ID_) LEFT JOIN TABLE_C c ON b.PRODUCT = c.PRODUCT
    WHERE b.STATUS = 'T' AND (b.TYPE = 'ACTION'
    AND ( TRUNC(b.DATE) + 1 = TRUNC(SYSDATE) ) ) AND b.PRODUCT = 2;
    Note: Indices on the join columns are available in the respective tables
    Please let me know if there is any better way to write it.
    Edited by: 862944 on Aug 18, 2011 9:52 AM

    862944 wrote:
    Need help in optimising the performance of a query. Below is the query that is executed on TABLE_A, TABLE_B and TABLE_C with record counts as 10M, 10m and 42 (only) respectively and it takes around 5-7 minutes to get 40 records:
    SELECT DISTINCT a.T_ID_, a.FIRSTNAME, b.T_CODE, b.PRODUCT,
    CASE WHEN TRUNC(b.DATE) +90 = TRUNC(SYSDATE) THEN -90 WHEN TRUNC(b.DATE) +30 = TRUNC(SYSDATE) THEN -30 ELSE 0 END AS T_DATE FROM TABLE_B b
    INNER JOIN TABLE_A a ON (a.T_ID_ = b.T_ID_) LEFT JOIN TABLE_C c ON b.PRODUCT = c.PRODUCT
    WHERE b.STATUS = 'T' AND (b.TYPE = 'ACTION'
    AND ( TRUNC(b.DATE) + 1 = TRUNC(SYSDATE) ) ) AND b.PRODUCT = 2;
    Note: Indices on the join columns are available in the respective tables
    Please let me know if there is any better way to write it.
    Edited by: 862944 on Aug 18, 2011 9:52 AM[When Your Query Takes Too Long|https://forums.oracle.com/forums/thread.jspa?messageID=1812597]

  • Need help in writing NVARCHAR2 column to an excel sheet

    Hi All,
    I have a NVARCHAR2 column in my table. I want to store the data present in the column into an excel file. When i write the data to an excel file the data is getting converted to some other form. It's not in human readable form.
    Language is not fixed for the column.
    I need help in storing the NVARCHAR2 data into an excel file without any implicit conversion done by the oracle.
    Please help.
    Thanks,
    Girish G
    Edited by: Girish G on Jul 14, 2011 2:02 AM

    Export data to BLOB (csv)

  • Need help to find the "leading point size"

    Hi,
    I need help to find the "leading point size".
    Any para style leading is more than 2 points of my font size, I need the alert message "Its more than 2 points for your font size". For instance my para font size is 10 here my leading should be 12 points rather than its 14 points, I need the alert message.
    Is this possible by script?
    by
    hasvi

    Hi Hasvi,
    Try this.
    var doc = app.activeDocument;
    var texts = doc.stories.everyItem().textStyleRanges.everyItem().getElements();
    var pstyle = "Following paragraph styles have more leadings:\r\r";
    for(var i=0;i<texts.length;i++)
        var ps = texts[i].pointSize;
        if(texts[i].leading > ps + 2)
            pstyle += texts[i].appliedParagraphStyle.name;
    alert(pstyle)
    If it is correct than mark the answer as correct and don't mark your question as correct answer.
    Regards,
    Chinna

  • I need help understanding how the Apple components integrate to create a system across all my devices?

    I need help understanding how the Apple components connect to create a whole system across all my devices?
    Is there a resource that describes current system and associated functionality?
    For example:
    Buy A, B, C to achieve "X" 
    You will need:
    an internet provider which supports <specs>
    add D to achieve "Y"
    You will need:
    an internet provider which supports <specs>
    add "E" to achieve "Z"
    You will need:
    an internet provider which supports <specs>
    For example, I am looking at the Gen 6 Airport extreme.  For intended performance do I need broadband? if so what are the specs, or will basic internet service suffice?  Do I need the internet provider's modem or does the Airport extreme replace that?  And then I think, if I am doing this, I should also look at Apple TV....What do I need and Why?  Then I look at the New Desk top coming out in the fall, and I think well, if I wait and get this, what does this component do for the system, and what becomes redundant? What does this awesome desktop do for my ability to sit and use a new macbook air when I travel  or sit on the couch in my PJs?
    If there was a place that plainly stated "if you buy the new dektop you can configure a system including only these components and achieve <this result> and by adding <additional components> you will achieve this result.
    I have been to the genius store a few times, but I come out of there more confused unless I have SPECIFIC questions or already know what to buy. 
    A "System Configuration App" would be a really great sales tool--Just saying.

    I have no idea what "fully optimized" means.
    No Apple device will let you watch broadcast TV. The Apple TV is a good option for watching streaming TV from iTunes, NetFlix and Hulu. If you want to watch from other sources, you may need to look at other devices.
    Any Mac computer or iPad will allow you to surf the web.
    What business software?
    Time Capsule is a good option for back ups.
    Update what across all devices?
    For accessing documents from all devices, a service like Dropbox is your best bet.
    I have no idea what "step as far away from an internet provider as possible" means. If you want Internet access, you need an Internet provider.
    Lighting fast speed for what? Processor? The specs are listed for all devices in the Online Store. Internet? We're back to the service provider.
    Technology changes. The only way to keep pace with it beyond a couple of years is to buy new stuff.
    The bottom line is you need to look at the specs for devices availble and at your budget and decide what best meets your needs. If you are unable to do that on your own, there are lot of technology consultants out there who will, for a fee, look at your exact situation, make recommendations and even handle the purchase and set up. Perhaps that would be the best route for you.
    Best of luck.

Maybe you are looking for