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

Append text

Former Member
0 Likes
638

Hi All,

We have a scenario where we have a text object for purchase requisition text id B01 and text object EBANH. We want that this text should editable to limited exyent e.g. the conents of the text should be non editable but the new text can be appended into the object. Once the PR is saved the text object with the new txt should become non editable.

Is there any functionality by which we can just append to the text field?

Prashant

1 ACCEPTED SOLUTION
Read only

Subhankar
Active Contributor
0 Likes
570

Use the function module READ_TEXT to get the previous text.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = l_c_id_zl50

language = sy-langu

name = l_name

object = l_c_object

TABLES

lines = l_i_tline

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

Then use the function module SAVE_TEXT to update the new text .

Append the new to itab L_I_LINE

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

client = sy-mandt

header = l_wa_hea

savemode_direct = 'X'

TABLES

lines = l_i_line

EXCEPTIONS

id = 1

language = 2

name = 3

object = 4

OTHERS = 5.

2 REPLIES 2
Read only

Former Member
0 Likes
570

I thought this was a configurable field. However, when I checked in the IMG, I couldn't find it. Have you tried looking at EXIT_SAPMM06E_022? It checks to see if texts exist. I'm not sure it will be much help. But it might give you a start.

Michelle

Read only

Subhankar
Active Contributor
0 Likes
571

Use the function module READ_TEXT to get the previous text.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = l_c_id_zl50

language = sy-langu

name = l_name

object = l_c_object

TABLES

lines = l_i_tline

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

Then use the function module SAVE_TEXT to update the new text .

Append the new to itab L_I_LINE

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

client = sy-mandt

header = l_wa_hea

savemode_direct = 'X'

TABLES

lines = l_i_line

EXCEPTIONS

id = 1

language = 2

name = 3

object = 4

OTHERS = 5.