COLLECT command on DECIMAL fields

Hi All,
Since a couple of days, I am trying to solve the problem of using COLLECT statement against content of table which is :
F1.... type CHAR key
Fn.... type CAHR key
T1 ....type DEC 7,2
I am loadint the teble to internal table, and trying to perform COLLECT on it, but it says, that non-key fields to collect have to be type: I,P or F. I need to collect field which in table reflects type DEC 7,2. Do You have any idea how to solve it ???
regards, tomek

Here it comes:
declaration:
DATA:       T_TABLE TYPE SORTED TABLE OF Z_TABLE WITH UNIQUE KEY
            RLDNR
            RYEAR
            RTCUR
            RPMAX
            RPRCTR
            SPRCTR
            RACCT
            KTOPL
            KTOSL
            BKLAS
            WITH HEADER LINE,
S_TABLE TYPE Z_TABLE.
code:
COLLECT S_TABLE INTO T_TABLE.
in Z_TABLE there are the last non key filelds of type: DEC(7,2), which are to be collected
and it gives syntax error while compiling: I can only use collect command for fields of type: I, P or F
Any glue ???
regards, tomek

Similar Messages

  • Error in collect statement(non-key fields must be numeric)...

    Error in collect statement(non-key fields must be numeric)...
    Hello Experts,
    I created an internal table based from a ztable. The structure of the ztable is
    as follows:
    1. MANDT -> PRIMARY KEY
    2. BUKRS -> PRIMARY KEY
    3. TXK50 -> PRIMARY KEY
    4. ANLKL -> PRIMARY KEY
    5. KTANSW -> PRIMARY KEY
    6. KOSTL  -> PRIMARY KEY
    Then the remainder of the fields(around 8 fields) are currency data types(ANBTR).
    An error is showing saying 'You can only use the collect command in a table if all of its non-key
    fields are numeric(type I,P or F).
    I searched the forum and it said that non-keys must be numeric in order for the
    collect command to work. But all of my primary keys are non-numeric.
    Below is my declaration:
    CLASS-DATA: gt_output_acq TYPE hashed TABLE OF zsd_output_acq
                                  WITH UNIQUE KEY bukrs txk50 anlkl
                                                  ktansw kostl,
                    gt_output_ret LIKE gt_output_acq,
                    wa_output_gen LIKE LINE OF gt_output_acq,
                    gt_output_net TYPE HASHED TABLE OF zsd_output_net
                                  WITH UNIQUE KEY bukrs txk50 anlkl
                                                  ktansw kostl,
                    wa_output_net LIKE LINE OF gt_output_net,
                    gt_sort_crit  TYPE SORTED TABLE OF t_sort_crit
                                  WITH NON-UNIQUE KEY bukrs kostl,
                    wa_sort_crit  LIKE LINE OF gt_sort_crit.
    FIELD-SYMBOLS: <fs_output_acq> LIKE LINE OF gt_output_acq,
                       <fs_output_ret> LIKE LINE OF gt_output_ret,
                       <fs_output_net> LIKE LINE OF gt_output_net.
    COLLECT <fs_output_acq> INTO gt_output_acq.     "Here is the error

    Hi Vijay,
    Here it is:
    CLASS-DATA: gt_output_acq TYPE hashed TABLE OF zsd_output_acq
                                  WITH unique KEY bukrs txk50 anlkl
                                                  ktansw kostl,
                    gt_output_ret LIKE gt_output_acq,
                    wa_output_gen LIKE LINE OF gt_output_acq,
                    gt_output_net TYPE hashed TABLE OF zsd_output_net
                                  WITH unique KEY bukrs txk50 anlkl
                                                  ktansw kostl,
                    wa_output_net LIKE LINE OF gt_output_net,
                    gt_sort_crit  TYPE SORTED TABLE OF t_sort_crit
                                  WITH NON-UNIQUE KEY bukrs kostl,
                    wa_sort_crit  LIKE LINE OF gt_sort_crit.

  • Can a .pdf created with Livecycle allow a user to enter a % symbol in a numeric or decimal field?

    What I've found so far is that the only way to get the % symbol into a numeric/decimal field at all is to set the "display pattern" to display the % symbol after numbers have been entered into the field.
    The reason I want the field to be numeric and not text is because I have to run a FormCalc caculation that populates a third field.
    (NumericField1 * Numeric Field2*) + NumericField1

    Thanks for the reply Niall.
    I ended up chanigng the numeric field to a decimal field instead, and added the following display pattern: num{zzzz9.99'%'}
    So although the user can't enter a % symbol into the field, a % symbol automaticaly populates when the user enters a number.
    My criteria involved ensuring that a user could not enter a number with more than two numbers after the decimal, so I also set a trailing digits max of 2 (in the Obect > Field settings)
    This is the FormCalc formula I used in the "calculate" event to calculate the salary increase amount request: (DecimalField1 * NumericField2) *.01 + NumericField2
    This formula is meant to calculate the salary amount a manager is requesting their employee's salary be increased to.

  • Data flow fails on packed decimal field moving iSeries DB2 data from one iSeries DB to another

    I' trying to use SSIS to move table content from one iSeries DB2 database to another.  I'm using the .Net providers for OleDb\IBM DB2 for i5/OS IBMDA400 OLE DB Provider in the connection managers for the source and destination and the test connection
    works fine.  When I try to run the data flow task however it fails on the first packed decimal field it encounters with the exceptions ...
    [select from hydro520 hydroweb2 blpmstr [16]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "component "select from hydro520 hydroweb2 blpmstr" (16)" failed because error code 0x80004002 occurred, and the error
    row disposition on "output column "MSPRIB" (55)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
    [select from hydro520 hydroweb2 blpmstr [16]] Error: The component "select from hydro520 hydroweb2 blpmstr" (16) was unable to process the data. Pipeline component has returned HRESULT error code 0xC0209029 from a method call.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "select from hydro520 hydroweb2 blpmstr" (16) returned error code 0xC02090F5.  The component returned a failure code when the pipeline
    engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
    ...in the progress tab.  Can someone kindly tell me what I need to do to get the connection manager to work with DB2 packed decimal fields?  Or is it a different issue all together?  Thanks tonnes for any help, Roscoe

    Hi rpfinn,
    From the Data Types mapping rules between SSIS and DB2, we can see that both the NUMERIC and DECIMAL data types in DB2 are mapped to DT_NUMBERIC data type in SSIS. Now that the source data in your DB2 database is NUMERIC data type, changing the DT_NUMBRIC
    data type to DT_DECIMAL is invalid. Besides, if we check the data types of the target External column and Output column from the Advanced Editor for ADO NET Source adapter, the data type should be defined as DT_NUMERIC with Precision as 9 and Scale as 2. I
    am not clear where you see the DT_NUMBERIC(9,0) e.g. DT_NUMERIC with Precision as 9 and Scale as 0, but it may be the cause of the issue. You need to make sure the DT_NUMERIC data type also has Scale 2 instead of 0.
    If you don’t know how to modify the data type, please elaborate the Data Flow Task of the package so that we can make further analysis. Besides, the error messages you posted are incomplete, it will be helpful if you post the complete error message.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Format of a numeric/decimal field

    Can we set the format of a decimal field to display zzz.999 without rounding off the value. For example,I have a decimal field with display & Edit pattern set as "zzz.999" and trailing digits limited to 3. If I enter a value 123.456, its ok. But if I put 123.4567 the value is rounded off and displayed as 123.457. Can we limit it somehow to truncate anything extra than 3 trailing digits.
    Thanks
    Shweta

    Maybe not automatically, but you should be able to do this with a little JavaScript in the form.
    Mike

  • Can I know the precision and scale of a decimal field using ACEDAO?

    Using ACEDAO in VC++, I am trying to retrieve the field details of an Access database (.accdb file) table of which one field is of decimal type. I am able to get the details using the functions of
    DAO::_FieldPtr field;
    as follows:
    fieldName = field->GetName().GetBSTR();
    nType = field->GetType() // returns DAO::dbDecimal
    lSize = field->GetSize(); // returns 16
    lAttr = field->GetAttributes(); // returns 0x000002H
    nOrdinal = field->GetOrdinalPosition(); // returns 11
    bAutoIncrement = ((lAttr & DAO::dbAutoIncrField) > 0);
    DAO::PropertiesPtr props;
    DAO::PropertyPtr prop;
    int k, nProp;
    std::wstring propName, propNames;
    props = field->GetProperties();
    if(props)
    nProp = props->GetCount(); // returns 33
    for(k = 0; k < nProp; k++)
    prop = field->GetProperties()->GetItem((short) k);
    if(prop)
    propName = prop->GetName().GetBSTR();
    propNames += propName;
    propNames += L"\n";
    // After exiting the loop, propNames contain 33 properties as:
    // Value
    // Attributes
    // CollatingOrder
    // Type
    // Name
    // OrdinalPosition
    // Size
    // SourceField
    // SourceTable
    // ValidateOnSet
    // DataUpdatable
    // ForeignName
    // DefaultValue
    // ValidationRule
    // ValidationText
    // Required
    // AllowZeroLength
    // AppendOnly
    // Expression
    // FieldSize
    // OriginalValue
    // VisibleValue
    // GUID
    // ColumnWidth
    // ColumnOrder
    // ColumnHidden
    // Description
    // DecimalPlaces
    // DisplayControl
    // TextAlign
    // AggregateType
    // ResultType
    // CurrencyLCID
    //But does not have any property named "Scale" or "Precision"
    I could not find any function for retrieving the value for precision and scale for the decimal field.
    Though I am able to retrieve the field value as a decimal number and get the required information from the structure, I think it is not the right way. Because, what will happen if the data for field is not available in the table?
    Is there any other method to retrieve the precision and scale of a decimal type field using ACEDAO?
    Thanks.

    I cannot find a method or property in ACEDAO to retrieve the precision and scale of a field. Maybe you could try get the number of a decimal type and use some mathematical methods to get the precision.
    I find there are some way to get the precision by ADO or OLEDB.
    For ADO way, you could check this thread:
    https://social.msdn.microsoft.com/Forums/office/en-US/883087ba-2c25-4571-bd3c-706061466a11/how-can-i-programmatically-access-scale-property-of-a-decimal-data-type-field?forum=accessdev
    For OLE DB , you could use IColumnsInfo::GetColumnInfo to get DBCOLUMNINFO::bPrecision.
    https://msdn.microsoft.com/en-us/library/windows/desktop/ms722704(v=vs.85).aspx
    Also people in C++ may not familiar with access development, the
    Access for Developers forum is good place for access develop issue. You could try there.
    Hope this helps some.
    Shu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to process decimal field in extract

    Hi All
    I need to use a extract in TableMaintenace event.
    I understood using loop and indexing, we can access teh fileds.
    But when i checked in the Debugging mode, Decimal values in hte table are displayed as ####. How to get these decimal fields.
    Could someone please clarify this?

    Increase the field length for you decimal field.
    If that doesn't work define the field as an alpha field.

  • Aodbe form Numeric or Decimal Field

    Hi experts,
                 I am new to adobe form. I want to display, if i enter 1234 ,it will be displayed 12.34 .Can you please suggest me?
    Thnaks.
    Hans

    Hi Hans Bauer,
    Do the following:
    1. Take the field as Numeric Field or Decimal field from Library.
    2. Select the field from Hierarchy.
    3. Go to menu> windows> Script Editor.
    4. Choose Exit event in the script editor.
    5. now write the following code in the exit event of the numeric field/decimal field.
    $.rawValue = $.rawValue/100
    Thats all what you have to do.
    Hope it will solve your problem.
    Regards,
    Vaibhav Tiwari.

  • How to change the Display Pattern for Decimal Fields dynamically

    hi all,
    Can any one help me how to change the display pattern for decimal fields dynamically???
    Currently I am using z,zzz,zzz,zz9.999 Display pattern for Quantity Field. If the value is blank it is displaying as 0.000 on the Screen. But I don't want this to be printed.
    Please help me how to solve this ASAP.
    Thanks,
    Prabhu

    Hi,
    Alternatively you can handle it in the context.
    In the context area, click on the quantity. In the bottom, click on the conditions tab, and put a condition
    <quan field> NE initial.
    So the field will not be printed if there is no value.
    Regards,
    Vidya Chowdhary A.

  • Decimal Fields in screen

    Hi,
       I have developed a Module pool program. I have a screen field type DEC. I have two modes, EDIT and DISPLAY. In EDIT mode, when i enter 0.00 into this screen field and press save, the value displayed is BLANK and not '0.00' as required. In DISPLAY mode the value is displayed correctly as '0.00'.
       I tried changing the screen field to type CHAR. But the same field variable is declared as TYPE 'p' for underlying calculations. Thus it gives me an 'SCREEN FORMAT ERROR'.
       Any ideas how to diplay '0.00' in the decimal field in EDIT mode?
    Awaiting your responses.
    Regards,
    Sandeep

    What you are seeing is the stanard way the gui handles these fields in the particular mode(change,display).  You can not get around this using the decimal field.  Your only solution is to make are character field on the screen as well as character field in the underlying program. 
    Regards,
    Rich Heilman

  • Invalid Number Error for Decimal Field While Loading Data

    I am loading a delimited text file using the SQL* loader however I am reciving an error in my decimal fields. When a decimal field only has leading zeros before the decimal point I receive invalid number error. Below will clarify:
    i.e.) 00000000.30 [*Invalid number*]
    i.e.) 00046567.45 [*Valid number*]
    i.e.) 00000001.00 [*Valid number*]
    I've tried setting the precision/scale in the table, tried declaring it a decimal field instead of number, none of these methods fixed the issue. Any help I would really appreciate.
      POLICY_NUMBER             NUMBER,
      EFFECTIVE_DATE     DATE "YYYYMMDD"          NULLIF EFFECTIVE_DATE = '',
      TRANSACTION_DATE     DATE "YYYYMMDD",
      TRANSACTION_AMOUNT     DECIMAL EXTERNAL,   -- Tried TRANSACTION_AMOUNT DECIMAL EXTERNAL (10)  & TRANSACTION_AMOUNT NUMBER
      MF_TRX_CODE          NUMBER,
      USER_ID          CHAR,
      GROUP_NUMBER          NUMBER,
      EXPIRATION_DATE     DATE "YYYYMMDD"          NULLIF EXPIRATION_DATE = '',
      BILL_NUMBER          NUMBER,Any help is greatly appreciated. Thanks before hand.

    Hi,
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> SELECT * FROM TEST;
    TRANSACTION_AMOUNT
    SQL> SELECT * FROM TEST;
    TRANSACTION_AMOUNT
              11000,00
                293,37
               2000,00
               1134,32
                  0,30
    SQL>Between the selects I loaded the table with sql*loader using...
    Load Data
    INFILE *
    APPEND
    INTO TABLE TEST
    FIELDS TERMINATED BY '|'
    TRAILING NULLCOLS
      TRANSACTION_AMOUNT     DECIMAL EXTERNAL
    BEGINDATA
    00011000.00
    00000293.37
    00002000.00
    00001134.32
    00000000.30The log is
    SQL*Loader: Release 10.2.0.1.0 - Production on Tue Dec 23 17:23:47 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   test.ctl
    Data File:      test.ctl
      Bad File:     test.bad
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table TEST, loaded from every logical record.
    Insert option in effect for this table: APPEND
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    TRANSACTION_AMOUNT                  FIRST     *   |       CHARACTER           
    Table TEST:
      5 Rows successfully loaded.
      0 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    Space allocated for bind array:                  16512 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             5
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Tue Dec 23 17:23:47 2008
    Run ended on Tue Dec 23 17:23:50 2008
    Elapsed time was:     00:00:02.86
    CPU time was:         00:00:00.06Regards,

  • Warning with DECIMAL field

    hi ,
    I have created an extractor using a Ztable. The extractor is available in RSA6 transaction. When i doubl click on the extractor from RSA6, it takes me to the extractor and when i click on BACK icon from the extrcator, it takes me back to RSA6 screen with a info window " warnings have occured . See Log "...
    the log says,
    "The even-numbered length of the DEC field ZHOURLY_RT can lead to problems".
    how to get rid of this......
    regards,
    Balaji

    Hi Balaji,
    The reason for the error will be clear for you when you check the following link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21f2f2446011d189700000e8322d00/content.htm
    And check your table if you put the even number for the decimal field.
    With regards
    Chandru

  • Dezimalfeld und Berechnung/ decimal-field and calculation

    Hallo zusammen,
    in einerm Formular versuche ich mehrere Dezimalfelder anzulegen, die am Ende zu einer Summe berechnet werden sollen.
    Wenn die Stellen hinter dem Komma  "00" lauten, werden sie nicht dargestellt.
    Welche Einstellung muss ich wählen?
    Wie muss die Einstellung für das Summenfeld lauten?
    Freue mich über jeden Hinweis oder Tipp.
    Hi,
    in a form I'm trying to create several decimal fields that are to be calculated at the end to a sum.
    If the digits after the decimal point are "00", they are not shown.
    What setting should I choose?
    What must be the setting for the total field?
    I am pleased with every hint or tip.

    In a form I'm trying to create several decimal fields that are to be calculated at the end to a sum.
    If the digits after the decimal point are "00", they are not shown.
    What setting should I choose?
    What must be the setting for the total field?
    In the field's validation pattern, In pattern field box copy this pattern  num{(zzzz9.99)}
    This should work for your problem
    Thanks,
    Jaison

  • Web dynpro + adobe form decimal field round off

    hello all,
    I am now developing an application which is based on the SAP WebDynpro and Adobe form, but the application has an error, if one can help me to resolve the error, I will be very thankful.
    The error is as follows, for a decimal filed on the Adobe form which is binded to a deicmal attribute of Webdynpro, if I get the value of the decimal field using the programming code as "context.nodexx.getAttribute("xx")", the decimal value is rounded off (e.g., 2.4 is changed to 2.0, 2.7 is changed to 3.0).
    for example:In Web Dynpro,  A node name is  "TestNode" which has a  type of decimalattribute named "TestAttr" ,  in  adobe form  a decimal field  bind to the TestAttr . when i input 2.3  in  adobe form,  i  click the button with code:
    this.wdComponentAPI.getMessageManager.reportSuccess(this.wdContext.nodeTestNode.getTestAttr()+"");
    the rusult is  :     2.0
    if  i  input  the  value  2.5   the result  will be  3.0
    Thanks All !

    Hi,
    there is a special display pattern to check for null values:
    null{pattern}
    Example:
    null{'please enter a value'}
    But I don't know if WDJ is really sending a null value. You can combine this with alternatives using '|' to separate alternatives.
    Regards,
    Juergen

  • Decimal field in Adobe interactive form

    I am making one report in which i am displaying decimal field , if that variable contains value then there is no problem but when the value is null then it is showing 0.00 so please suggest me any method by which i can remove these 0.00 and the space left blank.
    Thanks. Ankesh

    Do one thing...
    write the following code on "intialize" event of LSF field:
    xfa.host.messageBox( $.rawValue );
    if ( $.rawValue == 0.0 ) {
    $.rawValue = "";
    What is the message coming in messageBox in case of value is 0, write that value in if condition.
    Edited by: Amit on Jun 6, 2008 7:07 AM

Maybe you are looking for

  • Sales group not filled form sales order header in PGI accounting Document

    Hi all, we are creating a sales order . when sold to and ship to is entered the sales group at the header level is fetched from the customer master automatically. Now after changing the sales group,different from customer master,the sales order got s

  • Creating first number in a sequence field

    Hello. I'm used to SQL Server and I see there is no direct way to create identity fields in Oracle. I have an application that receive many messages that are inserted in a table. I need that to be the fastest I can do it. The table has a sequence num

  • CSS 11500 - how to clear sticky-table entry

    Hi together, 1. is there any possibility to clear an entry in the sticky table ? 2. how could I find a sticky table entry, belong to a certain IP Addres or flow ? commands I know to find more details infos about the sticky table and the flows find be

  • Help SecurityException

    Hello. I'm a problem with WL6.0 that in WL5.1 i haven't. My source code is : java.security.MessageDigest oDigest=java.security.MessageDigest.getInstance("MD5"); byte oRes=oDigest.digest(oIn); the Exception that produce is : java.lang.SecurityExceptio

  • Hi i would like to have the RFC documentation

    hi friends i need to do RFC using VB 6.0. if u have any documentation or good sites can u please provide. thank you in advance.