cancel
Showing results for 
Search instead for 
Did you mean: 

activity relation using bapi bapi_network_maintain

Former Member
0 Kudos

hi gurus,

i wrote a upload program to create relation between the activities using the bapi bapi_networ_maintain .

I used refnumber Objecttype method object key

000001 NetworkRelation CREATE FS0000600001610280

000000 save

for i_method_project table

object key is formed with the combination of

wa_tab-relation_type wa_tab-net_pd wa_tab-activity_predecessor

wa_tab-net_sc wa_tab-activity_successor INTO w_objkey

here in my program objectkey value is obtained from the bellow values.

wa_tab-relation_type value is 'FS'

wa_tab-net_pd VALUE is empty (there is no value for this field in excel sheet)

wa_tab-activity_predecessor value is ' 000060000161'

wa_tab-net_sc value is empty ((there is no value for this field in excel sheet)

wa_tab-activity_successor value is ' 0280'

when i run the program I am getting the bellow error ..........

An incorrect object key was entered for object type Relationship

kindly sugest the solution for my problem.

thanks in advance,

padmaja.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Object key is formed as follows

<Rel Type><Precedding Network><Preceeding Network Activity><Successor Network><Successor Network Activity.

All concatenated without any spaces or special characters.

If the relation ship created by you is of same type then in program you can write concatenation statement and form object key. No need to input it through excel.

You have to pass Preceeding and Successor Networks followed by respective activity number for program to work.

Do not keep Network columns empty in excel. Pass Network number.

It will then work as desired.

Thanks

Saikishore.Ganga

Former Member
0 Kudos

Hi ,

I think there is some error in the code written as you have mentioned that

object key is formed with the combination of

wa_tab-relation_type wa_tab-net_pd wa_tab-activity_predecessor

wa_tab-net_sc wa_tab-activity_successor INTO w_objkey

but as per the documentation found for this particular BAPI ( bapi_network_maintain ) ,

there should be only 1 object type , and can be a single network .

Please look into the documentation by opening this BAPI in system and try to write the program as per the rules.

May your problem get resolved .

And I suggest you to post this thread to Abap Forum , and there you can get the exact solution.

Thanks ,

Dhruv Kumar Malhotra

Edited by: Dhruv Kumar Malhotra on Aug 4, 2009 8:30 AM