Application Development and Automation 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: 
Read only

Question on BAPI_NETWORK_MAINTAIN

Former Member
0 Likes
587

Hi All,

Iam facing a Problem with this bapi BAPI_NETWORK_MAINTAIN .

I have populated the field activity_successor in the internal table it_relation which we export to Function Module.

But it is throwing an error stating *Activity 1492 does not exist in the network " " *

Below is my code :

wa_method-objecttype = c_object_type. "Network relation

wa_method-method = c_method. "Create

wa_method-objectkey = 'FS00000090445314910000009044531492'.

wa_method-refnumber = c_refnumber. "000001

APPEND wa_method TO it_method.

CLEAR wa_method.

wa_method-objecttype = ''.

wa_method-method = c_method1. " Save

wa_method-objectkey = ''.

wa_method-refnumber = ''.

APPEND wa_method TO it_method.

  • populate network table

wa_network-network = wa_nrel-o_network.

APPEND wa_network TO it_network.

wa_relation-activity_successor = wa_nrel-n_act_succ. "Activity successor = 1492

wa_relation-relation_type = wa_nrel-relation_type. " FS

wa_relation-duration_relation_unit = wa_nrel-duration_relation_unit. " 2

wa_relation-duration_relation = wa_nrel-duration_relation. " D

APPEND wa_relation TO it_relation.

wa_nrel is the work area which holds the data. I have mentioned the data which work area contains in the right corner.

My network number is 904453 and acitvity number are 1491 and 1492

1 REPLY 1
Read only

Former Member
0 Likes
399

from err msg it looks like network number is not passed.

try passing

NETWORK_ PREDECESSOR = same network number

NETWORK_ SUCCESSOR = same network number

that's how shown in SAP help