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: 

SUBOBJECT_NOT_FOUND using bapi_contract_create

Former Member
0 Kudos

Hi Guys,

I have an issue whereby for some 'Z' document types, it cannot create contract using BAPI_CONTRACT_CREATE. I have tried to debug and find that it could be caused when calling class CL_API_MASTER_CONDITION_MM and OBJECT 'COND' SUBOBJECT 'MAINTENANCE' is not found then a short dump occurred. However, when i check with the functional team, the contract can be created from ME31K and does not need a condition to be input. Also, this problem only occurs after my client upgraded their SAP from EHP5 to EHP7. This has no issue on EHP5 with the same data.

Below and attached are the short dump. Kindly help me as i am unsure if this is an SAP program issue or data issue. Thanks!

  53 * when object/subobject is specified

  54  IF NOT I_OBJECT IS INITIAL OR NOT I_SUBOBJECT IS INITIAL.

  55 *  we do only have to do something when current values have changed

  56    IF G_S_CURRENT-OBJECT    NE I_OBJECT OR

  57        G_S_CURRENT-SUBOBJECT NE I_SUBOBJECT.

  58 *    does this combination exist ?

  59      CALL FUNCTION 'BAL_OBJECT_SUBOBJECT_CHECK'

  60            EXPORTING

  61                I_OBJECT            = I_OBJECT

  62                I_SUBOBJECT        = I_SUBOBJECT

  63            EXCEPTIONS

  64                OBJECT_NOT_FOUND    = 1

  65                SUBOBJECT_NOT_FOUND = 2

  66                SUBOBJECT_NECESSARY = 2

  67                OTHERS              = 2.

  68      CASE SY-SUBRC.

  69        WHEN 1. RAISE OBJECT_NOT_FOUND.

>>>>>        WHEN 2. RAISE SUBOBJECT_NOT_FOUND.

  71      ENDCASE.

  31 FORM        SAPLSLG0                            LSLG0F02                              70

      SET_CURRENT

  30 FUNCTION    SAPLSLG0                            LSLG0U01                              30

      APPL_LOG_INIT

  29 FORM        SAPLCOND_MNT_INTF                  LCOND_MNT_INTFFPR                      11

      PROTOCOL_INIT

  28 FUNCTION    SAPLCOND_MNT_INTF                  LCOND_MNT_INTFU02                      42

      COND_MNT_START

  27 METHOD      CL_API_MASTER_CONDITION_MM====CP    CL_API_MASTER_CONDITION_MM====CM00J    93

      CL_API_MASTER_CONDITION_MM=>PROCESS_VAL_PERIODS

  26 METHOD      CL_API_MASTER_CONDITION_MM====CP    CL_API_MASTER_CONDITION_MM====CM00I  129

      CL_API_MASTER_CONDITION_MM=>PROCESS_CONDITION

  25 METHOD      CL_API_MASTER_CONDITION_MM====CP    CL_API_MASTER_CONDITION_MM====CM00H    39

      CL_API_MASTER_CONDITION_MM=>HANDLING_CONDITION

  24 METHOD      CL_API_MASTER_CONDITION_MM====CP    CL_API_MASTER_CONDITION_MM====CM003    38

      CL_API_MASTER_CONDITION_MM=>PROCESS

  23 METHOD      SAPLMEOUT                          LMEOUTP5B                            230

      LCL_R_COND_API=>IS_VALID

  22 METHOD      CL_SIMPLE_RULE_MM=============CP    CL_SIMPLE_RULE_MM=============CM00F    71

      CL_SIMPLE_RULE_MM=>IF_RULE_MM~EXECUTE

  21 METHOD      CL_RULE_INTERPRETER_MM========CP    CL_RULE_INTERPRETER_MM========CM005    38

      CL_RULE_INTERPRETER_MM=>EXECUTE

  20 METHOD      CL_RULE_INTERPRETER_MM========CP    CL_RULE_INTERPRETER_MM========CM002    59

      CL_RULE_INTERPRETER_MM=>PROCESS_RULES

  19 METHOD      SAPLMEOUT                          LMEOUTP03                            297

      LCL_OUT_HEADER=>IF_PURCHASE_OUT_HEADER~PROCESS

1 ACCEPTED SOLUTION

former_member200338
Active Contributor
0 Kudos

Have a look at below OSS

1784267 - Dump when creating contract via SAP Sourcing or SOA


Summary

------------------------------------------------------------------------
|Manual Activity                                                       |
------------------------------------------------------------------------
|VALID FOR                                                             |
|Software Component   SAP_APPL                      SAP Application   |
| Release 604          From SAPKH60401                                 |
| Release 605          All Support Package Levels                      |
| Release 606          From SAPKH60601                                 |
| Release 616          All Support Package Levels                      |
| Release 617          From SAPKH61701                                 |
------------------------------------------------------------------------

Start transaction SLG0 and create following new entry:

  • Object: COND
  • Object text: Condition technique (ERP)

Once this is done, please create the following sub-object for object COND:

  • Subobject: MAINTENANCE
  • Subobject text: Maintenance of Condition records


Save your changes.

3 REPLIES 3

former_member200338
Active Contributor
0 Kudos

Have a look at below OSS

1784267 - Dump when creating contract via SAP Sourcing or SOA


Summary

------------------------------------------------------------------------
|Manual Activity                                                       |
------------------------------------------------------------------------
|VALID FOR                                                             |
|Software Component   SAP_APPL                      SAP Application   |
| Release 604          From SAPKH60401                                 |
| Release 605          All Support Package Levels                      |
| Release 606          From SAPKH60601                                 |
| Release 616          All Support Package Levels                      |
| Release 617          From SAPKH61701                                 |
------------------------------------------------------------------------

Start transaction SLG0 and create following new entry:

  • Object: COND
  • Object text: Condition technique (ERP)

Once this is done, please create the following sub-object for object COND:

  • Subobject: MAINTENANCE
  • Subobject text: Maintenance of Condition records


Save your changes.

0 Kudos

i've tried adding the objects in SLG0 but it still giving me an error

ME                   816 System error (error in method CL_API_MASTER_CONDITION_MM=>PROCESS)

it seems that the error is caused in this class. do you have any idea?

*I'll open new thread for this issue, thanks for your answer Niyaz.

0 Kudos

This message was moderated.