Unicode error in statement Describe Field

Hi,
There is a statement in my program which is giving Unicode error.
DESCRIBE FIELD t_mara-mfrpn LENGTH len.
Here t_mara is internal table with header line. Unicode error which I am getting is 'In Unicode, Describe Length can only be used in Byte mode or IN....'.
Kindly let me know how to remove this unicode error without affecting the functionality.
Regards,
Rajneesh

syntax check always finds the error when the addition BYTE or CHARACTER MODE is missing in the statement DESCRIBE.
And it will not cause any impact in functionality of your program

Similar Messages

  • An error message using DESCRIBE FIELD

    DESCRIBE FIELD MAKT-MATNR LENGTH MNR_LNG .      
    that line off code gives me an error message:
    In Unicode, DESCRIBE LENGTH can only be used with the IN BYTE MODE or IN CHARACTER MODE addition.
    can anyone else provide me an explanation and solution..thanks

    Hello,
    You want to have the length of the field MAKT-MATNR. Then you can use the function STRLEN.
    DATA:
    MNR_LNG TYPE I.
    MNR_LNG = STRLEN(MAKT-MATNR).
    Else as suggested you have to use the addition IN CHARACTER MODE with DESCRIBE FIELD.
    Depends on your requirement.
    Hope this helps !!
    BR,
    Suhas

  • Problem with DESCRIBE field-symbol statement?

    Hi
    I havw written following querry but it's showing error. My doubt is there any resctriction field symbols in DESCRIBE query.
    i wrote
    describe field <a> type typ  length in character mode.
    Is that syntax correct?

    When you use the Describe statement with the field symbols, it will do the describe on the field which was assigned to it.
    Like:
    FIELD-SYMBOLS: <fs> TYPE ANY.
    DATA: l_char TYPE char10.
    l_char = 'TEST'.
    ASSIGN l_char TO <fs>.
    DATA: l_len TYPE i.
    DESCRIBE FIELD <fs> LENGTH l_len IN CHARACTER MODE.
    write: / '<fs>:', <fs>.
    WRITE: / 'Length', l_len.
    Here descirbe gives the property of the L_CHAR because it was assigned to field symbol <FS>.
    Regards,
    Naimesh Patel

  • How to assign a character field to a strucure in ECC6.0 ( Unicode error)

    Hi all,
    This is regarding a Unicode error we are facing in upgrading a program from 4.6c to ECC6.0.
    The following pice of code gives error now in ECC6.0, stating Unicode incompatible structures.
            DATA: WA_MSEG TYPE MSEG,
                       WA_MKPF TYPE MKPF.
            DATA: LE_DATA(8192) TYPE C.
            CALL FUNCTION 'ARCHIVE_GET_NEXT_RECORD'
              EXPORTING
                ARCHIVE_HANDLE                = LE_HANDLE
              GET_REAL_STRUCTURE_NAME       = 'X'
              AUTOMATIC_CONVERSION          = 'X'
              IMPORTING
                RECORD                        = LE_DATA
              RECORD_CURSOR                 =
              RECORD_FLAGS                  =
                RECORD_STRUCTURE              = LE_STRUCTURE
              RECORD_LENGTH                 =
              EXCEPTIONS
                END_OF_OBJECT                 = 1
                INTERNAL_ERROR                = 2
                WRONG_ACCESS_TO_ARCHIVE       = 3
                OTHERS                        = 4
            IF SY-SUBRC <> 0.
              EXIT.
            ENDIF.
    move records
            CASE LE_STRUCTURE.
              WHEN 'MSEG'.
               <b> WA_MSEG = LE_DATA.</b>
                move-corresponding WA_MSEG to TBL_ARC_MSEG.
                APPEND TBL_ARC_MSEG.
                CLEAR: WA_MSEG, LE_DATA, TBL_ARC_MSEG.
              WHEN 'MKPF'.
              <b>  WA_MKPF = LE_DATA.</b>
                move-corresponding WA_MKPF to TBL_ARC_MKPF.
                APPEND TBL_ARC_MKPF.
                CLEAR: WA_MKPF, LE_DATA, TBL_ARC_MKPF.
            ENDCASE.
    Can you please suggest a way to overcome this error.
    Thanks in advance,
    Sreenivasa Reddy V.

    IV_OFFSET is the position from the C field will be started to be read (should be 0) and EV_OFFSET is the length to which the data is going to be fetched.  The Following code could be useful ---
    w_len = STRLEN( p_data ).
    CALL FUNCTION 'OIF_CONVERT_CHAR_TO_STRUCTURE'
      EXPORTING
        iv_string         = p_data
        iv_structure_name = 'VBAK'
    *    iv_offset         = w_len
      IMPORTING
        ev_structure      = wa_vbak
        ev_offset         = w_len
      EXCEPTIONS
        ddif_nametab_get  = 1
        OTHERS            = 2.
    Hope That Helps
    Anirban M.

  • Unicode error free MODIFY statement

    HI All,
    I have midify statement in a loop like this.
    loop at itab into wa_itab.
    modify itab from wa_itab index tabx.
    endloop.
      I am working in ECC 6.0. It is showing unicode error at modify statement. Please suggest me the correct statemnt.ANy extension for modify statemnt..?
    Thanks,
    kishore

      LOOP AT IT_VBRK.
    <b>    CTAB = SY-TABIX.</b>
        LOOP AT IT_T001 WHERE BUKRS = IT_VBRK-BUKRS.
          IF SY-SUBRC  = 0.
            IT_VBRK-BUTXT = IT_T001-BUTXT.
    <b>        MODIFY IT_VBRK INDEX CTAB.</b>
            CLEAR CTAB.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
    The problem may be with SY-TABIX, check the above code

  • DESCRIBE FIELD statement difference between structure & Itab

    Hai ,
    I am trying to read  field attributes using DESCRIBE FIELD satement & I am getting the field type
    in SYDES_DESC-types.
    When I am trying to read the attributes of a structure like the one below,
    data : begin of STRUCT ,
               field1 type c,
               field2 type c,
            end of STRUCT.
    and the table like below,
    data : begin of TAB1 occurs 10,
               field1 type c,
               field2 type c,
             end of TAB1.
    that is ,
    describe field STRUCT in w_sydes_desc.
    describe field TAB1 in w_sydes_desc.
    ( w_sydes_desc is of type sydes_desc).
    my question is,
    for the above 2 stements the table W_SYDES_DESC-TYPES contains same values
    though one is plain structure & another one is internal table with header line.
    can any one tell how can we distinguish between the above fields?
    or is ther any other approach to find wheter a variable is a struct or table?
    Regards,
    Bhaskar M

    Hello,
    describe field STRUCT in w_sydes_desc.
    describe field TAB1 in w_sydes_desc.
    When you use an int. table with HEADER LINE, then TAB1 represents the HEADER LINE & not the entire table body. To access the whole table you have to use TAB1[].
    So you are getting the same results.
    Try this coding:
    TYPE-POOLS: sydes.
    DATA : BEGIN OF struct ,
    field1 TYPE c,
    field2 TYPE c,
    END OF struct.
    DATA:
    w_sydes_desc  TYPE sydes_desc,
    w_sydes_desc1 TYPE sydes_desc.
    DATA :
    BEGIN OF tab1 OCCURS 10,
    field1 TYPE c,
    field2 TYPE c,
    END OF tab1.
    DESCRIBE FIELD struct INTO w_sydes_desc.
    DESCRIBE FIELD tab1[] INTO w_sydes_desc1.
    IF sy-subrc = 0.
    WRITE: 'Hurray !!!'.
    ENDIF.
    BR,
    Suhas

  • DESCRIBE FIELD t001 LENGTH anz_fe in   which mode ??

    Hi all,
    I am in Unicode Project. For the statement mentioned below, i have to use IN Character mode or IN BYTE mode ??
    DESCRIBE FIELD t001 LENGTH anz_fe
    Thanks in Advance.
    Sriram

    data: l_type type c,
    l_number type i.
    describe field t001 type L_TYPE components L_NUMBER.
    Message was edited by:
            Muthurajan Ramkumar

  • UNICODE Error in ECC 6.0

    Hi Guys,
    I am working on upgrade project 4.5B to ECC 6.0, in 4.5B internal table refers the Ztable, but in ECC 6.0 it giving error.
    4.5B statement: GT_PLAN_SIO  TYPE STANDARD TABLE OF   ZSTR_PLAN_SIO WITH HEADER LINE.
    The above statement error in the ECC 6.0, Could you please correct the statement.
    Thanks
    Gourisankar.

    Hello Gourisankar
    First of all I would get rid of the "... WITH HEADER LINE". However, this is probably not the reason for the Unicode-error.
    Since you did not mention the most important detail to answer your question, namely the exact Unicode error, I can only give some tips and hits:
    - try to change the type of the table
    - try to add key options
    Examples:
    DATA: GT_PLAN_SIO TYPE STANDARD TABLE OF ZSTR_PLAN_SIO. " WITH HEADER LINE.
    DATA: GT_PLAN_SIO TYPE                    TABLE OF ZSTR_PLAN_SIO.
    DATA: GT_PLAN_SIO TYPE                    TABLE OF ZSTR_PLAN_SIO
                                                                  WITH DEFAULT KEY.
    Regards
      Uwe

  • How to avoid Unicode errors in SAP custom code queries.

    Currently we are going for a non Unicode technical upgrade from 4.6C to ECC 6.0.
    We have many query infosets with custom ABAP code. Unable to execute these queries (infosets) as ECC 6.0 system is throwing short dump and query infoset editor throwing Unicode syntax errors . Anyway to avoid these Unicode errors by changing query or infoset system setting.
    We will proceed with infosets ABAP code Unicode remediation if the above is not feasible.
    Thanks in advance.

    If the infosets are with custome abap code let the UCCHECK be happen on these programs in ecc6 ..
    In tcode UCCHECK the code which needs to be replaced for the custom programs  will be provided for the abap developers . All programs in ecc6 should be ucc compliant . I hope this will happen with the abap upgrade by enabling ecc6 .
    they will enable ecc check and do the code modification for moving out the obselete statements in ecc6 which were ok for 4.6c then .
    Dont worry about the dumps as this will not take much time on a single program once the UCC is over ..
    Br,
    vijay.

  • FF_5 - Import Bank Statements, Balancing field "Profit Center"

    Hi
    When importing the bank statement I get the error Error: (GLT2 201) Balancing field "Profit Center " in line item 001 not filled when using the NEW GL only.
    I know why I'm getting the error, the document is trying to determine a Profit Center, I do want it to determine for the balance sheet also. Also due to making it mandatory in document splitting rules I get this error.
    Now my problem is HOW DO I ASSIGN A PROFIT CENTER?? In the past in the classic GL I would use 3KEH and that would do the trick. It does not work now.
    How do we assign a profit center for bank import postings???
    Thanks in advance

    Hi
    Thanks, that solved it.
    Can you please tell me the one for the cost center?? It is also giving an error it can not determine cost center but I have entered it in OKB9.
    Then can you tell me the path for the profit center.
    Thank you for your assistance.

  • Need solution for unicode error

    Hi ,
    I am facing unicode error  "ESCAPE_TRICK cannot be converted to a character-type field"  for
    the following syntax -
    ESCAPE_TRICK-X1           = '1C'.
    Where ESCAPE_TRICK is defined as -
    DATA: BEGIN OF ESCAPE_TRICK,
    X1(1) TYPE X,
    END  OF  ESCAPE_TRICK.
    Please suggest me the solution.
    Thanks,
    Narayan

    Hi,
    As type X is obsolete.
    you need to convert it to type c. But you should convert the hexadecimal value '1C' to its equivalent Char value. Replace your code with:
    DATA: BEGIN OF ESCAPE_TRICK,
    X1 TYPE STRING,
    END OF ESCAPE_TRICK.
    To convert Hex '1C' to type string
      CALL FUNCTION 'CACS_CONVERT_HEX_TO_STRING'
      EXPORTING
        XSTRING       = '1C'
      IMPORTING
       CSTRING       = ESCAPE_TRICK-X1.
    It should solve your purpose.
    Alternatively, '1C' is "FILE SEPERATOR'. you can find its value in char and can use it.
    howver, the first ,method should work..
    revert back in case of further issue.
    Thanks and Regards
    Rishika
    Edited by: Rishika Bawa on May 14, 2009 2:06 PM

  • Unicode error:a line of internal table and a data object are not mutually c

    Hi Friends,
        This is the issue in upgradation from 4.6c to ECC6.0
        I have an internal table itab which has include structure say 'xyz' . In xyz there is a field of type int4 as third field. I have a field as l_line which is a string.
    data : begin of itab occurs 0.
             include structure zxyz.
    data: end of itab.
    data: l_line type string.
    In the program I am getting the unicode error as:
    " A line of "itab" and "l_line" are not mutually convertible in unicode program." at he following line.
    loop at itab into l_line.
    endloop.
    Thanks,
    Ali.

    Hi Narendran,
    I did the same earlier, but the field l_line is again used in the another line as follows
    IF l_line CS w_group.----
    (1)
    where     w_group         LIKE zstr-cctr_group.
    here zstr-cctr_group is same as one of the fields of structure xyz.
    in line 1 it is giving warning as
    l_line is incompatible and it must be C,N,D,T or string.
    Thanks,
    Ali

  • ECC 5.0 Unicode error

    Hi,
    During the upgrade from 4.6B to ECC 5.0, we are facing the following problem:
    In 4.6B, when we move the contents of one internal table to another ( itabA[] = itabB[] ), its happening properly, even though the structure of both the internal tables are not the same i:e itabB has more fields than itabA.
    But, this doesn't happen in the case of ECC 5.0. Its throwing some UNICODE error, saying that the structure isn't the same.
    If anyone has come across this problem, please revert with the solution.
    Thanks,
    Raj.

    hi,
    We are getting error because of unicode issues. We get this problem bcos of Alignment gaps.
    Hope the below explanation helps you..
    To check whether two structures can be converted at all, the Unicode fragment view of the structures is set up initially by combining character type groups, byte type groups, alignment gaps, and other components. If the type and length of the fragments of the source structure are identical in the length of the shorter structure, the structures can be converted. Assignment is allowed under the following conditions:
    The fragments of both structures up to the second-last fragment of the shorter structure are identical
    The last fragment of the shorter structure is a character or byte type group
    The corresponding fragment of the longer structure is a character or byte type group with a greater length
    If the target structure is longer than the source structure, the character type components of the remaining length are filled with blank characters. All other components of the remaining length are filled with the type-adequate initial value, and alignment gaps are filled with zero bytes. Since longer structures were previously filled with blanks by default, using initial values for non-character type component types is incompatible. This incompatible change is, however, rather an error correction. Character-type components are not filled with initial values, for the sake of compatibility.
    Example
    BEGIN OF struc1,                     BEGIN OF struc2,
      a(1) TYPE C,                         a(1) TYPE C,
      x(1) TYPE X,                         b(1) TYPE C,
    END OF struc1.                       END OF struc2.
    You cannot use the struc1 = struc2 assignment in Unicode, because struc1-x only occupies one byte, in contrast to struc2-b.
    BEGIN OF struc3,                     BEGIN OF struc4,
      a(2) TYPE C,                         a(8) TYPE C,
      n(6) TYPE N,                         i    TYPE I,
      i    TYPE I,                          f   TYPE F,
    END OF struc3.                       END OF struc4.
    The struc3 = struc4 assignment is valie because the fragment views of the character-type fields and the integer numbers match.
    BEGIN OF struc5,                     BEGIN OF struc6,
      a(1)  TYPE X,                        a(1) TYPE X,
      b(1)  TYPE X,                        BEGIN OF STRUC3,
      c(1)  TYPE C,                          b(1) TYPE X,
    END OF struc5.                           c(1) TYPE C,
                                           END OF struc3
                                         END OF struc6.
    However, struc5 = struc6 is not permitted - the fragment views of the two structure are different, because of the alignment gaps before struc3 and struc3-c.
    BEGIN OF struc7,                     BEGIN OF struc8,
      p(8)  TYPE P,                        p(8) TYPE P,
      c(1)  TYPE C,                        c(5) TYPE C,
    END OF struc7.                         o(8) TYPE P,
                                         END OF struc8.
    The struc7 = struc8 works because the fragment views in the length of the structure struc1 match.
    For deep structures, the operand types must be compatible as usual. We enhanced the concept by generalizing to some extent the convertibility of object references and table components.
    Regards,
    Sailaja.

  • Describe field

    Hello,
    I have to process flat file coming from external system. I need to check if  starting  from position 30, length 14 we can find
    14-teen characters long entry.
    I tried with describe statement but it gives always 14 in "ilen" field , even  when I have only two characters value in tmp_lt_quant+wf_index(14).Please see code below
    data ilen type i.
    wf_index(30)
    tmp_lt_quant+wf_index(14) = 84.
    describe field tmp_lt_quant+wf_index(14) length  ilen in character mode.
    -'ilen' shows 14 , I would expect 2 as 84 has only two characters. Please let me know how I can get number of the characters
    in variable.
    I am working in release 6.00
    Thank you

    Hi Krsto,
    Data : ilen type i,
    wf_index(30),
    lv_char(30) type c.
    tmp_lt_quant+wf_index(14) = 84.
    lv_char = tmp_lt_quant+wf_index(14).
    ilen = strlen(lv_char).
    Thanks,
    Best regards,
    Prashant

  • Error: (GLT2 201) Balancing field "Profit Center " in line item 001 not fi

    Hi All,
    While trying to upload a MT940 bank statement thru FF_5 am facing this error " Error: (GLT2 201) Balancing field "Profit Center " in line item 001 not filled".
    Can any one let me know how to overcome this error.
    Thanks and Regards
    SrihariBolla

    Hi
    Document Splitting is active in your Company Code.
    Hence while doing posting it is mandatory to give Profit Center.
    If you dont enter profit center during postings it will throw errors like this Balancing field "Profit Center " in line item 001 not filled.
    Go to Img -->FinancialAccounting(new) -->General Ledger Accounting(new) -->Business Transactions -->Document Splitting -->Define Document splitting characteristics in General Ledger Accounting
    Deselect the Mandatory Field CheckBox for Profit Center and save.
    Now you will be able to Upload.
    Regards
    Venkat

Maybe you are looking for

  • How do I get my iMessage to connect with my Apple I.D.?

    When I try to sign into my iMessage on my MacBook Pro, it won't connect and it says there is an error when I try to log in with my Apple I.D.

  • My iPhone 3GS is not showing in "devices" on my iTunes. Tried everything that Apple advize but still not working. Any suggestions please? :)

    Hello, hope someone can please help. I've had my iPhone 18 months, not had any problems with using it. Trying to update the software to 4.0 on iTunes but it's just not recognizing it at all. It's not there under devices (infact, even the heading "dev

  • Double click on ipad

    Hi, We are working on an ipad application, but it don't support double click event. We need to implement double click or long click in it. One suggestion is to have a mouse down event and mouse up event and calculated the time between but we are havi

  • Question for NABers or AE folks re: Motion 3's 3D

    Hi all, This question can probably be answered by those who saw Motion 3 at NAB or people who are familiar with other apps with 3D capability, but since I'm not one of them... Most of the examples in Apple's web videos (other than possibly particle e

  • Auto call drop

    Whenever call is taken on the handset and phone taken to the ear it drops after any small moment is done without touching anything on the screen and even opens up menu or nominations or quick setting. Like ear proximity bug, I checked in diagnosis bu