STRING field in a table

I have a table in SAP(PLM) where I need to change the existing 255 CHAR fields to 1250 CHAR long.  There are six fields in the table that I need to change.  All the BAPIs using the table are all created and so using LCHAR data type is not going to be very easy.  I have changed the data types of these fields to STRING.  But it seems like SAP would allow only three fields in a table to have STRING data type. All the three fields that I changed to STRING type are working good.  Is there any other data type that I can use to fit 1250 characters?

Hi ,
i think any table can have maximum of 4000 char as its length( check for the exact no..)
If it crosses that it wont be activated.
and also see the following from sap help.
STRING
Character string of variable length. This type may not be used in database tables. In ABAP this type is implemented as a reference to a storage area of variable size.
RAWSTRING
Uninterpreted byte string of variable length. This type may not be used in database tables. In ABAP this type is implemented as a referece to a storage area of variable size.
so i think its better to display as char and required length.
Cheers,
Vasant..

Similar Messages

  • String fields in Z table

    hi
    i need to create a z table in which i need to declare some 7 fields which are more than 255 chars in size . so i have created a data element and made the reference field as tring  . when i try to activate the table it says that the no of fields with long texts cannot be greater then 3.
    any pointers for solving the issue would be helpful.

    Hi,
    Try and see if you can use LCHR instead, but you need to have one field extra for each field to store the CHARACTER Fields length.
    <b>Sorry you cannot have more than one LCHR.</b>
    SO you might have to split you table into 2 or 3 based on your requirement.
    Regards,
    Sesh
    Message was edited by:
            Seshatalpasai Madala

  • Assign string  to various fields of internal table

    hello,
    i have  one string : lt_str  TYPE STANDARD TABLE OF string.
    And there is one structure as:
    begin of ty_data
    field1
    field2
    field 3
    end of ty_data.
    * table declaration:
    gt_data  TYPE STANDARD TABLE OF ty_data   WITH HEADER LINE.
    In old ECC we have write like gt_data = lt_str. Now we are shifting it to new version but it is not working in ECC 6.0.It is giving unicode error regarding conversion.
    In our case there are many structure like ty_data  but we want unique solution to gt_data = lt_str.
    so how can i do it?

    Hi Tushar,
    Please refer below link for all commoun Unicode conversion error.
    http://wiki.scn.sap.com/wiki/display/SI/UCCHECK+(Unicode+Complaince)+-+Common+Errors+and+Solutions
    Move string to Structure:
    call method cl_abap_container_utilities=>read_container_c
    exporting
      im_ container = data_string
    importing
      ex_ value = struc_umsetz
    exceptions
    illegal_parameter_type = 1
    others = 2.
    Regrads,
    Jyoti Singh

  • I am trying to parse a string field

    I am reading a field from a table that contains several comma seperated control fields. Like this -
       TYPE=A,CREATE USER=amanger                       ,MODIFIED USER=amanger                       ,SHORT PAID ITEM 03P89-24 TO        
       CONTRACT PRICE OF 5.36 EA PER BUYER LYNNE HENRY.
    I need to check position 6 to see if it is an A or a C, if it is then I need return all the rest of the string after the 3rd comma. In this case it would be
       SHORT PAID ITEM 03P89-24 TO CONTRACT PRICE OF 5.36 EA PER BUYER LYNNE HENRY.
    I tried this
       if (Left ({L_HAPI.OBJECT}, 6) = "A")
       or (Left ({L_HAPI.OBJECT}, 6) = "C")
       then Split ({L_HAPI.OBJECT}, "," , 3 )
       else ""
    but it did not work.
    I need to set up a formula that will work, can anybody help me?

    This should do the trick for you...
    IF RIGHT(SPLIT({TableName.StringField}, ",") [1], 1) IN ["A", "C"]
    THEN SPLIT({TableName.StringField}, ",") [4] ELSE ""
    HTH,
    Jason

  • Can substitution strings be used for table name references?

    Hi,
    I was wondering if it's possible to use substituion strings for table names in SQL queries. This would allow for me to edit all references to a table at one location. For instance, if a table name or dblink changed, I could edit the substitution string or application item to ensure all the queries reference the new table.
    For example:
    select * from &table1.
    table1 would be the substitution string for the actual table name
    I know this is possible if I used a pl/sql function returning a query, but I would much rather use a substition string in a SQL query.
    Thanks in advance.
    Brian

    i think not
    because how create the fields of * in this case
    in the other because all is dynamic, i think that you obtain only an error

  • How to remove numeric value in the fields of a table

    Environment: SQL Server 2008R2
    Tools: MSMS
    Code:
    a. Table Definition 
    USE [DLPT_CMS1_RESTORE]
    CREATE TABLE [dbo].[Mocha]
    [id] [int] IDENTITY(80,1) NOT NULL,
    [Login_ID] [char](10) NULL,
    [PE4] [varchar](8000) NULL,
    [PE9] [varchar](8000) NULL,
    [PE11] [varchar](8000) NULL,
    [PE15] [varchar](8000) NULL,
    [PE17] [varchar](8000) NULL,
    [PE20] [varchar](8000) NULL,
    [PE22] [varchar](8000) NULL,
    [PE25] [varchar](8000) NULL,
    [PE28] [varchar](8000) NULL,
    [PE29] [varchar](8000) NULL,
    [PE27] [varchar](8000) NULL
    b. data
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293595,293595,293737,293737,293737,293737,293737,293737,'I dont think 12 week program is hard',293737,293737,'antiinflamatory- this helps to fight free radicals and ward off disease.')
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293841,293841,293841,293841,'293841 I feel that the product should be more holistic'
    ,'293841 I would like for the customer support to give more immediate feedback'
    ,'293841 Fends off alzeimer disease and dementia. It has been proven to destroy the amaloid plaques that are believed to be a cause of dementia and memory loss',
    293841,293841,293841,293841,293841,293841)
    Challenge: 
    1. Delete / Remove login_ids from a string found in one or more of the fields in Mocha table 
    Example: the following string contains login_id '293841 I would like for the customer support to give more immediate feedback' , remove the login_id in the narrative field which could be PE4, PE22. or PE28
    2. Count the response or narrative field for each column after the deletion is completed 
    My script and still working progress
    SELECT * FROM MOCHA
    WHERE ISNUMERIC(PE4) = 1 and [PE4] like '%[0-9]%'
    Thanks for the support

    I added a new data which shows inaccurate results using your last updated code. The mistake appears in the 3rd row culomn name PE25 is null but counts it as 1 
    CREATE TABLE [dbo].[Mocha]
    [id] [int] IDENTITY(80,1) NOT NULL,
    [Login_ID] [char](10) NULL,
    [PE4] [varchar](8000) NULL,
    [PE9] [varchar](8000) NULL,
    [PE11] [varchar](8000) NULL,
    [PE15] [varchar](8000) NULL,
    [PE17] [varchar](8000) NULL,
    [PE20] [varchar](8000) NULL,
    [PE22] [varchar](8000) NULL,
    [PE25] [varchar](8000) NULL,
    [PE28] [varchar](8000) NULL,
    [PE29] [varchar](8000) NULL,
    [PE27] [varchar](8000) NULL
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293737,293737,293737,293737,NULL,293737,NULL,293737,'I dont think 12 week program is hard',293737,293737,'antiinflamatory- this helps to fight free radicals and ward off disease.')
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],
    [PE15],[PE17]
    ,[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293841,293841,293841,293841
    ,'293841 I feel that the product should be more holistic'
    ,'%%293841%% I would like for the customer support to give more immediate feedback'
    ,'%%293841%% Fends off alzeimer disease and dementia. It has been proven to destroy the amaloid plaques that are believed to be a cause of dementia and memory loss'
    ,293841,NULL,NULL,293841,293841)
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293735,'293735 my name',NULL,NULL,NULL,NULL,NULL,NULL,'%%293735%%I dont think',293735,293735,'this helps to fight free radicals and ward off disease')
    select
    Replace(Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE4
    ,Replace(Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE9
    ,Replace(Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE11
    ,Replace(Replace([PE15],RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE15
    ,Replace(Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','')PE17
    ,Replace(Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE20
    ,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE22
    ,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE25
    ,Replace(Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE28
    ,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE29
    ,(case when len(PE4)-Len(Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe4] is null or Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP4
    ,(case when len(PE9)-Len(Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe9] is null or Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP9
    ,(case when len(PE9)-Len(Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe11] is null or Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP11
    ,(case when len(PE15)-Len(Replace(PE15,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe15] is null or Replace(PE15,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP15
    ,(case when len(PE17)-Len(Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe17] is null or Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP17
    ,(case when len(PE20)-Len(Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe20] is null or Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP20
    ,(case when len(PE22)-Len(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe22] is null or Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP22
    ,(case when len(PE25)-Len(Replace(PE25,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe25] is null or Replace(PE25,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP25
    ,(case when len(PE28)-Len(Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe28] is null or Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), '') =''Then 0 Else 1 End) cntP28
    ,(case when len(PE29)-Len(Replace(PE29,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe29] is null or Replace(PE29,RTRIM(Cast(Login_ID as varchar(10))), '') =''Then 0 Else 1 End) cntP29
    from mocha

  • Unbound fields in a table built with rfc model

    Hi,
    I would like to have unbound fields in a table in addition to the fields that are coming from the model.
    I have a model from an RFC function. I use this to build a table. There are 5 columns. This works fine. I would like to add two additional columns to the table that have their data coming from elsewhere (not from the rfc function).
    I've tried using the wdDoModifyView as below:
    IWDTextView text = (IWDTextView)view.getElement("TextView2");
    text.setText("This is the text");
    The problem here is that the value is shown on all the rows, not just one.
    And if I try to use the object that contains the getters and setters for the table data, these additional unbound fields do not have the getters and setters.
    How can I get to these unbound fields so I can fill them in a loop ? Can I create additional fields in the model so I can bind them to the context ?
    I do not wish to change the rfc code to have these additional fields in there. I am also not able to add fields to the model by hand (should I be able to ?).
    Any help greatly appreciated
    Kind Regards,
    Jari Pakarinen

    Thanks.
    I will need a clarification though
    Here is the code snippet from wdDoInit():
    for (Iterator iter = list.iterator(); iter.hasNext();) {
         Object skeduLine = iter.next();
         StringTokenizer toker = new StringTokenizer(((Ztab4000)skeduLine).getWa(), "t");
         Zmaterials zMats = new Zmaterials();
         String blaa = (toker.nextToken().split("\,"))[0];
         if (blaa.indexOf('.') != -1);
              blaa = blaa.replaceAll("\.", "");
         zMats.setWmeng(Integer.parseInt(blaa));
         zMats.setEtdat(getDate(toker.nextToken()));
         zMats.setMatnr(toker.nextToken());
         zMats.setKdmat(toker.nextToken());
         wdContext.nodeZ_Rfc_Schedagrt_Save_Input().currentZ_Rfc_Schedagrt_Save_InputElement().modelObject().addMaterials(zMats);
    I'm going thogh a list that contains String objects.
    Each String object contains fields separated by a tab. There are 6 fields, and 4 of them are going to the Zmaterilas object, and the rest 2 should be put to the additional fields of the table.
    I create the Zmaterials (table contents minus the additional fields) object and populate these fields with the 4 fields of data.
    How should I put the additional data to the table here ?
    Kind regards,
    Jari

  • Problem while saving date field in custom table

    Hi,
    Iam facing the following problem while saving a date field in custome table
    i have a date field zdate in which the value is 02082010.
    now when i try to insert this value in the custom table it is getting updated as 20/10/0208 , but it should be 08/02/2010
    How can i correct it..
    Regards
    Kumar

    just before saving u might have to use a string reverse FM and then save it..
    CALL FUNCTION 'STRING_REVERSE'
      EXPORTING
        STRING          = p_string
        LANG            = sy-langu
    IMPORTING
       RSTRING          = r_string
    EXCEPTIONS
       TOO_SMALL        = 1
       OTHERS           = 2

  • A record selection problem with a string field when UNICODE database

    We used report files made by Crystal Reports 9 which access string fields
    (char / varchar2 type) of NON-UNICODE database tables.
    Now, our new product needs to deal with UNICODE database, therefore,
    we created another database schema changing table definition as below.
    (The table name and column name are not changed.)
        char type -> nchar type
        varchar2 type -> nvarchar2 type
    When we tried to access the above table, and output a report,
    the SQL statement created from the report seemed to be wrong.
    We confirmed the SQL statement using Oracle trace function.
        SELECT (abbr.) WHERE "XXXVIEW"."YYY"='123'.
    We think the above '123' should be N'123' because UNICODE string
    is stored in nchar / nvarchar2 type field.
    Question:
    How can we obtain the correct SQL statement in this case?
    Is there any option setting?
    FYI:
    The environment are as follows.
        Oracle version: 11.2.0
        ODBC version: 11.2.0.1
        National character set: AL16UTF16

    With further investigating, we found patterns that worked well.
    Worked well patters:
        Oracle version: 11.2.0
        ODBC version: 11.2.0.1
        National character set: AL16UTF16
        Report file made by Crystal Reports 2011
        Crystal Reports XI
    Not worked patters:
        Oracle version: 11.2.0 (same above)
        ODBC version: 11.2.0.1 (same above)
        National character set: AL16UTF16 (same above)
        Report file made by Crystal Reports 2011 (same above)
        Crystal Reports 2008 / 2011
    We think this phenomenon is degraded behavior of Crystal Reports 2008 / 2011.
    But we have to use the not worked patters.
    Anything wrong with us? Pls help.
    -Nobuhiko

  • Length of value of c field in internal table

    Hi experts,
    how do I find out the lenght of the value which is an CHARACTER field in an internal table.
    I get a .XLS file from the customer. To check where the real entries starts I need to know the length of one field in the internal table.
    How do I do this?
    I tried it with DESCRIBE, but it doesn't work because the c field is interpreted hexadecimal.
    Example:
    all fields in my table are c(30), the value in one column is max. 3 letters. I want to find out the row where the entry in this field is 3 letters long.
    Edited by: Heiko Kany on Sep 3, 2008 8:49 AM

    Hi Heiko,
    You can find the length using the STRLEN function as given below;
    DATA : ipstr TYPE string.
    DATA : len TYPE i VALUE 0.
    ipstr = 'Sample String'.
    len = STRLEN( ipstr )
    After execution len will contain 13.
    Regards
    Karthik D

  • How to handle field symbols internal table values?

    HI all,
              I declared field string as below.The below code is working fine.
    Data : ITAB TYPE STANDARD TABLE OF YAPOPLN, (Custom table).
              wa_itab like line of ITAB.
    field-symbol : <fs> type ITAB.
    ASSIGN PARAM TO <FS>
    LOOP AT <FS> INTO WA_ITAB.
    WRITE:/ 'ABC'.
    ENDLOOP.
    But my requirement is that I dont want all the fields of the table YAPOPLN.My output contains only 2 fields of the table YAPOPLN,which contains total 4 fields.According to my requirement only 2 fields will be getting into one parameter PARAM(this is function module parameter,which is from ALV classes) from the user entered output,which contains only 2 fields.So the above code is not working properly because wa_itab contains 4 fields and giving short dump.
    If I am declaring the internal table with the required fields(only 2 fields) and referring that internal table to field symbol <FS>
    Data : BEGIN OF ITAB1 OCCURS 0,
             FIELD1 LIKE YAPOPLN-FIELD1,
             FIELD2 LIKE YAPOPLN-FIELD2,
             END OF ITAB1.
    field-symbol : <fs> LIKE ITAB1 OR  <FS> TYPE ANY.
    DATA :WA_ITAB1 LIKE LINE OF ITAB1.
    ASSIGN PARAM TO <FS>
    LOOP AT <FS> INTO WA_ITAB.
    WRITE:/ 'ABC'.
    ENDLOOP.
    But when I am compiling this code i am getting the below error.I am gettting the same below error when even <FS> is also declared as <FS> TYPE ANY.
    .'FS' is not an internal table or defined in TABLES.
    Can anyone help me in this regard?
    Thanks,
    Balaji

    Hello,
    Try this way:
    If both the type of internal tables are same then you can directly assign dynamic internal table to static internal table.
    itab = <itab>.
    Suppose you have field symbol internal table <itab> which is different in structure from ITAB.
    Now, you can create <wa> as follow:
    FIELD-SYMBOLS <wa>.
    DATA wa TYPE REF TO DATA.
    CREATE DATA wa TYPE LINE OF <itab>.
    ASSIGN wa->* to <wa>.
    This way your work area is read.
    Using [ASSIGN COMPONENT|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3923358411d1829f0000e829fbfe/content.htm] syntax you can read required component of <wa>.
    Finally you can use that value to load static internal table.
    You can also refer to my thread on [Dynamic table|Re: Creating Dynamic table].
    Hope this helps!
    Thanks,
    Augustin.
    Edited by: Augustarian on Aug 20, 2009 10:06 AM

  • Problem with adding user fields to user table

    hi everyone,
    i have written code to create user tables and some user fields to that table....
    its working fine...
    in the code i have some conditions like if the table is already created.. then it should execute the code written for creating table..?
    udTables1 = oDICompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
                If udTables1.GetByKey("FA_MASTERDATA") Then
                    udTables1 = Nothing
                Else
                    udTables1.TableName = "FA_MASTERDATA"
                    udTables1.TableDescription = "Fixed Assets Master Data"
                    udTables1.TableType = SAPbobsCOM.BoUTBTableType.bott_MasterData
                    ret2 = udTables1.Add()
    System.Runtime.InteropServices.Marshal.ReleaseComObject(udTables1)
                    udTables1 = Nothing
                    GC.Collect()
                End If
    but how to check the same condition for adding fields????
    udfields1 = oDICompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
                '' 1st field
                udfields1.TableName = "FA_MASTERDATA"
                udfields1.Name = "Alias"
                udfields1.Description = "Alias"
                udfields1.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
                udfields1.EditSize = 20
    '''how to write condition to check whether the field is already creatd or not????
                ret3 = udfields1.Add()
    System.Runtime.InteropServices.Marshal.ReleaseComObject(udfields1)
                udfields1 = Nothing
                GC.Collect()

    hi try this..
    oUserFieldsMD = muc_ParentAddon.SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
                '********Adding 1st Field
                If Not IsFieldExist("POR1", "PINo") Then
                    oUserFieldsMD.TableName = "POR1"
                    oUserFieldsMD.Name = "PINo"
                    oUserFieldsMD.Description = "Purchase Indent No"
                    oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
                    oUserFieldsMD.EditSize = 20
                    lRetCode = oUserFieldsMD.Add
                    If lRetCode <> 0 Then
                        muc_ParentAddon.SBO_Company.GetLastError(lErrCode, sErrMsg)
                        MsgBox(sErrMsg)
                        Return False
                        Exit Function
                    Else
                        Fields = True
                    End If
                End If
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserFieldsMD)
      Private Function IsFieldExist(ByVal as_TableName As String, ByVal as_FieldID As String) As Boolean
            Dim flag As Boolean
            Dim businessObject As SAPbobsCOM.Recordset
            Try
                businessObject = DirectCast(Me.muc_ParentAddon.SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset), SAPbobsCOM.Recordset)
                businessObject.DoQuery(String.Concat(New String() {"Select * From CUFD Where TableId = '", as_TableName, "' AND AliasID='", as_FieldID, "'"}))
                If (businessObject.RecordCount > 0) Then
                    flag = True
                Else
                    flag = False
                End If
            Catch exception1 As Exception
                Me.muc_ParentAddon.SBO_Application.SetStatusBarMessage(exception1.Message, SAPbouiCOM.BoMessageTime.bmt_Short, True)
            End Try
            System.Runtime.InteropServices.Marshal.ReleaseComObject(businessObject)
            Return flag
        End Function
    hope it helps

  • Purpose of using string field

    how to use string field and its purpose...

    STRING: Character string with variable length This data type can be used only in types (data elements, structures, table types) and domains. In the dictionary a length can be specified for this type (at least 256 characters). It can be used in database tables only with restrictions. For a description of them, refer to the documentation of the ABAP statement 'STRING'. In ABAP, this type is implemented as a reference to a storage area of variable size. The system proposes 132 characters as default for the output length. You cannot attach search helps to components of this type.
    SSTRING: Short character string with variable length. In the Dictionary the number of characters can be specified for this type (from 1 to 1333). This data type can be used only in types (data elements, structures, table types) and domains. It can be used in database tables. To do so, refer to the documentation of the ABAP statement 'STRING'. In ABAP, this type is implemented as a reference to a storage area of variable size. String fields of this type can be used in indexes and in the WHERE condition of a SELECT statement. You cannot use them in table keys

  • String operations in internal table

    Dear friends..
            Good morning.
                        I wish to know.. how i segregate the field from a database table to internal table into two different internal table field. say for example.
    i have db table tab1 which has field number
    tab1 -> number
    and i have another internal table itab1 whic has two fields numa and numb
    tab1 -> numa
         -> numb
    i have value in tab1->number is 001 and 0001
    i wish to segregate this two values in to internal table
    if the value is 001 then it should be into 001 -> numa
    if the value is 0001 then it should be into 0001-> numb
    i dont know how to perform the string operations in internal table.. would you like to tell me how i fix this problem any suggetion, article, code will be great help of mine..
    thanking you
    Regards
    Naim

    Hi,
      what u can do is check the lenth
    lit_data_tab.
    lit_data_3
    lit_data_4.
    lv_char3 type char3.
    lv_char4 type char4.
    lv_length type i.
    loop at lit_data_tab.
    lv_length = STRLEN ( lit_data_tab-value ).
    if lv_length = 3.
       lv_char3 = lit_data_tab-value .
       append lv_char3 to lv_char3 type char3.
    else.
       lv_char4 = lit_data_tab-value .
       append lv_char4 to lv_char3 type char4.
    endif.
    endloop.
    if u want
    numa  numb
    003   0003.
    then u have to loop in one table and modify other.
    that is any one table should contains both the field.
    read the table with one field
    mark helpfull answers
    Regards
    Message was edited by: Manoj Gupta

  • String Field rendering as Number Field in CR Basic for VS2008

    I recently migrated from CR for VS2005 to CR Basic for VS2008 and am creating my first report using CR 2008. The SQL result set returns rows containing strings (nvarchar), integers and decimal (7,2) fields.
    The report is getting all rows in the result set, but the string fields as defined in the SQL are 1) rendering in the report as numbers, and 2) showing as empty. The non-string fields render fine. I tried reformatting the report field to string, but only the Number tab appears in the formatting dialog. I also tried converting the SQL field result into an unbound string field, as well as tried the ToText function, but the results were the same. I suspect the field appears empty because of the formatting issue.
    How can I get CR Basic for VS2008 to render a string (nvarchar) field as a string?

    Try placing the field inside a formula field or inside a text field.  That should cause the field to be shown no matter what type of data it is.  If the data is still not showing, then perhaps it is not being returned properly. 
    Things to check:
    -Are you connecting directly to the tables - or are you connecting to a stored procedure?  If you are connecting to a stored procedure and you are using Temp Tables, then make sure you add the line "SETNOCOUNT ON" to your stored proc.
    -Run SQL profiler - see what query is being made, then try running that exact same query through the SQL admin console (Or some other utility that lets you run SQL queries)
    Thanks
    Shawn

Maybe you are looking for

  • JumpServlet issue in migration to ATG 10.1

    Hi all, I am doing migration from ATG 10.0.3 to 10.1 version. I am using JumpServlet component to convert some URLs, like browse/category.jsp, to other friendly URLs. In version 10.0.3 it was working fine, but in 10.1 it is not loading any page with

  • Exporting .dv takes a long time

    Does anyone know why it takes so long to export a .dv file? I used to do it in FCP3 and it took about 1/3 real-time. Now, with FCP5 & QT7 it takes about 4x real-time. Thanks, g G5 dual 2gig   Mac OS X (10.3.9)  

  • GL Accounts for MM Integration

    Hi friends I am in the midst of providing GL accounts for MM Integration.  I am slightly confused about what type of GL I should create for the transaction keys.  For example, for GBB (Offsetting posting for inventory), I am not sure what type of GL

  • Deployment hung

    I was deploying my BC4J JSP app to standalone OC4J on NT server, and got the following message: Beginning deployment to Oracle9i Application Server... Invoking Oracle9iAS admin tool... It stayed like that forever. I tested the connection in JDev and

  • How to remove all slide notes in a project at once

    Hi All, I've some problem on removing slide note. I recently know how to remove slide note "one by one" method on captivate 8 but if I want to remove all slide notes at once, How can I do? Anybody know about this?