3

I need to find a BAPI (or a chain of BAPIs?) to read the Notification Attachment List (GOS) using as input the Notification number.

enter image description here

I've tried many BAPIs, but the only functional result was via SO_OBJECT_READ FM to which I passed Object ID (which I obtained from SOOD table).

enter image description here

Problem is that I'm unable to retrieve the attachment object list belonging to the notification. Any idea or suggestion?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
SimonFreeman
  • 205
  • 1
  • 7
  • 17

1 Answers1

2

Try to use BDS_GOS_CONNECTIONS_GET function module to retrieve attachment list for notification. Specify parameters like this:

CALL FUNCTION 'BDS_GOS_CONNECTIONS_GET'
  IMPORTING
   logical_system  = <system name> * << optional parameter       
   classname       = BPR_NOTIF     * << object type for notifications     
   objkey          = 1014866112016 * << your notification number + year        
   client          = XXX
  TABLES
   gos_connections = lt_attachments
.

The attachments links can be found in SRGBTBREL table and FM OBJKEY parameter corresponds to INSTID_A field of this table.

Suncatcher
  • 10,355
  • 10
  • 52
  • 90
  • Hello, using as classname "BUS2080" and as objkey notification only it works. The problem is that I cannot use a Functional Module, I need to use a BAPI. – SimonFreeman Jun 24 '16 at 14:29
  • 1
    BAPI is nothing more than special-case function module. Tell me the reason for strong BAPI requirement. – Suncatcher Jun 24 '16 at 15:45
  • Because in my use case I need to use standard RFC BAPI, FM are not exposed to RFC. – SimonFreeman Jun 24 '16 at 18:22
  • 1
    But if you have access to backend, you can create z-copy of the above FM and make it remote-enabled. – Suncatcher Jun 28 '16 at 09:37
  • 1
    That's correct: I should avoid a z-copy, just wondering if there was a standard already exposed BAPI, but it seems not. Thank You! – SimonFreeman Jun 29 '16 at 06:35