ALV field, max length?

Hello all,
When entering data on the screen into the ALV, field VALID will allow only 128 characters.  But the field has 255 characters.
Is the max field lenth in an ALV 128 characters? 
The fieldcat has these values for field VALID:
DATATYPE        char
INTLEN               255
DD_OUTLEN     255  
The Layout has just 2 fields populated, ZEBRA and GRID_TITLE.
Here is the bits of code I'm using.
DATA: w_container TYPE scrfname VALUE 'ZCONTAINER1',
      w_grid  TYPE REF TO cl_gui_alv_grid,
       w_custom_container TYPE REF TO cl_gui_custom_container.
DATA: i_alv TYPE TABLE OF zalv_zfxxu004.  " ALV table - displayed
DATA: w_outtab  TYPE zalv_zfxxu004.           " ALV table row
*zalv_zfxxu004 is a structure with the following fields.
*AUFNR CHAR     12
*BUKRS CHAR     4
*KTEXT CHAR     40
*VALID CHAR     255
           Create an instance of the container displayed on screen 100
  CREATE OBJECT w_custom_container
         EXPORTING container_name = w_container.
           Create an instance of the grid displayed in the container
  CREATE OBJECT w_grid
         EXPORTING i_parent = w_custom_container.
  CALL METHOD w_grid->set_table_for_first_display
    EXPORTING
      i_bypassing_buffer   = 'X'
      is_layout            = l_layout
      it_toolbar_excluding = lt_exclude
    CHANGING
      it_fieldcatalog      = il_fieldcat
      it_outtab            = il_outtab.
Any thoughts?
Thanks
Bruce

Hello,
Check SAP note 857823.
This is the standard system behavior and cannot be changed.
Regards,
David

Similar Messages

  • Setting max length of the field when using Context Model Node

    I have created a model using Import Adaptive Web Service model option (a web service was a wrapper around SAP BAPI function module).
    There were no dictionary types created in the Local dictionary as a result of import.
    I have mapped the context of the controller to the model node.
    One of the fields in the model is name     CUSTOMER_NUMBER type string;
    Corresponding element in the wsdl of the web service is
    <xsd:element name="CUSTOMER_NUMBER" type="tns:char10" />
    I have created a view with the input filed mapped to the CUSTOMER_NUMBER field of the model node.
    When I type more than 10 chars into the field and hit the search button, I get a com.sap.dictionary.runtime.Ddcheck exception that the length of the field should be less than 10 chars.
    How can I set the max length of the field in design time to prevent runtime exception?
    Thanks,
    Julia

    Thank you for your reply.
    Java trim function will trim the white spaces only, not the characters.
    I can code check length functionality before calling execute function (the function that call the web service).
    I can also create a dictionary structure based on the model structure; create a context value node based on the dictionary structure and use WDCopyService API to move the data between value node and model node.
    I was looking for the best practice...
    When importing model based on Adaptive RFC, the dictionary structures are imported together with the model. This does not happen for Adaptive web service - hence there is a need to add coding for simple checks.
    Julia

  • Oracle 9ir2 Max length of element/field name?

    Does anyone know what the max length of a element/field name can be in Oracle 9ir2?
    thanks,
    -mcd

    Thanks.. So, the max length is still 30.. what about this:
    Is this also true for the length of element names defined in an XML schema for use by Oracle XML DB?
    There are two ways in which XDB can absorb a schema -- one that causes the XMLTYPE to be stored in a CLOB, the other causes the XMLTYPE to be broken down into relational tables behind the scenes. The latter uses the element names for the table names, so I'm assuming it would be restricted by the 30-character column name limit (unless XDB has some way of truncating the column names but preserving the element names). But what about the case where the XMLTYPE is stored in a CLOB? In theory, there's nothing limiting the length of the element name.

  • Reg: Max length of internal table field(GUI_UPLOAD)

    Hi All,
    In my internal table there is a field for long text(free text/string), when i using GUI_UPLOAD the field max char is 255, so i couldnt get the full text, eventhough i declared that particular long text as string. Can any one tell me how to get the free text.
    And i am uploading data from presentation server, not from app server.
    Thanks in advance.
    Arun
    Edited by: arun on Mar 18, 2010 7:01 AM

    You have to cook your own logic. But what is the reason for not sorting the table?
    If you do not want to disturb the main intrenal table, you can move the contents into a temporary internal table, and sort it by descending order. The first record would have the maximum value.
    here is a logic to find the maximum value.
    loop at itab.
    if itab-value > v_max.
    v_max = itab-value.
    endif.
    endlop.
    V_max would have the maximum value at the end lo the loop.
    Regards,
    Ravi

  • Decimal Value display in ALV Field display

    Hi Expert,
    I need to dispaly one ALV Field "Routine Work Hour" value up to 2 decimal place in ALV output i.e if value is 2.5 then it should display as 2.50.The field which refers to this is ISMNW and the database table is AFRU.Now if this value is maintained in MINUTE unit, then code converts into HOUR unit and correctly outputs to ALV output up to 2 decimal after i changed the field decimal lenght.But for the value which is mainatined in HOUR unit, it correctlty populated into the final internal table upto 2 decimal and this table data while passing into FM " REUSE_GRID_DISPLAY" it only outputs upto 2 deciamal value for the value which is maintained as MINUTE unit in database table AFRU in ALV output, but for other value(Which are maintained in HOUR unit in table AFRU)  it still shows 1 decimal length.But the internal table correctly populates these values up to 2 decimal for all unit of work(MINUTE/HOUR) while passing though this above FM.
    Please advise where i need to look into.
    Thanks

    hi,
    pass these parameters to fieldcatlog.
    e.g.
    Fcat-ref_fieldname = 'ISMNW'.
    fcat-ref_tabname  = 'AFRU'.
    fcat-decimalsout = 2.
    Hope this will help you.
    Regards,
    Vijay

  • 1000 CHARACTER TEXT IN ALV FIELD

    Hi Experts,
    I have a String type variable containing 1000 character text that I am passing in a field on ALV. But ALV field can display on 132 characters. So now my requirement is that when a user double clicks on that field... then a popup or a screen appears where the user can read the entire text of that field.
    I have tried some FMs (like POPUP_TO_CONFIRM, POPUP_TO_INFORM, POPUP_DISPLAY_TEXT etc...), but all have length restriction.
    Please suggest if there is any FM to get the entire 1000 character text on a popup....  OR if there is any other way to do this...
    Thanks in advance
    Regards,
    Ashish Goyal

    I am using this code provided by you, facing error : Field "OB_GUI_DIALOGBOX_CONTAINER" is unknown. It is neither in one of   the specified tables nor defined by a "DATA" statement. 
    Please take a look and suggest.
    Using REUSE ALV GRID to display ALV.
       TYPES: BEGIN OF tp_text_x .
    TYPES: tdname      TYPE thead-tdname ,
           tdobject    TYPE thead-tdobject ,
           tdid        TYPE thead-tdid ,
           tdspras     TYPE thead-tdspras ,
           tdtxtlines  TYPE thead-tdtxtlines .
    TYPES: tdline      TYPE tline-tdline ,
           it_tline    TYPE tline_tab .
    TYPES: END OF tp_text_x .
    CLASS cl_event_reciever DEFINITION DEFERRED.
    DATA v_event_reciever TYPE REF TO cl_event_reciever.
    CLASS cl_event_receiver DEFINITION .
      PRIVATE SECTION.
        METHODS: close
                 FOR EVENT close OF cl_gui_dialogbox_container
                 IMPORTING sender.
        METHODS: init_container .
        METHODS: display_textedit
                 IMPORTING value(st_text_x) TYPE tp_text_x .
    ENDCLASS .                    "cl_event_receiver DEFINITION
    CLASS cl_event_receiver IMPLEMENTATION.
      METHOD close .
        CALL METHOD sender->set_visible
          EXPORTING
            visible = abap_false.
      ENDMETHOD .                    "handle_close
      METHOD init_container .
    *    DATA: ob_gui_dialogbox_container TYPE REF TO cl_gui_dialogbox_container.
        IF ob_gui_dialogbox_container IS NOT INITIAL .
    *    IF EDITOR_CONTAINER IS NOT INITIAL .
          me->close( EXPORTING sender =  ob_gui_dialogbox_container ) .   " EDITOR_CONTAINER ).
        ENDIF .
        CREATE OBJECT ob_gui_dialogbox_container
          EXPORTING
            parent   = cl_gui_container=>screen0
            top      = 40
            left     = 200
            lifetime = cntl_lifetime_dynpro
            width    = 600
            height   = 100.
      ENDMETHOD.                    "init_container
      METHOD display_textedit .
        me->init_container( ) .
        DATA: ob_gui_textedit TYPE REF TO cl_gui_textedit .
    *    DATA: ob_gui_dialogbox_container TYPE REF TO cl_gui_dialogbox_container.
        CREATE OBJECT ob_gui_textedit
          EXPORTING
            parent = ob_gui_dialogbox_container.
        CALL METHOD ob_gui_textedit->set_readonly_mode
          EXPORTING
            readonly_mode = cl_gui_textedit=>true.
        DATA: it_tdline TYPE TABLE OF tdline .
        DATA: st_tdline LIKE LINE OF it_tdline .
        FIELD-SYMBOLS: <st_tline> LIKE LINE OF st_text_x-it_tline .
        LOOP AT st_text_x-it_tline ASSIGNING <st_tline> .
          APPEND <st_tline>-tdline TO it_tdline .
        ENDLOOP .
        CALL METHOD ob_gui_textedit->set_text_as_stream
          EXPORTING
            text = it_tdline.
      ENDMETHOD.                    "display_textedit
    ENDCLASS .                    "cl_event_receiver IMPLEMENTATION
    INITIALIZATION.
    CREATE OBJECT v_event_reciever.
    DATA: ob_gui_dialogbox_container TYPE REF TO cl_gui_dialogbox_container.
    CREATE OBJECT ob_gui_dialogbox_container.
    START-OF-SELECTION.
    v_event_reciever->display_textedit( EXPORTING st_text_x = <st_alv_data_1>-text_1 ) .

  • Loading a field of length( 60 and up to 2048) from flat file to BW.

    Hello,
    Can you please suggests ways by which we can load a field in flat file which is of length greater than 60 and up to 2048 digits to BW.
    Facts:
    We cannot have more than 59 length digits in an infoobject
    Observations:
    The idea of using multiple infoobject,ie for 2048 max length it will be 35 infoobjects is not acceptable by my client.
    So, can anyone suggests other ways in BW3.5 for loading a text of length up to 2048 from flat file to BW.

    Hi,
    If you have source field DD/MM/YYYY format, please try this code in the field routine.
    Data : lv_date(8) type C.
    lv_date0(4) = <Source Field Name>6(4).
    lv_date4(2) = <Source Field Name>3(2).
    lv_date6(2) = <Source Field Name>0(2).
    RESULT = LV_DATE.
    Thanks,
    Saru
    Edited by: P. Saravana Kumar on Apr 19, 2009 2:38 PM

  • Getting the max length

    i am using pl/sql and i need to do some validation regarding the max length of the string. but the problem is that i have to refer back to the database for the length so that if the database change, my code don't change.
    is there any way to get the max length in the field of the table?
    eg:
    lets say i got a table call Person with column Name(varchar2(66)) and Sex(char(1))
    so how i retrieve the max length of the field Name?
    thanks

    It's quite simple. We can use the PL/SQL %TYPE in our declarations. Check it out...
    SQL> CREATE TABLE small1 (col1 NUMBER, col2 VARCHAR2(3))
      2  /
    Table created.
    SQL>
    SQL> CREATE OR REPLACE PROCEDURE small1_api (pv_string IN VARCHAR2)
      2  AS
      3      l_col2 small1.col2%TYPE;
      4  BEGIN
      5      l_col2 := pv_string;
      6      INSERT INTO small1 (col1, col2)
      7      VALUES (a12.NEXTVAL, l_col2);
      8  EXCEPTION
      9      WHEN value_error THEN
    10          dbms_output.put_line('oops! string is too long');
    11  END;
    12  /
    Procedure created.
    SQL> EXEC small1_api('APC')
    PL/SQL procedure successfully completed.
    SQL> EXEC small1_api('APC4')
    oops! string is too long
    PL/SQL procedure successfully completed.
    SQL>
    SQL> ROLLBACK
      2  /
    Rollback complete.
    SQL> ALTER TABLE small1 MODIFY (col2 VARCHAR2(4))
      2  /
    Table altered.
    SQL> ALTER PROCEDURE  small1_api COMPILE
      2  /
    Procedure altered.
    SQL>
    SQL> EXEC small1_api('APC4')
    PL/SQL procedure successfully completed.
    SQL> EXEC small1_api('APC45')
    oops! string is too long
    PL/SQL procedure successfully completed.
    SQL> Cheers, APC

  • Customize user logon name max length

    Hi all,
    We are changing our user name policy from testingadmin (12 char) to testingadministrator (20). The new user name don't fit in the bname field when try to login. Anybody know if is possible to expand it or change this size or to customize the max length of userid?
    Best regards and thanks in advanced.

    Do you have the SAP note indicate that it is not advisable to customize the user logon name max length or it cannot be customize?
    thanks in advance....
    Message was edited by:
            Brian Lee

  • Selection text's max length 30 but its not going beyond 28

    selection text's max length 30 but its not going beyond 28 while its 30 in other fields.

    Hi Yogesh,
    Yes Selection texts have limitations . You can use text elements for your selection paramater and it can acomadate up to 132CH:
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(48) TEXT-005.
    SELECTION-SCREEN POSITION 49.
    SELECT-OPTIONS : S_SAKNR FOR BSIK-SAKNR .
    SELECTION-SCREEN END OF LINE.
    Lanka

  • Error in updating ALV field catalog in selection tool for Planning Book

    Hi ,
    I am Implementing BADI  '/SAPAPO/SDP_SELECTOR' to upload Custom Fields Data in Planning Book Selection Window under APO Location Product. These Custom Fields are maintained in Custom Table.So from Table whatever Custom Fields are availabe all the fields needs to be available in for selection. Once selection is done the same data to be uploaded into Planning Book.
    This BADI is working Fine upto 4 fields but if any extra fields are added in the table 'Error in updating ALV field catalog in selection tool' error Pop Up is coming. Here i am using Folloowing Methods
    1). INIT_OBJECT_LIST
    2). F4
    3). LOC_PROD_VALUE_LIST
    Please help on the same if u have any idea or clue.
    Thanks.

    Hi Srinivas!
    Where did you get your implementation from?
    It would be nice if you could debug your code!
    For the F4 method, have you seen this note?
    Note 544904 - Sample source code f.BAdI /SAPAPO/SDP_SELECTOR ('F4'method)
    Also check this note. It contains selection modifications in the BAdI:
    Note 376902 - SDP selector: Basis corrections for BADI
    I do not know your release and support package in your SCM, but you can find a lot of notes related to this BAdI.
    Thank you!
    Will
    SCM Support Consultant

  • Error in updating ALV field catalog in selection

    Dear all,
    I'm trying to use the standard transaction /SAPAPO/TSKEYFMAIN in order to check the TS values.
    After filling the selection variant, the system shows the following error:
    'Error in updating ALV field catalog in selection'
    Could you please provide me with further details about the error? What could be the possible solution to avoid it?
    Many thanks,
    SM

    Hi Marius,
    thanks for your answer.
    I would like to use the /SAPAPO/TSKEYFMAIN transaction to check massively the values in the time series KFs and not just the consistency of them.
    So do you know any other transaction to do it or do you have an idea about the error of /SAPAPO/TSKEYFMAIN?
    Thanks for your help!
    SM

  • How do I validate one field's length based on another field's selection?

    I am creating a form for our offices where I need to check one field for length of a serial number based on the answer to a previous field's selection.  Depending on the product selection, the serial number has two different lengths.  Both fields are marked as required, but I want to make sure that we receive the full serial number for our product.  Previous forms were done on paper and instructions were for the last 4 digits only which now we want the full serial number.  One product has a 12 digit number and the other is 6.
    I'm guessing that I need a validation script in the serial number field, but I am not a JavaScript coder and haven't found the right thing when searching.  Any help would be great!
    Thanks!

    Never trust your users to follow what you expect them to do... That often leads to mistakes and problems later on.
    I would reset the s/n field when a selection is made in the drop-down. To do so set the drop-down field to commit the selected value immediately and add code as its custom validation script:
    this.getField("Serial Number").value = "";
    To validate the s/n field you can use something like this as that field's custom validation script (of course, you'll need to adjust the field names and values to match the actual ones in your file):
    event.rc = true;
    if (event.value) {
         var selection = this.getField("Dropdown1").valueAsString;
         if (selection=="1" && event.value.length!=6) {
              app.alert("Error! The s/n must be 6 digits long.");
              event.rc = false;
         if (selection=="2" && event.value.length!=12) {
              app.alert("Error! The s/n must be 12 digits long.");
              event.rc = false;

  • Field name lengths

    The field name lengths in the Citadel database are approaching 80 characters when Citadel adds the total path to each field. I am saving data from a process running on computer #1 to computer #2. I am using OPC and to select the analog input values require an extremely long length to the field names.
    i.e.
    "\\Dispatchbd1\Freq_Process\FreqOPC.'OPC DAQ Items'.'Analog Input'.'PHS Narrow Freq'" is just one of my field names. When you have 75 values in a database that you want to look at this long name gets discouraging. Any help would be appreciated.

    Hi Wapa,
    You are right the names are a bit long. Citadel stores the absolute names (includes computer and process name), to make sure the names are unique. For example if process1 and process2 have both Pot1 and you are storing the data to the same database, unless you log it with a process name and computer name you would get a conflict - (if there is just Pot1 you would not know from which process).
    So, the computer and process parts are always there. The Item name has to be also included, but you have more choise there. The member ('OPC DAQ Items'.'Analog Input'.''PHS Narrow Freq') can be aliased to anything you want (and is valid). Go to the Edit database - select the item in the second window - select the datatype - type in alias (for example item1) - check the log to
    historical database and hit save (you are going to get a warning - don't worry about it, just make sure the alias (item1) you typed is is not already an existing item - because of the folder structure exposed by DAQ OPC you'll be fine).
    Now instaed of using "\\Dispatchbd1\Freq_Process\FreqOPC.'OPC DAQ Items'.'Analog Input'.'PHS Narrow Freq'" you can go with "\\Dispatchbd1\Freq_Process\FreqOPC.item1" - you can stop loggin the original member.
    If you need to go even shorter, you can create an expression object for every member you want to log and then log the expression. Then you get to something like:
    "\\Dispatchbd1\Freq_Process\Exp1"
    I hope this helps.
    Martin

  • Storing a field of length 500 char in a database table

    I want to create a ztable in which I need  to store the data of length more than 256 , so please let me know , how can we create the field of length 500 chars..
    I have tried using STRING and LCHR , but it's not working.
    Thank You,
    Ankur Goyal

    Hi,
    Try creating the field like this
    1. Create a new data element with required description.
    2. While creating data element select 'Built-in type' radio button under Data Type tab. Specify Data type as STRING and press enter. You need not specify Length (or you can provide 500 here, I suggest not to specify field length as it leads to short dump if you enter text more than 500 chars in it).
    Note: Once you press enter you can see an information message 'No length restriction'.
    3. Save and activate the data element.
    4. Use the data element for your text field in your custom table.
    Important:
    The text field with size >255 chars should not be a key field, neither you should select 'Initial values' option while defining field.
    I have tried this and it worked.
    Hope this helps.
    Thanks,
    Venkat

Maybe you are looking for