on 2018 May 28 11:36 AM
Hello Experts,
I have a requirement that I need to open a PDF form generated by a FM(RFC) in SAP ECC. From MII, I am passing relevant data to FM and FM gives "PDF_STRING" that I can open by Runner & application/pdf.
Now the problem is - we use SSO to login to SAP. So when I'm calling the FM, I map
SAP_JCo_Start_Session_UP2.SAPSSO2Ticket to Transaction.MYSAPSSO2
Now when I use Runner, I am passing IllumloginName as below but still somehow MII is not able to generate SAPSSO2Ticket and hence FM is failing.
var printWindow = window.open(url + '/Runner?Transaction=Default/Demo/DemoPDF&Action=UP2&IllumLoginName=test_mii&OutputParameter=Output&Content-Type=application/pdf&IsBinary=true','','scrollbars=yes,width=720, height=960');
Now if I use Illuminator, FM runs properly but if I use application/pdf with illuminator, it gives an error stating SAP MII type is not supported.
So I'm kind of stuck.
With Runner, MII is not able to create SAPSSO2Ticket so FM is failing.
With Illuminator, MII is able to create SAPSSO2Ticket and FM runs fine with giving back PDF_STRING but illuminator does not support application/pdf.
What options do I have to resolve the issue?
Thanks !
Request clarification before answering.
Soham,
You may want to try j_user if IllumLoginName isn't working. Also, if the web application / JS code is hosted on the MII server, just give the MII user access to the transaction if they don't already have access and remove IllumLoginName parameter from the URL.
The Illuminator service is out of the question if you are trying to return Content-Type=application/pdf. There are a few things I can think of for your situation:
1) Content-type white list entry issue
If you are running MII 15.1 or later, application/pdf needs to be added to the white list (SAP note 2423159)
2) Enable MYSAPSSO2 authentication through NetWeaver AS Java Administrator (nwa) if it is not currently set up correctly
This requires:
3) Pass in (IllumLoginName and IllumLoginPassword) or (j_user and j_password) into the Runner URL as parameters
This is not a good option because you are putting the password in code. The user would need to be restricted in access to only call the runner against the transaction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Eric for the detailed answer and explanation !
Well, I found another way.
The Function Module(FM) in ECC was failing as MII Service User created for FM/RFC did not have Spool Access. So now I am calling Illuminator Service of MII and getting the username of the MII user.
I'm passing this username to MII Transaction as input variable. MII Transaction is passing this username to RFC as import parameter. My ABAP developer changed the logic in RFC to change sy-uname to the username MII is passing. This way RFC is getting executed and I am able to open the PDF.
Thanks for the help though.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.