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: 

BAPI Help - BAPI_REL_GETRELATIONS

Former Member
0 Kudos

Hi All,

I really am in need of some help with this BAPI.

This is my code


data: objectid type bapiborid.

  objectid-objkey  = material.
  objectid-objtype = 'BUS1080'.

  if sy-mandt = '260'.
    objectid-logsys  = 'IRDCLNT260'.
  elseif sy-mandt = '220'.
    objectid-logsys  = 'IRDCLNT220'.
  endif.

call function 'BAPI_REL_GETRELATIONS'
  exporting
    objectid              = objectid
*   ROLE                  =
*   RELATION              =
*   RECURSIONLEVEL        = 1
  IMPORTING
    RETURN                = RETURN4
 tables
   listofrelations       = list_of_relations.

However it is not returning anything at all and also there is no information in the return paramater! I am sure I am passing the correct parameters to the BAPI but to no avail. What I am trying to do is get all the object links (or relations) held against this object (Material) ... Any ideas??

3 REPLIES 3

Former Member
0 Kudos

Hi,

Pls check these links below-

Regards

Lekha

b_deterd2
Active Contributor
0 Kudos

Hi,

Are you sure you must use BUS1080 and not BUS1001 ?

If so then remember that bus1080 has three keyfields. Are you syre you passed those three keyfields in the objectid?

regards,

Bert

Former Member
0 Kudos

done