Skip to Content
avatar image
Former Member

No active nametab exists for...


I try to maintain BOM data by CSAP_MAT_BOM_MAINTAIN bapi. Everthing works ok when I use example code of this function module. But when it comes to terms deleting an item from BOM, I always get error :

"No active nametab exists for CI_STPO".

But it also deletes the item. Do you have any idea?

*---- BOM header data structure
data: begin of tstk2.
          include structure stko_api02.
data: end of tstk2.
*---- BOM items table
data: begin of tstp3 occurs 0.
          include structure stpo_api03.
data: end of tstp3.

DATA tstko TYPE stko_api01.

*---- Object dependencies table
*     Basis data
data: begin of tdep2_data occurs 0.
         include structure dep_data.
data: end of tdep2_data.
*     Description
data: begin of tdep2_descr occurs 0.
         include structure dep_descr.
data: end of tdep2_descr.
*     Source
data: begin of tdep2_source occurs 0.
         include structure dep_source.
data: end of tdep2_source.
*     Sequence
data: begin of tdep2_order occurs 0.
         include structure dep_order.
data: end of tdep2_order.
*     Documentation
data: begin of tdep2_doc occurs 0.
         include structure dep_doc.
data: end of tdep2_doc.

data: flg_warning like capiflag-flwarning.
*data : error_code type BAPI_MSG.

*- Initialize database log
   call function 'CALO_INIT_API'
             log_object_not_found     = 1
             log_sub_object_not_found = 2
             other_error              = 3
             others                   = 4.

   clear tstp3.
   tstp3-id_item_no = '0050'.                    "Item identification.
   tstp3-fldelete   = 'X'.
   append tstp3.

*- Change BOM
   call function 'CSAP_MAT_BOM_MAINTAIN'
             material   = MATNR
             plant      = PLANT
             bom_usage  = BOM_USAGE
             valid_from = VALID_FROM
             fl_bom_create = ' '
             fl_new_item = ' '
             i_stko  = tstko
             fl_warning = flg_warning
             o_stko     = tstk2
             t_stpo       = tstp3
             others  = 1.

   if sy-subrc eq 1.
*---- Error
*     Please see log
      ERROR_CODE = 'Tanu0131msu0131z hata. Baku0131m ekranu0131 açu0131k olmasu0131n?'.

   if flg_warning eq 'X'.
*---- Please see log for information, warning messages, and success
*     messages.
*      MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
*WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
                msgid               = sy-msgid
                msgnr               = sy-msgno
                msgv1               = sy-msgv1
                msgv2               = sy-msgv2
                msgv3               = sy-msgv3
                msgv4               = sy-msgv4
                message_text_output = ERROR_CODE.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Sep 02, 2008 at 11:58 AM

    CI_STPO is a customer include in which you can put some specific fields

    probably you call a user-exit that is used to maintain fields of this customer include and it does try to find the structure of it (which does not exist)

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 02, 2008 at 12:59 PM

    Actually there's no user exit. I just call bapi.

    Add comment
    10|10000 characters needed characters exceeded