Transfer a char type varialble value to NUMC type variable

Hi all,
I have a BSEG-PROJK  type NUMC(8) variable and one xyz type CHAR(50)  variable.
I have to pass value from xyz to BSEG-PROJK
my e.g is that while I am passing
xyz= 'M-000064'
BSEG-PROJK  = xyz
then the value of BSEG-PROJK is 00000064 but i need M-000064

Hi,
The value M-000064 is showing in field PROJK of BSEG, due to the conversion routine ABPSP attached in the domain level of this field.
- To check the actual value stored in data base level
- SE16 Give table name=>to see the table contents Press F7=>settings=>user parameters=> uncheck the check box check conversion exit.
- now the value in field PROJK will show in numeric.
Regards
DKS

Similar Messages

  • How to insert int type array value to String type value?

    public class wood
         public static void main (String args[])
              int a[]={1};
              String b[]={" "};
              b=a[0];
    }how can I do it??I know it is int type, but how to insert a[0] to b[0]?

    I don't understand this statement.
    What I want to know is
    1) why are you trying to convert an int[] to a String[]
    2) are you trying to convert from a int[] to String[] or from an int[] to a String (i.e. treating the ints as chars or even simply concatenating there String values to a single String) and , once again why
    There is probably a better way to accomplish your goals, but without cleary stating your goals we cannot help you. And as far as there being multiple int values, so what, the code snippet I posted would work for a hundred int values, you would just need to make the String[] long enough and loop through the values, you can't just simply do it all at once (unless of course, they are to be treated as char values, in which case you can probably cast your int[] to a char[] and use new String).

  • On VA01 transfer an value from Condition type Z000 from sub-item to main it

    Hi,
    I want to create a sales order and I have one main item an one promotion  (sub-item) item without determination price. I want to transfer cost price from VPRS form sub-item to an Z000 contidion to main item for tranfer this value to CO_PA for a field value different from VPRS field value.
    How can i do this?
    Thanks in advance.
    Catarina Alves

    Hi,
    In copy controls of Del to Bill - VTFL .... in the item screen copy control.... u have a button called cumulate coast set this for the item u need to transfer i.e to item category of subitem u have.
    Reward if helpful
    Please find the help for this "Cumulate Cost" below -
    Cumulate cost
    This field is used in the main item to control whether the cost value (usually condition type VPRS) is to be copied from the relevant sub-items. The following cases are taken into account:
    Free of charge sub-items (free goods)
    Batch split items
    Bill of material components
    This function is needed especially if the sub-items involved are not relevant for billing. In this case the costs of these sub-items do not appear in CO-PA or the statistics.
    Reward if helpful
    Krishna

  • What are the different values available for type attribute

    Hi,
        I am working with IDOC to Stored Procedure. For each field we need to give the values for 'isInput' and 'type' attributes. I need to pass values for 'datetime' and 'numeric' fields. What are the list of values availabIe for 'type' attribute. I know only about 'CHAR' attribute.
         Can anybody please tell me what all the values availabe for attribute 'type'. I am facing this problem while giving the value for type attribute.
    Thanks in Advance,
    Murthy.

    Does this help
    tring
        Data that contains a combination of letters, numbers, and special characters. String data types are listed below:
    CHARACTER: Fixed-length character strings. The common short name for this data type is CHAR.
    VARCHAR: Varying-length character strings.
    CLOB: Varying-length character large object strings, typically used when a character string might exceed the limits of the VARCHAR data type.
    GRAPHIC: Fixed-length graphic strings that contain double-byte characters.
    VARGRAPHIC: Varying-length graphic strings that contain double-byte characters.
    DBCLOB: Varying-length strings of double-byte characters in a large object.
    |BINARY: A sequence of bytes that is not associated with a |code page.
    |VARBINARY: Varying-length binary strings.
    BLOB: Varying-length binary strings in a large object.
    |XML: Varying-length string that is an internal representation |of XML.
    Numeric
        Data that contains digits. Numeric data types are listed below:
    SMALLINT: for small integers.
    |INTEGER: for large integers.
    |BIGINT: for bigger values.
    DECIMAL(p,s) or NUMERIC(p,s), where p is precision and s is scale: for packed decimal numbers with precision p and scale s. Precision is the total number of digits, and scale is the number of digits to the right of the decimal point.
    |DECFLOAT: for decimal floating-point numbers.
    REAL: for single-precision floating-point numbers.
    DOUBLE: for double-precision floating-point numbers.
    Datetime
        Data values that represent dates, times, or timestamps. Datetime data types are listed below:
    DATE: Dates with a three-part value that represents a year, month, and day.
    TIME: Times with a three-part value that represents a time of day in hours, minutes, and seconds.
    TIMESTAMP: Timestamps with a seven-part value that represents a date and time by year, month, day, hour, minute, second, and microsecond.
    Regards
    Ravi

  • The conversion of a varchar data type to a datetime data type resulted in an out-of-range value

    I am trying to insert records into a temporary table with date values concatenated with other string values  into one large string value.I am getting the following error:
    Msg 242, Level 16, State 3, Line 12
    The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
    Msg 241, Level 16, State 1, Line 28
    Conversion failed when converting date and/or time from character string.
    -My code below
    Declare
           @hdrLOCAL char(255),                                                       
        @CR char(255),                                                             
        @BLDCHKDT DATETIME,                                                         
        @BLDCHTIME DATETIME,                                                         
        @hdrline int
        SELECT @hdrLOCAL = DDLINE FROM DD40400 WHERE INDXLONG =1
        SELECT @CR = DDLINE FROM DD40400 WHERE INDXLONG =2
        SELECT @hdrline =1
        SELECT
                @BLDCHKDT = CONVERT(varchar(20),T756.PAYDATE,105) ,
                -- convert(varchar,getdate(),15)
                @BLDCHTIME= CONVERT(varchar(20),T756.PAYDATE,105)
                FROM STATS.dbo.DD10500 T762
                LEFT OUTER JOIN STATS.dbo.DD10400 T756 ON (
                        T762.INDXLONG = T756.INDXLONG
                        AND T756.INCLPYMT = 1
                WHERE (T756.INCLPYMT = 1)
                    AND (T762.DDAMTDLR <> 0)
      Create TABLE [dbo].[##DD10200B](
        [INDXLONG] [int] NOT NULL,
        [DDLINE] [varchar](8000) NOT NULL,
        [DEX_ROW_ID] [int] IDENTITY(1,1) NOT NULL,
    BEGIN
    INSERT INTO ##DD10200B (INDXLONG,DDLINE)
            VALUES (1,@hdrLOCAL +',' + @CR +','+ @BLDCHKDT +',' + @BLDCHTIME )
    END
    Msg 242, Level 16, State 3, Line 12
    The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
    Msg 241, Level 16, State 1, Line 28
    Conversion failed when converting date and/or time from character string.
    The Best thing in Life is Life

    Since the Variable
    BLDCHKDT and BLDCHTIME are of type date time why are you trying to assign it a value
    of type varchar
    and the format 105 gives you dd-mm-yyyy but SQL server takes the default format as mm-dd-yyyy so the error occurs for all dates that
    are greater than 12
    try the below code
    Declare
    @hdrLOCAL char(255),
    @CR char(255),
    @BLDCHKDT Varchar(50),
    @BLDCHTIME Varchar(50),
    @hdrline int
    SELECT @hdrLOCAL = DDLINE FROM DD40400 WHERE INDXLONG =1
    SELECT @CR = DDLINE FROM DD40400 WHERE INDXLONG =2
    SELECT @hdrline =1
    SELECT
    @BLDCHKDT = CONVERT(varchar(20),T756.PAYDATE,105) ,
    -- convert(varchar,getdate(),15)
    @BLDCHTIME= CONVERT(varchar(20),T756.PAYDATE,105)
    FROM STATS.dbo.DD10500 T762
    LEFT OUTER JOIN STATS.dbo.DD10400 T756 ON (
    T762.INDXLONG = T756.INDXLONG
    AND T756.INCLPYMT = 1
    WHERE (T756.INCLPYMT = 1)
    AND (T762.DDAMTDLR <> 0)
    Create TABLE [dbo].[##DD10200B](
    [INDXLONG] [int] NOT NULL,
    [DDLINE] [varchar](8000) NOT NULL,
    [DEX_ROW_ID] [int] IDENTITY(1,1) NOT NULL,
    BEGIN
    INSERT INTO ##DD10200B (INDXLONG,DDLINE)
    VALUES (1,@hdrLOCAL +',' + @CR +','+ @BLDCHKDT +',' + @BLDCHTIME )
    END
    the only change done is 
    @BLDCHKDT Varchar(50),
    @BLDCHTIME Varchar(50),
    Surender Singh Bhadauria
    My Blog

  • How to read char() for bit data DB2's type in Oracle?

    Hello,
    I am developing an application (from JDeveloper) to operate with two data base. In one hand threre is Oracle and in the other one DB2 (AS400).
    I am trying to read a DB2'sfield with the "char() for bit data" type from Oracle, but I can't read it.
    I have trying:
    rset.getObject(1) -->[B@1a786c3
    rset.getBinaryStream(1) --> java.io.ByteArrayInputStream@1a786c3
    rset.getAsciiStream(1) --> java.io.ByteArrayInputStream@2bb514
    rset.getCharacterStream(1) -->java.io.StringReader@1a786c3
    Do you have any solution to see the value of this type of field?
    Thank you and regards

    I have to synchronize unidirectionally from the Oracle database to DB2. And I'd like to save the information of the record of DB2 prior to the update operation.
    And here is where the problem arises for me, because when I try to read from Java with the connection established on DB2 is unable to interpret the information. While there are no problems from Oracle to consume the information, it happens that DB2 field types are not common with Oracle, such as char () for bit data. From what I could find the equivalent in Oracle would be raw (), but since Java is possible to read this type of information... And this is my doubt, it is necessary to do any type of cast or to do a special view to retrieve this information?

  • Manually input ( or type ) the value of the node in hierarchy

    Dear all,
    I have the following requirement :
    In the query, I am using a hierarchy node variable. Now, by default, on the selection screen the valued can be passed to this hierarchy node var. by a drill down on the hierarchy on which the variable is created and selecting one of the nodes.
    Now, I would like to manually input ( or type ) the value of the node instead of performing the drilldown on the hierarchy and selecting the node..
    It is this possible for a hierarchy node variable ?
    Thanks,
    Kenps

    Hi Carlos,
    You create a Variable with following selections
    Type of variable : Hierarchy node
    processing : Manual Input/Default value
    Reference Char : Mention the CHAR that contain this hierarchy
    Define it as SIngle value & Mandatory entry.user can see all the nodes in F4 help and selects the node as he wants
    Hope it helps
    Sriman
    Edited by: Sreeman on Apr 21, 2008 8:34 PM

  • PROBELM WITH TYPE X  VALUE '20' IN CONCATENATE STATEMENT in ECC version

    Hi EXPERTS,
             I am working in ECC 6.0 version.
             PROBELM WITH TYPE X  VALUE '20' IN CONCATENATE STATEMENT in ECC           version
             C_DEL     TYPE X VALUE '09' having solution --C_DEL TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,
             If  C_DEL     TYPE X VALUE '20'   what was the solution in ECC version.
             Please let me know. I am awaiting for ur answers
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

    Hi
    welcome to SDN forum
    move that X field to a char field and use in concatenation
    CONCATENATE works only with CHAR fields
    Regards
    Anji

  • How to covert exponent figure in char to numerical value

    Hi all,
    I am getting value 3.0000000000000000E+01 in one of char field in the output of my report , But I want it to be display as '30' . Please help , and tell how to convert the value
    Thanks and regards,
    V.Kumar

    Hello,
    - You will find below the code that will answer to your question :
    REPORT ztest.
    DATA : wv_count TYPE sy-dbcnt.
    DATA : wv_fltp  TYPE imrg-readg.
    DATA : wv_char  TYPE char22 VALUE '3.000000000000E+01'.
    MOVE   wv_char  TO wv_fltp.
    WRITE  wv_fltp  TO wv_char EXPONENT 0 DECIMALS 0.
    WRITE / wv_char.
    Cordialement,
    Chaouki.

  • Converting char to decimal value format as defined in SU3(User profile)

    Hi Techies,
    Is there any FM to convert CHAR value into Decimal fomat as defined in SU3.
    If we use, WRITE statement for printing the value in decimal format , it shows the value in decimal format correctly
    in SU3 transaction , there are three different decimal format notations which can be user specific
    I would appreciate your valuable inputs ....
    Thanks
    Santhosh

    This is my code in a generic method to transform a table into a csvrow
    when 'P'.
            tmpstr = <p_field>.
            len = strlen( tmpstr ) - 1.
            tmpstr = tmpstr+0(len).
            if <p_field> < 0.
              sign = '-'.
            else.
              sign = ' '.
            endif.
            case decimalformat.
              when 'X' or 'E'.
                split tmpstr at '.' into int frac.
                ptmp = int.
                write ptmp to cp.
                shift cp left deleting leading space.
                replace all occurrences of '.' in cp with ','.
                concatenate
                  s
                  sign
                  cp
                  frac
                  delimiter
                into s in character mode.
              when 'Y' or 'D'.
                split tmpstr at '.' into int frac.
                ptmp = int.
                write ptmp to cp.
                shift cp left deleting leading space.
                replace all occurrences of ',' in cp with '.'.
                concatenate
                  s
                  sign
                  cp
                  frac
                  delimiter
                into s in character mode.
              when ' '.
                concatenate s sign tmpstr delimiter into s in character mode.
              when others.
                concatenate s '????????' delimiter into s in character mode.
            endcase.
    where pfield is a fieldsymbol type P. (honestly ist from type any, but determined by RTTI). I needed this cause i want to format the value from "outside" without taking the user settings in consideration as write...to.. is doing.
    What i'm doing is to use the write... to... clause modifying the result (change decimal point, thousand separator and sign) according to the demanded decimal notation.
    Edited by: Rainer Hübenthal on Oct 7, 2009 4:47 PM

  • Show NUMC Type Field with Zeros in SE16

    Hi.
    Is there any way to show a field of numc type (length 9) with zeros when is shown in SE16???

    Hi
    I am not clear with your question?
    Just check the table entries in VBAP
    fields VBELN  which is of CHAR 10 and
    POSNR which of NUMC 6
    For both the fields the leading zeros are displayed in SE16
    just check it.
    so what's your question?
    Reward points if useful
    Regards
    Anji

  • Find data type from value

    Hi,
    I want to find data type from its value.
    Ex- If value = 1234 then its data type is numeric.
          If value = ABCD then its data type is char.
    So is there any FM which can tell the data type from its value or any way to do it.
    Moderator Message: Offering points is against forum RoE. 
    Regards,
    Ashish Gupta
    Message was edited by: Suhas Saha

    Hai.
    check this.
    the five non-numeric types (text field (C), numeric text field (N), date field (D), time field (T), and hexadecimal field (X)), there are three numeric types, used in ABAP to display and calculate numbers. Data type N is not a numeric type. Type N objects can only contain numeric characters (0...9), but are not represented internally as numbers. Typical type N fields are account numbers and zip codes.
    integers - type I
    The value range of type I numbers is -2*31 to 2*31-1 and includes only whole numbers. Non-integer results of arithmetic operations (e.g. fractions) are rounded, not truncated.
    You can use type I data for counters, numbers of items, indexes, time periods, and so on.
    Packed numbers - type P
    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.
    Floating point numbers - type F
    The value range of type F numbers is 1x10*-307 to 1x10*308 for positive and negative numbers, including 0 (zero). The accuracy range is approximately 15 decimals, depending on the floating point arithmetic of the hardware platform. Since type F data is internally converted to a binary system, rounding errors can occur. Although the ABAP processor tries to minimize these effects, you should not use type F data if high accuracy is required. Instead, use type P data.
    You use type F fields when you need to cope with very large value ranges and rounding errors are not critical.
    Using I and F fields for calculations is quicker than using P fields. Arithmetic operations using I and F fields are very similar to the actual machine code operations, while P fields require more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.
    C ---> character
    D ---> date
    P ---> packed
    T ---> time
    X ---> hexadecimal
    I ---> integer.
    N ---> Muneric.
    Possible ABAP/4 data types:
    C: Character.
    D: Date, format YYYYMMDD.
    F: Floating-point number in DOUBLE PRECISION (8 bytes).
    I: Integer.
    N: Numerical character string of arbitrary length.
    P: Amount or counter field (packed; implementation depends on hardware platform).
    S: Time stamp YYYYMMDDHHMMSS.
    T: Time of day HHMMSS.
    V: Character string of variable length, length is given in the first two bytes.
    X: Hexadecimal (binary) storage.
    regards.
    sowjanya.b.

  • ID Point for Storage Type V.S. Value in Storage Type Search Table.

    I am trying to perform a GR without PO (MVT 501) for material ABC into Plant 1000, Warehouse number 100, Storage Location 0100.
    During creation of Transport Order, the Destinated Storage Type appeared
    is 011  (ID point for st.ty.010). However, the desired Destinated Storage Type should be 015 (High Rack) instead of 011.
    I have checked the following configuration:
    1. At the SPRO->LE->WM->Master Data->Define Storage Type, the value set for Field: Assigned ID (Identification point) for storage type under the Stock Placement Control = 011 (ID point for st.ty.010).
    2. At the Storage Type Search Strategy, 015 is put as the first Storage Type, followed by Storage Type 001 (high Rack Storage)
    3. And I found out that using LX03 (Bin Status Report) that there is no
    Storage Bin created for the combination of the following
    Plant 1000, WN 100, SLOC 0100, Storage Type 015, Storage Section 001
    Since we do not have any Storage Bin created for Storage Type 015, it will display 011 as the destinated storage type during TO creation.
    My question
    After I have manually created a Storage Bin 03-01-01 for storage type 015, during the TO Creation, system still suggests 011 as Destinated Storage Type instead of the 015 I put in the 1st column of the Storate Type Search.
    I already have the Storage Bin created for Storage Type 015, why the system still fails to pick it but suggests 011 from Assigned ID (Identification point) for storage type.

    Dear Karthik
    You are right, I did activated Indicator: Activate Storage Unit Type Check for Stock Placement in SPRO->LE->WM->Master Data->Define Storage Type
    The Indicator: Storage type with storage unit management was also ticked automatically by system when I selected Indicator: Activate Storaget Unit Type Check for Stock Placement.
    Are you trying to say the ID Port defined in Storage Type will have higher priority over the Storage Type value I maintained in the Storage Type Search Table?
    I have already maintained the Storage Bin and I still do not understand why system still go for ID port. As far as I know, system will suggest the Storage Type from ID Port ONLY if storage bin in this storage type as their destination are not maintained in first in the other setting.
    Quoted from SAP HELP
    Identification point for storage type
    Identification point (storage type) of the current storage type.
    All goods movements that do not have a specific storage bin in this storage type as their destination are first directed to the identification point.
    Here the goods are identified and a transfer order is generated for the actual transfer of the goods into the storage type concerned.
    Please help.
    Edited by: Daimos on Nov 4, 2011 3:25 AM

  • Retrieve all values from project type when project type combo box is null

    Hi,
    We are facing a tight situation here. We have a scenario where we have 2 filter options.
    1) Department ID
    2) Project type
    When department ID is selected all the department IDs should be populated in the combo box and the project type combo box should be empty.
    Similarly, when project type is selected all the project types should be populated in the combo box and the department ID combo box should be empty.
    Then, when more than one value is selected from department ID box and all the values from project type must be retrieved from query level (as per business logic).
    How do we do this? Kindly help us with this situation.

    Basically my situation slightly different.
    I am trying to do a bulk insert on SQL Server table using prepared statement, during that time i am getting the exception. I am using JDBC-ODBC driver. However, if i do individual record insertion, it is working.
    Any idea about this type of problem ?
    Regards
    Ramesh

  • SRM 4.0- How to set the default values for product type (01) only for SC

    The radio button “Service” should not be visible.
    Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
    How to set the default values for product type (01) only for SC
    We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
    Here we can set defalut value 01 but it is not correct one since same search help is using several places.
    We need to limit the search help results only for SC.
    Kindly help out me ASAP.

    The easiest way to set defautl values is to edit the batch class.
    Goto the characteiristic and go to update values.
    In here you probably have something like 0 - 100 as a spec range.
    On the next line enter the default value within this range.  At the end of the line, click in the box in the column labelled "D".  This indicates the defautl value for the characteristic.
    If you need to you can do this in the material classification view as well.
    Just to be clear, these values will only show up in the batch record.  You can not have defautl values in resutls recording screens.
    FF

Maybe you are looking for

  • I can no longer send mail

    I can no longer send Mail but the Connection Doctor tells me everything is working properly. When I click the Send icon, the email just disappears and no activity is reflected in Mail Activity at the bottom of the screen. It also doesn't show up in t

  • ITunes x64 can't open - Windows 7 x64

    I cannot open my iTunes x64 on my Windows 7 x64 operating system. I reinstalled it but it still hasn't been working. When I go into iTunes store, it says "We are unable to find iTunes on your computer." I don't have a problem with QuickTime.

  • How to change data source of Universe

    Hi, I have two databases called A_Database and B_Database Same tables and data are in both the databases. I created universe U_universe using A_Database. It is working fine Now I would like to change from A_Database to B_Database in U_universe withou

  • TS1538 itunes won't recognize iphone

    my itunes will not recognize my iphone. there is no devices tab what so ever. i have tried restarting my computer. restarting my phone and reinstalling itunes and nothing is helping. any suggestions?

  • How do you debug with IPlanet

    I am evaluating IPlanet under the Test Drive. We are using JBuilder for development. Is there a way to launch kjs processes in debug mode so that they can be remotely attached for debugging? Right now I can see no way to debug my EJB code running in