Use IFrame and read cookie in ABAP

I think it is possible and can be simply achieved. You can do the following:

Firstly, create a business server pages application on the server. Make sure the application contains a frameset and two IFrames as a part of the frameset.

Then you need to split up the implementation between these two IFrames. First IFrame will contain the third party component and second component will contain the view and JS part of the application that we just created. Make sure the second frame does not have any height as it should be invisible to the user.

Then you can write client-side code in the second frame to fetch the cookie from a third-party component in the first frame and save the value into hidden fields and then as a part of the form submit these hidden fields. In this manner, your cookie of the third-party component is accessible by ABAP code.