Passing importing parameter in  ABAP to  java script variable

Hi Experts,
I am calling a ABAP function module in javascript.Now how can I take importing parameter in  ABAP to java script variable. Because I need to give alert using the improting Paramter value...
Thanks in advance..
RR

to pass ABAP variable value to javascript variable the syntax is
var myjsvariable = "<%=abapvariable%>";
Edited by: Durairaj Athavan Raja on Jul 29, 2009 2:39 PM

Similar Messages

  • How to pass Cascading Parameter in SSRS using Java

    How to pass Cascading Parameter in SSRS using Java---
    We are having a problem with dependent parameters.There are three drop down--
    1.first dropdown is of Country.When we select a country--Accordingly next dropdown(State)will populate
    2.Second dropdown is of State. When we select a state--Accordingly next dropdown(City)will populate.
    I have three data sources are
    CountryList-
    SELECT CountryRegionCode, Name
    FROM Person.CountryRegion
    ORDER BY Name
    StateList
    SELECT StateProvinceID, StateProvinceCode, CountryRegionCode
    FROM Person.StateProvince
    WHERE CountryRegionCode = @CountryRegionCode
    ORDER BY StateProvinceCode
    CityList
    SELECT StateProvinceID, City
    FROM Person.Address
    GROUP BY StateProvinceID, City
    HAVING (StateProvinceID = @StateProvinceID)
    ORDER BY City
    Ihave to show report that has been deployed on server on the besis of these parameters
    I am using ReportViewer in JSP Page through url--
    http://192.168.90.149/ReportServer/Pages/ReportViewer.aspx?%2fReport+Project1%2fCascading_Parameters&rs:Command=Render&rs:parameter=true&Country="+Country+"&State="+State;
    But it is not accepting parameter if they are cascaded.It is working fine if Both parameters are independent.
    Edited by: kaushlee on May 11, 2010 9:22 PM

    Take a look at set_custom_property:
    public static final ID SETTEXT = ID.registerProperty("SETTEXT");
    public boolean setProperty(ID pid, Object value)
        if (pid == SETTEXT)
    String text = value.toString();
    and in forms
    set_custom_property('beans.bean_item', 1, 'SETTEXT', 'some text');
    cheers

  • Returning/passing Java script variable/value to PL/SQL environment

    Hi,
    Can someone give me a sample code about how to return a Java script variable to PLSQL environment?
    for example, I have a javascript function that returns timestamp in milisecond, I then want to write PLSQL code to call this java script function and save its value in a number-typed plsql variable for further calculation, I dont know how the two scripting language communicate.
    Thank you very much
    Binh
    null

    This is quite simple.
    I assume that you are able to define html form side through pl/sql. Suppose your new pl/sql value is v_time then in the procedure that you write include one more statement
    htp.p('<Input type=hidden name="v_time" value="">');
    and also in the form invocation,
    htp.p('<form name=app method=post action="time_handler" onSubmit="return false;">');
    and to the end you must be having a submit
    to it attach a onClick function that calls
    simply our validate function..
    eg htp.p('<Input type=submit value="process"
    onClick="validate();">');
    Include in the head portion
    the following script using htp.p procedure
    function validate()
    app.v_time.value=<calculated value>;
    return app.submit();
    Hope this helps.
    Nat
    null

  • How to access a JAVA Script variable in JSP Code

    How to access a JAVA Script variable in JSP Code. I have been unable todo this.
    Plz Suggest a way.
    Thanks
    Soumya

    try to do this code
    String s=request.getParameter("javascriptvariablename");

  • Pass value of Java script variable to ABAP variable (in BSP)

    Hi,
    I have a Javascript variable declared in the SCRIPT tag of BSP layout page.
    I want to pass its value to ABAP variable, so that later I can do some computations using the ABAP variable.
    (ABAP variable is also declared in the same SCRIPT tag of BSP page)
    Would request to post a sample code, if possible.
    Would appreciate quick replies.
    Thanks & Regards,
    Nisha Vengal.

    just check this
    https://forums.sdn.sap.com/click.jspa?searchID=16240444&messageID=1191305

  • Problem in passing import parameter to SAP Widget

    Dear experts,
    I have a widget which shows me important information by passing date as a parameter
    on eclipse plugin.
    I am able to see data only if i give date as YYYYMMDD as standard SAP format.
    I want to pass sysdate in this way ,what should i write.
    Controller.showMain_View({"INPUT_DATE":               });
    If input_Date is import parameter then how should i pass the value. ?
    Thanx in advance.

    hi,
    First check whether you have any predefined functions in the widget library..else create a java script and call it in your widget...
    you can use this  Java script code and modify the output according to your usage using string functions:
    use date function to get the system date...
    also include the js file in your .kon file...
    thanks
    jaideep srinivasan

  • How to pass import parameter it_header_guid to FM CRM_ORDER_READ

    Hi,
    I have an internal table with only one field GUID of type CRMT_OBJECT_GUID.
    Now I need to pass this into the import parameter of the FM CRM_ORDER_READ.
    I tried in many ways but getting a type conflict error.
    <removed_by_moderator>
    Thanks,
    Madhurima
    Edited by: Julius Bussche on Sep 15, 2008 12:49 PM

    Hi Madhurima,
    Post CRM Technical or Functional related queries in "Customer Relationship Management (CRM) - General & Framework" available under SAP Solutions in Expert Forums.
    And regarding your question,
    Your guid should be of  "CRMT_OBJECT_GUID_TAB" type and not CRMT_OBJECT_GUID.
    Eg,
    DATA : IT_GUID TYPE CRMT_OBJECT_GUID_TAB.
    APPEND '488628CFB8C600B0E1008000C0090137' TO IT_GUID.
    CALL FUNCTION 'CRM_ORDER_READ'
        EXPORTING
          IT_HEADER_GUID       = IT_GUID
    Hope this helps.
    Thanks.
    Best Regards,
    Arun Sankar.

  • Optional import parameter in abap webservice

    I am using ECC 6.40. I have generated a webservice for a function module. In this function module i have an import parameter refering to a structure defined in data dictionary (SE11).
    The import parameter is optional. I see this in the virtual interface of the webservice. But i would also like to make each field of the structure optional. Goal is that the WSDL will have nillable fields or minoccurs = 0.
    What i would like to have is like the wsdl from the bapi BAPI_CUSTOMER_CREATEFROMDATA1
    <xsd:element name="PI_COMPANYDATA" minOccurs="0" type="s0:BAPIKNA106" />
    - <xsd:complexType name="BAPIKNA106">
    - <xsd:sequence>
    - <xsd:element name="TITLE" minOccurs="0">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="30" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
    - <xsd:element name="TITLE_KEY" minOccurs="0">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="4" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:element>
    In my case i get for the my defined structure ZcvClientfilterRec:
    <xsd:element name="FilterLow" minOccurs="0" type="tns:ZcvClientfilterRec" />
    - <xsd:complexType name="ZcvClientfilterRec">
    - <xsd:sequence>
      <xsd:element name="Clientno" type="n0:char10" />
      <xsd:element name="Clientgroup" type="n0:char2" />
      <xsd:element name="Clientstatus" type="n0:char3" />
    Can anyone help me with this or tell my how i can generate the wsdl so it looks like the standard bapi

    Hi everyone,
    Just faced the same problem, and while it's almost 2013, SAP doesn't have a solution for this problem, as stated in note 1341947.
    Cheers, Fred

  • How to pass importing parameter of super class method to subclass method?

    hi all,
    i have defined  a class
    CLASS CUST_REPORT DEFINITION.
      PUBLIC SECTION.
        METHODS:DATA_RETRIVE IMPORTING  CUSTID_LOW  TYPE ZCUSTOMER-ZCUSTID
                                       CUSTID_HIGH TYPE ZCUSTOMER-ZCUSTID.
        DATA:IT_CUST TYPE TABLE OF ZCUSTOMER,
             WA_CUST TYPE ZCUSTOMER.
    ENDCLASS.                    "cust_report DEFINITION
    The method DATA_RETRIVE   in this class  has two importing parameters named CUSTID_LOW   and CUSTID_HIGH.
    then i have defined subclas of this clas.
    LASS CUST_ORD DEFINITION INHERITING FROM CUST_REPORT.
      PUBLIC SECTION.
        DATA:IT_ORD TYPE TABLE OF ZORDER.
        METHODS:DATA_RETRIVE  REDEFINITION,
               DISPLAY.
    ENDCLASS.                    "cust_ord DEFINITION
    Method DATA_RETRIVE   is redefined.
    So how to pass importing parameteres of super class method to sub class method with the same name.
    Thanks and Regards,
    Arpita

    Hi,
    I tried like this.
    METHOD DATA_RETRIVE.
    CALL METHOD SUPER->DATA_RETRIVE
          EXPORTING
            CUSTID_LOW  = I_CUSTLOW
            CUSTID_HIGH = I_CUSTHIGH.
    ENDMETHOD.
    But  parameters I_CUSTLOW and I_CUSTHIGH are not getting values after call to method.
    Thanks and Regards,
    Arpita

  • Assigning a jstl variable to java Script variable

    Hai All,
    I created one jsp page with java script with JSTL.
    I retrive arrayList from simple java bean in jsp page with help of JSTL .
    Now i want assign the ArrayList value through JSTL to Java Script Array.
    How to convert JSTL to Java Script.
    Please give me details asp.
    thanks ,
    Bala

    You can do this:
    <% request.setAttribute("x", "hello"); %>
    <c:out value="${x}"/>or if you want to go from JSTL to scriplet you can:
    <c:set var="testvar" value="hello" scope="request"/>
    <%= request.getAttribute("testvar") %>Both of these will output "hello"
    <c:set> defaults to the page scope, so you could substitute pageContext for request and get the same results (remove scope="request" first though).
    Karl

  • How to assign java script variable to a hidden parameter in JSP?

    Hi All,
    I want to assign the variable in the Jscript to a hidden parameter in JSP page.
    <select name="sortingOption" class="sortingOptions" onchange="changeSortOption(this)">
    <c:forEach var="sortingOption" items="${sortingOptionList}">
    <c:set var="sortingOptionValue" value="${sortingOption}" target="java.lang.String"/>
    <c:choose>
    <c:when test="${sortingOptionValue == sortingOptionValueFromRequest}">
    <option value="${sortingOptionValue}" selected="selected">${sortingOptionValue}</option>
    <input type="hidden" name="srchType" value="none"/>
    </c:when>
    <c:otherwise>
    <option value="${sortingOptionValue}">${sortingOptionValue}</option>
    </c:otherwise>
    </c:choose>
    </c:forEach>
    </select>
    In changeSortOption script,they capture the value selected by the user and then they submit the form.I want to assign that value to a hidden parameter in JSP,can someone tell me how to do that?
    I dont have the Jscript code with me right now to post here.

    To the point: just by accessing/manipulating the HTML DOM using JS. Learn JS and HTML DOM. There are basic tutorials at w3schools.com. Besides, your code syntax is still invalid. The input hidden elemend doesn't belong in a select element. Learn HTML. There's a basic tutorial at w3schools.com as well.
    For future HTML/JS problems please consult the appropriate forums. This has not much to do with JSP. There are ones at webdeveloper.com.

  • How to pass a java script variable to a JSP page

    How to assign a javascript variable value to a jsp variabe
    <script>
    var scroll="100"
    </script>
    <%
    String age=[ here i need to set the value of "scroll" ]
    %>
    is it possible ,
    thanks

    assign this scroll to a hidden field in a form
    and pass via form to server this may be one way or
    set attribute scroll and then access to server side
    may this help you
    --yogeshb                                                                                                                                                                                                                                                                                                                                                                           

  • How to pass input parameter (parameterized mapping) to java mapping program

    Hello
    I have a question about the parameterized mapping with Java (PI 7.1).
    In the operation mapping (using Java-class) I defined a inputer parameter (string). I think I am supposed to retrieved the value using:
                    arg0.getInputParameters().getString("myInputParameterName");
    where arg0 is the TransformationInput object.
    However I am not able to get the value, I got runtime exception saying the inputer parameter doesn't exit.
    Then I figured out maybe I need to bind the OM input parameter to Java mapping parameter, just like in case of message mapping, you need to bind OM parameter to MM parameter. However there is no way to define input parameter for the java mapping program.
    Anybody has done java mapping with parameterized mapping?
    Anybody can give any hint for this?
    Thanks
    Jayson

    InputParameters params = container.getInputParameters();
    DynamicConfiguration conf = (DynamicConfiguration) params.getValue(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
    http://help.sap.com/saphelp_nwpi71/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Edited by: Anand on Dec 10, 2008 4:13 PM

  • Passing table parameter from dynpro for java to sap r/3

    I am sending table parameter from WebDynpro to sap r/3,but the table is not populating.

    Hi,
    In 7.3:
    // models
                RFCModel1 modeloGral = new RFCModel1();
                Zfmfi_Certificado_Ret_Pdf_Input modeloRfc =                          wdContext.currentZfmfi_Certificado_Ret_Pdf_InputElement().modelObject();
                // clean
                if(modeloRfc.getIt_Tipo_Ret_Pobl()!=null && modeloRfc.getIt_Tipo_Ret_Pobl().size()>0){
                               modeloRfc.getIt_Tipo_Ret_Pobl().removeAll(modeloRfc.getIt_Tipo_Ret_Pobl());
                //fill
                IEt_RetencionesElement retElem;
                int cant = wdContext.nodeEt_Retenciones().size();
                for(int i=0; i<cant; i++){
                   retElem = wdContext.nodeEt_Retenciones().getEt_RetencionesElementAt(i);
                   Zfie_Tipo_Retencion_Poblacion retencion = new                                                                            Zfie_Tipo_Retencion_Poblacion(modeloGral);
                                    retencion.setTipo_Ret(retElem.getTipo_Ret());
                                    modeloRfc.addIt_Tipo_Ret_Pobl(retencion);

  • Use a Java Script variable's value in some other  jsp ....how?

    Please help me.................
    <%@ page import="java.util.*" %>
    <%@ page language = "java" import="java.sql.*,javax.servlet.*,javax.servlet.http.*,java.util.*" session = "true" %>
    <HTML>
    <HEAD>
    <TITLE>Create Employee</TITLE>
    </HEAD>
    <BODY>
    <%
         Connection conn = null;
         Statement stmt = null;
         ResultSet rs = null;
         try {
              Class.forName("com.mysql.jdbc.Driver");
    conn = DriverManager.getConnection("jdbc:mysql://10.203.143.55:3306/bdaymgr" ,"root","mysql");
              stmt = conn.createStatement();
              rs = stmt.executeQuery("Select emp_id,emp_name From employee_info ");
              System.out.println("rs " + rs);
    %>
    <script language="JavaScript">
         function OnSubmitForm(){
         var box = document.form2.UserList;
         var where_to = box.options[box.options.selectedIndex].value;
         if(where_to =="")
    {document.write("Please select something");}
         else {Dont know what to do here }
         </script>
    </script>
    <center>
    <FORM NAME = "form2" onSubmit="OnSubmitForm();">
    <table>
    <TR>
         <TD width="11%">User ID : </TD>
         <TD width="180%"><select name="UserList" size="1">
         <option>-- Select A User ID --<option>
         <% while (rs.next()) {
         %>
         <option value='<%= rs.getString("EMP_ID")%>' ><%=rs.getString("EMP_ID") %></option>
         <% } %>
         </select>
         <input type="hidden" name="score" value="">
         <INPUT TYPE="SUBMIT" name="Submit" VALUE="Submit">
         </TD></TR>
    </TABLE>
    </FORM>
    </Center>
    <%
              stmt.close();
                   rs.close();
              catch(Exception e){
                   System.out.println("Error : "+ e);
                   response.sendRedirect("errorcreateSession.jsp");
    %>
    </BODY>
    </HTML>
    As u can see i have extracted emp_id from the employee_info table and populated it in my drop down list
    In the javascript i have used a variable "where_to" which keeps track of what the user has selected in the drop down list
    I want to use this value of "where_to" in some other other jsp(say Admin.jsp) to carry out an insert query
    how can i retrieve this value of "where_to" from Admin.jsp so that i can carry out my insert query
    Thanx in advance i certainly hope that u will help me

    I made these changes in my Guest.jsp page(as u mentioned):
    <FORM NAME = "form2" onSubmit="return OnSubmitForm();" action="Admin.jsp">
    <select name="UserList" size="1">
         <option>-- Select A User ID --<option>
    </select>
         <INPUT TYPE="SUBMIT" name="Submit" VALUE="Submit">
    <script language="JavaScript">
         function OnSubmitForm(){
         var box = document.form2.UserList;
         var where_to = box.options[box.options.selectedIndex].value;
         if(where_to =="")
    document.write("Please select something");
    return false;
    else
    return true;
    </script>
    Now have a look at my Admin.jsp page:
    <%@ page import="java.util.*" %>
    <%@ page language = "java" import="java.sql.*,javax.servlet.*,javax.servlet.http.*,java.util.*" session = "true" %>
    <HTML>
    <HEAD>
    <TITLE>Create Employee</TITLE>
    </HEAD>
    <BODY>
    <%
         Connection conn = null;
         Statement stmt = null;
         ResultSet rs = null;
         PreparedStatement ps = null;
         try {
              Class.forName("com.mysql.jdbc.Driver");
    conn = DriverManager.getConnection("jdbc:mysql://10.203.143.55:3306/bdaymgr" ,"root","mysql");
              String s=request.getParameter("UserList");
              String m=request.getParameter("month");
              String y=request.getParameter("year");
              String a=request.getParameter("amount");
              String sql="insert into contribution_info values(?,?,?,?)";
              ps=conn.prepareStatement(sql);
              ps.setString(1,s);
              ps.setString(2,m);
              ps.setString(3,y);
              ps.setString(4,a);
              ps.executeUpdate();
              System.out.print("Values Entered");
              %>
    <center>
    <FORM NAME = "form3" action="canBeAnyPage.jsp">
    Month :<br><input type=\"text\" name="month"><br>
    Year :<br><input type=\"text\" name="year"><br>
    Amount Paid :<br><input type=\"text\" name="amount"><br>
    <INPUT TYPE="SUBMIT" name="Submit" VALUE="Submit">
    </FORM>
    </center>
    <% stmt.close();
                   rs.close();
              catch(SQLException e){
                   System.out.println("Error : "+ e);
                   //response.sendRedirect("errorcreateSession.jsp");
    %>
    </BODY>
    </HTML>
    I dont know why but when i select one of the emp_id from the drop down list and press submit it does not show anything
    I can see the value of "UserList" in the url which is correct
    Probably there is some problem in my Admin.jsp page
    Please find time to have a look at my code
    Help would be really appreciated
    thanx

Maybe you are looking for