Trim the gaps.. condense a field of a table

Hello all,
I have a query related to trim the spaces of a particular field of a table.
e. i have a table gt_aoextseq which contains 2 records.
This table contains the filed ORDNO.
This field ORDNO contains prefixed spaces.
How can I remove the spaces for the field ORDNO in the table gt_aoextseq .
Kindly suggest me.
Thanks,
Rekha

Hi, Rekha 
Hope following code will help you in this way,
TYPES: BEGIN OF t_test,
  a(10),
  b(20),
  END OF t_test.
DATA: it_test TYPE STANDARD TABLE OF t_test WITH HEADER LINE,
      wa_it_test TYPE t_test.
DO 10 TIMES.
  wa_it_test-a = '     45'.
  wa_it_test-b = '            10'.
  APPEND wa_it_test TO it_test.
ENDDO.
LOOP AT it_test INTO wa_it_test.
  CONDENSE: wa_it_test-a, wa_it_test-b.
  MODIFY it_test from wa_it_test INDEX sy-tabix.
ENDLOOP.
Please Reply if any Issue,
Kind Regards,
Faisal

Similar Messages

  • How can i change the color of a field in a table depence of a value

    Hi forum
          Is this possible to change the color of a row in a specific field of a table depends of the value of this field,,, for example if the value is equal or greather than 1.
    Thnks
    Josué Cruz

    Josue,
    Yes this is possible if you use the fillColor method. It requires R,G,B value of color.
    //Sample code which highlights cell2 in my table which has two rows.
    frm1.Table1.Row2.Cell2.fillColor = "120,120,120";
    // If you want highlight complete row.
    frm1.Table1.Row2.fillColor = "120,120,120";
    So now just apply an if loop which reads the input value as greater than 1 and use the code shown above.
    Chintan

  • Refreshing the value of a field in a table and displaying it on the screen.

    how do i mimimize calls to the database in the following scenario?
    I need to show the latest value of a field in a table in a database through a java program. in a concurrent access environment, there are chances of multiple users getting stale values. how do I overcome this problem through code?
    please advise.

    There are many ways of doing this. However its worth noting that RDBMS database are not messaging, event driven systems and are not best suited to do what you want to do. You should only consider doing this if you have a low rate of changes.
    You can
    - Poll the database table and look for changes.
    - Add a trigger to the table to record the keys which have changed. The have a query to find just the key which have changed.
    - When a field changes, also send a broadcast/topic message.
    - Add a trigger which sends a JMS message when a change occurs. (This is entirely DB/JMS specific, you need to find if this is possible)
    Again, databases are not ideally suited to event driven, real time updates. There is no simple, clean solution.

  • How to add the contents of a field of internal table.

    Hello Everybody,
    How to sum up the individual field from a internal table. Like i have a internal table that has menge field , I need to sum up the menge field for each matnr..
    exm : for each matnr there are 5 menge entries, I need to add all the menge fields and shud be put against the matnr .
    Thanks,

    Hi Khaleel,
    One more option is using the "collect" statement.....
    imagine in the internal table itab..we have 2 fields only..
    MATNR,MENGE,
    we have 2 internal tables itab1 and itab2...
    loop at itab1.
    collect itab1 to itab2.
    endloop.
    Action performed is ...for the same MATNR...menge gets added and saved as a single record...When matnr changes...new record is Appended
    another case is we have 3 fields in internal table
    MATNR,UNIT,MENGE
    imagine we hane the records
    Material1 KG  100
    Material1 LT   20
    Material1 LT   200
    MAterial2 KG 100
    in this case...the output will be
    Material1 KG 100
    Material1 LT  220
    MAterial2 KG 100
    Reason is that the fields before the addable value is checked for similarity..
    here field UNIT is also checked and also MATNR before adding up....
    Hope it gave you some alternative idea to proceed with....
    Reward if helpful
    Regards
    Byju

  • How to see the dropdown option for field of a table during selection

    Hello,
    I am adding a new custom field in the table. Now when user goes to the screen after clicking the content button icon in se11, he sees all fields for selection.
    That custom field is one character field. I want the user to see P and S option when he hits F4 (Dropdown).
    How can I achieve this ?
    Regards,
    Rajesh.

    hi check this..
    report .
    TYPE-POOLS : vrm.
    TABLES:vbak,vbap.
    DATA : v(80) TYPE c.
    DATA: wa_vbak TYPE vbak,
          it_vbak TYPE vbak OCCURS 0 WITH HEADER LINE,
          wa_vbap TYPE vbap,
          it_vbap TYPE vbap OCCURS 0 WITH HEADER LINE.
      DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values ,
            v_count  TYPE i,
            l_value LIKE LINE OF li_list.
    PARAMETERS: p_test(20) AS LISTBOX VISIBLE LENGTH 60 MODIF ID DAT.
    INITIALIZATION.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM get_data.
      LOOP AT it_vbak.
        l_value-key =  it_vbak-vbeln .
        l_value-text = it_vbak-vbeln .
        APPEND l_value TO li_list.
      ENDLOOP.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = 'P_TEST'
          values          = li_list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
    AT SELECTION-SCREEN ON P_TEST.
      clear : li_list , li_list[].
      SELECT vbeln
             matnr
             meins
             FROM vbap
             INTO CORRESPONDING FIELDS OF TABLE it_vbap
             WHERE vbeln = p_test.
    START-OF-SELECTION.
      SELECT vbeln
             matnr
             meins
             FROM vbap
             INTO CORRESPONDING FIELDS OF TABLE it_vbap
             WHERE vbeln = p_test.
      LOOP AT it_vbap.
        WRITE :/ it_vbap-vbeln, it_vbap-matnr,it_vbap-meins.
      ENDLOOP.
    *&      Form  get_Data
          text
    -->  p1        text
    <--  p2        text
    FORM get_data .
      SELECT  vbeln
              FROM vbak
              INTO  CORRESPONDING FIELDS OF TABLE it_vbak.
    ENDFORM.                    " get_Data
    regards,
    venkat

  • Change the Size of  "Code"  field in Master Table of UDO

    Hi there,
    I am using UDO in my form, where "Code" is the Primary key field of the Master Table.
    Now the Size of the same is 8 characters. Can any one of you help me, to change the "Code" size to 15 characters?
    Thanking you,
    Pradeep

    Hi pradeep,
    You can't. But you can create a new alphanumeric field with the intended size.
    Regards,
    Vítor Vieira

  • What is the Length of a Field in a Table Control?

    Hi,
        I have a small question. I want to know, What could be the Maximum length that can be assigned to a field while creating a Table Control? Any help would be highly appreciated.
    Thanks in advance,
    Exertive.

    Hi Exertive,
    I've found that a simple field can have a maximum length of 128 characters.
    To enter more text, use a custom textview control - use the text view class to build yourself a field that can hold a string variable - then you can have as long a value as you want. refer to class CL_GUI_TEXTEDIT.
    Not sure about putting custom controls in a table control though!
    Hope this helps slightly or gives you something to work with.
    Cheers,
    Chris

  • How do i find the total number of fields within all tables in one of my databases

    I'm in the process of creating some "gee whiz" metrics for one of my applications and want to find the total number of columns contained in its database.  Is there a stored procedure to get this information that would save me the effort
    of opening each of my 66 tables and counting the columns?  I also have the same question for my 138 views.  Thank you for any ideas you care to offer...............Phil Hoop
    Phil Hoop

    Hi Phil,
    Assumes SQL 2005 or higher
    Let 's try simple one ....
    SELECT COUNT(col.column_name), col.table_name
    FROM information_schema.columns col
    JOIN information_schema.tables tbl
    ON tbl.table_name = col.table_name
    AND tbl.table_schema = col.table_schema
    AND tbl.table_catalog = col.table_catalog
    AND tbl.table_type = 'VIEW'
    GROUP BY col.table_name
    Let me know if this will help you.
    If you think my suggestion is useful, please rate it as helpful.
    If it has helped you to resolve the problem, please Mark it as Answer.
    Varinder Sandhu www.varindersandhu.in

  • Decrease the GAP

    Hello Guru's,
    I'm new to adobe form design, So I couldn't catch the solution to decrease the GAP between two fields.
    Like I have to fields side by side, with first field lenth 40 and second field 10.
    If the first field field is not in full lenth, it is giving gap inbetween first field and second field.
    Please suggest me how to reduce this GAP.
    Thanks in advance.
    Indra

    >>Like I have to fields side by side, with first field lenth 40 and second field 10.
    >>If the first field field is not in full lenth, it is giving gap inbetween first field and second field.
    >>Please suggest me how to reduce this GAP.
    wrap those two fields in a subform.
    for the subform, use the content:Flowed, Flow Direction:Western Text, Layout->Width:Auto-fit.
    for both the fields objects, use Layout->Width: Expand-to-fit
    the initial width of the first field can be small as you want,
    incase of longer field values, the width will be automatically set by the acrobat reader.
    regards,
    BJagdishwar.

  • Key fields in variant tables.

    Hi masters,
    i would like to know the use of "key field" in variant tables.
    according to definition:This indicator shows whether a characteristic is used as a key field for accessing tables. Key fields have the value "X". When the table is accessed, the values assigned to the key fields infer values for the other characteristics.
    please give an example of its usage,
    thanks regards
    Rahul

    Hello Rahul,
    Please view the following link with the explaination and an example.
    http://help.sap.com/saphelp_47x200/helpdata/EN/92/58c5cd417011d189ec0000e81ddfac/frameset.htm
    Thanks
    Amber

  • How to access hidden fields in a table

    hi
          what is the use of hidden fields in a table, ie. some fields doesn't visible in the field list of a table.  but the fileds will be visible if u display its contents.
        for example in table t518A the text field is not visible in the field list.  But it will be visible if display its contents.  can any one of u please help me out how to access those fields. 
    regards
    sri

    Hi Srivallika,
    The table T518A has a text table called T518B. You can have a look at this table by:-
    1. GOTO SE11 and display table T518A.
    2. GOTO menu GOTO -> TEXT table. It gives the text table for the given table. Here its is T518B.
    A Text table is table with same key fields as the main table with another extra Language key TYPE SPRAS. This table is related to the main table. Hence to access the extra text fields, you can use the TEXT table :).
    Thanks and regards,
    Ravi.
    NOTE: Points keep me alive on SDN .

  • Significance of Counter field in CATsDB Table

    Dear All,
    What is the significance of OUNTER Field in CATSDB Table?
    Regards,
    Satya.

    Yeah ...
    Absolutely correct.
    Please go through my requirement.
    I need to Update CATSDB table manually.
    Say If an Employee enters the leave data like CL, SL etc., through Portal, that is coming into R/3 and my IT2001 is getting updated.
    But when the Same employee logs in using his Cats Id into CATS for time sheet entries, then those booked as well as approved days are not getting reflected and allowing the user to enter the data. After that it is throwing the error.
    My Requirement is Those records should get displayed in Cat2 T-code defaultly. So, I need to update my CATSDB table manually.
    So, as COUNTER Field is updated by the System itself, I want to know its significance. and please let me know how to do this???
    Regards,
    Satya

  • Checking length of a field in a table

    Hi,
    How can i use STRLEN to check the length of a field in a table... lets say i have to chek the length of the field VBELN in the table VBAK.
    I will reward all the useful answers.
    Thanks,
    Mohit.

    Hi Mohit,
    I have a doubt: do you want to compute the length of a value stored in a field, or to compute the length of the definition of that field?
    1. In the first case, just make sure that the field is filled OK, then compute
    l_length = strlen( vbak-vbeln ).
    2. In the second case, you will have to compute
    describe field vbak-vbeln length l_length.
    For example, if VBAK-VBELN = '1234', then the first case will result 4, but the second case will result 10.
    I hope this helps. Best regards,
    Alvaro

  • How to decrease the gap between label and input field.. pls respnd

    hi friends,
    I am facing this problem since long time and couldnt get any solution...
    pls respnd,
    i need to decrease the gap between my input field and label.. its very much gap there..
    thanks in very advacne,
    niraja

    Hi WD ABAP,
    i am doing the same, created tcontainer, and just binded my node. i given matrix layout. But i dont know why it is coming like that.
    Also WDABAP, could you pls reply me to the other thread,
    about when im trying to read the dropdown value of subnode, the get_static_attribute or create_element method is going into my supplyfunction.
    supplyfunction - my code is to fill the dropdown. and due to this supply function triggering,
    my get_static_att or create_element is not reruting currenct row dropdown value.
    what am i doing wrong.. can u pls pls.. its kicking me. i have spent my whole weekend on this, but couldnt solve this.
    plsfnds :(((((
    Niraja

  • How can you trim the contact field value without cloudconnector?

    How can you trim the contact field value without cloudconnector?

    You can add your contacts to segments, while right-clicking on the criteria you have added in segments, you will see the option for Merge, Intersect & Trim.
    See the attached URL, it might help you .
    Merge, Intersect, Trim

Maybe you are looking for

  • Fading out of Position filed in -IT-0001

    Guys, Request to help me in fading out of the Position filed in IT-0001. In IT-0001, the POSITION filed in editable....My client wants the POSITION field to be Un editable... Pls give any ray on this.. Best Regards, Srikanth S

  • Need to find certain disappeared mails

    I know that a version of this question has been posted before...I won't bore you with specifics, but i'll just say that those posts leave me unsatisfied for various reasons. So. I can't help it. I have to ask. Please help me out if you can. I need to

  • HFM Adhoc Analysis

    Hi All, I have a query regarding Adhoc Analysis in Smartview. In an Adhoc reports when I click on ZOOM IN or Double click on any of the parent in Account or Entity Dimesion the child is repeating or duplicates the number of times I use double click o

  • New iTunes 10.5.3 quits unexpectedly.

    Has anyone else had problems with new iTunes U quitting everytime you try to access the featured content from an iPad.  The strnge thing is that it works ok on my iPhone.

  • Where do I find the digital signature toggle in mail

    I saw this post in one of the threads, but for some reason it wouldn't let me post a question.... "Did you maybe accidentally click on the little toolbar icon to digitally sign the email message in the New Message window in Mail? I did, and the keych