Find length of  a particular field.

Hi,
I am new in ABAP. So Please guide me how to find out the length of a particular field and also give the function name with example.
Ram Shanker

Hi RAM,
DESCRIBE FIELD
Syntax
DESCRIBE FIELD dobj
  [TYPE typ [COMPONENTS com]]
  [LENGTH ilen IN {BYTE|CHARACTER} MODE]
  [DECIMALS dec]
  [OUTPUT-LENGTH olen]
  [HELP-ID hlp]
  [EDIT MASK mask].
Effect
This statement determines several properties of the data object dobj and assigns them to the specified variables. The various additions enable you to determine the data type and the number of components for structures, the length used in the memory, the number of decimal places, the output length, the name of the data type for a reference to a data element of the ABAP Dictionary, and a possible conversion routine.
Notes
You can specify field symbols or formal parameters in procedures for dobj to determine the properties of the data object they represent at the time of the statement execution.
The statement DESCRIBE is used to determine the properties of data objects of elementary data types. When DESCRIBE is used for structures or data objects of deep data types like strings, internal tables, or reference variables, you can only determine elementary properties. Further details, for example, the static or dynamic type of a reference variable cannot be determined using DESCRIBE. For this kind of information, you can use the type classes of Run Time Type Services (RTTS). They enable you to determine all properties of data objects of all data types.

Similar Messages

  • FM to find ranges of a particular field ina table

    hi
    is there any FM to find the ranges of a particular field in a standard table

    Hi Senthil,
    Try these function modules.
    BALW_RANGES_CHECK
    CMO_NUMBERRANGES_CHECK
    ISU_DB_TE218_SELECT_RANGES
    ISU_DB_T259_SELECT_RANGES
    FBIW_SELECT_RANGES_FILL
    FBW4_SELECT_RANGES_FILL
    Hope it helps!
    Much Regards,
    Amuktha.

  • How to find out the list of field exists for a particular transaction

    Hi all,
    Can u please help me find out the list of field exits available for a particular Tcode?
    Is it similar to User exit or . . . . ?
    Thanks,
    C.Selvaraj
    SAP-QM

    Create a program and add this code to find user exit
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
    tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
      select single * from tadir where pgmid = 'R3TR'
      and object = 'PROG'
      and obj_name = tstc-pgmna.
      move : tadir-devclass to v_devclass.
      if sy-subrc ne 0.
        select single * from trdir where name = tstc-pgmna.
        if trdir-subc eq 'F'.
          select single * from tfdir where pname = tstc-pgmna.
          select single * from enlfdir where funcname =
          tfdir-funcname.
          select single * from tadir where pgmid = 'R3TR'
          and object = 'FUGR'
          and obj_name eq enlfdir-area.
          move : tadir-devclass to v_devclass.
        endif.
      endif.
      select * from tadir into table jtab
      where pgmid = 'R3TR'
      and object = 'SMOD'
      and devclass = v_devclass.
      select single * from tstct where sprsl eq sy-langu and
      tcode eq p_tcode.
      format color col_positive intensified off.
      write:/(19) 'Transaction Code - ',                        "#EC NOTEXT
      20(20) p_tcode,
      45(50) tstct-ttext.
      skip.
      if not jtab[] is initial.
        write:/(95) sy-uline.
        format color col_heading intensified on.
        write:/1 sy-vline,
        2 'Exit Name',                                          "#EC NOTEXT
        21 sy-vline ,
        22 'Description',                                       "#EC NOTEXT
        95 sy-vline.
        write:/(95) sy-uline.
        loop at jtab.
          select single * from modsapt
          where sprsl = sy-langu and
          name = jtab-obj_name.
          format color col_normal intensified off.
          write:/1 sy-vline,
          2 jtab-obj_name hotspot on,
          21 sy-vline ,
          22 modsapt-modtext,
          95 sy-vline.
        endloop.
        write:/(95) sy-uline.
        describe table jtab.
        skip.
        format color col_total intensified on.
        write:/ 'No of Exits:' , sy-tfill.                      "#EC NOTEXT
      else.
        format color col_negative intensified on.
        write:/(95) 'No User Exit exists'.                      "#EC NOTEXT
      endif.
    else.
      format color col_negative intensified on.
      write:/(95) 'Transaction Code Does Not Exist'.            "#EC NOTEXT
    endif.
    at line-selection.
      get cursor field field1.
      check field1(4) eq 'JTAB'.
      set parameter id 'MON' field sy-lisel+1(10).
      call transaction 'SMOD' and skip first screen.
    Rewards if useful........................
    Minal

  • In which package we ll find length field

    in which package we ll find length field

    length field for what????
    int arr[] = new int[10];
    System.out.println(arr.length);???

  • Clear historical cache for particular field

    Hi all,
    I am working on a module pool program. There is one field to display the exployee number, let's say the field length is 8 char.
    Everytime accessing into the screen, the employee number field should clear (clear from history) for the next new employee to enter the employee number.
    The problem I am facing now is, the next employee can easily press on the SPACEBAR to select the employee number from the history (which is not agreed by my boss).
    I also understand that there is a fastest way to handle this by increasing the field length to longer, let's say 60 char. Then it will not display out in list for them to select from history even they press on SPACEBAR.
    In ABAP programming, how do I remove it from history for this particular field? Other fields are required to store in history for easier data entry.
    Thanks in advance.

    Hi,
    For each user related information is stored in the local folder. You can get the latest cache file for that user from there. Below is the path to obtain the same.
    C:\Documents and Settings\andy\SapWorkDir\SAP_Cache_andy
    Here you will find a lot of files. They will contain the latest cache information.
    Cache1 and Cache2. You need to manipulate these files to achieve the requirement.
    Thanks,
    Samantak.

  • How to find Info objects for particular filed??

    Hi
    I hav doubt Can anyone tel me???
    My Query s <b>How to find Info objects for particular filed??</b>
    For example i hav some table fileds, how to find Info objects for that fields??
    Pls explain me detaily
    Points wil be given for all answers.
    Thanks
    Senthil

    Hi Senthil ,
    You have your field description along with your Field right.
    For example:MATNR - Material Number
    Now take this description and go to your BW side Tcode:RSA1
    1)Search in Modelling >> Infoobjects >> Material Number
    Then you get few hits (matches)  which have description matched.
    For Example: 0material  - Material Number
    Check for the Length and type match.
    You will understand once you get those hits as to which is related to yours.
    2)Go to BI content and search in the infoobjects this has all active and inactive objects but this takes a little time (not much  though).
    3) You have meta data search / simple search also where you can search for the objects with field description as matching criteria.
    Hope your doubt is cleared atleast to some extent.
    Assign Points if helpful.
    Thanks,
    Priyanka

  • Get the value of a particular field in a segment of an Idoc

    Hi All,
    I have a requirement where I need to write a report which will fetch the value of a particular field in a segment of an idoc.
    I have the idoc number segment and field name as input parameters by which I can fetch Sdata from EDID4 but the confusion is how to find the exact field value from that Sdata. How to Map the SDATA to the segment structure.
    Please advice...

    Hi,
    I have one last doubt that may be you people can help with... The user will be giving the segment name and field name as input. So by following Kesav's code while i can get all the values in the segment structure at runtime please suggest how to display any one field from that structure given that that particular field will come at runtime.
    EX: user gives an idoc number 123 (say belonging to Orders basic type)
                                 segment E1EDK01
                                 field  BELNR.
    So i need to display the value of E1EDK01-BELNR of idoc number 123.
    Please suggest how to achieve this....

  • How to find out the structure stored field  value in a standard program

    Hi Gurus,
    Please suggest me how to find out the structure field stores the value in which table.
    Exanple : i have a strutured field in T.code cj31 is BPDY-WERT1 and it is stotring value 10,000,000.00. know i need to find out in which table this value is storing .
    Please suggest me its urgent.
    Thanks in Adavance!!!
    Points will be rewarded.......
    Regards,
    Kranthi

    hi,
       Go to transaction ST05,Click activate trace with filter,Give the transactio name as cj31,Go to the transaction and navigate to the place where the particular field is present, then again go to st05 ,Deactivate the trace and display the trace.
    Now u can see how the data is fetched ,U can even go to display mode of the same transaction cj33
    Thanks
    San

  • How to attach search help in a particular field in se80 screen

    Hi All,
    Can any one tell me how to attach a search help in a particular field in a screen.
    Wat search help is used to display material no and description
    Thanks in Advance
    Regards,
    Priya

    Hi Priya,
    In the Screen Layout, Double click on the field on which you wish to attach the search help.
    In the properties window you can specify the search help for that field.
    Search help for Material No. is MAT1.
    You can find it in the Table structure (SE11) , "Entry help/check" tab.
    Regards,
    Himanshu

  • Which all table contains a particular field

    Hi
    Can any one give me the query for finding which all tables in the database contains a particular field.
    Like I want to find out all the tables which has fields with field name like '%LOC%'
    Thank You
    .S

    select table_name from dba_tab_columns where column_name like '%LOC%'

  • How to find Length of String

    Hi
    how to find length of a string.. i have a requirement that user cannot add more than 9 digits in a string.. i am new to WD Abap..
    Regards,
    Puneet

    Hi,
    You can use STRLEN command for your requirement.
    First read your input field using code wizard.
    Then using STRLEN command you can find the length of the Input field.
    For Example :
    Here input is your input field.
    data :    length type i.
    length = strlen(input).
    If length < 9.
    raise error msg.
    endif.
    Edited by: Viji on Mar 26, 2008 11:30 AM

  • How to find a view containing specified fields

    Hello Guys,
    I have got some fields of R/3 table based upon which i have to find View which has all the fields.
    I know that we have to go to help.sap.com and search there, but where to go after that i am not sure.
    Since i am new to BW , please guide me.
    Regards,
    Dolly

    >
    adlins wrote:
    > Hi Dolly,
    >
    > Go to R3 system, and click on 'where-used' list for those particular fields,
    > in that you will get list of objects which are using this field,
    >
    > please ask if u need more help.
    >
    > --adlin
    I am sorry my question is i know field names from R3 for example bukrs etc. which i want to have in my report.
    But i do not know in which view they all are present. I want the to know the perticular view'name  to create my report.
    from help.sap.com where to search for same?

  • How can we disable a particular field in BI,BCS Report in Portal

    Hi Friends,
    I have one doubt in Portal.
    How can we disable a particular field in BI,BCS Report in Portal depending up on user.
    For Exam: In Our Application can we divided in to 3 Categories. Managerial, Regional and Supervisor.
    Manager having all authorizations. So here I donu2019t have any problem.
    When Regional Manager logs in portal Depending up on that Regional Plant number will be in Disable mode.
    EX: India Regional Manager logs in portal Plant number Files == IND123 Like in BI Report
           UK Regional Manager logs in portal Plant number Files == UK154   Like in BI Report
    When Supervisor logs in portal Depending up on that Regional Plant number will be in Disable mode and also Company Code also in disable mode
    EX: India Supervisor logs in portal Plant number Files == IND123 Like in BI Report and also Company code input file is ABC is in Disable mode
        In India Another Supervisor logs in portal
    India Supervisor logs in portal Plant number Files == IND123 Like in BI Report and also Company code input file is ASD is in Disable mode
           UK Supervisor logs in portal Plant number Files == UK154   Like in BI Report and also Company code input file is XYZ is in Disable mode
    This is my Req; How can we do there. Could you help me.
    Give me these Ans:
    1. Is it Feasible in portal.
    2. Depending upon user we can disable particular filed in Portal.
    3. Can we find out who is login in Portal. by Using BI System. in WDJ We can Find out Like IUSER Code Same as BI Developer also Find it. Is it Possible or not.
    Regards
    Vijay Kalluri

    no

  • Need help to find technical char for an field

    Hi Guys,
                I have to do some abap work for that i got some table in BW now how to find the technical characteristic for the fields of that table i want to know the field length what does that field stand for like what type of data it stores.. there in no data for that table at present
    points wil be rewarded for answers
    ravi

    Hi,
    For that u have to ask your basis peoples. Whether u r  a consultant or enduser?
    If u r enduser means any company people won't provide that authorization.
    Thanks,
    Sankar M

  • How to find the Ranges for a field ?

    Hello All,
               Can anyone tell me how to find the ranges for a field.
    <b>1</b>, i.e say I want the Ranges Structure for the field LIFNR.
        The ranges structure for this is "<b>RANGE_LIFNR</b>".
        This I used in my Program since I know it previously.
        But now I want the ranges structure for the field <b>VBELN (Delivery Document).</b>
        I  don't know what is it !!!!!
    <b>2</b>, Is there any procedure to know the ranges structure for a particular field ?
    Regards,
    Deepu.K

    Hi Deepu,
    Using 'Where used list' you can able to find out RANGES tables.
    For VEBLN range table is --> CRM_AC_ASSIGN_VBELN
    If you using a program defined as shown below.
    DATA: r_vbeln type ranges of vbeln.
    The above statement also creates ranges structure in Runtime.
    Procedure finding range table structures
    go to SE37 -> Enter domain or dataelement value
    Go to where used list --> search for 'Structures'
    After getting all structure  --> Click 'SEARCH' butoon in tool bar --> Search for 'RANGES' word
    You can get all ranges tables in the search window
    If helps plz reward points.
    Regards
    Bhupal Reddy

Maybe you are looking for