Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function modules to edit table's record

Former Member
0 Likes
946

Hi, thanks in advance. I have two questions:

1. I call function 'STC1_FULLSCREEN_TABLE_CONTROL' to edit a table, the problem is fieldnames are not displayed, all emptys. Please check below calling.

CALL FUNCTION 'STC1_FULLSCREEN_TABLE_CONTROL'

EXPORTING

HEADER = p_table

tabname = p_table

endless = 'X'

no_button = space

IMPORTING

okcode = w_okcode

TABLES

nametab = it_dfies

TABLE = <itab>

fielddif = it_fdiff

modif_table = <ntab>

EXCEPTIONS

OTHERS = 1.

2. The second question is above function module is to edit a table in full screen style, multiple record lines are displayed. Could you please tell me which function module can be called to only edit one record in the screen?

Thanks.

Tom

1 REPLY 1
Read only

Former Member
0 Likes
493

Hello Tom

Use the following code before calling the function.

loop at IT_DFIES into is_dfies.
    if is_dfies-reptext is initial.
      select single scrtext_s into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                 and fieldname = is_dfies-fieldname
                                                                 and ddlanguage = sy-langu.
      IF sy-subrc = 0 and is_dfies-reptext is initial.
        select single scrtext_m into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                   and fieldname = is_dfies-fieldname
                                                                   and ddlanguage = sy-langu.
        IF sy-subrc = 0 and is_dfies-reptext is initial.
          select single scrtext_l into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                     and fieldname = is_dfies-fieldname
                                                                     and ddlanguage = sy-langu.
        endif.
      endif.
      If is_dfies-reptext is initial.
        select single fieldtext into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                   and fieldname = is_dfies-fieldname
                                                                   and ddlanguage = sy-langu.
      ENDIF.
      If is_dfies-reptext is initial.
        is_dfies-reptext = is_dfies-fieldname.
      ENDIF.
      modify it_dfies from is_dfies .
    endif.
  endloop.

I hope that could help

Regards

dstj