Application Development 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: 

Change/Delete production order components from ABAP-Code

Former Member
0 Kudos

Hi all,

can anybody show me how to change btw. delete production order components e.g. for report-usage.

I already found the BAPIS

CO_MK_IBAPI_COMPONENT_CHANGE

CO_MK_IBAPI_COMPONENT_REMOVE

, but could not found a direction how to use them, so SAP dumps with an unknown error everytime 😕

Additionally, i got the BAPIs

BAPI_RESERVATION_CHANGE

BAPI_RESERVATION_DELETE

I executed them correctly, but as report message i get the information, that automatic reservation can't be changed...

Thanks for your help!

1 ACCEPTED SOLUTION

karun_prabhu
Active Contributor

Hi. You have to make use of BDC to edit/delete production order components.

The BAPIs(BAPI_RESERVATION_CHANGE and BAPI_RESERVATION_DELETE) can only be used for reservations created directly via MB21 tcode.

Regards.

24 REPLIES 24

karun_prabhu
Active Contributor

Hi. You have to make use of BDC to edit/delete production order components.

The BAPIs(BAPI_RESERVATION_CHANGE and BAPI_RESERVATION_DELETE) can only be used for reservations created directly via MB21 tcode.

Regards.

0 Kudos

Hi,

I also think BDC for CO02 is the best option. I had similiar issue some years ago and all function modules tested for production order operations failed at the end. Internally SAP is using function modules with global data which are bad encapsulated for usage in own programs.

One option might be the function module CLOI_CHANGES_UPL_45. This is part of the POI interface.

By means of this FM can be changed some data in operations and components I suppose parameter CLOI_PLORD_RESBU_IMP is for components. Here is a sample program for calling the FM, in this case for changing one field in operation:

*&---------------------------------------------------------------------*
*& Report  ZMB_PO_OPER_CREATE
*&
REPORT  zmb_po_oper_change_cloi.

PARAMETERS: p_aufnr TYPE char12 MEMORY ID anr OBLIGATORY DEFAULT '001000000944',
            p_act_n(4) TYPE c DEFAULT '0040',
            p_wc_o TYPE arbpl DEFAULT '2000',
            p_wc_n TYPE arbpl DEFAULT '2641'.

DATA: ls_cloi_if_par_v2 TYPE cloiifpar,
      lt_opu TYPE TABLE OF cloioperu,
      lw_opu TYPE cloioperu,
      lt_cloi_methods_exp     TYPE STANDARD TABLE OF cloimetlog,
      lt_cloi_messages_exp     TYPE STANDARD TABLE OF cloimsglog,
      lt_cloi_msg_obj_log_exp TYPE STANDARD TABLE OF cloimoblog,
      lv_aplfl(6) TYPE c,
      lv_cloi_ret_val TYPE cloiretval,
      lw_cloi_messages_exp    TYPE cloimsglog.

CLEAR: ls_cloi_if_par_v2.

ls_cloi_if_par_v2-commitflg   = 'C'.
ls_cloi_if_par_v2-r3_version  = '60'.
ls_cloi_if_par_v2-metlog_req  = 'X'.
ls_cloi_if_par_v2-msglog_req  = 'X'.
ls_cloi_if_par_v2-msgobj_req  = 'X'.
ls_cloi_if_par_v2-ord_req     = 'X'.
ls_cloi_if_par_v2-ordseq_req  = 'X'.
ls_cloi_if_par_v2-ordopr_req  = 'X'.

lw_opu-aufnr = p_aufnr.
lw_opu-extaufnr = p_aufnr.
lw_opu-aplfl = '000000'.
lw_opu-vornr = p_act_n.
*lw_opu-aplfl = lv_aplfl.
lw_opu-field = 'ARBPL'.
lw_opu-value = p_wc_n.
APPEND lw_opu TO lt_opu.

CALL FUNCTION 'CLOI_CHANGES_UPL_31'
  EXPORTING
    cloi_if_par                = ls_cloi_if_par_v2
IMPORTING
cloi_ret_val               = lv_cloi_ret_val
TABLES
*     CLOI_PLORDI_IMP            =
*     CLOI_PLORDU_IMP            =
*     CLOI_PLORDD_IMP            =
*     CLOI_ORDI_IMP              =
*     CLOI_ORDU_IMP              =
*     CLOI_PLORD_OPRU_IMP        =
  cloi_ord_opru_imp          = lt_opu
*     CLOI_MAP_EXP               =
   cloi_method_log_exp        = lt_cloi_methods_exp
   cloi_message_log_exp       = lt_cloi_messages_exp
   cloi_msg_obj_log_exp       = lt_cloi_msg_obj_log_exp
*     CLOI_PLORD_EXP             =
*     CLOI_ORD_EXP               =
*     CLOI_PLORD_OPR_EXP         =
*     CLOI_ORD_OPR_EXP           =
*     CLOI_ORD_SEQ_EXP           =
          .
WRITE: / 'Retval:', lv_cloi_ret_val.

It was working in prototype phase but I ended up with using BDC (CALL TRANSACTION 'CO02').

/Michael

Former Member
0 Kudos

First off, thanks for your answers!

If i use BDC for CO02, i can't delete a variable position in the component overview, can i?

Problem background is comparing data receiving from iDOC with the component overview.

If the material fits, i update the positions' quantity etc...

If not, i delete the position and create a new one based on the iDOC-Information.

Can i estimate the position dynamicly using BDC?

0 Kudos

Record BDC by making use of a manual filter to get to the desired component and then perform your activity.

Then in the program,pass the production order and material value (AUFNR,MATNR) to RESB table and get its position (POSNR) for performing desired activity.

OR

Former Member
0 Kudos

Hi,

Here is a sample where I deleted operations within the overview screen. The components should also work in a similiar way:

*&---------------------------------------------------------------------*
*&      Form  POST_DELETIONS
*&---------------------------------------------------------------------*
*       Remove operations from production order
*----------------------------------------------------------------------*
*      -->PFD_NEW_OP  Flag if new operations to be inserted.
*----------------------------------------------------------------------*
FORM post_deletions  USING    pfd_new_op TYPE char1.

  DATA:   lwa_ct_params  TYPE ctu_params,
          lfd_ctmode     TYPE char1,
          lfd_mode       TYPE char1,
          lfd_count      TYPE i,
          lfd_oper_comp  TYPE bapi_alm_order_operation-activity,
          lfd_string     TYPE string,
          lfd_spo1flg    TYPE char1,
          lfd_dumps      TYPE resb-dumps,
          lfd_aufst      TYPE resb-aufst,
          lfd_aufwg      TYPE resb-aufwg.

  CLEAR: pfd_new_op.

  GET PARAMETER ID '/SIE/1I_CT_MODE' FIELD lfd_ctmode.
  IF lfd_ctmode CA 'AENP'.
    lfd_mode = lfd_ctmode.
  ELSE.
    lfd_mode = 'E'.
  ENDIF.
*
  REFRESH git_bdcdata.
  REFRESH git_bdcmess.
*
* Find first possible operation for component reassgnment
*
  LOOP AT git_alv INTO gwa_alv
    WHERE proc     <> 'D'
    AND   ampel    = '3'
    AND   po_vornr <> ''.
    lfd_oper_comp = gwa_alv-po_vornr.
    EXIT.
  ENDLOOP.
*
* Process actions
*
  PERFORM bdc_dynpro      USING 'SAPLCOKO1' '0110'.
  PERFORM bdc_field       USING 'BDC_CURSOR' 'R62CLORD-FLG_KNOT'.
  PERFORM bdc_field       USING 'BDC_OKCODE' '=VGUE'.
  PERFORM bdc_field       USING 'CAUFVD-AUFNR' gwa_ctrl-aufnr.
  PERFORM bdc_field       USING 'R62CLORD-FLG_KNOT' c_x.
  PERFORM bdc_field       USING 'R62CLORD-FLG_OVIEW' ''.

  LOOP AT git_alv INTO gwa_alv
      WHERE proc = 'D'
      OR    proc = 'A'.
    CASE gwa_alv-proc.
      WHEN 'D'. "Delete Operations
        IF gwa_alv-comp = c_x.
* Reassign components
          IF lfd_oper_comp IS INITIAL.
            CONCATENATE text-e11 gwa_alv-po_vornr INTO lfd_string
                SEPARATED BY space.
            CALL FUNCTION 'POPUP_TO_INFORM'
              EXPORTING
                titel = text-t06
                txt1  = text-e10
                txt2  = lfd_string.
            CONTINUE.
          ELSE.
            PERFORM bdc_dynpro      USING 'SAPLCOVG' '0100'.
            PERFORM bdc_field       USING 'BDC_OKCODE' '=KPU2'.
            LOOP AT git_po_comp INTO gwa_po_comp
              WHERE operation = gwa_alv-po_vornr.
* check if deletion flag is set
* if so do not reassign but an additional dynpro will occur during deletion
              IF NOT gwa_po_comp-deletion_indicator IS INITIAL.
                lfd_spo1flg = c_x.
                CONTINUE.
              ENDIF.
* check if component is part of a dummy assembly
* If so ignore, because reassignment is done with the level above
              SELECT SINGLE dumps aufst aufwg FROM  resb
                     INTO (lfd_dumps, lfd_aufst, lfd_aufwg)
                     WHERE  rsnum  = gwa_po_comp-reservation_number
                     AND    rspos  = gwa_po_comp-reservation_item
                     AND    rsart  = gwa_po_comp-reservation_type.
              IF sy-subrc = 0.
                IF lfd_dumps IS INITIAL AND NOT lfd_aufst IS INITIAL AND NOT lfd_aufst IS INITIAL.
                  CONTINUE.
                ENDIF.
              ENDIF.

              PERFORM bdc_dynpro      USING 'SAPLCOMK' '0120'.
              PERFORM bdc_field       USING 'BDC_OKCODE' '=P--'.

              PERFORM bdc_dynpro      USING 'SAPLCOMK' '0120'.
              PERFORM bdc_field       USING 'BDC_OKCODE' '=AUFS'.

              PERFORM bdc_dynpro      USING 'SAPLCO05' '0110'.
              PERFORM bdc_field       USING 'BDC_OKCODE' '=MORE'.
              PERFORM bdc_field       USING 'BDC_CURSOR' 'RCOSU-POSNR'.
              PERFORM bdc_field       USING 'RCOSU-POSNR' gwa_po_comp-item_number.
              PERFORM bdc_field       USING 'RCOSU-VORNR' gwa_alv-po_vornr.
              PERFORM bdc_field       USING 'RCOSU-MATNR' gwa_po_comp-material.

              PERFORM bdc_dynpro      USING 'SAPLCOMK' '0120'.
              PERFORM bdc_field       USING 'BDC_OKCODE' '=SWAP'.
              PERFORM bdc_field       USING 'RC27X-FLG_SEL(01)' c_x.

              PERFORM bdc_dynpro      USING 'SAPLCOMP' '1040'.
              PERFORM bdc_field       USING 'BDC_OKCODE' '=GOON'.
              PERFORM bdc_field       USING 'RCM01-VORNR' lfd_oper_comp.
            ENDLOOP.
            PERFORM bdc_dynpro      USING 'SAPLCOMK' '0120'.
            PERFORM bdc_field       USING 'BDC_OKCODE' '=BACK'.

            PERFORM bdc_dynpro      USING 'SAPLCOKO1' '0115'.
            PERFORM bdc_field       USING 'BDC_OKCODE' '=VGUE'.
          ENDIF.
        ENDIF.
* Delete operation
        lfd_count = lfd_count + 1.
        PERFORM bdc_dynpro      USING 'SAPLCOVG' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '=P--'.

        PERFORM bdc_dynpro      USING 'SAPLCOVG' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '=AUFS'.

        PERFORM bdc_dynpro      USING 'SAPLCO05' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '=MORE'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'RCOSU-VORNR'.
        PERFORM bdc_field       USING 'RCOSU-VORNR' gwa_alv-po_vornr.

        PERFORM bdc_dynpro      USING 'SAPLCOVG' '0100'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '=LOE'.
        PERFORM bdc_field       USING 'RC27X-FLG_SEL(01)' c_x.

        IF gwa_alv-prt IS INITIAL AND lfd_spo1flg IS INITIAL.
          PERFORM bdc_dynpro      USING 'SAPLSPO2' '0200'.
          PERFORM bdc_field       USING 'BDC_OKCODE' '=OPT1'.
        ELSE.
          PERFORM bdc_dynpro      USING 'SAPLSPO2' '0100'.
          PERFORM bdc_field       USING 'BDC_OKCODE' '=OPT1'.
        ENDIF.

      WHEN 'A'. "Add Operations
        pfd_new_op = c_x.
    ENDCASE.
  ENDLOOP.
* Post data
  IF lfd_count > 0.
    PERFORM bdc_dynpro      USING 'SAPLCOVG' '0100'.
    PERFORM bdc_field       USING 'BDC_OKCODE' '=BU'.
    PERFORM bdc_field       USING 'BDC_CURSOR' 'PSFC_DISP-AUFNR'.

    lwa_ct_params-dismode = lfd_mode.
    lwa_ct_params-updmode = 'S'.
    lwa_ct_params-defsize = c_x.
    lwa_ct_params-cattmode = space.
*  lwa_ct_params-nobinpt = c_x. " This would leed to popup of error messages
    " But side effect is that long text won't work
    lwa_ct_params-nobiend = space.
    lwa_ct_params-racommit = c_x.
    CALL TRANSACTION 'CO02'
         USING git_bdcdata
         OPTIONS FROM lwa_ct_params
         MESSAGES INTO git_bdcmess.
    DESCRIBE TABLE git_bdcmess LINES lfd_count.
    READ TABLE git_bdcmess INDEX lfd_count INTO gwa_bdcmess.
    IF sy-subrc = 0.
      gwa_ctrl-refresh = c_n.
      MESSAGE ID gwa_bdcmess-msgid TYPE gwa_bdcmess-msgtyp NUMBER gwa_bdcmess-msgnr
              WITH gwa_bdcmess-msgv1 gwa_bdcmess-msgv2 gwa_bdcmess-msgv3.
    ENDIF.
    COMMIT WORK AND WAIT.
  ENDIF.

ENDFORM.                    " POST_DELETIONS

Former Member
0 Kudos

Using the FM CLOI_CHANGES_UPL_45, this is my Code this far, trying to change the quantity of position #0050.There are no syntaxerror and i got returncode "5C", but there is no change in my database.

*&---------------------------------------------------------------------*
*& Report  Z_CLOI_CHANGES_UPL_45
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  z_cloi_changes_upl_45.

DATA: lv_aufnr       TYPE  aufnr.

DATA: lt_cloi_plord_resbu_imp TYPE TABLE OF cloiplresbu,
       wa_cloi_plord_resbu_imp LIKE LINE OF lt_cloi_plord_resbu_imp.

DATA: ls_cloi_if_par_v2 TYPE cloiifpar,
       lv_cloi_ret_val   TYPE cloiretval. "Returnparameter

DATA: lt_cloi_methods_exp       TYPE STANDARD TABLE OF cloimetlog,
       lt_cloi_messages_exp      TYPE STANDARD TABLE OF cloimsglog,
       lt_cloi_msg_obj_log_exp   TYPE STANDARD TABLE OF cloimoblog.

lv_aufnr = '000100004180'.

CLEAR: ls_cloi_if_par_v2.
ls_cloi_if_par_v2-commitflg   = 'C'.
ls_cloi_if_par_v2-r3_version  = '60'.
ls_cloi_if_par_v2-metlog_req  = 'X'.
ls_cloi_if_par_v2-msglog_req  = 'X'.
ls_cloi_if_par_v2-msgobj_req  = 'X'.
ls_cloi_if_par_v2-ord_req     = 'X'.
ls_cloi_if_par_v2-ordseq_req  = 'X'.
ls_cloi_if_par_v2-ordopr_req  = 'X'.


wa_cloi_plord_resbu_imp-plnum = lv_aufnr.
wa_cloi_plord_resbu_imp-EXTPLNUM = lv_aufnr.
wa_cloi_plord_resbu_imp-posnr = '0050'.
wa_cloi_plord_resbu_imp-field = 'MENGE'.
wa_cloi_plord_resbu_imp-value = '30'.
APPEND wa_cloi_plord_resbu_imp TO lt_cloi_plord_resbu_imp.

CALL FUNCTION 'CLOI_CHANGES_UPL_45'
   EXPORTING
     cloi_if_par               = ls_cloi_if_par_v2
  IMPORTING
    cloi_ret_val               lv_cloi_ret_val
  TABLES
*   CLOI_PLORDI_IMP            =
*   CLOI_PLORDU_IMP            =
*   CLOI_PLORDD_IMP            =
*   CLOI_ORDI_IMP              =
*   CLOI_ORDU_IMP              =
*   CLOI_PLORD_OPRU_IMP        =
*   CLOI_ORD_OPRU_IMP          =
     cloi_plord_resbu_imp       = lt_cloi_plord_resbu_imp
*   CLOI_ORD_RESBU_IMP         =
*   CLOI_EBAN_IMP              =
*   CLOI_EKPO_IMP              =
*   CLOI_MAP_EXP               =
    cloi_method_log_exp        = lt_cloi_methods_exp
    cloi_message_log_exp       = lt_cloi_messages_exp
    cloi_msg_obj_log_exp       = lt_cloi_msg_obj_log_exp
*   CLOI_PLORD_EXP             =
*   CLOI_ORD_EXP               =
*   CLOI_PLORD_OPR_EXP         =
*   CLOI_ORD_OPR_EXP           =
*   CLOI_ORD_SEQ_EXP           =
           .

WRITE: / 'Returninfo:', lv_cloi_ret_val.

0 Kudos

Do you want to change planned or production orders? In case of production order fill table CLOI_ORD_RESBU_IMP instead of cloi_plord_resbu_imp. Check returned log an message table content.

0 Kudos

You're right, CLOI_ORD_RESBU_IMP is the right table.

I tried to change CLOI_ORD_OPRU_IMP table and it worked well!

But if i try to change the components, the Value can't be saved in database:

So in this case, theres an empty database insert.

If i want to correct the component, i got an error:

"Das System hat keine Materialnummer übergeben/no MATNR served by system"

Any idea?

0 Kudos

The company I am working for does do not use PP. Therefore I cannot verify it in my system.

As far as I understood the POSNR in CLOIRESBU is the item number of the corresponding BOM.

What do you want to change in PO components? Or do you want to add?

I think you can only change them.

Finally you should debug the FM to figure out why this message is raised and how to fill the fields and values in your case.

0 Kudos

I want to change the quantity of the components ex post after compare the expected value(old value) with the real value(new value for change).

This is the code where i supply the changing-table for the fm:

   lv_pos_nr = '0010'
   lv_field = '
EINHEIT'
   lv_value = 5.

     CLEAR wa_cloi_plord_resbu_imp.
   wa_cloi_plord_resbu_imp-AUFNR =    lv_aufnr.
   wa_cloi_plord_resbu_imp-EXTAUFNR = lv_aufnr.
   wa_cloi_plord_resbu_imp-POSNR =    lv_pos_nr.
   wa_cloi_plord_resbu_imp-field =    lv_field.
   wa_cloi_plord_resbu_imp-value =    lv_value.
   APPEND wa_cloi_plord_resbu_imp TO lt_cloi_plord_resbu_imp.

The BAPI works inasmuch as i get an empty value on the right position. I can change the value via transaction co02, so i got no authority problems i guess.

In one case, i reached changing the MEINS-field from 'KG' to 'ST', but not the other way around, which i can't explain.

The Warning-Message is raised in the function module CLOI_RESB_DATA.

I don't have any idea where i got wrong...


0 Kudos

Hi,

There is a SAP note 538945 describing the entire POI interface:

https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=0000538945&nla...

Look at the content of the attached zip files. Perhaps you can find something in the idoc processing for idoc type LOIPRO01.

I fear that the functionality with RESB might not work since the FM CLOI_CHANGES_UPL_45 is not released by SAP but CLOI_CHANGES_UPL_31 is.

CLOI_CHANGES_UPL_31 haven't got the parameter  CLOI_ORD_RESBU_IMP.

/Michael

0 Kudos

Is there any possibility to change the components of a production order beside BCD?

A solution would be using two FMs, one for delete flag and one for add the same component with other values. Are there any FMs which can handle this?

0 Kudos

Only other option then BDC I see is to make direct update of RESB-Table.

0 Kudos

Hi,

i studied the problem the last days, and i found a solution for the change of components in the production order:

With the FM CO_XT_COMPONENT_CHANGE, it is possible to make changes about Material, quantity and more.

Important is to execute the FM CO_XT_ORDER_PREPARE_COMMIT with "Commit Work"-Command afterwards to save the changes in the database.

In this way,i amanged to delete components, too(FM CO_XT_COMPONENTS_DELETE).

Now i try to add new components by FM CO_XT_COMPONENT_ADD.

I don't get any errors(sy-subrc = 0), but the position-nr is emty.

Anybody already dealt with the position-nr?

There is a parameter I_POSNO(Type CIF_R3RES-POSITIONNO), which is not kompatibel to the resb-posnr...

Can anybody help?


0 Kudos

Additional: I debugged my programm, the parameter i_posno is assigned to the stpoz-attribute of the resb-structure, which represents the new component.

Is there maybe any mechanism  the stpoz and posnr are involved?

0 Kudos

Thanks a lot dude. Finally I can use a FM to alter production order component(s).

SAP Ralot you can create a document for using these FMs.

It has been one of the most commonly queried issue in the forums.

0 Kudos

I have not found good solution, but it's possible to modify POSNR via ASSIGN before DB update. Implement this just before COMMIT:


TYPES: BEGIN OF ts_resb_bt.

         INCLUDE STRUCTURE resbb. TYPES:

         indold LIKE sy-tabix,

         no_req_upd LIKE sy-datar,

       END OF ts_resb_bt.

TYPES tt_resb_bt TYPE TABLE OF ts_resb_bt.

FIELD-SYMBOLS <lt_resb_bt> TYPE tt_resb_bt.

FIELD-SYMBOLS <ls_resb_bt> TYPE ts_resb_bt.

DATA lf_numc TYPE numc4.


ASSIGN ('(SAPLCOBC)RESB_BT[]') TO <lt_resb_bt>.

LOOP AT <lt_resb_bt> ASSIGNING <ls_resb_bt>.

  lf_numc = sy-tabix * 10.

  <ls_resb_bt>-posnr = lf_numc.

ENDLOOP.

Former Member
0 Kudos

Since I tried these function modules some years ago dealing with a similiar requirement I know how much effort you probably spent by trying and debugging to find out the way hou to use these SAP internal and not documented function modules of group COXT.

Although you are deservedly happy now because it is working you should not forget one thing which finally stopped me in the past using it.

These function modules are not released by SAP. This means they can be changed with every new release, enhancement or support package. SAP does not guarantee to keep parameters and functionallity. From this point of view they are not better then using CALL TRANSACTION.

I know that it is practise to use SAP internal function modules in own programs and I do not condemn it but I recommend to consider it at least. Some companies have got policies not to use unreleased function modules. Again not released in this context means not released for usage in customer programs.

You can see the status within the attributes tab. Compare it with any of a released FM like CONVERSION_EXIT_ALPHA_INPUT. There you'll find a Released on date.

/Michael

Former Member
0 Kudos

Thanks for the Information, Michael!

I think using the "unofficial" FMs is way better than using BDC in my case.

K.Arun, where can i put down the document? I will do this after the "CO_XT_COMPONENT_ADD"-FM is working perfect. DId you try to implement this FM? I always get the bug posted on top....

0 Kudos

You will find a link "Write a document" in the ABAP Development page.

In the document after compilation, mention the issues which Michael had put forth above regarding the unreleased FMs.

Regards.

Former Member
0 Kudos

Does anybody know how the posnr of the production orders components is composed of?

I found a way to assign the posnr, but i got no idea which values are the right ones...

0 Kudos

POSNR-Item number flows from BOM.

You will find in RESB table.

Regards.

0 Kudos

Hi,

Could you tell us how you passed the posnr to the component? I haven't managed to get that to work.

And thanks for sharing your findings about the CO_XT_COMPONENT... functions!

They're a great step forward compared to BDC!

Former Member

Another problem appeared in my programm:

If i first add and then delete a component, there is an error not founding CAUFVD(FM CO_BT_CAUFV_READ_WITH_KEY).,

Is there the need to fill the document tables, additional to the database?

If i add a component by transaction CO02 and then delete by using the Delete-FM, there is no error.

Regards.