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

Problem with Alt. Bom Long Text

Former Member
0 Likes
617

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.

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.

1 REPLY 1
Read only

Former Member
0 Likes
475

> 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?

>

Did you check the text in the Script text editor.There you can see full text.

May be you are just seeing the Text which appears in the input field. There is a create Text button infront of the Bom text. You click the Button and see .

Since the text is coming when you run the function READ_TEXT that means it will definitely be there. So you try to check the text by clicking the Text button.