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: 

Overview of all GOS-elements for an Object

Former Member
0 Kudos

Hi,

is there any FM or class to find all GOS elements for an Object

f. Ex. EQUI or BUS2080?

thanks for Help.

Regards, Dieter

16 REPLIES 16

Former Member
0 Kudos

You can use the class cl_gos_manager.

0 Kudos

Hi Ravi,

thanks for your answer. Can you show which method i have to use

to find all element f. Ex. to object BUS2080?

Regards, Dieter

athavanraja
Active Contributor
0 Kudos

Hi Dieter,

What do you mean by all GOS elements? of a business object?

Regards

Raja

0 Kudos

Hi Durairaj,

thanks for your answer.

We often use the Service of Object to create attachments for Material or Eqipments.

I'm looking for a possibility for a list of all Attachments (PDF, JPG, etc.)

for ALL METRAILS or ALL EQIPMENTS.

Regards, Dieter

0 Kudos

use FM BDS_ALL_CONNECTIONS_GET without specifying the objeckey.

just pass

LOGICAL_SYSTEM <logsys>

CLASSNAME <BUS...>

CLASSTYPE BO

CLIENT

ALL 'X'

Regards

Raja

0 Kudos

Hi Dieter,

You can use method 'DISPLAY' of class CL_GOS_ATTACHMENTS or

FM BDS_GOS_CONNECTIONS_GET

Regards,

Srinivas

0 Kudos

Hi Durairaj,

thanks for your answer.I have tried it with this:

DATA: BEGIN OF ALL_CON OCCURS 0.

INCLUDE STRUCTURE BDN_CON.

DATA: END OF ALL_CON.

*

CALL FUNCTION 'BDS_ALL_CONNECTIONS_GET'

EXPORTING

CLASSNAME = 'BUS2080'

CLASSTYPE = 'BO'

ALL = 'X'

NO_GOS_DOCS = ' '

TABLES

ALL_CONNECTIONS = ALL_CON.

*

LOOP AT ALL_CON. WRITE: / ALL_CON. ENDLOOP.

*

But i didn't any result.

<b>We have changed to ECC6. Is this the problem or what mistake do i do</b>?

Regards, Dieter

0 Kudos

you havent passed logical system parameter

LOGICAL_SYSTEM <logsys>

Regards

Raja

0 Kudos

and also the CLIENT parameter

CLIENT = sy-mandt

Raja

0 Kudos

Hi Durairaj,

i have tried:

DATA: BEGIN OF ALL_CON OCCURS 0.

INCLUDE STRUCTURE BDN_CON.

DATA: END OF ALL_CON.

*

CALL FUNCTION 'BDS_ALL_CONNECTIONS_GET'

EXPORTING

LOGICAL_SYSTEM = our logicat system

CLASSNAME = 'BUS2080'

CLASSTYPE = 'BO'

ALL = 'X'

NO_GOS_DOCS = ' '

CLIENT = SY-MANDT

TABLES

ALL_CONNECTIONS = ALL_CON

EXCEPTIONS

NO_OBJECTS_FOUND = 1

ERROR_KPRO = 2

INTERNAL_ERROR = 3

NOT_AUTHORIZED = 4

OTHERS = 5.

*

LOOP AT ALL_CON. WRITE: / ALL_CON. ENDLOOP.

*

nothing in ALL_CON.

regards, Dieter

0 Kudos

are you sure you passed right logical system may be try running OWN_LOGICAL_SYSTEM_GET (FM) to get the right logical system and pass the same to BDS_ALL... FM

i am using this FM in my programs and it works fine (ECC5.0)

Regards

Raja

0 Kudos

Hi Durairaj,

i have updated like this:

DATA: BEGIN OF ALL_CON OCCURS 0.

INCLUDE STRUCTURE BDN_CON.

DATA: END OF ALL_CON.

*

DATA: LOGSYS LIKE TBDLS-LOGSYS.

*

CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'

IMPORTING

OWN_LOGICAL_SYSTEM = LOGSYS.

*

CALL FUNCTION 'BDS_ALL_CONNECTIONS_GET'

EXPORTING

LOGICAL_SYSTEM = LOGSYS

CLASSNAME = 'BUS2080'

CLASSTYPE = 'BO'

ALL = 'X'

NO_GOS_DOCS = ' '

CLIENT = SY-MANDT

TABLES

ALL_CONNECTIONS = ALL_CON

EXCEPTIONS

NO_OBJECTS_FOUND = 1

ERROR_KPRO = 2

INTERNAL_ERROR = 3

NOT_AUTHORIZED = 4

OTHERS = 5.

*

LOOP AT ALL_CON. WRITE: / ALL_CON. ENDLOOP.

*

Nothing in ALL_CON.

Regards, Dieter

0 Kudos

sorry no clue. the following is the test program i wrote and it works fine in my case

REPORT YBDSCONNECTIONS
       NO STANDARD PAGE HEADING.
Data: LOGICAL_SYSTEM LIKE  BAPIBDS01-LOG_SYSTEM ,
CLASSNAME LIKE  BAPIBDS01-CLASSNAME ,
CLASSTYPE LIKE  BAPIBDS01-CLASSTYPE ,
CLIENT LIKE  SY-MANDT ,
ALL LIKE  BAPIBDS01-X  .

data: all_con like BDN_CON occurs 0 with header line .

CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
    IMPORTING
      OWN_LOGICAL_SYSTEM = LOGICAL_SYSTEM.
*
  CALL FUNCTION 'BDS_ALL_CONNECTIONS_GET'
    EXPORTING
      LOGICAL_SYSTEM   = LOGICAL_SYSTEM
      CLASSNAME        = 'BUS0012'
      CLASSTYPE        = 'BO'
      ALL              = 'X'
      NO_GOS_DOCS      = ' '
      CLIENT           = SY-MANDT
    TABLES
      ALL_CONNECTIONS  = ALL_CON
    EXCEPTIONS
      NO_OBJECTS_FOUND = 1
      ERROR_KPRO       = 2
      INTERNAL_ERROR   = 3
      NOT_AUTHORIZED   = 4
      OTHERS           = 5.
*
  LOOP AT ALL_CON. WRITE: / ALL_CON. ENDLOOP.

Regards

Raja

0 Kudos

Hi Durairaj,

i have tried your code and have only changed BUS0012 to BUS2080.

There are nothing in all_con!

I think there has something changed in ECC6.

I will look on SAP-Notes.

Thanks for your Help.

Regards, Dieter

0 Kudos

Hi Durairaj,

i have tried the FM under 4.6C. I didn't get any result.

must i do any customizing?

Regards, Dieter

0 Kudos

i am not very familiar with config. but check this OSS note, this may help

https://service.sap.com/sap/support/notes/530792

Regards

Raja