Skip to Content
0
Former Member
Aug 24, 2008 at 03:27 PM

Problem with Alt. Bom Long Text

33 Views

Hi experts,

I'm currently doing a program which is suppose to create alternative bom long text. I'm using CREATE_TEXT for this. my parameters are correct. when i run my program, STXH is updated. I use DELETE_TEXT before running the program to ensure that everything is correct. however, when i use cs02/cs03 and i try to view the alt bom long text, it is not displayed correctly. If read_text is used from SE37, the text is read correctly. What could be the problem for this?

Here's my program routine:

LOOP AT i_keyaltbomtxt INTO wa_keyaltbomtxt.

CALL FUNCTION 'DELETE_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = c_id

language = sy-langu

name = wa_keyaltbomtxt-head

object = c_obj

savemode_direct = 'X'

  • TEXTMEMORY_ONLY = ' '

  • LOCAL_CAT = ' '

EXCEPTIONS

not_found = 1

OTHERS = 2

.

IF sy-subrc <> 0.

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

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

ENDIF.

LOOP AT i_tmpaltbomtxt INTO wa_tmpaltbomtxt WHERE head EQ wa_keyaltbomtxt-head.

  • wa_altbomtxt-tdformat = '*'.

wa_altbomtxt-tdline = wa_tmpaltbomtxt-ltext.

APPEND wa_altbomtxt TO i_altbomtxt.

CLEAR: wa_altbomtxt,

wa_tmpaltbomtxt.

ENDLOOP.

CALL FUNCTION 'CREATE_TEXT'

EXPORTING

fid = c_id

flanguage = sy-langu

fname = wa_keyaltbomtxt-head

fobject = c_obj

save_direct = 'X'

FFORMAT = '*'

TABLES

flines = i_altbomtxt

EXCEPTIONS

no_init = 1

no_save = 2

OTHERS = 3

.

IF sy-subrc <> 0.

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

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

ENDIF.

REFRESH: i_altbomtxt.

CLEAR: wa_keyaltbomtxt.

ENDLOOP.