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

Editable fields in ALV Grid. Why internal table have no values after input?

Hallo All.

I set some fields in ALV Grid as editable. I enter values in fields, but there are no values in the internal table. Why?

To display ALV Grid i use function REUSE_ALV_GRID_DISPLAY.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 07, 2005 at 12:02 PM

    Hi Vytautas,

    I am using function module REUSE_ALV_LIST_DISPLAY, and it works fine. If I change the value of a cell whose field is declared as "input", then the moment I press a button or whatever (I mean, the moment I trigger an ok_code) the new value is transferred to the content of the internal table I am displaying.

    Could you please make a test with function module REUSE_ALV_LIST_DISPLAY?

    I hope it helps. BR,

    Alvaro

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 07, 2005 at 12:38 PM

    ls_fieldcat-edit = 'X'.

    ls_fieldcat-reptext = 'Dok Nr'.

    ls_fieldcat-TXT_FIELD = 'DOKNR'.

    MODIFY p_gt_fieldcat FROM ls_fieldcat TRANSPORTING edit reptext

    WHERE fieldname = 'DOKNR'.

    This is my code which set field for input. Give me example. I want to know, what i did wrong.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Vytautas,

      I think you shouldn't be using field "ls_fieldcat-edit", but "ls_fieldcat-input" instead. I mean, there's no documentation on field "edit" when you ask for help into parameter "it_fieldcat" on function module "reuse_alv_grid_display". I think "input" is the field you really wanted to use.

      Please let me know if it helped. Best regards,

      Alvaro

  • author's profile photo Former Member
    Former Member
    Posted on Feb 07, 2005 at 12:47 PM

    I get an error message if i try to use ls_fieldcat-input. What type of ls_fieldcat must be?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Well, you should have declared:

      DATA: ls_fieldcat TYPE slis_fieldcat_alv.
      DATA: lt_fieldcat TYPE slis_t_fieldcat_alv.
      

      ... and ls_fieldcat-input should only take values 'X' or ' ' (blank)

      (BTW, I'm using SAP R/3 46C)

  • author's profile photo Former Member
    Former Member
    Posted on Feb 07, 2005 at 01:11 PM

    I have declared that variables, but changes nothing.

    I rewrite from one field catalog to another one.

    My code:

    data:

    gt_mainfldc TYPE lvc_t_fcat,

    ls_fields type lvc_s_fcat,

    gt_fldc type SLIS_T_FIELDCAT_ALV,

    ls_fldc type SLIS_FIELDCAT_ALV.

    loop at gt_mainfldc into ls_fields.

    move-corresponding ls_fields to ls_fldc.

    ls_fldc-seltext_l = ls_fields-SCRTEXT_l.

    ls_fldc-seltext_m = ls_fields-SCRTEXT_m.

    ls_fldc-seltext_s = ls_fields-SCRTEXT_S.

    ls_fldc-ref_tabname = ls_fields-ref_table.

    ls_fldc-reptext_ddic = ls_fields-reptext.

    if ls_fields-edit = 'X'.

    ls_fldc-input = 'X'.

    clear ls_fldc-edit.

    endif.

    append ls_fldc to gt_fldc.

    endloop.

    What is wrong???

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 07, 2005 at 01:44 PM

    Automatic internal table updation for input fields feature is present in ALV list display and not in ALV grid display. For updating the internal tables in grid display, You have to read the correspong line by Read Line statement and modify the internal table.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 07, 2005 at 01:46 PM

    And how to set input field value to internal table field value?

    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.