Skip to Content
avatar image
Former Member

Access global variable from stand alone html page in SAP Web ui


I have global variable with data. I need to display the data in an html page. This html page is not a part of a view. It is in component CRMCMP_IC_FRAME under Pages with Flow Logic. This page is used as a popup when a IC toolbar button is called.

If I directly try to access the global variable it shows empty.

Can anyone please help me regarding this issue.

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    I am still trying but anable to find any solution. I have observed that when I am calling any call variable or method (static or instance) from the HTML page, Its not at all loading the run time call instances. So everything in the class in empty.

    How can I get the runtime class data from the HTML?

  • Get RSS Feed

2 Answers

  • Oct 27, 2016 at 05:54 AM

    Suggest you add additional Tag 'UI Webclient UI Framework' also.

    Regarding the question, where did you define your global variable?

    What JS codes from which file do you use to call this html page from the button?

    In your own html file, what's your codes to write the variable?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      1. I have defined the global variable (static and public) in a view which is loading in the begining and populating the value too. (In debugging I can see the value is there )

      2. I have created a new button on the IC toolbar and JS file header_jscripts.js is calling an html page as popup using code

      3. In HTML file I have declared a same type of variable and tried the following ways to assign the value.

      • Directly assign the value: lv_data = class_name=>variable_name
      • By calling a static method which is returning the value: lv_data = class_name=>method_name( ).
      • Is there a way to use the page attribute in this. I have limited knoledge of it. I have created a page attribute for the class in which the variable is but the attribute name is not recognized in the html page.

      Could you please help me out.

  • Nov 01, 2016 at 08:09 AM


    Not sure how exactly you implement your codes in the HTML file.

    When you assign lv_data = class_name=>variable_name , and when you using the lv_data, are you writing them in <% ... %> ?


    Or else, since you are opening the htm file using, maybe you can also refer to the file

    GenericPostExecutionNewWindow.htm under CRM_UI_FRAME. This

    GenericPostExecutionNewWindow.htm is to be opened by a JS statement when opening a transaction launcher in new window, and inside this htm file, you can see variable gv_layout .

    Add comment
    10|10000 characters needed characters exceeded