cancel
Showing results for 
Search instead for 
Did you mean: 

how can I read the parameter on UI5 program?

0 Kudos

<Question>: How can I read the parameter in URL on UI5 program when I click ‘Open Task’ button of approval menu in Fiori inbox?



  • Settings


          1) Tcode : SWFVISU

       

          2) I created a new target in Fiori



          3) Screenshot of an executed result on inbox

          --> The Workitem is specified as parameter ccc=00000006297, but I can’t get this parameter on UI5 program.



          4) Final URL


http://XXXXXXX:8020/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?sap-client=100&sap-lan...?ccc=000000006297&openMode=external


         

     So what I want to know is how I can read the parameter ‘ccc’ in above URL on UI5 program.

Accepted Solutions (1)

Accepted Solutions (1)

LeonardoGomez
Advisor
Advisor
0 Kudos

Hi,

you can do it like this:

var ccc = jQuery.sap.getUriParameters().get("ccc");

Regards,

Leonardo.

0 Kudos

Hi Leonardo Gomez, thanks for your reply.

I've tried to do that, but I still can't solve it.

Please refer to below.

1) I am trying to get parameter ‘ccc’ to Component.js of UI5 program by using jQuery.sap.getUriParameters().get("ccc"), but it doesn’t work.

2) Inbox Screen --> The Workitem is specified as parameter ccc=00000006297, but I can’t get this parameter on UI5 program.

LeonardoGomez
Advisor
Advisor
0 Kudos

Hi Kim,

Run your application, open the developer tools of your browser (F12 in Chrome) and set up a break point before your call to jQuery.sap.getUriParameters().get("ccc") function. Maybe the problem is in the data binding.


Regards,

Leonardo.

younghwan_kim
Active Participant
0 Kudos

Try

this.getComponentData().startupParameters.ccc[0]


Instead of


jQuery.sap.getUriParameters().get("ccc")

0 Kudos

Hi Leonardo Gomez,

I finally made it

Thank you very much for your reply.

I really appreciate your kind help to me.

LeonardoGomez
Advisor
Advisor
0 Kudos

Good to know! Mark the correct answer if you can.

Cheers,

Leonardo.

agentry_src
Active Contributor
0 Kudos

As Leonardo suggested, please mark this Discussion with a Correct Answer (closes, but does not lock the Discussion) and Helpful Answer where appropriate. See http://scn.sap.com/community/support/blog/2013/04/03/how-to-close-a-discussion-and-why   Even if you discovered the solution without any outside contributions, it helps others to understand what the solution turned out to be. 

Do not use Assumed Answered as it confuses anyone looking for the specific answer.  If you dig into the Getting Started link (top right of each SCN page), you are only instructed to mark Helpful or Correct Answers to Discussion responses. 

Thanks, Mike (Moderator)

SAP Technology RIG

Answers (1)

Answers (1)

younghwan_kim
Active Participant
0 Kudos

You can get the parameters from component data, like

this.getComponentData().startupParameters

Check the details.

Handling Startup Parameters - User Interface Add-On for SAP NetWeaver - SAP Library

0 Kudos

Hi Young Hwan Kim,

I could solve it!

Thank you very much for your reply.

It helped me a lot