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: 

Error Releasing Network via BAPI_NETWORK_MAINTAIN

Former Member
0 Kudos

I am trying to release network using BAPI_NETWORK_MAINTAIN with the following codes below:-

MOVE: 'NETWORK' TO lw_method-objecttype,

'000001' TO lw_method-refnumber,

'RELEASE' TO lw_method-method,

w_network-aufnr TO lw_method-objectkey.

APPEND lw_method TO li_method.

CLEAR: lw_method.

MOVE: 'SAVE' TO lw_method-method.

APPEND lw_method TO li_method.

MOVE: w_network-aufnr TO lw_netwrk-network.

APPEND lw_netwrk TO li_netwrk.

CALL FUNCTION 'BAPI_NETWORK_MAINTAIN'

IMPORTING

return = lw_return

TABLES

i_method_project = li_method

i_network = li_netwrk

e_message_table = li_mess.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = c_update.

List of errors obtained include: -

The network could not be released

Termination: Too many errors (more than 10% of methods)

The order or network could not be saved

2 REPLIES 2

uwe_schieferstein
Active Contributor
0 Kudos

Hello Chin

I assume that the value for objecttype is not correct. It should be '<b>Network</b>' (small letters!).

Please refer to the type group '<b>CO1</b>' for more details (partial coding shown below):

...
*   abstact ordertype for all common attributes of all ordertypes
    order                 TYPE co1_objtyp VALUE 'Order',
    planned_order         TYPE co1_objtyp VALUE 'PlannedOrder',
    production_order      TYPE co1_objtyp VALUE 'ProductionOrder',
    production_operation  TYPE co1_objtyp VALUE 'ProductionOperation',
    ps_system             TYPE co1_objtyp VALUE 'PsSystem',
    project_definition    TYPE co1_objtyp VALUE 'ProjectDefinition',
    wbs_element           TYPE co1_objtyp VALUE 'WBS-Element',
    wbs_dates             TYPE co1_objtyp VALUE 'WBS-Dates',
    wbs_hierarchy         TYPE co1_objtyp VALUE 'WBS-Hierarchy',
    wbs_milestone         TYPE co1_objtyp VALUE 'WBS-Milestone',
    act_milestone         TYPE co1_objtyp VALUE 'ActivityMilestone',
    network               TYPE co1_objtyp VALUE 'Network',  " !!!
    network_activity      TYPE co1_objtyp VALUE 'NetworkActivity',
    network_element       TYPE co1_objtyp
                          VALUE 'NetworkActivityElement',
    network_relation      TYPE co1_objtyp VALUE 'Relationship',
    milestone             TYPE co1_objtyp VALUE 'MileStone',
    ps_text               TYPE co1_objtyp VALUE 'PS-Text',
    component             TYPE co1_objtyp VALUE 'Component',
    capacity              TYPE co1_objtyp VALUE 'Capacity',
    order_sequence        TYPE co1_objtyp VALUE 'OrderSequence',
    order_position        TYPE co1_objtyp VALUE 'OrderPosition',
    unit                  TYPE co1_objtyp VALUE 'Unit',
    calendar              TYPE co1_objtyp VALUE 'Calendar',
    project_edit_specials TYPE co1_objtyp
                          VALUE 'ProjectEditMaskSpecialChars',
    project_edit_mask     TYPE co1_objtyp VALUE 'ProjectEditMask',
    message_log_method    TYPE co1_objtyp VALUE 'MessageLogMethod',
    message_log_message   TYPE co1_objtyp VALUE 'MessageLogMessage',
    message_log_object    TYPE co1_objtyp VALUE 'MessageLogObject',
...

Regards

Uwe

Former Member
0 Kudos

Thank you Uwe. I tried your suggestion but I'm still getting the same errors.