Amount field data type?

I have rows coming in with three column values I need on the export, I don't want to change the export process that is in place ...and I can't change the import formats...
I would like to concatenate them and put them in the "Amount" field...can this be done?
Suggestions?
Jz

You won't be able to do it in the Amount field because without using some sort of seperator i can't see how you will parse the values out later and this will give you issues at import with non numeric data type exceptions. Also if you can't change import formats you are extremely limited as this is where any sort of data manipulation is traditionally done.
Edited by: SH on May 13, 2011 8:39 PM

Similar Messages

  • Unicode  - "DMBTR" must be a character-type field (data type C,N,D or T)

    Greetings Experts!
    I am trying to convert legacy code to Unicode for a current ERP6.0 reinstallation and have encountered the syntax error "DMBTR" must be a character-type field (data type C,N,D or T)
    The field is part of a structure and the fields attributes are as follows:
    COMPONENT = DMBTR     
    COMPONENT TYPE = DMBTR     
    DATA TYPE = CURR     
    LENGTH = 13     
    DECIMALS = 2     
    DESCRIPTION = Amount in Local Currency
    The code in question is as follows:-
    macro Move_Zoned.
    Converts a numeric variable to zoned format and moves it to a
    target variable.
    DEFINE move_zoned.
         &1 - source variable
         &2 - Number of Decimal Places
         &3 - 'To'
         &4 - Target Variable.
      write &1 to w_zoned no-grouping decimals &2.
      condense w_zoned.
         Remove the Decimal Points.
      search w_zoned for '...'.
      while sy-subrc = 0.
        move sy-fdpos to w_to_point.
        if w_to_point = 0.
          w_to_point = 1.
        endif.
        compute w_from_point = sy-fdpos + 1.
        concatenate w_zoned+0(w_to_point)
                    w_zoned+w_from_point
               into w_zoned.
        search w_zoned for '...'.
      endwhile.
      shift w_zoned right deleting trailing space.
      translate w_zoned using ' 0'.
      call function 'Z_TRANSLATE_ZONED_DECIMALS'
        exporting
          i_input              = w_zoned
        importing
          i_output             = w_zoned
        exceptions
          x_invalid_zoned_char = c_invalid_zoned_char
          x_numeric_info_lost  = c_numeric_info_lost
          others               = c_other_zoned_error.
         Get the length of the recipient field so we don't truncate the
         numbers....
      describe field &4      length w_flength in character mode.
      describe field &4      type   w_type.
      describe field w_zoned length w_zoned_len in character mode.
      if w_zoned_len <= w_flength.
        move w_zoned to &4.
        shift &4 right deleting trailing space.
        translate &4 using ' 0'.
      else.
            Get the start position....
            If it's a packed field allow for values up to 6 figures
        compute w_zoned_len = w_zoned_len - w_flength.
        if w_type = 'P'.
          subtract 2 from w_zoned_len.
          clear w_type.
        endif.
        move w_zoned+w_zoned_len &3 &4.
      endif.
    END-OF-DEFINITION. "Move_zoned
      LOOP AT t_single_kunnr.
        move_zoned t_single_kunnr-postamt 2
                to t_single_kunnr-dmbtr.
        DIVIDE t_single_kunnr-dmbtr BY 100.
        MODIFY t_single_kunnr.
      ENDLOOP.
    Is there a solution to get past this syntax error as I would rather not change the datatype of the field in the structure.
    Much Obliged
    Elphick.

    Type X is not allowed in Unicode. When a field is declared as Type X with Value u201809u2019 or any other value, it can be resolved by using classes.
    Before Unicode
                      CONSTANTS: c_hex TYPE x VALUE '09'.
    Resolution:
    Itu2019s work for any value of x.
    First a temporary field of Type c should declare. Following class will convert Type x variable into type c.
    Example:
    CONSTANTS: c_hex TYPE x VALUE '09'.
    DATA: LV_TEMP TYPE STRING.
    DATA: LV_TMP TYPE C.
    TRY.
    CALL METHOD CL_ABAP_CONV_IN_CE=>UCCP
    EXPORTING
    UCCP   = c_hex
    RECEIVING
    CHAR   = LV_TMP   .
    CATCH CX_SY_CONVERSION_CODEPAGE.
    CATCH CX_PARAMETER_INVALID_TYPE.
    CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
    ENDTRY.
    CONCATENATE I_OUTPUT-BKTXT I_OUTPUT-BVORG            
    I_OUTPUT-BUDAT I_OUTPUT-MESSAGE INTO
    SEPARATED BY LV_TMP.                      
    I_BUFFER = LV_TEMP.
    CLEAR LV_TEMP.
    CLEAR LV_TMP.
    OR
    Note: It works only for type x value  09.
    CLASS cl_abap_char_utilities DEFINITION LOAD.
    CONSTANTS: c_hex TYPE c VALUE
                             abap_char_utilities=>HORIZONTAL_TAB.

  • Suppose we have 4 fields ,  data type  u0093 DATS u0094 for those fields how do you

    Hi Experts,
    How we decide particular  field map to particular info object. Suppose we have 4 fields ,  data type  “ DATS ” for those fields how do you decide the  InfoObject  “0calday
    have to map.
    thanks&regards
    pradeep

    Hi Pradeep,
    It merely depends upon ur requirement.
    If u r having 4 dats fields and is it up to ur requirement to map one of that obj to the 0calday.

  • Issue with field data type NUMBER(22,5) while updating field data.

    Hi,
    I have a field with data type NUMBER(22,5).
    While inserting or updating field data it should take 17 digit and after decimal point 5 digit total 22 digit.
    I set 22 for maximumLength property of messageTextInput field.
    While updating field I am getting following problems,
    1) I provide the value as 1234567890123456789012 (22 digit) and click apply button.
    then I got error message as
    Error
    मैकेनाइजड दो पहिया/तीन पहिया वाहन - Value 1234567890123460000000 exceeds the maximum allowed value (NUMERIC (22, 5))
    2)then I insert 12345678901234567.1234 (17 digit before decimal point and 4 digit after decimal point and it didn't accept 5 digit after decimal point) and click apply button.
    It insert the value as 12345678901234600 (value changed after Apply)
    The I tried with simple SQL insert statement to insert data and it successfully insert 12345678901234567.12345 value.
    Any item property I missed here to set?
    Please suggest.
    Thanks & Regards,
    Sagarika

    hi
    according to
    " then I insert 12345678901234567.1234 (17 digit before decimal point and 4 digit after decimal point and it didn't accept 5 digit after decimal point) and click apply button.
    It insert the value as 12345678901234600 (value changed after Apply)"
    this statement ,it seems that it is definitely applying round or somthing like that function in the code before inserting value in the table("try with select round(12345678901234567.1234 ) from dual u will get the same result = 123456789012345600 ") ,
    bcz u r able to insert the same directely into the table using insert statement so kindely have look on the code if something like this is not happening there.try to check code in related EOimpl class
    try to to use debugging mode ,and the 23 char problem is related to maximum lenghth of text box make it 23 it will get resolved and u will be able to enter 17 digits with 5 digits after decimal point
    thanx pratap

  • RF Screen Field-Data Type

    Hi,
       Please let me know if the Data Type- STRG (Char string,variable length) is allowed for RF Screen.
    I want to use a field with Defined Len = 1000 CHAR & visible Len = 1.
    Pls let me know if you hv some other solution also...
    Regards,
    Rushikesh

    I'm not familiar with module pool programs and their impossibilities ??
    but I guess the transfer of data or retrieving of data is the same whether youi have a selection screen or not.
    in the selection screen all data is gathered in a range. you can also create and fill a range you're self
    look at datatype ranges for more info
    example
    ranges: h_arbid for crhd-objid occurs 0 .
    you can now define
    h_arbid-option = 'I'.
    h_arbid-sign = 'BT'.   "means between or EQ for single value
    h_arbid-low = 'start 1'.
    h_arbid-high = 'start 10'.
    append h_arbid.
    you can also add more ranges to the same selection.
    h_arbid-option = 'I'.
    h_arbid-sign = 'BT'.   "means between or EQ for single value
    h_arbid-low = 'start 20'.
    h_arbid-high = 'start 30'.
    if you pass it on to you're select statement it is
    select * from table where arbid IN h_arbid.
    so you get all the records from 1 till 10 and 20 till 30
    kind regards
    arthur

  • Creating Custom fields (data type QUAN) using EEWB

    Hi all
    I tried to create two customised fields using EEWB for CRM Opportunity:
    1. Projected Volume (data type 'QUAN', length 13, 3 decimal places)
    2. Projected Unit (data type 'UNIT')
    In the SAP-generated tables, I have set the reference table field for 'Projected Volume' to point to 'Projected Unit'. However, I encountered errors that is related to Table Buffering and Restricted Transport for the Projected Volume field.
    If I were to change the data type to 'NUMC', field generation is ok. Does anyone know to resolve this issue? I need the Projected Volume field to be of data type 'QUAN' since decimal place is required.
    Thanks for your advice!

    SAP Note 746227 has addressed this issue. I will close this question.

  • JCo getting truncated value from SAP when field data type is RAW

    We are trying to fetch data from a SAP-AII table by using JCo using the RFC RFC_READ_TABLE.
    We are getting incomplete data when the data type of the column is RAW in a particular table.A typical case is:
    Table Name: /AIN/DM_DEVCTR
    Field : CLIENT                Type: CLNT    Length:3      Value: 100                                                            (SAP Generated)
    Field:  DEVCTR_GUID    Type:RAW      Length:16    Value: 306F50F53805ED488DE9797AC86B5728     (SAP Generated)
    Filed:  DEVCTR_ID         Type:CHAR    Length:128   Value: KDEVICECONTROLLER                             (User input)
    For the fields CLIENT and DEVCTR_ID we get the entire value (including blank spaces) but for DEVCTR_GUID we get only 16 characters whereas SAP-AII stores a value that is 32 characters in length. How do we fetch the actual value instead of the truncated value?
    Sample code is attached.
              try {
                   mConnection = JCO.createClient("100", // SAP client
                             "User", // userid
                             "Password", // password
                             "EN", // language
                             "SAP", // host name
                             "00"); // system number
                   mConnection.connect();
                   if (mConnection == null) {
                        System.out.println("Connection to SAP Server failed.");
                   mRepository = new JCO.Repository("User", mConnection);
                   ftemplate = mRepository.getFunctionTemplate("RFC_READ_TABLE");
              } catch (Exception ex) {
                   ex.printStackTrace();
                   System.exit(1);
              JCO.Function function = ftemplate.getFunction();
              JCO.ParameterList importParamList = function.getImportParameterList();
              importParamList.setValue("/AIN/DM_DEVCTR", "QUERY_TABLE");
              importParamList.setValue(";", "DELIMITER");
              JCO.Table tableData = function.getTableParameterList().getTable("DATA");
              JCO.Table fields = function.getTableParameterList().getTable("FIELDS");
              mConnection.execute(function);
              if (tableData.getNumRows() > 0) {
                   do {
                        for (JCO.FieldIterator e = tableData.fields(); e
                                  .hasMoreElements();) {
                             JCO.Field field = e.nextField();
                             String str = field.getString();
                             String[] values = str.split(";");
                             for(int i = 0; i < values.length; i++){
                                  System.out.println(values<i>);
                   } while (tableData.nextRow());
              } else {
                   System.out.println("No results found");
              mConnection.disconnect();

    Hi Kaanu,
       You have to modify your java code.
    String val = new String( field.getByteArray());
    PS: Please reward points for helpful answer or problem resolved.

  • Check field data type

    Hey,
    Im trying to determin the value of a JTextField.
    I want to test if the data in the field is either
    a) a String
    b) a Date
    c) a numeric
    How would i do this?
    Any example code of tutorials would be great
    thanks in advance
    Dave

    you're advocating exception handling for this?
    advocating expecting exceptions? normally if
    someone suggested this, I'd dismiss it as amateur
    ramblings, but I know that doesn't apply to you. what
    gives?Simplicty. To find out whether it's a valid int, you could of course use a regex to check for sign and all-digits,and then check the amount of digits for the maximum length - and if the String is as long as MAX_VALUE (or MIN_VALUE), you'll need to check each digit whether its equal or smaller than MAX_VALUE's.
    And then you parseInt() it.
    And for dates, it will be even worse.
    So you're going to write a hell of a lot of code that ends up doing what you'd do anyway, and in once case you have neat although avoidable "error" handling, while in the other case you're left with a lot of work, potential bugs and people cursing at you.
    If you're really a purist, a NumberFormatException should never occur. But I'm at least a bit more pragmatic.

  • A field is given data type is Table icon in Function Module

    Hi Experts,
    I am developing HCM Reports for that I have one Function Module to retrive data from Source.
    One of my Requirement is to Display One of the fields below
    Field Name:
    Sucessfull Candidate
    Vijay
    Raju
    Ram
    to display like this in my Function Module this fields Data Type is selected Table Icon
    I think because of this the field Sucessfull Candidate is not display in Data Sources.
    quires:
    1. what is the procedure to get data in Reporting like above requirement.
    2. what I will do to appairing the field in Data sources
    3.any changes in Function Module
    Regards
    Vijay

    thanks for all participants

  • Table in Smartforms cannot use data type CURR

    Hello everyone,
    I have trouble with Smartform
    in Main window , I want to show data in table.
    in main area of table .
    I want to show data of amount in document (BSEG-DMBTR)
    in text of main area. I add work area W_LINE_ITEM-DMBTR.(declare W_LINE_ITEM TYPE BSEG in Global definitions)
    but when i execute report program I got error message "W_LINE_ITEM-DMBTR Unknown in form"
    it's appear error for data type CURR only, for data type CHAR. it is OK.
    Is Smartform can show data type Curr ?
    what should i do to solve problem ?
    Please help.

    Hi,
    The best way wud be just to use the "Currency/Quan. Fields" tab...
    In Global definition,, go in "Currency/Quan. Fields" tab -> declare the the field as below for W_LINE_ITEM-DMBTR,,
    Field Name           Reference Field          Data type
    W_LINE_ITEM-DMBTR          BSEG-DMBTR             CURR
    Rgs,
    Lokesh.

  • Amount field display as 0.00

    Hi friends,
    we have requirement to display amount value as 0.00 if amount is 0  in the custom screen field(data type CURR).
    user is requesting us to display amount in screen field with 0.00 if the amount is 0.
    i want to do this through screen attributes ..
    Please help

    HI Thanks for your reply.
    we need to display for input amount screen field once user enter value 0 it shoud display as 0.00..
    as you said i enter and it works fine if i enter 0.00 or 20.00.etc.
    if i enter 0 or 20..etc. its going to dump and  given msg as shown below.
    i etntered amount screen field attributes as follows:
    Attrubutes:
    under Dict TAB:
    FORMAT  CURR
    Conv.Exit: NUMCV
    Ref.field : T001-WAERS
    under program TAB
    inout field & ouput field check boxes checked
    dump:
    runtime Error          UC_OBJECTS_NOT_CHARLIKE
          Occurred on     10.05.2008 at   05:24:31
    he current statement is defined for character-type data objects only.
    Error analysis:
    Only character-type data objects are supported at the argument
    position "OUTPUT" for the statement
      "TRANSLATE".
    In this case, the operand "OUTPUT" has the non-character-type "P". The
    current program is flagged as a Unicode program. In the Unicode context,
    type X fields are seen as non-character-type, as are structures that
    contain non-character-type components.
    Please help me.
    thanks

  • Tg4msql - Blob Data Type Support(Oracle 8i - sql server 2000)

    hi,
    We are trying to replicate the data from oracle 8i to sql server 2000 through tg4msql.if we want to replicate the data thet contains the blob field , we are getting invalid expression in the procedure marked with error line.
    the procedure i am using is as follows
    CREATE OR REPLACE PROCEDURE INSERT_SQL
    AS
    BEGIN
    FOR VAL_CURSOR IN
    --Get the Data from the table with status 0
    SELECT rs_report_rowid FROM BIJU.rs_report where rs_report_status = 0
    LOOP
    for new_cursor in
    --get the details of the record with the row id
    select id ,name,DOB from biju.sample where rowid = val_cursor.rs_report_rowid
    LOOP
    ---insert the data from oracle to sql where the oracle data type contains blob(here photo field data type is blob).
    Error Line: insert into [email protected](id,name,photo) values(new_cursor.id,new_cursor.NAME,new_cursor.DOB);
    END LOOP;
    END LOOP;
    COMMIT;
    END;
    i want to know that tg4msql won't support the blob data type on the oracle end?we configured blob eqivalent in sql server as binary.Any help or suggestion regarding this are welcome..
    regards
    Srini

    Srini,
    Support for LOB was added in v9.2. It is not supported in 8i.

  • Can we change the data type of a field based on the value of the field

    HI Gurus,
    My Requirement is as below -- Could you please guide me
    in the Printable Adobe form -- for ex - as usual for dates fields in the Object Pallette the object type is a date/time field  and for quantity/currency fields corresponding fields are taken
    now in case the either the date, quantity or currency is initial in place of displaying 0.00 or empty date we need to display N/A (Not Applicable)
    for this I would like to change the data type of the field
    to put it simply --
    we need to change the data type of date field from DATE&TIME to Char type to hold N/A or  Quantity field to Char field to hold N/A
    how can we realize this in SAP adobe forms
    Thanks in Advace
    Ramchander Rao.K

    Hello Ramchander,
         You cannot change the data type of the field at run time in Adobe forms because the type of field you choose at the time of design level is associated with the data type itself.
    If you want to achieve your requirement, then your main idea should be to set the data type as CHARACTER itself while designing the field in the adobe form itself. CHAR field will comfortably hold the value of Calculation/amount field, Currency field, Amount, Date, Time HHMMSS, Unit Accuracy, Currency key, Floating point number, Numeric text, Client, Language and many other data types.
    After designing the field as TEXT field in Adobe form you have two options.
    Option 1:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms.
    Suppose the name of the field is TEXTFIELD1, then write the Javascript code on this field in Initialize event as below.
    if ( this.rawvalue == null )
         this.rawvalue = "N/A";
    If the field is not blank, then it will show the date. Else it will show "N/A".
    Option 2:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms. Do the formatting part in ABAP itself. It will increase the performance. Avoid Javascript as much as possible.
    Suppose you have a DATE variable l_dats of type DATS. Then take another variable l_date of type CHAR. Then write the below ABAP code.
    MOVE l_dats TO l_date.
    IF l_date IS INITIAL.
         l_date = 'N/A'.
    ENDIF.
    Bind the l_date to the TEXT field in the form.
    Even in this case, if the field is not blank, then it will show the date. Else it will show "N/A".
    But I will suggest you to use Option 2 of keeping the AMOUNT, QUANTITY, DATE, TIME fields etc as CHAR or TEXT fields in Adobe form and do the required formatting in ABAP itself.

  • What should be the data type for a field in ztable?

    i am desing a ztable , wht should be the datatype for a field if i want to enter values like -1.5 and -2.5 , negative values with decimals what should be the data type???

    declare as P type. TYPE P DECIMALS 1
    Type P data allows digits after the decimal point. The number of decimal places is generic, and is determined in the program. The value range of type P data depends on its size and the number of digits after the decimal point. The valid size can be any value from 1 to 16 bytes. Two decimal digits are packed into one byte, while the last byte contains one digit and the sign. Up to 14 digits are allowed after the decimal point. The initial value is zero. When working with type P data, it is a good idea to set the program attribute Fixed point arithmetic.Otherwise, type P numbers are treated as integers.
    You can use type P data for such values as distances, weights, amounts of money, and so on.
    Also check this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm
    Regards,
    Maha

  • Dynamically change data type of a field

    Hello,
    I'm trying to dynamically create a SQL statement which will insert record sin to my SQL data base.
    I dynamically bring field name sand values. then concatenate them in a string and then Execute the SQL string in a native SQL eXEC statement.
    It all worked fine till I used signle quotes for all field values.
    but now I wante dto insert a field of type "Money" is SQL which is nothing but AMount/currency in SAP.
    Now If I remove this quotes it is working fine. but If I have a negative number the "-" sign comes in the end in my abap code and gives a short dump in insert statement.
    now I wante dto make that variable dynamic in to currency rather than String.
    Please let me know how Can I change it dynamically.
    EG: w_field_value = 3000.25-  (value in SAP / w_field_value is of TYPE String)
    Before I concatenate this , I wanted to change its type to AMOUNT ...
    thanks.

    Just Use the field Symbols.
    Regards
    Rusidar S

Maybe you are looking for