Skip to Content
0
Jul 19, 2007 at 12:53 PM

function module 'EDIT_TEXT'. still not working

1242 Views

first i called READ_TEXT.

EDIT_TEXT.

SAVE_TEXT.

COMMIT_TEXT.

PLEASE CHECK THIS CODE ONCE ..PLEASE LET ME KNOW THE PROBLES.

gv_vlsch = gs_bmw_std_a1020-vlsch.

gv_lng = 'DE'.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'SUBM'

language = gv_lng

name = gv_vlsch

object = 'WORKST'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

IMPORTING

header = gs_thead

TABLES

lines = gt_text

  • EXCEPTIONS

  • ID = 1

  • LANGUAGE = 2

  • NAME = 3

  • NOT_FOUND = 4

  • OBJECT = 5

  • REFERENCE_CHECK = 6

  • WRONG_ACCESS_TO_ARCHIVE = 7

  • OTHERS = 8

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

DATA:lv_clnt TYPE sy-mandt.

********CHANGE 5/7**********

CLEAR gv_index.

CLEAR gt_line[].

  • SET PF-STATUS 'VIEW'.

LOOP AT gt_bmw_std_a1020 INTO gs_bmw_std_a1020 WHERE ch = 'X'.

gv_index = gv_index + 1.

ENDLOOP.

IF gv_index GE 2.

MESSAGE s000.

  • leave to screen 0.

CLEAR gv_index.

ELSEIF gv_index LT 1.

MESSAGE s001.

  • leave to screen 0.

ELSE.

CLEAR gv_index.

CLEAR gs_bmw_std_a1020.

READ TABLE gt_bmw_std_a1020 INTO gs_bmw_std_a1020 WITH KEY ch = 'X'.

IF sy-subrc EQ 0.

gv_vlsch = gs_bmw_std_a1020-vlsch.

gv_lng = 'DE'.

PERFORM read_text.

ENDIF.

CALL FUNCTION 'EDIT_TEXT'

EXPORTING

display = ' '

  • EDITOR_TITLE = ' '

header = gs_thead

  • PAGE = ' '

  • WINDOW = ' '

save = 'X'

  • LINE_EDITOR = ' '

  • CONTROL = ' '

  • PROGRAM = ' '

  • LOCAL_CAT = ' '

  • IMPORTING

  • FUNCTION =

  • NEWHEADER =

  • RESULT =

TABLES

lines = gt_text

  • EXCEPTIONS

  • ID = 1

  • LANGUAGE = 2

  • LINESIZE = 3

  • NAME = 4

  • OBJECT = 5

  • TEXTFORMAT = 6

  • COMMUNICATION = 7

  • OTHERS = 8

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*****************5/7******************

lv_clnt = sy-mandt.

**************************************************

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

client = lv_clnt

header = gs_thead

  • INSERT = ' '

  • SAVEMODE_DIRECT = ' '

  • OWNER_SPECIFIED = ' '

  • LOCAL_CAT = ' '

  • IMPORTING

  • FUNCTION =

  • NEWHEADER =

TABLES

lines = gt_text

  • EXCEPTIONS

  • ID = 1

  • LANGUAGE = 2

  • NAME = 3

  • OBJECT = 4

  • OTHERS = 5

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'COMMIT_TEXT'

EXPORTING

OBJECT = '*'

NAME = '*'

ID = '*'

LANGUAGE = '*'

  • SAVEMODE_DIRECT = ' '

  • KEEP = ' '

  • LOCAL_CAT = ' '

  • IMPORTING

  • COMMIT_COUNT =

  • TABLES

  • T_OBJECT =

  • T_NAME =

  • T_ID =

  • T_LANGUAGE =

.