‎2008 Jul 17 10:39 AM
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
‎2008 Jul 17 12:32 PM
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.
‎2008 Jul 17 12:17 PM
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
‎2008 Jul 17 12:32 PM
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.