Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BOM Long Text Not Updating

Hi Friends,

              Here one requirement is ,Need to update the BOM long text for individual item. I have used below code

while executing this , does not shows any error. but while checking in cs02 , cs03 values are  not showing. Anyone please suggest me to do.

CALL FUNCTION 'CO_ZK_TEXTKEY_STPO'

   EXPORTING

     stlkn = '1' "item-stlkn

     stlnr = '00000108' "item-stlnr

     stlty = 'M' ":item-stlty

     stpoz = '2' "item-stpoz

   IMPORTING

     ltsch = tdobject.

txhead-tdname = tdobject.

txhead-tdid = 'MPO'.

txhead-tdspras = sy-langu.

txhead-tdobject = 'BOM'.

g_t_tlines-TDFORMAT = '*'.

g_t_tlines-tdline = 'capacitor'.

APPEND g_t_tlines.

g_t_tlines-TDFORMAT = '*'.

g_t_tlines-tdline = 'Resistor'.

APPEND g_t_tlines.

g_t_tlines-TDFORMAT = '*'.

g_t_tlines-tdline = 'Resistor'.

APPEND g_t_tlines.

g_t_tlines-TDFORMAT = '*'.

g_t_tlines-tdline = 'Transformer'.

APPEND g_t_tlines.

g_t_tlines-TDFORMAT = '*'.

g_t_tlines-tdline = 'Inductor'.

APPEND g_t_tlines.

g_t_tlines-TDFORMAT = '*'.

g_t_tlines-tdline = 'coil'.

APPEND g_t_tlines.

txhead-tdlinesize = '40'.

*CALL FUNCTION 'SAVE_TEXT'

*  EXPORTING

*    client        = sy-mandt

*    header          = txhead

*    insert = 'X'

*    savemode_direct = 'X'

*    owner_specified = 'X'

**    local_cat = ''

*  TABLES

*    lines           = g_t_tlines

*  EXCEPTIONS

*    id              = 1

*    language        = 2

*    name            = 3

*    object          = 4

*    OTHERS          = 5.

CALL FUNCTION 'COMMIT_TEXT'

  EXPORTING

    OBJECT                = txhead-tdobject

    NAME                  = txhead-tdname

    ID                    = txhead-tdid

    LANGUAGE              = txhead-tdspras

    SAVEMODE_DIRECT       = 'X'

    KEEP                  = 'X'

*   LOCAL_CAT             = ''

  IMPORTING

    COMMIT_COUNT          = sy-index

* TABLES

*   T_OBJECT              =

*   T_NAME                =

*   T_ID                  =

*   T_LANGUAGE            =

           .



Regards,

Thangam.P

Former Member
Not what you were looking for? View more on this topic or Ask a question