Skip to Content
0

Why BAPI_CONTRACT_GETDETAIL creates a GOS object button?

Mar 02, 2017 at 03:53 PM

183

avatar image

Hi gurus,

I use FM BAPI_CONTRACT_GETDETAIL to get information for certain contract number.

But during its work it creates a GOS Object button on screen.

Is it even normal for such kind of BAPI? I mean, I don’t create or change a contract, just read. This behavior isn’t relevant to data reading. I find this completely illogical to influence GUI from BAPI.

Any ideas, why this function was implemented in such kind of BAPI?

gos.png (11.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Jelena Perfiljeva
Mar 02, 2017 at 09:05 PM
2

We don't use purchasing contracts, so I can't confirm. It looks like you're testing BAPI using SE37. Are you sure the button is related to this BAPI specifically? Did you click on it to see what it does?

As Bruce replied, this is relevant to data reading but it is rather odd so see such behavior in BAPI.

If you suspect there is some problem in standard SAP then open an incident with SAP Support. Or maybe it's a "feature", then there might be an SAP note explaining where this came from.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

The button is related to BAPI. Of course I had tested it in different environments (including a report, where I found this "feature").

I've also debugged the source and found where the magic happens. It doesn't depend on input data.

I'll try to follow your advice and open an incident.

0
Bruce Tjosvold Mar 02, 2017 at 07:30 PM
0

The GOS functionality will allow any attachments that have been associated with that contract to be viewed. That would be my guess.

Bruce

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Yes, it is exactly what GOS does. And you're right, in this case it maintains corresponding contract. But such kind of logic is not typical for BAPI, which must read data rather than create GOS Object button.

If I want to create button, I prefer to use FM like *CREATE_GOS* (or create it using object cl_gos_publication for example). If there is no some secret implicit purpose, that it’s a very, very bad style called violation of the single responsibility principle.

0