Length of the field in debugging

Hi,
I have declared the "rate" field like this in a program.
the field "konp-kbetr" is of "CURRENCY" field type and the length is: 11,2.
data: begin of itab occurs 0,
              rate like konp-kbetr,
      end of itab.
select kbetr from konp into itab-rate.
but while dubugging the contents for the "rate" field in itab shows like this:
no    component name    type    length    contents
1.    rate               P         6         0.00
What could be the probelm for that?
please let me know.
thnx.

VIJAY,
there are 3 itabs in my prog like this.
1st itab:
data: begin of itab occurs 0,
        rate  like konp-kbetr,
      end of itab.
2nd itab:
data: begin of itab2 occurs 0,
        knumh like a505-knumh,
      end of itab2.
3rd itab:
data: begin of itab3,
        awp like konp-kbetr,
     end of itab3.
the code is like this:
      select kbetr from konp into itab-rate
             where knumh = itab2-knumh.
        append itab.
      endselect.
    loop at itab.
      write itab-rate to itab3-awp.
    endloop.
when i debug the code, the "rate" field is showing the correct value for the 2nd itab.
but the problem is with the 3rd itab only. it is basically a structure. and in that i want the value eventually.
thnx,

Similar Messages

  • How can I search the attribute including type and length of the field in the SD table or form such as sales executive table through debug?

    Some users show that  the sales docment external name is not printed completely in the form of delivery form printing, so I want to find how much length of the field is there through debugging. I am very expected to gain some suggestion from you.

    for exploding the bom if you know header material use
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          CAPID                 = 'PP01'
          DATUV                 = SY-DATUM
          MEHRS                 = 'X'
          MTNRV                 = P_MATNR
          WERKS                 = P_WERKS
        TABLES
          STB                   = I_BOM
        EXCEPTIONS
          ALT_NOT_FOUND         = 1
          CALL_INVALID          = 2
          MATERIAL_NOT_FOUND    = 3
          MISSING_AUTHORIZATION = 4
          NO_BOM_FOUND          = 5
          NO_PLANT_DATA         = 6
          NO_SUITABLE_BOM_FOUND = 7
          CONVERSION_ERROR      = 8
          OTHERS                = 9.
    now check PLPO & PLKO table for routing or AFVC and AFVV for routing.
    if production order created you have to check in afvc and afvv else check in plpo and plko.
    for checking with plpo and plko you have to check MAPL table.
    for bom and material link
    MAST,STPO,STKO.
    stlnr is the common field
    regards
    shiba dutta

  • Output data to txt file with full length of the field as in database

    Hi
    I have a problem related to output data I ntxt file on server
    for eg
    CONCATENATE
    wa_sagadr_outtab-seqno
    wa_sagadr_outtab-bpext
    wa_sagadr_outtab-name_org1
    wa_sagadr_outtab-country INTO wa_sagadr_text SEPARATED BY ''.
    the output is separated by single space irrespective of database length of the field , I want to display all the lenth of the database field eventhough the remaining space is blank ie if a field is 20 char in dtabase and only filled with 6 char the whole 20 char lenth should be displayed in the output file
    ouput as below
    required format ie space equvalent to as in database lenght
    000001       700006               C4 Plant AMD Export Sdn.Bhd.so on.
    my format as coming single space in between only
    000001 700006 C4 Plant AMD Export Sdn.Bhd
    pls suggest

    For this maintain an work area with the fields and structure same as the one which you want.
    ten populate the work are and write to file.
    concatenate will not work.
    e.g.
    DATA: begin of wa_sagadr_text,
              seqno like wa_sagadr_outtab-seqno,
              bpext like wa_sagadr_outtab-bpext,
              name_org1 like wa_sagadr_outtab-name_org1,
              country like wa_sagadr_outtab-country
              end of wa_sagadr_text,
    clear wa_sagadr_text.
    wa_sagadr_text-seqno = wa_sagadr_outtab-seqno.
    wa_sagadr_text-bpext= wa_sagadr_outtab-bpext.
    wa_sagadr_text-name_org1 = wa_sagadr_outtab-name_org1.
    wa_sagadr_text-country = wa_sagadr_outtab-country INTO wa_sagadr_text.
    transfer wa_sagadr_text to outputfile
    or write:/ your fields.

  • FB03 - Increase length of the field "Account Short Text" in FB03

    Dear Expert!
    I understand that Tcode: FB03 is SAP standard tcode. However, i just want to ask, is it possible to increase length of the field "Account Short Text" to 42 characters in FB03? Because my vendor/customer name is quite long, and when i view via FB03, the field "Account Short Text" only displays 20 characters, not full vendor/customer name. Unless, i double click on the line item, then i can see full vendor/customer name. But i want the "Account Short Text" field can display full vendor/customer name.
    Is that possible?
    Thank you very much.
    LeLinh

    Hi,
    there's a matadata table behind it RFPSD and for Account short text field KTEXT is used, which in fact has a length of 35 chars.
    But on the other hand there's also a filed KTEXT_GL (G/L Account Short text) which is maybe applied here. It has a length of 20.
    You can do some more checks on program to clear it finally
    Regards

  • 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

  • Increasing of the length of the field of short text

    hai gurus
    i want to increase the length of the field while creating the purchase order is there any facility for  that plese give me the details

    Hi Rao,
    If you want to give some description in the short text you can use Purchase order text for giving complete details about your requirement to the vendor.
    Regards,
    Vijay

  • For abap-hr i need datatype and length for the fields which i selected

    hi seniors,
          I got one task for which i have to get the data type and length for the fields of a table in abap-hr. I am using dd03l table, but my team leader told me to not to use this. So, please anybody can help, i will be thankfull.
          I have to select PA30 fields in which pernr and choic, subty and whatever i have selected the infotypes fields. If there is any function module to find data type and length or else any other table.
    thanks,
    sekhar.

    Hi,
    Try using the Function Module "DDIF_FIELDINFO_GET". You can use this for fetching the complete details of a structure or, a specific field.
    Input:->
    TABNAME        PA0001
    FIELDNAME     PERNR
    Output:->
    Check the DFIES_TAB  it will contain all the details you need for the specific field.
    Sample--->
    CALL FUNCTION 'DDIF_FIELDINFO_GET'
      EXPORTING
        TABNAME              = 'PA0001'
    *   FIELDNAME            = ' '
    *   LANGU                = SY-LANGU
    *   LFIELDNAME           = ' '
    *   ALL_TYPES            = ' '
    *   GROUP_NAMES          = ' '
    *   UCLEN                =
    *   DO_NOT_WRITE         = ' '
    * IMPORTING
    *   X030L_WA             =
    *   DDOBJTYPE            =
    *   DFIES_WA             =
    *   LINES_DESCR          =
    TABLES
       DFIES_TAB            = MY_DFIES_TAB
    *   FIXED_VALUES         =
    * EXCEPTIONS
    *   NOT_FOUND            = 1
    *   INTERNAL_ERROR       = 2
    *   OTHERS               = 3.
    Hope this was of some help.
    Best regards,
    Sagar.

  • Check the Data length for the fields in the mapping

    Hi,
    I need to check for the data length of the below fields in mapping. And if any of the field lengh does not match with the given length then I discard the data and trigger a mail
    X1_LENGTH = 9
    EMail_LENGTH = 100
    PrjDesc_LENGTH = 50
    Regards,
    Varun

    Hi,
    You can use following approach:
    - Create UDF for length analysis and raise exception if length is not accurate Use lenght() method of string.
    CheckLength(Field, Length)
       If Field.lenght() >= Length then raise mapping exception
    Use Alert to capture this and send mail.
    - Use Enum while defining datatype to reject data at source (in adapter engine). Again use Alerts to send mail.
    Regards,
    Gourav

  • Fixed length for the fields of  ALV output

    Hi,
          How to fix a field in the ALV output to its max length..For example..if a field's max length is 10...that coloumn should not be dragged or moved to right..Its lenght shluld be fixed to 10...Could any bod suggest me how to perform this...thanks..
    Shyam.

    Hi,
    U can better optimize the width.it will be good.
    data : W_LAYOUT TYPE SLIS_LAYOUT_ALV.
    W_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM     = SY-REPID
          I_STRUCTURE_NAME       = 'T_ALV'
          IS_LAYOUT              = W_LAYOUT
          IT_FIELDCAT            = T_FIELDCAT_ALV
          I_CALLBACK_TOP_OF_PAGE = 'ALV_TOP_OF_PAGE'
        TABLES
          T_OUTTAB               = T_ALV
        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.

  • How to get the length of a field value, not the length of DB's CHAR(20)

    Hello.
    I'm trying to handle a String from my DataBase and get its length:
    String myName;
    int i;
    PreparedStatement sql = Conn.prepareStatement("SELECT NAME FROM MY_TABLE");
    ResultSet results = sql.executeQuery();
    results.next();
    myName = results.getString("NAME");
    i = myName.length();
    out.println("The value is " + myName + " and the length is " + String.valueOf(i) );
    I get:
    " The value is Tom and the lengh is 20 "
    20 is the length of the field (it's a CHAR (20) ), but I would like to get the length
    of 'Tom'.
    On other hand, I would like to detect if this value is 'Tom' or not, but trying with:
    if (myName.equals("Tom")) {...}
    or
    if (myName == "Tom") {...}
    There is no response.
    Any experience?

    myName = results.getString("NAME");
    if(myName!=null) myName = myName.trim(); //Take out trailing spaces
    i = myName.length();Sudha

  • How to fix the output length of a field

    Hi!
    I want to 'allocate' the full length of the field while smartform printing even if it is initial.
    How can I do this? I tried the &field(*)& &field(F<' '>)& output format, but nothing.
    Thanks

    Hi!
    I have only one text element, and in that I have two variables separated only with one space. In the printed form the starting place of the second variable depends on the length of value in the first variable.
    like this:
    The first variable has the dictionay type 'VBELN', despite this fact, the &FIELD(*)& does not work.
    The template doesn't work here too. because I have only one text element.
    Or can I print two text element in one row? It could be a solution probably.

  • How to skip a selection screen mandatory field in debugging mode with out changing the code?

    Hi Team,
    In my report there is two fields on selection screen, one is obligatory field , but i just want to execute the report(for testing per pus) with out entering  the data for the mandatory field with out changing the code. could u let me know which event and how to debug the report. or else  in debugging mode how can i change that field as non mandatory field.
    Regards,
    Venkat.

    If the value is not of importance how come it became obligatory in your program?
    Any how you can do one thing...Put some value in your obligatory field, put a debugger point where you are interested in  and use the pencil tool to change the value of the field while debugging. 
    Regards,
    Philip.

  • Change the maximum length of a field in oracle apps forms.

    Hello all. The form which is used is POXPOEPO(purchase order) and the corresponding field is Supplier note(NOTE_TO_VENDOR).
    The note_to_vendor field is stored in the table po_headers_all .The length of the field which actually is *480bytes* but if we have to enter more than 480char, what we have to do.
    I used the custom.pll and tried to change the property of MAXIMUM_LENGTH using app_item_property2.set_property('PO_HEADERS.NOTE_TO_VENDOR',MAX_LENGTH,500). But there is no such property it seem. Is there a solution to enter more than 480 bytes in the field Supplier note(NOTE_TO_VENDOR).
    Thank in advance.

    Changing the lenght of the note_to_vendor field in the database or form is not advisable.
    You should create a short text attachment at the header or line level.
    Oracle seeded PO printing programs print this attachment on the PO /FAX.
    This attachment can be much longer.
    Hope this helps,
    Sandeep Gandhi

  • How to check the length of a field symbol value

    hi all,
    i have a problem with string function, i have assined  table fields to  a field symbol in a loop i want check the length of the assigned fields symbol value  in every loop . i have written like ,,,,,len = strlen( <fs>). then i am getting the length of the field label what i ahve assigned to fiels symbol not the field value lenght ,
    please advise me on this,
    thanks,
    sre

    I think you're on the right track.  This should work:
    data: len type i.
    data: begin of itab OCCURS 1,
            a type string value '1',
            b type string value '12',
            c type string value '123',
          end of itab.
    FIELD-SYMBOLS: <fs> type ANY.
    do 3 times.
      assign component sy-index of STRUCTURE itab to <fs>.
      len = strlen( <fs> ).
    enddo.

  • Length of a field in a structure

    Hi,
    Is there any restriction on the length of the field in a structure which is CHAR type ??
    Thanks.

    Sample
    report zrich_0001
           line-size 1023.
    data: begin of s,
          a(65510) type c,
          b(25) type c,
          end of s.
          s-a = 'This is field 1 asdfkljas;dfkja;sldkjf;aslkdjf;alskdjfa' &
                'asdfkajsd;kfjas;dlkfj;aslkdjf;alksjdf;lkasjdf;lasdfasdf' &
                'asdfkljas;dlkfj;askdjf;askjdf;lkasdjf;lkasj  thd end'.
          s-b = 'This is field 2'.
          Write:/ s-a.
          write:/ s-b.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Use of External cash desk using PI

    Hi, The client of my project has a new requirement regarding the posting of payment from third party. Currently , its running maintaining standard process. Bill fetch is done by third party through PI WS. Then payment which is stored in a ISU staging

  • Problem to see content after Upgrading

    i have  apple tv 2G after upgrading to latest version Several times with directly to computer with i Tunes Version 5.0 (4099) i can't see all the content no iTunes movies and TV shows i see only the home sharing and setting please help thank you

  • Error during DG data distribution

    Hi SAP DG Experts, I am configuring and testing DG data distribution from central EHS system to multiple ERP systems. I am able to send the DG idoc and ERP system is receiving that. But the DG data creation is failing and when I check DGp7 I can get

  • Adding fields to Travel Services in Travel Request

    Hi guys, In our system, Travel Planning is disabled, because we don't want online booking. Travel services button is active in Travel Request, because we do want some basic information for each service. I would like to know what's the best approach t

  • Reading/writing XML files

    hi i want to makeXML based config files for my system,i didn`t example to write/read XML files(parsing). please provide some example ,Also,is there some alternative for readind data? Thanks