cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_BUS1077_DELETE to delete single properties?

LN1
Participant
0 Kudos

SAP System Component Version: EHP6 FOR SAP ERP 6.0

Hi. I expected to be able to delete single properties, that is, single characteristic value in a VAT rather than all characteristics/VA instance by the ff. BAPI call:

        CALL FUNCTION 'BAPI_BUS1077_DELETE'

          EXPORTING

            key_date                = sy-datum

            FLG_PROP_DATA           = 'X'

            flg_val_check_by_status = ' '

          TABLES

            return                  = t_ret2

            sub_header              = t_del_subhead

            prop_header             = t_del_prophead

            prop_val                = t_del_propval

            PROP_DATA               = t_del_propdata.

I verified that the table params contain the correct records from pervious *GETDETAIL call. I also tried to comment out the other tables and only left PROP_DATA and return. But the specific charact. is not getting deleted. Though the *DELETE call works for deleting VAI if flg_prop = 'X' and prop_val is filled.

Upon debugging, I noticed the ff. in FORM L_PROPD_DELETE called from C1F2_SUBSTANCES_DELETE that the BAPI calls:

* delete properties valuation

  IF i_flg_prop_data = true.

*    PERFORM L_PROP_DATA_DELETE

*                TABLES

*                   X_API_PROPD_TAB-DATA

*                USING

*                   I_ADDINF

*                   I_FLG_CHECK_ONLY

*                CHANGING

*                   X_PROPHEAD

*                   X_API_PROPD_TAB-PROP

*                   X_FLG_LOCKFAIL

*                   X_FLG_WARNING

*                   X_FLG_ERROR

*                   E_FLG_INTERNAL_ERROR.

    IF e_flg_internal_error = true.

      EXIT.

    ENDIF.

*    FLG_CHANGED = TRUE.

  ENDIF.

The subroutine is commented out. And when I checked the actual form, it contains no processing:

FORM l_prop_data_delete

* Purpose: This form deletes property-charact.-values.

Any info why SAP did that? Any suggestions so I can perform the requirement to delete specific property-charact.-values and not the whole VAI? Create enhancements? (like in ES_SAPL1077, BAdI BADI_EHSS_SPEC_VAL_CHECK) Perform a direct delete from table AUSP? Kindly advise.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

christoph_bergemann
Active Contributor
0 Kudos

Dear Maria

SAP provides some "sample" reports regarding the "correct" use of these BAPIs. E.g. check: http://www.se80.co.uk/sapreports/r/rc1_/rc1_1077_bapi_example_change.htm

May be these examples might help. If you check OSS you will find a lot of improvements changes other the year (e.g. performance and other type of stuff). There are a lot of OSS note avialable which are "consulting" related regarding the APIs/BAPIS (but they are not easy to find)

May be check: http://scn.sap.com/docs/DOC-41109

May be at the end you need to start OSS dialog.

C.B.

Answers (1)

Answers (1)

LN1
Participant
0 Kudos

Alternative solution is to use BAPI_BUS1077_CHANGE. Pass to it all PROP_DATA records from previous *GETDETAIL call; clear the char/num field values of selected/specific characts. This met the reqt.