cancel
Showing results for 
Search instead for 
Did you mean: 

Problem by creating a new Text via FM SAVE_TEXT from Abap Prog.

Former Member
0 Kudos

Hi,

I try to insert an new Text in my program. I think I have to give the message to the Application that there is a new text. The Function Mudule calls are okay but after that there is no new text in the Application. In my case the Apllication is Customer Service TA.: IW32. For instance in Opearation or Notification. The update an old text works but again not the insert. There must be a FM or easy way to give the Appl. that there is a new on Text. Do you know it, thanks?

Remark: The program updates the DD table 'STXH' and 'STXL' but the Appl. program TA: IW32 cannot find the text or doesn't read it.

The FM which I use in my program are:

-'READ_TEXT'

if the text not_found than

- 'INIT_TEXT'

CALL FUNCTION 'EDIT_TEXT_INLINE'

EXPORTING

  • DISPLAY = ' '

  • EDITOR_TITLE = ' '

header = lwa_header

inline_count = lv_line

  • save = ' '

  • TEXTSCREEN = ' '

  • LINE_EDITOR = ' '

  • CONTROL = ' '

  • SUPPRESS_END_SPACE = ' '

  • PROGRAM = ' '

  • LOCAL_CAT = ' '

IMPORTING

FUNCTION = lv_func

  • NEWHEADER =

  • RESULT =

TABLES

inlines = lt_line

lines = lt_line_dummy

EXCEPTIONS

ID = 1

LANGUAGE = 2

LINESIZE = 3

NAME = 4

OBJECT = 5

OTHERS = 6

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

endif.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

client = sy-mandt

header = lwa_header

INSERT = lv_func

savemode_direct = 'X'

  • OWNER_SPECIFIED = ' '

  • LOCAL_CAT = ' '

IMPORTING

function = lv_func

newheader = lwa_check_header

TABLES

lines = lt_line

.

Commit work

thank you

KR

Mahmoud Rowshandel

Edited by: Mahmoud Rowshandel on Dec 22, 2007 8:09 AM

Edited by: Mahmoud Rowshandel on Jan 8, 2008 9:37 AM

Edited by: Mahmoud Rowshandel on Mar 11, 2008 2:50 PM

Edited by: Mahmoud Rowshandel on May 7, 2010 2:04 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

raymond_giuseppi
Active Contributor
0 Kudos

Most SAP objects with long texts carry flags that indicate existence of a long text (so the program don't have to use a READ_TEXT if there is no text), (e.g.. AUFK-LTEXT) using a single SAVE_TEXT wont set this flag.

Try to use BAPI_ALM_ORDER_MAINTAIN. (But first check if [Note 1076036 - PM/CS Order Operation long text corrupted when BAPI is used|https://service.sap.com/sap/support/notes/1076036] and [Note 1150418 - BAPI: Error when trying to modify longtext for PM/CS order|https://service.sap.com/sap/support/notes/1076036] are suitable for your system)

Also encapsulate your code betweend two markers.

Regards,

Raymond