Alv field size

Hi all
       Please help me to solve this problem.I want to display the size of the coloumn heading eqaul to the data element size in alv.I am using below code at this moment.Explain to me step by step to solve this problem.
  layout-box_tabname   = 'ALV_FIELDS'.
  eventcat_ln-name = 'TOP_OF_PAGE'.
  eventcat_ln-form = 'TOP_OF_PAGE'.
  append eventcat_ln to eventcat.
  call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
      i_callback_program       = sy-cprog
      i_callback_pf_status_set = 'SET_PF_STATUS'
      i_callback_user_command  = 'USER_COMMAND '
      i_structure_name         = 'FIELDCAT'
      is_layout                = layout
      it_fieldcat              = fieldcat
      i_default                = 'A'
      i_save                   = 'A'
      is_variant               = dvariant
      it_events                = eventcat
    tables
      t_outtab                 = alv_fields
    exceptions
      program_error            = 1
      others                   = 2.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
Thanx in advance.
Regards,
Giri.

while appending header fields to ALV, there is a field (length) wherein U can specify the length and it will be displayed accordingly. So, u can set the data element size to this field and use it.

Similar Messages

  • 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 to determine the field size

    I am going to make a multiplatform application that hopefully
    will run on linux and windows 2000.If the os is 2000, then I will use
    vb.net/aspx else I'll use java servlets. I make the connection
    to the web server ( through HTTP) not directly to database server.
    So, the resultset will be stored in the String object. The columns
    will be separated by delimeter. Our problem is how to determine
    the size and type of the fields of mssql,oracle and postgres database
    so that we can include it in the String object.
    Ex.
    String sResultSet=new String();
    ResultSet rs=statement.executeQuery(sSQL);
    while(rs.next()){
    sResultset=sResultSet + rs.getString(field1) + "||" + rs.getString(field2) + "||";
    vertical bars acts as delimeter
    supposedly this is the code:
    sResultset=sResultSet + rs.getString(field1) +"_" + rs.getFieldType() + "_"+
    rs.getFieldSize() + "||" + rs.getString(field2) +"_" + rs.getFieldType() + "_"+
    rs.getFieldSize() + "||";
    supposedly this is the code if rs.getFieldType() and rs.getFieldSize() methods are existing
    Anyone can give me an idea how to get the field type and field size of the database?
    thanks in advance

    Yes, but I dont know how to do it.
    Can you give me an example of using it.
    Thanks in advance

  • Error in ALV : Field Does not exists in Output table .

    Hi All,
    In my ALV report, program get dumped and showing error when i tried to put a col named Distribution channel ion the alv.
    I have put the Distribution cannel field in the IT_FInal table , but still getting folwong errors :
    Error : Field Symbol is not been assigned.
    As Instructed i have passed            I_INTERFACE_CHECK              = 'X'.
    By this i am getting detail error that :
    Field Distribution channel does not exists in Output table & Heading for List is missing .
    But i have maintained the distribition channel in IT_Final table
    Please suggest wheather we have to define dis channel in any other place.
    Thanks in advance.
    Can any one help me regrarding this.
    Thanks in advance.

    Hello,
    You have to populate the same in the fieldcatalog as well, i think you have not maintained this field there.
    BR,
    Suhas
    PS: Also make it a point to follow-up on your previous post: [Error in ALV : Field Symbol not been assigned.|Error in ALV : Field Symbol not been assigned.]

  • 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

  • How to change the field size cache/buffer in a query

    I query a field from sql developer, the field is cases_history, it resides in a data mart in the global network of our company.
    this field is big in size, it stores logs in a sequential way, so field size increases a lot.
    when i query it and try a "single record view" the field is cut off and can´t see all of its content..
    WHAT I THOUGHT AND IT DOESN´T APPLY
    1. maybe in database connections in the system tab, I go to the oracle data mart that i am interested in and change buffer and cache
    but it doesn´t work, sql developer keeps showing part of the field
    2. maybe it was then the buffer size in sql developer, so I change it, but no luck
    WHAT IS THE PROBLEM HERE?
    MANY THANKS IN ADVANCE

    many thanks in advance for your help,
    1.the data type in the remote oracle data mart is VARCHAR2(4000)
    2.editing with the pencil cuts off at somepoint (which is the same line and last word)
    3.this is the query I write
    ||select case_history from wfm_case where case_id='xxxx'||
    this is to test if I can get a long case_history, which we know it is because it is fully accessible through a web solution to revise cases.
    PLS note. I have a tns connection which is of the following type :
    (in data sources (odbc) -- system dsn -- oracle odbc driver configuration ...oracle .. buffer size =9000 , cache buffer size =4000 and FORCE SQL_WCHAR SUPPORT is enabled
    many thanks,
    Jordi.

  • How to increase the field size in modules

    Dear Oracle Team,
    When we add some items in reason codes from the dictionary, it has certain limit in reason code and title. So I can increase those field size to add bigger text for title names.
    I think it also applicable for the fields in other modules also. Looking your valuable support.
    Thanks & Regards,
    Sheik

    1.  Once you add a custom field to your database, it would be made available to either your reports (BI) or your layouts in PCM.
    2.  When you create the custom field, you would specify the field length/type/properties.  (i.e. "Char" field with 120 char field length)  If you set this to one value when you create (say 120 char) and want to CHANGE it to 140 characters, you cannot do this without deleting and re-creating the custom field.  I did check 14.0.3 and this continues in this version as well.
    2a.  Best practice is to be generous in your field sizes to avoid needing to change it later.
    As I mentioned before, any default fields in the database are fixed to their set properties and the only way to change them is to submit an SR to Oracle to request the change.

  • Increasing field size in content repository

    What is the best way to increase the field size in the content repository? We are using MS SQL Server and I can't find a way to adjust field width in the Weblogic Administration interface for creating a new repository. Should this be done in the underlying SQL Server? It seems to me that even if we did that, there is a seperate setting in the repository limiting field width, but I don't know how to access that value.
    Thanks Much,
    Tim

    The NoSquint seems to work. The other one didn't install. I may have made a misstep.

  • 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 ) .

  • Hi, i have doubt in alv field cat log

    1)In alv field cat preparation (i dont want to display for one particular field in output screen) can u pls send me the code.
    2)in field cat for a particular field i want to display in different color for that can u send me code.
    3)code for (DOUBLE CLICK) event.
                for the can u send me a code
    Regards,
    Nagesh

    Hi Nagesh,
    I think you have posted your question in the wrong forum, this forum is for education related topics only.  Please review the existing forums and re-post it to the appropriate one.
    Regards,
    Simon

  • How to change field size using SQL against an oracle Database

    I am an admitted novice user, looking to become more proficient.
    I have a field in a table that I need to expand the field size. The table is called Inquiries. The data type is text. The current Field Size is 10. I want to increase it, to either the max, or somethign long enough to fit TECHNOLOGY LEADERSHIP PROGRAM.
    What is the SQL command to change the field size, and what is the max for a Text Field Size

    And/Or, an even better question might be,
    Do I need to use SQL*PLUS to do this, or are there better tools. I.e, I like how in Access, you can open up a database in Design view and just change the amount for the field size. Is there a similar "easy" method to do something like that with an Oracle database.
    My current version of the server/database is:
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning option
    JServer Release 9.2.0.6.0 - Production
    I was thinking I had to do SQL commands to perform the action, but there may be another way that I am not thinking about with all of the tools at my disposal. When I installed Oracle on my desktop, I installed most of the management tools and networking services, if that helps

  • Item Code Field size

    Hi!
    Is there a way to increase the Item Code field size? I believe it is 20 characters. Can it be increased to a higher size, say, 35 characters?
    Prajwal

    Hi Prajwal Kashyap,
    The length of item code is designed in background as 20 characters and cannot be changed from front end, even with add-on/SDK.
    If it is really necessary for your customer to change the definition, please kindly refer to Note 1028874 regarding missing functionality for datails and log a message providing Business Impact.
    Regards,
    Varun
    SAP Business One Forum Team

  • Changing LOV's  table-field size

    Hi,
    I'm using Jdeveloper 11g.
    Knowing that the tag below is used in LOV, Now I need to know how to change the LOV's table-field sizes? (I'm using the model-based LOV, and it's reading the attributes from the view object)
    <af:inputListOfValues
    model="#{bindings. .listOfValuesModel}"/>
    I need to customize the size of LOV's table-field manually, or based on the attribute's UI hint.
    To do so, I have written the code below in the backing-bean:
    RichInputListOfValues lov = (RichInputListOfValues)launchPopupEvent.getComponent();
    FacesCtrlLOVBinding.ListOfValuesModelImpl lovModel = null;
    lovModel = (FacesCtrlLOVBinding.ListOfValuesModelImpl) lov.getModel();
    TableModel tm = lovModel.getTableModel();
    java.util.List<oracle.adf.view.rich.model.ColumnDescriptor> l = lovModel.getItemDescriptors();
    But the "ColumnDescriptor" is an abstract class, and I cannot customize the size of the table.
    I need to know if it's possible to do it or not?
    Thanks in advance,
    Shadi Khani
    Thank you in advance,
    Shadi Khani
    Edited by: ShadiKhani on Aug 10, 2010 6:07 AM

    Hi ,
    i Know my answer is too late , just today i see the post .
    You can change content Size for LOV by going to look up view object --> then to attribute ---> UI hint ---> form UI hint but the size of component in "Dispaly width"

  • Dynamically modify the crystal report field size based on Paper size in C#

    Hi,
    I need to modify the Crystal Report field size dynamically based on the paper size using C# .Net. According to the paper size, crytal report field width should be increase or decreae.
    Kindly suggest any solution on this.
    Thanks

    Moved to .NET SDK forum
    See these RAS samples:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting
    Don

Maybe you are looking for

  • Want to take me ipod into a MRI

    Hi all, I have noticed that my burned Cd's are skipping and jittering on every song in a Cd player. Any fix would be nice. Now the real question , I have to have 2 MRI's . I have the remote for iPod , can I leave the iPod out of the MRI and just use

  • SD - DSD Connector Invoice Prices tables

    Dear All I want to get invoices from DSD tables: I found this tables: /DSD/HH_RAHD = Tour /DSD/HH_RADELHD = Invoice Header /DSD/HH_RADELIT = Invoice Detail I want to get the price of every line item in these invoices (unit price, taxes, total). Thank

  • Why do some pics show up in my iMac photo stream as just a dotted line?

    When I click to enlarge, the actual picture shows up.  Other pics show as they should.  From the image notation, it appears that both are originated from my iphone, and I cannot guess why some are different from others.

  • Limit SQL Report to a Collection

    I created this report to look for driver versions on our network after I edited the .mof file to look for it and everything seems to be pulling in great but I want to be able to limit this to a collection.  Does anyone know how I can add that to this

  • I keep getting a "start up disc is full" message on my iMac (running leopard)-  its a new mac so can't be full?

    I keep getting a "start up disc is full" message on my iMac (OSX 10.7.3 running leopard).  It can't be full the mac is only a few months old - please help - I am not a computer whizz so treat me gently!!