Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

alv field with string

hi,

I HAVE A TABLE IN WHICH ONE FIELD SAY F1 IS OF TYPE STRING

I HAVE CREATED AN ALV REPORT IN WHICH THIS FIELD F1 IS editable

when i press save button it ads the new row in the database

the Problem lies here is that the output length is viewed only to lenght of 15 infact outlen of fieldcatalog is set to 30

and i could only ad 30 character at max infact of being a type string

how can i add data in the table through alv with lenght more than 256 characters

Tags:
Former Member
replied

I try to create such a field but was rejected by system on activation on table, but got no error when checking syntax...

Maybe it depends on OS/database and version of R3?

If you really need a long text, use a text table (one "solution header table" and one "solution texts table" and use a custom container, and class cl_gui_textedit to create a small text input window.

<b>PBO </b>

First call :

   CREATE OBJECT: container EXPORTING container_name = 'CONTAINER',
                   editor    EXPORTING parent = container
                                       wordwrap_mode = 2
                                       wordwrap_position = 80
                                       wordwrap_to_linebreak_mode = 1.

Send text to editor

    CALL METHOD editor2->set_text_as_r3table
      EXPORTING table = texttab
      EXCEPTIONS
        error_dp = 1
        error_dp_create = 2.

<b>PAI</b>

Read text from editor

      CALL METHOD editor3->get_text_as_r3table
        IMPORTING table = texttab
        EXCEPTIONS
          error_dp = 1
          error_cntl_call_method = 2
          error_dp_create = 3
          potential_data_loss = 4.

(You could also use GET/SET_DATA_AS_STREAM, (Look at <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCITEXTEDIT/BCCITEXTEDIT.pdf">SAP Textedit</a>)

If you want "formated" text go to sap script editor.

Regards

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question