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

SAVE_TEXT problem - it can't lock??

Former Member
0 Likes
923

Hi, ALL.

I use the Function Module 'SAVE_TEXT' in my Zprogram.

It update the Sales long text in MM02.

When a user is in MM02, 'SAVE_TEXT' the Function Module doesn't return error message.

I think it's a LOCK error, but it's not.

Do I need to check LOCK before call function 'SAVE_TEXT' in Zprogram??

If you know that, please let me know.

Regards.

Rie.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
775

Your program must use the same logic than the standard program to manage locks.

- Lock same object(s) (ENQUEUE_Exxxx)

- Use same FMs like SELECT_TEXT, READ_TEXT, INIT_TEXT, SAVE_TEXT or similar tools

Tips: Execute transaction SE30 on MM02 and update a text, then evaluate the performance data file, look for call to FM starting with ENQUEUE or calls containing TEXT in the trace.

Remarks:

- A Save module is a little late to manage lock, no ?

- "I think it's a LOCK error, but it's not", it is a LOCK error, but in your program

- You could use BAPI_MATERIAL_SAVEDATA (table parameter MATERIALLONGTEXT) to update/create text, this one manages locks.

Regards,

Raymond

3 REPLIES 3
Read only

koolspy_ultimate
Active Contributor
0 Likes
775

This message was moderated.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
776

Your program must use the same logic than the standard program to manage locks.

- Lock same object(s) (ENQUEUE_Exxxx)

- Use same FMs like SELECT_TEXT, READ_TEXT, INIT_TEXT, SAVE_TEXT or similar tools

Tips: Execute transaction SE30 on MM02 and update a text, then evaluate the performance data file, look for call to FM starting with ENQUEUE or calls containing TEXT in the trace.

Remarks:

- A Save module is a little late to manage lock, no ?

- "I think it's a LOCK error, but it's not", it is a LOCK error, but in your program

- You could use BAPI_MATERIAL_SAVEDATA (table parameter MATERIALLONGTEXT) to update/create text, this one manages locks.

Regards,

Raymond

Read only

0 Likes
775

Hi Raymond.

Thank you for repry.

I understood very well.

It's very helpful for me.

Regards.

Rie.