How to retrieve the Page ID of newly created page in site pages library using javascript

I am creating the page programmatically under site pages library and want to get the ID of that newly created page.

Hi,
The following JavaScript Code for your reference:
<script src="http://code.jquery.com/jquery-1.11.2.min.js" type="text/javascript"> </script>
<script type="text/javascript">
$(document).ready(function () {
var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('Site Pages')/items?$select=ID&$orderby=Created desc&$top=1";
// execute AJAX request
$.ajax({
url: requestUri,
type: "GET",
headers: { "ACCEPT": "application/json;odata=verbose" },
success: function (data) {
alert("The newly created page ID is " + data.d.results[0].ID);
error: function () {
alert("Failed to get customer");
</script>
Best Regards
Dennis Guo
TechNet Community Support

Similar Messages

  • How do remove the page number using java script.

    Thank you.

    Hello,
    Where you want remove the page number? If you delete the page number in the first page of the document, that is no way to do. Becasue, first you have to try manually remove the page number 1st page of pages panel, its shown the error "Invalid entry".
    Can you please post your query briefly.
    thx
    csm_phil

  • How to clear all fields on the page by using javascript ?

    Hello,
    has anyone an example of javascript function that clears all fields on the page?
    Thanks

    Hi Edward,
    You may want to have a look here http://textsnippets.com/posts/show/215
    Or try this (source from http://www.mindpalette.com/tutorials/clear_defaults/index.php):
    function MPClearAll() {
    with (document.forms[thisForm]) {
    for (var n=0; n<defaultVals.length; n++) {
    var thisField = defaultVals[n][0];
    var thisDefault = defaultVals[n][1];
    if (elements[thisField].value == thisDefault)
    elements[thisField].value = '';
    }}}Hope that helps,
    Dimitri

  • How to set a page parameter using javascript ?

    Hi:
    i'd like to set page parameter with a value taken from a textbox when clicking a button using javascript code.
    i mean, i have a textbox and a button using javascript and i want to take the value from the textbox and when onClick event happens set that value to the page parameter. How can i do this????
    Thanks.
    Best regards. Urko.

    Hi,
    Can you please elaborate your requirement. May be some better ways can be suggested. Also please mention which component you are using.
    Thanks,
    Sharmila

  • How to retrieve the parameter names from a JSP page ? Urgent Please

    Hello,
    Can anybody tell me how to retrieve the parameter names from the JSP
    page. (without using getParameterNames() method.)
    The problem with the getParameterNames() method is I get the Jumbled output.
    I need it very badly
    With regards
    Ananth R
    email:[email protected]
    [email protected]

    Dear duffymo,
    My primary intention is to convert the JSP form information into a XML file.
    If I do not get the Parameter names in the correct order how can I maintain
    tag order in XML file.
    For ex: (JSP PAGE VIEW)
    Name--
    FirstName
    MiddleName
    LastName
    Address--
    Street1
    Street2
    City
    Country
    &so on
    (XML File to be generated)
    <Name>
    <FirstName>Value</FirstName>
    </Name>
    <Address>
    <street1>value</street1>
    </Address>
    & so on
    If I use getParameterNames() to get all the parameter names(Which form the tag names in the XML file ) the Enumeration object it returns will not be in the same order as the text fields in JSP.From this I can not construct a meaningful XML file.
    order means: Order of entry on the page, from top to bottom
    That's it
    Waiting for your responses

  • How to retrieve a page item value in another page?

    Hi,
    how to retrieve a page item value in another page?
    say P55_COURSES_TO_EVALUATE is my page item name and it is a select list.Based on the value selected,in the next page i shd show details related to the selected value and for this i need P55_COURSES_TO_EVALUATE value in the next page.How Do I get it?When I try to retrieve the values it simply returns nothing.
    Any pointers would be really helpful.
    Thanks in advance.

    Hi,
    Could you please tell how you try use it ?
    If you set value to item P55_COURSES_TO_EVALUATE and submit page, value is saved to session state.
    Then you can use that item in any page like
    :P55_COURSES_TO_EVALUATEYou can not access page value in javascript/jQuery from other pages like
    $v('P55_COURSES_TO_EVALUATE')
    document.getElementbyID('P55_COURSES_TO_EVALUATE')
    $(#P55_COURSES_TO_EVALUATE)Because item is not in other pages. In javascript from other pages you can use
    var a = '&P55_COURSES_TO_EVALUATE.';Regards,
    Jari

  • "How to retrieve deleted Pages document."

    How to retrieve deleted Pages document? Thanks.

    If you have a Mac that is signed into your account and you are using Time Machine to back up your Mac, you can recover the deleted document using Time Machine.  Otherwise, without a backup souce there is no way to recover it.

  • How to retrieve the Authentication Policy Responses?

    In my OAM server(OAM 11.1.1.5), I configured a Response in authentication policy to retrieve the user information after user signed in, the response item named "UserID", value is "$user.userid", type is "Cookie".
    My question is:
    If I use the WebGate , I will got the response items after user signed in. But I need to develop an Access Gate use the ASDK to replace the WebGate, I don't know how to retrieve the Response items by the ASDK.
    Below is the access log captured by Fiddler, "http://auth.mydomain.com/login.aspx" is my customized login page.
    -----------------------------Web Gate 10g (IIS)----------------------------
    GET http://alan-hu.mydomain.com/oamtest/index.aspx HTTP/1.1
    Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    Referer: http://auth.mydomain.com/login.aspx?authn_try_count=0&request_id=6476845472436935518&OAM_REQ=VERSION_4%7EFC5cvGlDZbKLQVbcnbvJSmtBw163LKRGyryAQ8b3CvEpVzVXpqqVE3Nbdcf3K7J957wIyP1d%252bEHNaC92smcnXnYxZr7xSfW8eNMU9NlFRnCUoNBTNXR6jZr8Ug8zqnSau5U%252bEnlInxHudS%252bTzD%252bUy5E9qUfX6lySlHfesJbBBH2yubEJ%252fJVrjbetqv5L295D1mhF%252f7VKyTED%252fAOv2LaVjT7Mi9PGkKDwGkZy9Th5vKVCvT58V%252fEYEgWqawE2LUv%252fb9nh7mdP5gRGBcoDpIeqXWo1F9G767%252feG9vPxM7jZRlGWcMKuYQYSn1oTg%252fL1KBE0KW2EJPvOiBpsplU7e0BvbqWgoSR8ctora%252fj2DHbHZh7m2k1GulUeBRiF3MKbY8XulBEtOYIuc02qVNhlQg2XAHOOk%252bqQ1Z6oua3DWH0aru6jnlFNpsTx6Rk2Q4WHAhXqKPzTwjtVHLgs%252b7Fb32D2Ncz%252fQqx%252b%252bfRtK9yS4YSNcoA3AmF15HoHgFd0lXQzUuQzxsDiho5S6GRc5QY2UvTz%252fsoC0Osismkd%252bUx0yZtxeFJrqA1%252f%252b9eeN%252fEFLMes2%252bxn7jxDP9ahl%252bDKaF9GdypVNZAKSdxSdUKcVCWHneHRRRtqdW8jcUEcTzohuCdCOvEgETz%252fksM7nsFHq01GHakc8174sXvcEE1l1jvsPy8f1CBf75DtguanLVIfenmUEp7kcRhe1vIgiBxmNefuhMKhLV%252fW%252fveJgnuMtWZ%252bgc2Yr%252bYFL5Qe9yz3Zz0Zn2d4PAzZWiS9teBrLqzAk6dU5dM9JTGdthstrhwjovP96J252mAGrRjo%252fFWTByyfrXYoQzETxV8QCDl8kDWaCsZl6V3Ahm94gDcTQrW8MYK8PJDlkUlnVtRtaDevrv4%252fQY%252bFvo78W1iKYM9v9O%252fu0EgPqyOJBg%252fYsBC5fI4VV7OvLZ1YoPb2v6IsepN9avD8nTB6B%252f5ZW0z1IxocptShWgjb5fMrDclA%252fEqgShz0QXzkoOa80cqLu%252bNEG7aUHQQXhZEG42zCN0NaJZbENpksK5ZyKo8U92KdjdSgHeUsFbWA0jZ%252b5nIIYHtesLFwoRZw%252f%252bbceyXAG8%252b6LMjJWYsRpl8bKKJejnOIvzM1dlY7PQ%252bf8eCtGxPkCaCa%252bkuJUkhHcK%252bsS5T2JMyocrBj0hIZsBXiWIrtmGr5h%252bbQIT8TdTfVCmUiv3zBRgDSvQqpJ3hAFc0NIk6zJS%252bPxSquhuYIH15G7zeN%252faW3sRecDpH8%252bFqa7HsT7xDukI2c6Ro3x7Bvp5MBEBSITibP41PJo7f5kPP6wFIk3rMpsC9r7zsSU0pzN3RvWn5M5gNyQ4EZVuwYMFCfgIAjRKRcNUWHebwSMxsOhwrsYESNfA9rFYxtOapzvIcx63B%252baR%252bsQXHI%252fQ4eoP2VBkkCOktummpQ41bDC6elI5LhFrAlSwCT5qv4ytCSBRan6OfMZ%252bLSA5J%252fkFtTvx2aNbV&locale=en_US
    Accept-Language: en-US
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
    Cookie: ObSSOCookie=NQqPNA%2BvLoyIujMLO%2F3VWalLMpFbnK6IW4uvEl1piC8hoQVQw%2FqGbDdkVg%2BDDcx1O7YeJhFVYinyJtKF8vI3VTQ%2BL3StaWFRZFLl7KqHnQEqdNVgkn4FCfx49t2KzXNQ%2FxLBkF0olHoNU1P01VTMOdQsq4hzdc6C0B7X6PM9hoaVGWvVmsbUKr5BmqWBG0aHbT1HXgNKlVsDimyz2Q9iy%2Briiu8%2B7x190rm8PTm3uXqEUqs4zuvOSdjZGs77uUFzeYnEzQb6T9gcZqyUvo8OtXqnmrUtPwdva8UrV9GlUkymsWDDtNk3iIqapLxQL1oXHO0iH2KXzXfUAcnQca%2BfNw%3D%3D
    Accept-Encoding: gzip, deflate
    Connection: Keep-Alive
    Pragma: no-cache
    Host: alan-hu.mydomain.com
    HTTP/1.1 200 OK
    Cache-Control: no-cache,private
    Pragma: no-cache
    Content-Length: 649
    Content-Type: text/html; charset=utf-8
    Set-Cookie: UserID=TEST; path=/
    Server: Microsoft-IIS/7.5
    X-AspNet-Version: 4.0.30319
    X-Powered-By: ASP.NET
    Date: Thu, 05 Jul 2012 08:14:13 GMT
    -----------------------------My Access Gate (IIS)----------------------------
    GET http://alan-hu.mydomain.com/oamtest/index.aspx HTTP/1.1
    Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    Referer: http://auth.mydomain.com/login.aspx?authn_try_count=0&request_id=-8854367975480028914&OAM_REQ=VERSION_4%7EslyJg6j%252fLhjd%252b%252b%252fAFDpFiRr4cPvaT3dU90HILcJWiqxptP4dV%252fNkm4eAzVOznnJmtFh8SNMg4G5K2IuCABhCNxJuFau4XUgfRJtQl03anU6YgU1U%252fc3nRevxNFTZ8bIGALMXNiGbtnNO7c9WRUy%252bekw7T5YidA2qr103PNQD0g36jKosUb2aT2kOYJ0HoZizyW%252bCeI2ARhjuqB4Kc0Kfv%252fHuZCCwcUychXY5cGDlcD2UVl9YRwEGBdcYnweNbps18LqmQNm0%252fJYh2XwW80hNKqRBQBGPUCrYP8A0XIF2%252bUFvViDfqcuK05n0vv5NErxih%252bgtZKRObD6pHsnLOd2a19jUU%252fsFaFYQ0n5UdTN0JSx8yFtvEjdwXKya2PGqKqHa2JzEXhLBXTP5eC4EavAwAMbVRVtNTle%252fU29tDOuUtb1NLTBsqI63ipchzUvouQ6QREcybIXErAMX06X9gpwEtMBXYCppIiV%252b67XpETVzcmMuOl%252bSj9Aha6AKy3yPYlEOTA0o5HqOMe2NTu2sSvJxUJJW0ZYXvqkprkWsaw5SBACH473KY7WS0kqUIiV7UoN60cRdT9I3fAdyuLzWDS7dhGKKTstmpTxClQQNlw7XcDfdczqJJBRSwbZQyomnSPRcO%252f%252f5EY56wSXMJLv5WDkfb3RC4Va5rzXeQn1McihExvrymn6ztZ2A6zZso%252b0jDObEa%252bWioCBinvdK%252bF85qk8ai%252bLal30b27oNzFHKc1AELQ7eP%252bkoyXDYQpVeHfX9ujHGAcEdN4FTGyxBoIohbQb%252fEvl3uEga%252fsufBa%252fVcFVM8WTI59kUSOCKankogv9ABry7CxYByZURjjloQp1CZif%252fuN1ddg5yGMuqmvY7OFz8BIT8mm%252b0klysXJbcneztKbVm2njffvj29gardyyFZ1%252fXDPqMJM1OKVcughERRZW%252fHbBFZ5h%252fupGqhgXaNXZGoeg%252bm8iaAXqrxRIg7NHmK7VnEtIV2qo4iDYWl%252fmf09eJJHMrhhQNRLjV5drgiIwGuPZWVC4irUhXBOPixks8StHx0c0TV%252boIRPxiyupLJKzdlE0SBjplC1%252ffMjiVgQGqZ2zena7601QT89vmuU%252bkO1NoAnN8iwZNF1dT45RDbfg8TLcK1C0CGb29eN7dbwBtbgnAAOXX8F421RTSv9W6UAn%252bttP%252fr2teYO8eXOwFkGMrGkdxdt%252b7%252fj9oH1nJ92Mviv5fiuxhnx9ukvyjQdkdGl0gnGVehnDIQODIXEG0EmEo9%252fJtQkNjgwLlKvTK5bcqIg0Kez27GqEKYhNc4XRsuYsfPQ2byH%252bnnsSDz%252bOLo43ub8vZ7XNWjMtQrNUpfbOwmw5jhfPsU9E2xgYTHGvDdbKBrLXgxQrO%252fSflCzRPhpc5gE9zOOFkCskHxy%252b%252bI8zyJFT7lEaIhz6WgXa5nk3An%252b9yukw2YkoFe1WB%252bfZsgdr%252fq%252b%252blUqjfUf1G5lHDUjODh0qh&locale=en_US
    Accept-Language: en-US
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
    Cookie: ObSSOCookie=fhyRb/mqqsz1Tk7Ma3aAvuTmisrarOveqR1FWPkCOKcMG860oQ/V/trZzor0ZPZs4lOl3yHvf83Jj1ahsffCMIueaSlJqHoBZPFB+uLlof9KV6OzyztVzLaxUql/qddGnzajvRs0ti9vKx84AsnMEbZwTcYdf8CNesOh5aSSgz4r6U2D3/rWaT/s1h7vda9rUhD7McjybboHWThM1sKVUGmDFJBA3XdXpwCbG+L35yw5NdablTgB8KOCaAiYDSNsbRkDRluzAxrwD9r/glEq9xI7X3fQ+t40PEQ/sIVFAy+BH6fqXUUEN6D8sc3GKt5RxxTzNzaHLoczlLyakAainQ==
    Accept-Encoding: gzip, deflate
    Connection: Keep-Alive
    Pragma: no-cache
    Host: alan-hu.mydomain.com
    HTTP/1.1 200 OK
    Cache-Control: private
    Content-Type: text/html; charset=utf-8
    Server: Microsoft-IIS/7.5
    X-AspNet-Version: 4.0.30319
    X-Powered-By: ASP.NET
    Date: Thu, 05 Jul 2012 08:29:41 GMT
    Content-Length: 649

    Summary:
    1. The Responses of Authentication Policy will be retrieved after user just signed in:
    ObConfigMgd.initialize();
    ObResourceRequestMgd rrq = new ObResourceRequestMgd("http", "//alan-hu.achievo.com/oamtest/index.aspx", "GET");
    ObDictionary creds = new ObDictionary();
    creds.Add("userid", "test");
    creds.Add("password", "Tt1234");
    ObUserSessionMgd session = new ObUserSessionMgd(rrq, creds);
    ObDictionary actions = session.getActions("cookie");
    ObConfigMgd.shutdown();
    2. The Responses of Authorization Policy will be retrieved after execute the ObUserSession.IsAuthorized() method:
    ObConfigMgd.initialize();
    ObResourceRequestMgd rrq = new ObResourceRequestMgd("http", "//alan-hu.achievo.com/oamtest/index.aspx", "GET");
    HttpCookie ObSSOCookie = Request.Cookies["ObSSOCookie"];
    string sessionToken = ObSSOCookie.Value;
    ObUserSessionMgd session = new ObUserSessionMgd(sessionToken);
    if (session.Status.IsLoggedIn && session.IsAuthorized(resource))
    ObDictionary actions = session.getActions("cookie");
    ObConfigMgd.shutdown();
    -----

  • How to retrieve the values from a table if they differ in Unit of Measure

    How to retrieve the values from a table if they differ in Unit of Measure?

    If no data is read
    - Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
    If no quanity in result internal table
    - There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
    - - Remove the CORRESPONDING, so quantity will fill the first field adqntp1.  ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
    - - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
    * Fill the internal table
    SELECT msehi adqntp
      INTO TABLE internal table
      FROM lipso2
      WHERE vbeln = wrk_doc1
        AND msehi IN ('KL','K15','MT').
    * If required move the read quantity in the appropriate column.
    LOOP AT internal_table ASSIGNING <fs>.
      CASE <fs>-msehi.
        WHEN 'K15'.
          <fs>-adqnt2 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
        WHEN 'MT'.
          <fs>-adqnt3 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
      ENDCASE.
    ENDLOOP.
    - You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
    Regards,
    Raymond

  • How to Retrieve the Selected Values from selectOrderShuttle using ADF 11g

    Hi Every One,
    Does anyone has idea how to retrieve the selected Items using shuttle and Order of the items using 'SelectOrderShuttle' component ?
    Thanks

    shuttle's valuechangeevent would fire when you shuttle items back and forth.
        public void selectOrderShuttle1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
            ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
            if (list != null){
                for (int i=0; i<list.size(); i++) {
                    int l = list.size()-1;
                    val = list.get(l).toString(); //returns , delimited string
                    if (val != null){
                        val = val.replaceAll("[\\[\\]]", "");
                        StringTokenizer st = new StringTokenizer (val, ",");
                        int nto = st.countTokens ();
                        for (int j = 0; j < nto; j++)
                            String token = st.nextToken ();                     
                ..........

  • How to print the page in custom format

    Hi All,
    I've a login page like
    USER ID : Test box to enter data
    PASSWORD: Text Box to enter data
    A Button named as Print
    When i click on print button i want to print the form in custom format. when i use window.print in java script it is printing text boxes and button . but i dont want to print button and text boxes. i just want to print the user id and password entered by the user with corresponding labels.
    Can anyone suggest me how to print the page in the above format with out using the request object. coz i need to implemnt above with plain java script and html.
    Tks in Advance

    Use CSS. Check out the 'media' attribute. http://www.w3.org/TR/REC-CSS2/media.html

  • How to retrieve the vendor number during creation of Purchase Order?

    Dear SAP experts,
    For our Purchase Orders, during PO creation (t-code ME21 or ME21N) we want to achieve the following:-
    1) default the delivery address to our plant A address if the vendor is local and
    2) default the delivery address to our plant B address if the vendor is foreign.
    At the moment, we are trying to use the user exit enhancement "MMDA0001" to achieve the above.
    The problem is how to retrieve the vendor number from the screen so we could pass the vendor number to ZXM06U32 to check the ktokk field in LFA1 table in the whether the vendor is foreign or local.
    Thank you in advance.
    Regards,
    Alex

    u can do one thing, create 2 partner function, like 1 for local, and second for import vendor.
    or make 2 batch  n activate vendor batch and make mandatory field from SPRO. 
    then goto SHD0, and do one by one step. first time take 1st requirement and second time take second . like that make two variant .
    i dont know how much it will be helpful. bt i want to suggest smth like that only.
    or, go for ABAPER help
    thanks
    nisha

  • My music files etc were all located on my old laptop which was stolen. I have just plugged my iphone in to my new computer and it has deleted all my files. Has anybody got any ideas on how to retrieve the files?

    My music files etc were all located on my old laptop which was stolen. I have just plugged my iphone in to my new computer and it has deleted all my files. Has anybody got any ideas on how to retrieve the files?

    WINDOWS?
    Connect the iPod to your PC. If iTunes starts syncing (ie erasing) your music automatically, hit the X in the upper right hand corner of iTunes display, to the left of the search box, to stop it.
    In Control Panel, Portable Media Devices, double-click your iPod.
    In the Tools menu -> Options, in the View Tab, check "Show hidden files and folders."
    Navigate to the Music folder. On my 'pod, the full path is
    Portable Media Devices\NAME of IPOD (F:)\iPod_Control\Music
    Select all the music folders, and drag and drop them into a folder on your hard drive, or directly into iTunes.
    And you're done! The iPod music folder structure is strange and inexplicable, but once you move your files into iTunes you can set it to automatically organize your folder by artist and album to clean that up. (To do this, in iTunes Edit menu, choose Preferences and in the Advanced tab, check "Keep iTunes Music Folder organized."
    might be out of date worth a try

  • How to retrieve the data from SAP-BAPI by using VB Code

    Hi ,
    I am new to BAPI.
    V have created an application in Visual Basic with the following fields
    EmpNo , EmpName, Addr1, Addr2, City and Phone (Only for Test)
    We have written the code for SAVING the data into SAP. Already we have
    constructed a table with the respective fields in SAP.
    For that we ourself created our own BAPI Structure / Function Group /
    Function Module/ Business Object - RELEASED related elements.
    1)Established the connection successfully.
    2)Stored the data into SAP Successfully and v r in need of
    3)HOW TO RETRIEVE THE DATA FROM SAP (USING GETLIST.....GETDETAIL....)
    Following is the code :
    'BAPI Structure  : ZBAPIEMP
    'Function Group  : ZBAPIEMP
    'Function Module : ZBAPI_EMP_CREATEFROMDATA
    'Business Object : ZBAPIEMP
    'Function Module : ZBAPI_EMP_GETLIST
    Dim bapictrl As Object
    Dim oconnection As Object
    Dim boEmp As Object
    Dim oZEmp_Header As Object
    Dim oImpStruct As Object
    Dim oExpStruct As Object
    Dim oreturn As Object
    Dim x As String
    Private Sub Form_Load()
    Set bapictrl = CreateObject("SAP.BAPI.1")
    Set oconnection = bapictrl.Connection
    oconnection.logon
    Set boEmp = bapictrl.GetSAPObject("ZBAPIEMP")
    Set oZEmp_Header = bapictrl.DimAs(boEmp, "CreateFromData", "EmployeeHeader")
    Set oImpStruct = bapictrl.DimAs(boEmp, "GetList", "EmployeeDispStruct")
    End Sub
    Private Sub cmdSave_Click()
        oZEmp_Header.Value("EMPNO") = txtEmpNo.Text
        oZEmp_Header.Value("EMPNAME") = txtEmpName.Text
        oZEmp_Header.Value("ADDR1") = txtAddr1.Text
        oZEmp_Header.Value("ADDR2") = txtAddr2.Text
        oZEmp_Header.Value("CITY") = txtCity.Text
        oZEmp_Header.Value("PHONE") = txtPhone.Text
        boEmp.CreateFromData EmployeeHeader:=oZEmp_Header, Return:=oreturn
        x = oreturn.Value("Message")
        If x = "" Then
            MsgBox "Transaction Completed!..."
        Else
            MsgBox x
        End If
    End Sub
    Private Sub cmdView_Click()
    End Sub
    COULD ANYBODY GUIDE ME, HOW TO RETRIEVE THE DATA FROM BAPI, FOR THE WRITTEN CODE.

    I didn't seen any other answers but here's how it's been done previously in our organization for a custom BAPI. In this example, we give material and language to return the part description. It's not specific to your project but may give you ideas..
    -Tim
    Option Compare Database
    Dim SAPLOGIN As Boolean
    Dim FunctionCtrl As Object
    Dim SapConnection As Object
    Sub SAPLOGOUT()
    On Error GoTo LogoutFehler
        SapConnection.logoff
        SAPLOGIN = False
    Exit Sub
    LogoutFehler:
        If Err.Number = 91 Then
            Exit Sub
        Else
            MsgBox Err.Description, vbCritical, "Fehler-Nr." & CStr(Err.Number) & " bei SAP-Logout"
        End If
    End Sub
    Function SAPLOG() As Boolean
    'Verbindungsobjekt setzen (Property von FunctionCtrl)
       Set FunctionCtrl = CreateObject("SAP.Functions")
       Set SapConnection = FunctionCtrl.Connection
    'Logon mit Initialwerten
       SapConnection.Client = "010"
       SapConnection.Language = "EN"
       SapConnection.System = "PR1"
       SapConnection.SystemNumber = "00"
       'SapConnection.Password = ""
       SapConnection.GroupName = "PR1"
       SapConnection.HostName = "168.9.25.120"
       SapConnection.MessageServer = "168.9.25.120"
         If SapConnection.Logon(0, False) <> True Then  'Logon mit Dialog
             Set SapConnection = Nothing
             DoCmd.Hourglass False
             MsgBox "No connection to SAP R/3 !"
             SAPLOGIN = False
             SAPLOG = False
             Exit Function
          End If
        SAPLOG = True
    End Function
    Function MatDescr(MatNr As String)
    Dim func1 As Object
    Dim row As Object, X As Integer, ErsteNr As String
    Dim DatensatzZähler As Long
    Dim RowField(1 To 50, 0 To 1) As String, RowLine As Long
        If Not SAPLOGIN Then
            If Not SAPLOG() Then
                MsgBox "No connection  to SAP !", 16
                SAPLOGOUT
                Exit Function
            End If
        End If
    ' Instanziieren des Function-Objektes
    Set func1 = FunctionCtrl.Add("Z_BAPI_READ_MAKT")
    ' Export-Paramter definieren
    func1.exports("MATNR") = MatNr
    func1.exports("SPRAS") = "EN"
    DoEvents
    If Not func1.call Then
        If func1.exception <> "" Then
            MsgBox "Communication Error with RFC " & func1.exception
        End If
        DoCmd.Hourglass False
        SAPLOGOUT
        Exit Function
    Else
      MatDescr = func1.imports("MAKTX")
    End If
    If MatDescr = "" Then
        MatDescr = "PART NO. NOT FOUND"
    End If
    End Function

  • How to retrieve the java object in a proxy service in osb -- Plz help

    Hi all,
    I have a singleton java class which runs whenever the weblogic server gets started and store the output in its object. I need to access this java object from a proxy service in osb.
    We tried using java call out and retrieved that object but we couldn't know how to parse that object into XML.
    We are not sure of using the java call out in osb to solve this purpose because whenever we use a java callout, that particular java code will run which is not the case of singleton class.
    So kindly help us how to retrieve the java object which holds the output without running the java code every time because its already run and holding the output in its object.
    Regards
    Prabhu

    here the doc http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1106656
    but I guess you are already at the stage of getting a POJO in a first Java Callout and passing the POJO to a second Java Callout, which should then return it to OSB as a XMLObject.
    My recommendation is to write a Java function which returns a XMLObject and uses a XMLCursor to populate it with the values of the POJO.
    An XMLObject returned to the OSB is automatically transformed in a "XML" variable (which in reality is represented as a XMLObject in the Pipeline context)
    Here some code sample:
    http://www.javamonamour.org/2010/09/how-to-create-xmlobject-using-xmlcursor.html

Maybe you are looking for

  • Customized Back Order Report

    Hello, I have a customer who would like a customized back order report.  They would like a query that would show them the following: - The Items on any orders that have been partially shipped on the row level.  (I was able to create a query that woul

  • HELP! Live or death question :(

    Hello guys im in the final week of a college project and i need to do some things in labview. I am receving from a FPGA trhough serial communication. The transmission is working OK as i receive the data im sending from the FPGA. With this, my fpga is

  • Live video distribution using CDN

    I am planning a ACNS/CDN deployment that will based around web-caching, prepos content, VOD's and Live Video distribution for town hall meetings to Corporate sites. I have completed the ACNS training and have a good picture of what I am going to be d

  • Improving Boot Time on Compact Fieldpoint

    Does anyone have any suggestions for how to improve the boot time of Compact Fieldpoint controllers?  Right now, I've got some not real complex code with 2-3 Loops (lots of shared variables, though).  It takes roughly 5-8 minutes for the loops to sta

  • HT3771 Hi, I cannot get my HP2200dn to work with my Intel macs after updating to Snow Leopard

    Since installing Snow Leopard I can only print using my HP Laserjet 2200dn mono laser printer if I print via my old G4 which is running Tiger. The G4 has the HP printer as a shared printer and is connected using Appletalk. Obviously this is very inco