Skip to Content
0
Former Member
Mar 21, 2006 at 10:50 AM

save longtext in text editor

446 Views

hi,

i wrote a bdc program to upload long text into MM01 for PO text.

it goes something like this:

DATA: BEGIN OF record OCCURS 10,

matnr_001(018),

werks_003(004),

vkorg_004(004),

vtweg_005(002),

maktx_006(500),

END OF record.

START-OF-SELECTION.

PERFORM upload.

LOOP AT record.

PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.

-


-


PERFORM bdc_dynpro USING 'SAPLMGMM' '4040'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=TEAN'.

PERFORM save_data.

ENDLOOP.

FORM save_data.

l_head-tdid = '0001'.

l_head-tdspras = 'E'.

l_head-tdname = record-matnr_001.

l_head-tdobject = 'MVKE'.

n = n + 1.

T_LINES-TDLINE = record-maktx_006.

t_lines-tdformat = n.

append t_lines.

clear t_lines.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

header = L_HEAD

SAVEMODE_DIRECT = 'X'

OWNER_SPECIFIED = 'X'

tables

lines = T_LINES

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

OBJECT = 4.

ENDFORM. "SAVE_DATA

The problem here is:

in the text editor of sales text in MM01 the longtext which i have it in T_LINES is not getting saved.

What is the mistake pls help me.

John.