Hello Team,
How can we check if Long Text is entered or not before SAVE in FB02. I did some analysis and found a FM called "GET_TEXT_MEMORY", and this is suppose to retrieve Long Text from memory before saving, but it is not able to retrieve text.
The requirement is to check if Long Text exists or not before saving the document.
DATA: i_catalog TYPE STANDARD TABLE OF tcatalog,<br> w_cat TYPE tcatalog,<br> memory_id(30) VALUE 'SAPLSTXD',<br> wa_header TYPE thead.
CALL FUNCTION 'GET_TEXT_MEMORY'<br> TABLES<br> text_memory = i_catalog.<br><br> READ TABLE i_catalog INTO w_cat WITH KEY tdobject = 'DOC_ITEM' "Header text<br> tdid = '0001' "Use your Text type<br> tdspras = 'E'.<br><br> IF sy-subrc EQ 0.<br> memory_id+8(6) = w_cat-id. "SAPLSTXD<br> ENDIF.<br><br> IMPORT thead TO wa_header<br> tline TO i_lines FROM MEMORY ID memory_id.<br>