Skip to Content
author's profile photo Former Member
Former Member

Using ALV function with tables

Hello Everyone,

Can anyone pls explain with an example how to use ALV in unicode to write out a table. Since following statements is porducing error:

write:/T510N, 'T510N was changed'.

it gives uncompatible error. In non unicode system it works fine.

Thanks in advanced.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 15, 2007 at 04:50 PM

    Hi

    check this doc regarding Unicode

    The Link will be helpful to you.

    upgrade-46-to-ecc---what-are-the-responsibilites

    regarding Unicode influence in Standard programs

    Very good document:

    http://www.doag.org/pub/docs/sig/sap/2004-03/Buhlinger_Maxi_Version.pdf

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d37d1ad9-0b01-0010-ed9f-bc3222312dd8

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/589d18d9-0b01-0010-ac8a-8a22852061a2

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f8e316d9-0b01-0010-8e95-829a58c1511a

    You need to use the transaction UCCHECK.

    The report documentation is here

    ABAP Unicode Scan Tool UCCHECK

    You can use transaction UCCHECK to examine a Unicode program set for syntax errors without having to set the program attribute "Unicode checks active" for every individual program. From the list of Unicode syntax errors, you can go directly to the affected programs and remove the errors. It is also possible to automatically create transport requests and set the Unicode program attribute for a program set.

    Some application-specific checks, which draw your attention to program points that are not Unicode-compatible, are also integrated.

    Selection of Objects:

    The program objects can be selected according to object name, object type, author (TADIR), package, and original system. For the Unicode syntax check, only object types for which an independent syntax check can be carried out are appropriate. The following object types are possibilities:

    PROG Report

    CLAS Class

    FUGR Function groups

    FUGX Function group (with customer include, customer area)

    FUGS Function group (with customer include, SAP area)

    LDBA Logical Database

    CNTX Context

    TYPE Type pool

    INTF Interface

    Only Examine Programs with Non-Activated Unicode Flag

    By default, the system only displays program objects that have not yet set the Unicode attribute. If you want to use UCCHECK to process program objects that have already set the attribute, you can deactivate this option.

    Only Objects with TADIR Entry

    By default, the system only displays program objects with a TADIR entry. If you want to examine programs that don't have a TADIR entry, for example locally generated programs without a package, you can deactivate this option.

    Exclude Packages $*

    By default, the system does not display program objects that are in a local, non-transportable package. If you want to examine programs that are in such a package, you can deactivate this option.

    Display Modified SAP Programs Also

    By default, SAP programs are not checked in customer systems. If you also want to check SAP programs that were modified in a customer system (see transaction SE95), you can activate this option.

    Maximum Number of Programs:

    To avoid timeouts or unexpectedly long waiting times, the maximum number of program objects is preset to 50. If you want to examine more objects, you must increase the maximum number or run a SAMT scan (general program set processing). The latter also has the advantage that the data is stored persistently. Proceed as follows:

    - Call transaction SAMT

    - Create task with program RSUNISCAN_FINAL, subroutine SAMT_SEARCH

    For further information refer to documentation for transaction SAMT.

    Displaying Points that Cannot Be Analyzed Statically

    If you choose this option, you get an overview of the program points, where a static check for Unicode syntax errors is not possible. This can be the case if, for example, parameters or field symbols are not typed or you are accessing a field or structure with variable length/offset. At these points the system only tests at runtime whether the code is sufficient for the stricter Unicode tests. If possible, you should assign types to the variables used, otherwise you must check runtime behavior after the Unicode attribute has been set.

    To be able to differentiate between your own and foreign code (for example when using standard includes or generated includes), there is a selection option for the includes to be displayed. By default, the system excludes the standard includes of the view maintenance LSVIM* from the display, because they cause a large number of messages that are not relevant for the Unicode conversion. It is recommended that you also exclude the generated function group-specific includes of the view maintenance (usually L<function group name>F00 and L<function group name>I00) from the display.

    Similarly to the process in the extended syntax check, you can hide the warning using the pseudo comment ("#EC *).

    Applikation-Specific Checks

    These checks indicate program points that represent a public interface but are not Unicode-compatible. Under Unicode, the corresponding interfaces change according to the referenced documentation and must be adapted appropriately.

    View Maintenance

    Parts of the view maintenance generated in older releases are not Unicode-compatible. The relevant parts can be regenerated with a service report.

    UPLOAD/DOWNLOAD

    The function modules UPLOAD, DOWNLOAD or WS_UPLOAD and WS_DOWNLOAD are obsolete and cannot run under Unicode. Refer to the documentation for these modules to find out which routines serve as replacements.

    Regards

    Anji

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 15, 2007 at 07:05 PM

    Hello

    I do not know the relation between ALV and this specific WRITE statement yet the following sample coding will always work (even on a Unicode system):

    *&---------------------------------------------------------------------*
    *& Report  ZUS_SDN_WRITE_TABLE
    *&
    *&---------------------------------------------------------------------*
    *&
    *&
    *&---------------------------------------------------------------------*
    
    REPORT  zus_sdn_write_table.
    
    
    TABLES:  e070.
    
    data:
      gd_record    type string.
    
    
    START-OF-SELECTION.
    
      SELECT SINGLE * FROM  e070 INTO e070.
    
      WRITE: / e070, 'Table E070 displayed'.
    
      CALL METHOD cl_abap_container_utilities=>fill_container_c
        EXPORTING
          im_value               = e070
        IMPORTING
          EX_CONTAINER           = gd_record
        EXCEPTIONS
          ILLEGAL_PARAMETER_TYPE = 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.
    
    
      WRITE: / gd_record, 'Table E070 displayed'.
    
    END-OF-SELECTION.

    Regards

    Uwe

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 15, 2007 at 08:40 PM

    Hello,

    Thanks very much for the replies. I tried to use the function:

    call method cl_abap_container_utilities=>fill_container_c

    but got into some issues. This function is giving me the following output:

    update 100CB 19BC 0000009999123120060301CAC #&#1280;&#3072;#&#1280;&#3072;##&#3072;

    update 100CB P19BC 0000009999123120060301CAC #&#1280;&#3072;#&#1280;&#3072;##&#3072;

    instead of:

    update 100 CB 1 9 AB 000000 9999/12/31 2006/03/01 CAC 50.00 50.00 0.00

    update 100 CB P 1 9 AB 000000 9999/12/31 2006/03/01 CAC 50.00 50.00 0.00

    It is producing boxes and number signs for packed numbers. Any ideas how to get rid of them. Any input will be greatly appreciated.

    Thanks in advanced.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2007 at 09:23 PM

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.