Calling SAP from javascript code

hi
I have come across a piece of  JS code where  an SAP tcode is called. the code is something like this
[https://weblogs.sdn.sap.com/weblogs/images/251875500/code.JPG]
I have read about the  JS function  activex object in the net. the parameters to this function are library.object and servername . In the above example we are not passing the servername. As for the library and object we are passing SAP.functions
I want to know where the library SAP is stored and all the objects available in the library.
thanks
sankar
Edited by: sankara rao bhatta on May 29, 2008 9:35 AM
Edited by: sankara rao bhatta on May 29, 2008 9:36 AM
Edited by: sankara rao bhatta on May 29, 2008 9:37 AM
Edited by: sankara rao bhatta on May 29, 2008 10:03 AM
Edited by: sankara rao bhatta on May 29, 2008 10:08 AM

DDIC objects are store in table tadir and program name are stored in trdir.
In your codes you are calling transaction va02 for change salesorder. All depends what rights your login id have.

Similar Messages

  • Can we call webserrvice from javascript code?

    Hi Gurus,
    Can we call webservice in "Javascript" code?
    Any pointers, samples?
    Appreciate your time.
    Thanks

    Hello,
    Yes you can, and we have in OracleAS 10gR3 create javascript for you.
    Take a look to the following:
    1- deploy a Web Services in OracleAS 10g R3 (10.1.3)
    2- go to the test page
    3- Click on the Javascript Stub page
    This utility creates a javascript linbray allowing Ajax calls to SOAP based Web Services:
    - create SOAP request from simple Javascript objects
    - create an XMLHttpRequest object to call synchronously or asynchronously
    - get back the response from and deserialize the SOAP object to Javascript
    Regards
    Tugdual Grall

  • Calling Taskflow from javascript

    Hi,
    Can any one help me on calling taskflow from javascript.
    Thanks in advance,
    Regards,
    Lavanya.

    hi Lavanya,
    All I did was a simple search and found this
    Javascripts and ADF Taskflows
    See if this is helpful to you too :)
    Regards,
    Neha..

  • Errors calling webservice of SAP from javascript

    Hi Friends,
    When i call a webservice from javascript using the XMLHttpRequest,i get a
    crediantals error,I alos pass the login details
    var oReq = new XMLHttpRequest();
    oReq.open("GET", url, async, loginname, password);
       oReq.send();
    any help please.
    regards
    kaushik

    Providing HTTP Basic Auth username and password as part of the URL is a common practice, however it is discouraged for security reasons. If possible, try to avoid it.
    Also, it may not work because your friendly browser developer might already took care of this. In the address bar, MS disallowed (by default) this usage three years ago, Firefox does warn (and prompt) the user. I haven't tried für AJAX, though - it might work, but it might break in the future.
    Assuming you are calling the service from the host you came from, is the page delivering the JavaScript password-free, but the service needs a password?
    :Frederic:

  • Error while calling applet from Javascript via LiveConnect and WebDriver

    Hi all,
    I am trying to call applet Java code from Javascript via WebDriver.
    Given the following two cases:
    - calling a static method: Integer.parseInt("42")- constructing a new object: new String("Hello world")My Javascript code looks like this:
    document.appletId.Packages.java.lang.Integer.parseInt("42");
    new document.appletId.Packages.java.lang.String("Hello world");When executing this code in Firefox via the Firebug Javascript console everything works fine and I get the expected results. However, when executing this code via the JavascriptExecutor from WebDriver only the call to the static method succeeds, the construction of the new object leads to the following error: "Attempt to call a default method on object with no invokeDefault method."
    I don't have any idea what is going wrong here, so any help would be greatly appreciated.
    Thanks!

    Hello Gerard, Hello Krishna,
    -> The liveCache application failed with COM error::
                                   40028 Illegal timestamp in rough timegrid
    More details about COM error 40028 you will see in TA /n/sapapo/om10
         -> Return code: 40028 -> execute ::
    Invalid time stamp in the time buckets profile relation     
    ( om_ts_tgrelinvalidstamp )     
       < click on '?' mark >
    -> Open an OSS message in accordance with SAP note 167280 if further help
         needed to solve the issue on your system.
    Thank you and best regards, Natalia Khlopina

  • Call dll from javascript

    hai,
    i have a dll(VB) in client m/c. i need to call a method in a dll from javascript.
    if possible please give some sample code.

    http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=calling+a+dll+from+javascript

  • How do i call servlet from javascript after validation the javascript

    Hi ,
    Can anyone tell me how to call a servlet after the javascript is being validated. Here is my code to validate javascript i need to call a servlet inorder to save the data into the same form. I tried calling through the action method in the form but its directly taking me to the servlet but not validating the form. Is there any way that i can validate the form first then call the servlet.
    Thanks in advance.
    <html>
    <head>
    <title>Online Blog</title>
    <script language ="javascript" type ="text/javascript">
    function myfunction()
    var mesg = "";
    var dmesg = "";
    var dnumber = 0;
    var number = 0
    var Blogstr = document.onlineblog.BlogName;
    var Fnamestr = document.onlineblog.FirstName;
    var Lnamestr = document.onlineblog.LastName;
    var Datestr = document.onlineblog.Dateformat;
    var Imagestr = document.onlineblog.uploadimage;
    var Imageval = Imagestr.value;
    var flength = parseInt(Imageval.length) - 3;
    var fext = Imageval.substring(flength,flength + 3);
    var Dateval = Datestr.value;
    var Dformat = /^\d{2}\/\d{2}\/\d{4}/; //checks the date format.
    //splits date into mm, dd , yyyy format.
    var m = Dateval.split("/")[0];
    var d = Dateval.split("/")[1];
    var y = Dateval.split("/")[2];
    //Get today's date (removes time).
    var today = new Date();
    var dd = today.getDate();
    var mm = today.getMonth()+1;
    var yyyy = today.getFullYear();
    //checks if month and date are displayed in mm, dd format and if not sets to mm,dd.
    if (mm <10)
    mm = '0'+mm;
    if (dd <10)
    dd = '0'+dd;
    //checks if name of the blog is empty
    if(Blogstr.value == "")
    number = number+1;
    mesg += "\n" + number + "Name of the blog";
    //checks if value of Frist Name is empty;
    if(Fnamestr.value == "")
    number = number+1;
    mesg += "\n" + number + "First Name";
    //checks if value of Last Name is empty;
    if(Lnamestr.value == "")
    number = number+1;
    mesg += "\n" + number + "Last Name";
    //checks if value of date is empty;
    if(Datestr.value == "")
    number = number+1;
    mesg += "\n" + number + "Date of mm/dd/yyyy format";
    //checks if value of image field is empty;
    if(Imagestr.value == "")
    number = number+1;
    mesg += "\n" + number + "select an image";
    //displays all the error messages.
    if (number > 0)
    alert ("Please enter the following" + mesg);
    return false;
    //checks if entered date format is mm/dd/yyyy
    if(!Dformat.test(Dateval))
    dnumber = dnumber +1;
    dmesg += "\n" + dnumber + "please enter a valid date(mm/dd/yyyy)";
    //checks if date is greater than 12 and is 2 digits.
    if ((m>12 && m<100) || (m> = 100 && m<1000) || (m==0))
    dnumber = dnumber+1;
    dmesg += "\n" + dnumber + "Enter valid month(mm)";
    //checks if month has 31 or 30 days and is in dd format.
    if (((d>30) && (d<100) && (m == 04 || m == 06 || m == 9 || m == 11)) || ((m == 01 || m == 03 || m == 05 || m == 07 || m == 08 || m == 10 || m==12) && (d >31) && (d<100)) || d == 0)
    dnumber = dnumber+1;
    dmesg += "\n" + dnumber + "Enter valid date(dd)";
    //checks if month has 28 or 29 days and wheather is a leap year or not.
    if((m == 02 && d>29 && y%4 == 0) || (m == 02 && d>28 && y%4 != 0))
    dnumber = dnumber+1;
    dmesg += "\n" + dnumber + "Enter valid date(dd)";
    //checks if entered date is prior to the current date.
    if((m == mm && d == dd && y == yyyy) || (y > yyyy)|| (d>=dd && m>=mm && m<=12 && y==yyyy) || (d<=dd && m>mm && y == yyyy && m<=12))
    dnumber = dnumber + 1;
    dmesg += "\n" + dnumber + "Please enter a date prior to the current date";
    if (y == 0 || y < 1000 || y>9999) //checks if year is zero and is a 4 digit number.
    dnumber = dnumber + 1;
    dmesg += "\n" + dnumber + "Enter a valid year(yyyy)";
    //checks if image format is jpg or gif.
    if(fext != "jpg" && fext != "gif")
    dnumber = dnumber + 1
    dmesg += "\n" + dnumber + "You can only upload gif or jpg images.";
    if(dnumber>0)
    alert("please check the followin error messages"+dmesg);
    return false;
    </script>
    <style type="text/css">
    .style1 {color: #FF0000}
    body {
         background-color: #FFCCFF;
    h2 {
         color: #CC3399;
    h1 {
         color: cc3399;
    .style2 {
         font-family: Arial, Helvetica, sans-serif;
         font-weight: bold;
    .style5 {color: #000000; font-family: "Times New Roman", Times, serif;}
    </style>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><body>
    <h1 align="center">Webloggers space</h1>
    <p align="center">Home
    <p>
    <h4> Please enter the following details to register.</h4>
    <p> <b>Note:</b> All fields marked with <span class="style1">*</span>(astrick)
    are compulsory.</p>
    <form action="servlet/BlogServlet" name="onlineblog" onsubmit = "return myfunction()" method="post">
    <table width="60%" border="0" cellspacing="5" cellpadding="2">
    <tr>
    <td><span class="style1">*</span>Name of the Blog</td>
    <td><input type="text" name="BlogName"/></td>
    </tr>
    <tr>
    <td><span class="style1">*</span>First Name</td>
    <td><input type="text" name="FirstName"/></td>
    </tr>
    <tr>
    <td><span class="style1">*</span>Last Name</td>
    <td><input type="text" name="LastName"/></td>
    </tr>
    <tr>
    <td><span class="style1">*</span>Date(mm/dd/yyyy)</td>
    <td><input type="text" name="Dateformat"/></td>
    </tr>
    <tr>
    <td>Category</td>
    <td><select name="catagory" size="1">
    <option></option>
    <option>Business</option>
    <option>Education</option>
    <option>Entertainment</option>
    <option>Food</option>
    <option>Hobbies</option>
    <option>Personal</option>
    <option>Politics</option>
    <option>Sports</option>
    </select></td>
    </tr>
    <tr>
    <td>Enter your text here:</td>
    <td><textarea name="textarea" cols="45" rows="5"></textarea></td>
    </tr>
    <tr>
    <td><span class="style1">*</span>Upload Image <span class="style5">(.jpg
              or .gif)</span></td>
    <td><input type="file" name="uploadimage" /></td>
    </tr>
    <tr>
    <td></td>
    <td><input type="submit" value="save">
    <input type="reset" name="reset" value="Reset" /></td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    Your javascript code contains a syntax error. That's why the function isn't being called. Take a look at this line in your code.
    if ((m>12 && m<100) || (m> = 100 && m<1000) || (m==0))Notice the space between > and =. Remove that space.
    m >= 100

  • Call servlet from javascript

    Hi,
    In my web application , i must call a servlet from javascript.
    At present i am calling the servlet by using the following syntax:
    document.location.href ="sample?startTime="startTime+"&endTime="+Time;+*
    The above syntax is working fine, but the problem is ,a new page is created whenever a request is made.
    Is there any way to call the servlet without creating any new page.
    kindly provide me an alternative, it will be of great help for me.

    Is there any way to call the servlet without creating any new page.Ajax. Or load it in a hidden (not visible) iFrame.

  • How to get latest flash player version from javascript code

    Hello,
    I want to know the latest flash player version number programmatically to compare with currently installed flash player version.
    I have requirement in which i need to show message to user when installed flash player version < latest flash player version.
    there is no API offlash player available which we can call to get the latest flash player version.
    We tried to do webscrapping of adobe site which prints version number but we need to do this from javascript.
    Is there any way through which we can come to know wether our installed flash player version is older than latest flash player released version?
    Please help..
    Thanks
    Dhwani

    It's in the Global Settings Manager in the Control Panel (Windows) or System Preferences (Mac), but I'm unaware of a javascript you can create to do this independent of a Flash container.
    The best you can do would be to create a web page with the expressInstall.swf and swfobject_modified.js added to a Flash container in the page. While that won't give a detailed (installed vs new) indication, it WILL prompt for an update if the current version is higher than the installed version.
    You'd then have to add the webpage to startup items, so the end user would see it on login.

  • Could i call airprint from Javascript

    How can i call the AirPrint function from my code? Could i call this function from my JavaScritp code?
    Message was edited by: JoshuaZheng

    What code are you talking about? If it's an app you are developing, you should try asking in Apple's Developer Connection.

  • (Its Urgent) Calling ActionScript from Javascript

    Hi, How to call ActionScript files from JavaScript ??? Can anyone Explain it
    with a Simple Example?? If yes,then please let me know ASAP. Thank you

    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/External Interface.html
    there are at least 100 examples out there google is your best friend.

  • Transfer of flat file from Oracle to SAP from ABAP code

    Hi Expert,
    I have to write a code in ABAP that call the Oracle procedure and it transfer the file generated by Oracle procedure. To call the Oracle procedure from ABAP with passing multiple parameters that i know the syntax but how to transfer the flat file (output file in txt format) generated by Oracle Procedure?
    If any one have sample code can you please give me.
    *Note: Oracle procedure is running in the different sever (Legacy system)*
    Help is appreciated.
    Thanks
    Ritesh

    Hello Ritesh,
    Please check the link below.
    http://download.oracle.com/docs/cd/B28359_01/owb.111/b31278/ref_def_flatfiles.htm
    This may provide an overview for your requirement.
    Please mark as answered if my solution helps in resolving your issue.
    Thanks
    Kind regards,
    Himanshu Limaye

  • Is there any way to call VBscript from java code

    hi all
    i have a question about calling a VBscript from my java code. can we do that in java? if so, any sample i can look at it. thanks in advance.

    it is not the scripting used in the browser. it is
    the scripting that builds VB program used in MS SQL
    server like the bulk loader. i need to call this
    loader to load xml data into the database.So you have a .vbs file that you want to execute?
    Runtime.getRuntime().exec("cmd.exe /C start " + fileName);
    Where fileName = the path to your .vbs file.

  • Calling labview from external code

    hello all,
    I m a student and new to labview,i just want to ask that whether i can call VI developed in LAbview form my c++ code?
    plz reply,it's urgent.
    waititng for replies.
    Thanx

    9866662680 wrote:
    hello all,
    I m a student and new to labview,i just want to ask that whether i can call VI developed in LAbview form my c++ code?
    plz reply,it's urgent.
    waititng for replies.
    Thanx
    If
    you have the Application Builder or the LabVIEW Professional Developer
    system you can compile the VI into a DLL and call that DLL as a
    standard C DLL from Visual C(++). OTherwise you could call LabVIEW over
    Active X and execute the VI through that. There are examples for
    calling LabVIEW through Active X in your LabVIEW installation.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Call RFC from EJB code

    Hi,
         I have a scenario where I need to write an EJB from where I need to execute a JCO call to an RFC. This RFC takes an XString as input (this is the input file) and returns a XString from which an XML needs to be generated.
    Can anyone suggest how to go about this?
    Thanks,
    Shiladitya

    JRA is the way to go....
    check my blog on this...
    /people/amol.joshi2/blog/2006/11/27/alerts-from-adapter-modules--the-jra-way

Maybe you are looking for

  • Need help asap. Can't open project in PP CS6 Debug Event, Need help asap. Can't open project in PP CS6 Debug Event

    I sat up all night, last night, editing a movie for a school project which is due Friday. I am extremely busy, and as i opened the file this morning to show the progress to a partner, Premiere, told me "Premiere pro has encountered an error" - "[c:\M

  • Import raw and JPEG and switch between them

    Some background. The Epson R-D1 (and R-D1s) when set to B&W and asked to record raw + JPGs renders the JPG in B&W and leaves the raw alone. It also shows you the images in B&W on its LCD. This is great because, if you don't want to, you never have to

  • Sent email is not listed on ipad

    SEnt email is not listed on ipad 3rd generation 7.0

  • Strange SSD problem

    Hello, Ive got a 2012 Macbook Pro that i installed a Samsung 830 in when I bought it a year ok, worked fine up until 2 weeks ago. One evening the system got sluggish and hanged so i powered it off and when rebooting i got the no boot volume questionm

  • SOL 4.0 BP and SERVICE DESK

    Good Morning, I have same problems with the right configuration of the Service Desk functionality. First of all I will describe our system landscape and what I have done. We are using SAP AS 6.20 and Retail. For the first steps to setup the Service D