Issue with Script

Hi Team,
I am using this script for monitoring VPN account expiration date. Please check any errors at date function.
Every this is working fine but while getting alerts i am getting END Date as below: It should be DD/MM/YYY Format
End date
41665
Functions*********************************************************************************
Function ReadExcel(strFileName,strSheetName)
    Set objExcelConn = CreateObject("ADODB.Connection")
    objExcelConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFileName & ";Extended Properties=Excel 5.0;Persist Security Info=False"
    Set objExcelRS = objExcelConn.Execute("SELECT * FROM [" & strSheetName & "$]")
    For iColumnNumber = 0 to objExcelRS.fields.Count-1
        If iColumnNumber = 0 Then
            sColumnNames = objExcelRS.fields(iColumnNumber).Name
        Else
            sColumnNames = sColumnNames & "~" & objExcelRS.fields(iColumnNumber).Name
        End If
    Next
    firstCol = true
    Do While Not objExcelRS.EOF
        If (objExcelRS.Fields.Item("End Date") = Date+2) or (objExcelRS.Fields.Item("End Date") = Date)  Then
            For Each fld In objExcelRS.Fields
                If firstCol Then
                dim abc
                'abc= objExcelRS.Cells(sRowValue,8)
                    fldCat = fldCat & fld
                    firstCol = false
                    'set uid=objExcelRS.Fields.Item("User ID")
                Else
                    fldCat = fldCat & ";" & fld
                End If
            Next
            fldCat = fldCat & "#"
        End If
        objExcelRS.MoveNext
    Loop
    ReadExcel = Replace(fldCat,"#;","#")    
End Function

There us no way to tell what is happening.  The script does not make much sense.
Ask the person who wrote it to help you. The script has noting to do with VPNs and nothing to do with dates.  It appears to just read all of an excel spreadsheet into a single string.
¯\_(ツ)_/¯

Similar Messages

  • I'm having a big issue with scripts and sites I need.

    I am an Etsy shop owner and always been able to access my shop just fine all the sudden about three weeks ago I cannot log in to my shop on ff. I can view the Etsy site but when I try to log in it just loads and loads and will not let me. I know it is the script bc I added a script turn off add on and I could log on but Etsy will not let you have it turned off to edit items if your shop so I had to download chrome just to go to my shop which is annoying, I do not like chrome.
    Other than that a few more sites like creative market and a few blogs will not load anymore for me. I have already re-set and that did not work. Also I get a lot of script not responding plugin popups that freeze and crash. This is really annoying. Does anyone know a fix? Thanks..

    You can try basic steps like these in case of issues with web pages:
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and only cookies from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Issue with script timeouts - trying to send email mail shots - hosting recommendations?

    Background is this - I look after a site for a recruitment agency, which has a backend mySQL database.
    It includes a table of potential candidates, which the site owner can search based on various criteria and then send all the returned candidates an email about potential jobs they might be interested in.
    I'm using an off the shelf script to send the emails, and have jumped through a few hoops to get this to work, but it looks like we need to move hosting unfortunately.
    The script is able to limit emails so that the hosting company doesn't get black flagged as a spammer.
    I've set it up with a progress bar in a new window so the site owner can see progress, but easily get back to the rest of the site.
    But where we have come unstuck is the script timeout on the server - so even though its set to send emails slowly enough, ie under 500 emails an hour, because of that slow pace, it fails if it takes more then five minutes to send them all as the script times out.
    My understanding is that the script includes a line to reset the script timeout value to 0, so enabling the script to keep running until all the emails have been sent. But unfortunately our current hosting company does not allow the script timeout to be reset at the PHP level.
    So my question is this - is anyone doing anything similar, and if so, can you recommend any hosting company that does allow the script timeout to be reset at the PHP level?
    Because at the minute it seems like a frustrating catch-22 - slow it down to get around the spam issue, and it won't run long enough to send all the emails. Speed it up, and it falls foul of the script timeout.
    Any advise on this, or hosting suggestons most welcome!
    Thanks.

    Although there is an AppleScript Forum, Automator can run AppleScripts, so sometimes things can go in either forum. In your script, other than not setting a recipient, you are just getting one of the persons. You need to get a list of your contact information, then build your outgoing messages from that list - for example:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    set theEmails to {} -- this will be a list of email addresses
    set theNames to {} -- this will be a list of names for the greeting
    tell application "Address Book"
    activate
    set theGroup to (choose from list (get the name of every group) with prompt "Choose a Group") as text
    if theGroup is "false" then return -- cancel
    repeat with aPerson in (get every person of group theGroup) -- build email and name lists
    set the end of theEmails to the first item of (get the value of the email of aPerson) -- just the first address
    set the end of theNames to the first name of aPerson
    end repeat
    end tell
    tell application "Mail"
    repeat with anItem from 1 to (count theEmails) -- make a new message for each entry
    tell (make new outgoing message at the front of outgoing messages with properties {subject:"Test Mail"})
    set visible to true
    get item anItem of theNames
    if the result is missing value then -- no name
    set the content to "message"
    else
    set the content to "Dear " & the result & "," & return & return & "message"
    end if
    make new to recipient at the end of to recipients with properties {address:(item anItem of theEmails)}
    end tell
    end repeat
    activate
    end tell
    </pre>

  • Image Quality issue with script

    So I recently wrote a simple script to output an image at a bunch of different resolutions. However, I am running into an image quality issue that I don't run into when I do the same thing manually.
    Here is an example image showcasing the image: http://terminalvelocity.ca/temp/notworking.jpg
    As you can see along the top of the model's forhead there is destinct color fragmentation. Which seems very strange.
    Here is the script, it is pretty simple, it asks for a few simple config options. (the above image was created using default settings). It then figures out the correct ratios and loops through doing each resize, saving the image, then reverting the history so each iteration uses the original image data and not the resized version:
    doc = app.activeDocument;
    openFilePath = Folder.selectDialog ("Where do you want the images to be saved?");
    maxSize = Number(prompt("What would you like to be the maximum length of the long edge? (Image is never upsized) (pixels)", 2800)); 
    minSize = Number(prompt("What would you like to be the minimum length of the long edge? (pixels)", 100));
    gap = Number(prompt("How much smaller should each image be? (pixels)", 100)); 
    quality = Number(prompt("What quality would you like the JPG exported as (0-12)", 10)); 
    var size;
    var primary;
    var secondary;
    if(doc.width > doc.height){
              primary = doc.width;
              secondary = doc.height;
    }else{
              primary = doc.height;
              secondary = doc.width;
    var ratio = secondary/primary;
    var size = [];
    for(var i = maxSize;i>minSize;i-=gap){
              var  p = i
              var s = i * ratio;
              size.push([p,s]);
    var w;
    var h;
    var n;
    for(var i in size){
              if(doc.width > doc.height){
                        w = n = size[i][0];
                        h = size[i][1];
              }else{
                        w = size[i][1];
                        n= h = size[i][0];
              if(doc.width >= w && doc.height >= h){
                        doc.resizeImage(w,h,null,ResampleMethod.BICUBICSHARPER);
                        jpgFile = new File(openFilePath+"/"+n+".jpeg" )
                        jpgSaveOptions = new JPEGSaveOptions()
                        jpgSaveOptions.embedColorProfile = false
                        jpgSaveOptions.formatOptions =
                        FormatOptions.STANDARDBASELINE
                        jpgSaveOptions.matte = MatteType.NONE
                        jpgSaveOptions.quality = quality
                        app.activeDocument.saveAs(jpgFile, jpgSaveOptions, true,Extension.LOWERCASE);             
                        doc.activeHistoryState = doc.historyStates[doc.historyStates.length-2];
    In comparison, here is an example of an image of the exact same resolution that does not exhibit this issue at all:
    The steps taken to save this image were as follows: http://photography.terminalvelocity.ca/content/images/2012/avery_konrad_6/horizontal/1500. jpg
    Image > Resize > Bicubic Sharper (1500px);
    Save For Web
         Jpeg
         Quality 75
         Optimzed: true
         Progressive: false
         Blur: 0
         Convert to sRGB: true   
    Anyway, as you can see, The manually exported image does not have any of the quality issues that are present within the scripted image. I am pretty new to photoshop scriping so am assuming it has something to do with me missing some sort of option in the save settings. Any help would be swell.
    Also note, this doesn't occur on all images, I usually don't see an issue when using the script, however, something about the tones of this particular photo make it really obvious.
    I am using the latest version of Photoshop CS6 (creative cloud) on Max OSX
    thanks so much!

    I'm on windows find the bicubicsharper does not work well it the image being resized has been highly sharpened all ready. Because of my Photoshop preferences I had to make minor modification to your script. I'm also a bit colorblind so i don't see many color issues so I include a screen capture if what windows does with your image and script.
    var orig_ruler_units = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;          // Set the ruler units to PIXELS
    doc = app.activeDocument;
    openFilePath = Folder.selectDialog ("Where do you want the images to be saved?");
    maxSize = Number(prompt("What would you like to be the maximum length of the long edge? (Image is never upsized) (pixels)", 2800));
    minSize = Number(prompt("What would you like to be the minimum length of the long edge? (pixels)", 100));
    gap = Number(prompt("How much smaller should each image be? (pixels)", 100));
    quality = Number(prompt("What quality would you like the JPG exported as (0-12)", 10));
    var size;
    var primary;
    var secondary;
    if(doc.width > doc.height){
              primary = doc.width;
              secondary = doc.height;
    }else{
              primary = doc.height;
              secondary = doc.width;
    var ratio = secondary/primary;
    var size = [];
    for(var i = maxSize;i>minSize;i-=gap){
              var  p = i
              var s = i * ratio;
              size.push([p,s]);
    var w;
    var h;
    var n;
    for(var i in size){
              if(doc.width > doc.height){
                        w = n = size[i][0];
                        h = size[i][1];
              }else{
                        w = size[i][1];
                        n= h = size[i][0];
              if(doc.width.value >= w && doc.height.value >= h){
                        doc.resizeImage(w,h,null,ResampleMethod.BICUBICSHARPER);
                        jpgFile = new File(openFilePath+"/"+n+".jpeg" )
                        jpgSaveOptions = new JPEGSaveOptions()
                        jpgSaveOptions.embedColorProfile = false
                        jpgSaveOptions.formatOptions =
                        FormatOptions.STANDARDBASELINE
                        jpgSaveOptions.matte = MatteType.NONE
                        jpgSaveOptions.quality = quality
                        app.activeDocument.saveAs(jpgFile, jpgSaveOptions, true,Extension.LOWERCASE);            
                        doc.activeHistoryState = doc.historyStates[doc.historyStates.length-2];
    app.preferences.rulerUnits = orig_ruler_units;          // Reset units to original settings

  • Issue with script design

    HI expert can we design a box in sap-script where the vertical lines inside the box are not continious i.e discrete .

    Well actually that doesnt work on first hand.
    There is no way to tell the BAX statement to do such stuff.
    what you COULD do is: have a box with height 0, well you need some upper line, you could do this using &ULINE(xx)& as well.
    and have another on for bottom.
    Between manually print the signs that you wish to build the not continuous vertical thing.

  • Issue with Scripted Probe for LDAP

    I have the script LDAP_PROBE loaded into memory on my ACE 4710 (A4(2.0)) and th Probe is name is configured for the LDAP port the servers are listening on. So here is th econfiguration.
    probe scripted LDAP_PROBE_3389
      port 3389
      interval 5
      passdetect interval 5
      passdetect count 2
      receive 5
      script LDAP_PROBE 3389
    I have tried removing the argument of 3389 at the bottom as well but I continue to get the result:
    real      : LDAP02[3389]
                    10.220.31.81    3389  PROBE    2491     2491     0        FAILED
       Socket state        : RESET
       No. Passed states   : 0         No. Failed states : 1
       No. Probes skipped  : 0         Last status code  : 30002
       No. Out of Sockets  : 0         No. Internal error: 0
       Last disconnect err : Probe error: Server did not respond as expected
       Last probe time     : Thu Jul 12 16:24:41 2012
       Last fail time      : Thu Jul 12 12:56:59 2012
       Last active time    : Never
    The server log states this was successful however...
    Admin Acct Status: Not Locked
    AuditV3--2012-07-11-14:18:21.428+00:00DST--V3 anonymous Bind--bindDN: <*CN=NULLDN*>--client: 10.220.31.217:56908--connectionID: 8--received: 2012-07-11-14:18:21.428+00:00DST--Success
    name: <*CN=NULLDN*>
    authenticationChoice: simple
    Admin Acct Status: Not Locked
    Am I missing an argument? I have run debug on LDAP but really don't know what I am looking at...

    To update the script
    ==============
    Extract the Cisco-supplied LDAP script from the tar.gz or zip file. Rename it to something unique. Update it to use the
    new length and offset.
    Import the script into the LDAP contexts on both ACEs. Remember, scripts are not replicated and having mismatched scripts will cause replication to fail.
    ACE1/ldap# copy tftp: disk0:
    Enter source filename[]? UoN-LDAP_PROBE-iLDAP2
    Enter the destination filename[]? [UoN-LDAP_PROBE-iLDAP2]
    Address of remote host[]? [redacted]
    Trying to connect to tftp server......
    TFTP get operation was successful
    ACE2/ldap# copy tftp: disk0:
    Enter source filename[]? UoN-LDAP_PROBE-iLDAP2
    Enter the destination filename[]? [UoN-LDAP_PROBE-iLDAP2]
    Address of remote host[]? [redacted]
    Trying to connect to tftp server......
    TFTP get operation was successful
    script file 13 UoN-LDAP_PROBE-iLDAP2
    If you look at (for example) packet 651 in the capture in wireshark you'll see a
    successful bind response. You will need to tell wireshark to decode the packet as LDAP.
    The payload is:
    30 84 00 00 00 10 02 01 01 61 84 00 00 00 07 0a 01 00 04 00 04 00
    You need to have a basic understanding of ASN.1 and something called Basic Encoding Rules (BER) - whicj comes down to TLV format structures.
    The key to understanding this output is that there are three ways of specifying a length in ASN.1. The first way we have already seen in the Cisco script is to use a single byte. This known as the "definite" form and can be used for lengths of 127 bytes or less. Otherwise if the high bit is set to one, the low seven bits define the length of length. The length is then encoded in that many bytes. This is the "length of the length field" form. It looks like Microsoft Active Directory uses the indefinite form for all length encoding. The third form (for completeness is "indefinite" where the length is coded as x'80' and the end of the content is marked by x'0000'. Deconstructing the data:
    0x30    The start of a universal constructed sequence
    0x84    The length of the sequence in "length of the length" format. The next 4 bytes give the length.
    0x00000010    sequence length of 16 bytes
    0x02    Integer
    0x01    The length of the next field (1 byte)
    0x01    Value (this is the message ID which agrees with the ID in the BIND Request)
    0x61    Application, number 0, use RFC2251 to decode. This is a Bind Response
    0x84    The length of the sequence in "length of the length" format. The next 4 bytes give the length.
    0x00000007    bind response length of 7 bytes   
    0x0a    Enumeration
    0x01    Length 1
    0x03    0 - Success
    0x04    String
    0x00    Length 0 (null string)
    0x04    String
    0x00    Length 0 (null string)
    The patch given takes in 20 bytes from the bitstream,converts it into a hexadecimal string  and finds the 6 hexadecimal characters from the 16th byte onwards   (Tcl uses zero-based arrays). This is the response code.
    Kind Regards
    Cathy

  • Declaration issues with  script logic

    we use to write the logic as below in 5.1
    *MEMEBERSET(%PRODUCT%,"Desendents(PRODUCT_LTERM.TOT_PROD,999,LEAVES)")
    *XDIM_MEMBERSET ACCOUNT_LTERM=100000000_D,110000000_D,120000000_D,130200000_D,
    *XDIM_MEMBERSET DATASRC=INPUT
    *XDIM_MEMBERSET ENTITY_LTERM=%ENTITY_LTERM_SET%
    *XDIM_MEMBERSET PRODUCT_LTERM=%PRODUCT%
    *XDIM_MEMBERSET RPTCURRENCY=LC
    *XDIM_MEMBERSET SCENARIO=%SCENARIO_SET%
    *XDIM_MEMBERSET TIME_LTERM=CY,CY+1
    *WHEN *
    *IS *
         *REC(EXPRESSION=0)
    *ENDWHEN
    As we know that sql based keywords are not used now in thi new version 7.0
    I want to know the replacement in 7.0 for *MEMBERSET() COMMAND and also
    How * in when command for specificing consideratrion of all the declaration is replaced in 7.0

    Hi sheldon,
    Thanks for your time in replying to the question. Chennuru and I are working together.
    Let me give you a clear picture of our issue.
    1. *memberset() command which is used to retrieve a list of members of a particular dimension, is not being recognised in 7.0NW version.
    We want to know if we have any replacement or other format for this command.
    2. After declaring the dimensions using XDIM_MEMBERSET statements for all the existing dimensions, if we need to manipulate on all the existing combinations we use
    WHEN *
    IS *
                                                                               REC(EXPRESSION=0)
                                                                         *ENDWHEN
    In this case, the star to the right of the when is not recognised. Even if we replace * with <ALL> the result is not achieved.
    We would like to know what must be used to select all the existing dimensions.

  • Issues with Script in Safari browser

    Anyone having trouble with the Weight Watchers website in Safari? First problem ever for me.
    Safari is no longer responding because of a script on the webpage “WeightWatchers.com: Community - Message Board Posts” (http://www.weightwatchers.com/community/mbd/post.aspx?threadpageno=1&page_size=25&rownum=1&board_name=50%2bPounds+to+Lose&thread_id=146669110&board_id=10&forum_name=message+boards&forum_i d=1&thread_name=Arguing+against+NI+being+posted+in+restaurants&modno=&sincedate=9%2f20%2f2010+12%3a00%3a00AM&viewchange=DATECREATEDDESC). Do you want to stop running the script, or let it continue?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen. Click the Clear Display icon in the toolbar. Then take one of the actions that you're having trouble with. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Issue with Script its urgent

    Hi,
    Any one please let me know how we can defne new-page with particular page name.
    for example i want to display the newpage 
    All terms & conditions in last page its layout is different.
    if iam using CONTROL_FORM function module its not taking LAstpage as new page
    please let me know urgently.
    thanks & regards...
    Anil.T

    Hi
    The first thing you have to consider is the NEW-PAGE statament can be done in the MAIN only.
    In the SAPSCRIPT you can insert the line:
    /: NEW-PAGE <PAGE NAME>
    so try to transfer the same command to fm CONTROL_FORM
    Max

  • Issue with script while adding table MTL_SECONDARY_INVENTORIES

    Hi All,
    I have a requirement to modify the existing query to fetch the segment3 of GL_CODE_COMBINATIONS table. I have to fetch it based on the Material_Account of MTL_SECONDARY_INVENTORIES.
    The existing piece of code is as below:
    SELECT line.inventory_item_id, line.order_quantity_uom line_uom,
    line.line_number, line.fulfilled_quantity qty, line.line_id,
    line.created_by, itm.segment1 || '.' || itm.segment2 item,
    itm.primary_uom_code primary_uom, head.order_number, head.header_id,
    head.attribute2 subinventory, line.actual_shipment_date date_shipped,
    NVL (itm.serial_number_control_code, 1) serial_req,
    NVL (itm.lot_control_code, 1) lot_req
    FROM mtl_system_items itm,
    oe_transaction_types_tl typ,
    oe_order_headers_all head,
    oe_order_lines_all line
    WHERE itm.organization_id = v_org_id
    AND itm.inventory_item_id = line.inventory_item_id
    AND typ.NAME || '' IN ('ABC', 'DEF')
    AND typ.transaction_type_id = head.order_type_id
    AND head.header_id = line.header_id
    The modified code is as below:
    SELECT glcc.segment3 -- AB Changed
    line.inventory_item_id, line.order_quantity_uom line_uom,
    line.line_number, line.fulfilled_quantity qty, line.line_id,
    line.created_by, itm.segment1 || '.' || itm.segment2 item,
    itm.primary_uom_code primary_uom, head.order_number, head.header_id,
    head.attribute2 subinventory, line.actual_shipment_date date_shipped,
    NVL (itm.serial_number_control_code, 1) serial_req,
    NVL (itm.lot_control_code, 1) lot_req
    FROM mtl_system_items itm,
    mtl_secondary_inventories msis, -- AB Changed
    mtl_item_sub_inventories misi, -- AB Changed
    gl_code_combinations glcc -- AB Changed
    oe_transaction_types_tl typ,
    oe_order_headers_all head,
    oe_order_lines_all line
    WHERE itm.organization_id = v_org_id
    AND itm.inventory_item_id = line.inventory_item_id
    AND typ.NAME || '' IN ('ABC', 'DEF')
    AND typ.transaction_type_id = head.order_type_id
    AND head.header_id = line.header_id
    AND line.line_id = p_line_id;
    AND glcc.code_combination_id = msis.material_account -- AB Changed
    AND msis.secondary_inventory_name = misi.secondary_inventory -- AB Changed
    AND msis.organization_id = misi.organization_id -- AB Changed
    AND misi.inventory_item_id = itm.inventory_item_id -- AB Changed
    AND misi.organization_id = itm.organization_id -- AB Changed
    **NOTE:** I was told that, for a particular item, the total number of records BEFORE and AFTER change has to be the same.
    So, can someone let me know, if the modification done is correct to meet the requirements? If not, could you please guide me in this regard?
    Thanks very much in advance.
    Regards,
    AB

    Your joins are correct but your number of records may not remain same if one item-org combination has more than 1 records in the mtl_item_sub_inventories table.
    However, if your business rules may prevent someone from creating such records, then you are fine. Run the following to verify that
    select count(1),organization_id,inventory_item_id From mtl_item_sub_inventories misi
    group by organization_id,inventory_item_id having count(1) >1
    Hope this answers your question,
    Sandeep Gandhi

  • Execution time issues with SU01 demo script

    Having worked with Scripting in a Box for a while now I wanted to try out the examples there. I read FM: SO_USER_LIST_READ or another one explaining why my attempt to narrow the returned users failed (Craig, did you find out why the functionality was removed?) and Re: Issue with "Scripting in a Box" seeing that  Harry had the same problems with only ~200 users in his system. However, Craig's original post states he successfully managed with over 400 users. I'm a bit confused...
    I included some simple timing stuff and found out that processing of one user in the loop takes about 1.7 seconds - little surprise then that every script times out. This seems to be due to the additional calls to GetStatus() and GetValid() - by commenting them out I get the whole list rather quickly.
    Unfortunately commenting them out also means no nice icons for 'Status' and 'Valid', which is not desired. I probably could create a Z FM to deliver me the userlist with these two fields already added (which would save on rfc-calls, assuming the operation is much quicker on the server directly), but I hoped to get a solution based purely on PHP, not own ABAP coding (being aware that Craig also used a Z FM anyway, but still...)
    I'm a bit unsure now how easy it is to actually create useful frontends in PHP, with such long execution times. I assume this will happen in other occasions as well, not only for user lists. Is there an alternative? Or a general way to do those things quicker?
    :Frederic:

    Craig: you say it's easy to go from 1.7 seconds per user lookup down to a small fraction of it? Then apparently I'm lacking these skills. Could you please give me a hint what should be done there?
    I though about creating a Z function, but having to write custom wrappers - possibly for about any transaction in this style - I wanted to avoid.
    Bala: the two functions only take one user as input, not a list. So w/o modifying the ABAP side I can't feed the whole list in there. I wonder how much it would improve the result time anyway, so perhaps I'm trying it. It's just not a solution I'd prefer.
    Paging is a good idea, the actual call to get the whole userlist is quite quick. Having like 20 users displayed at a time is manageable - still slow, but the script won't timeout anymore. I think I'll implement this today.
    About AJAX: yes, I want to play around a bit with AJAX, however having the two columns valid and status removed and the information only displayed on mouseover etc is a bit like cheating. And 1.7+ seconds waiting for a hoover info is too long. So I'd like to optimize on the rfc-calling side primarily.
    Craig: surely it was just a demo, and I'm just trying to get it to work for understanding it
    :Frederic:

  • Issue with Generate Create Script in new ODT 11.1.0.5.10 beta

    So I'm trying to determine if there's an issue with the Generate Create Script option in the new ODT 11.1.0.5.10 beta (when you right click on a table in Server Explorer).
    The SQL create script that it generates lacks the slash between lines. For example I generated the create script for my User table and this is what was generated:
    CREATE TABLE "DEV"."SYSTEM_USER_TB" ("RID" NUMBER(10,0),"USER_NAME" VARCHAR2(256 CHAR),"APPLICATION_RID" NUMBER(10,0),"FIRST_NAME" VARCHAR2(256 CHAR),"LAST_NAME" VARCHAR2(256 CHAR),"PW" VARCHAR2(128 CHAR),"PW_FORMAT" NUMBER,"PW_SALT" VARCHAR2(128 CHAR),"LAST_ACTIVITY_DT" DATE,"EXPIRATION_DT" DATE,"EMAIL" VARCHAR2(256 CHAR),"PW_QUESTION" VARCHAR2(256 CHAR),"PW_ANSWER" VARCHAR2(256 CHAR),"APPROVED_FLG" NUMBER(1,0),"LOCKED_OUT_FLG" NUMBER(1,0),"LAST_LOGIN_DT" DATE,"LAST_PW_CHANGED_DT" DATE,"LAST_LOCKOUT_DT" DATE,"FAILED_PW_ATTEMPT_CNT" NUMBER(6,0),"FAILED_PW_ATTEMPT_WINSTART" DATE,"FAILED_PW_ANSW_ATTEMPT_CNT" NUMBER(8,0),"FAILED_PW_ANSW_ATTEMPT_WINSTRT" DATE,"CREATED_BY_RID" NUMBER(10,0),"CREATED_DT" DATE,"MODIFIED_BY_RID" NUMBER(10,0),"MODIFIED_DT" DATE) TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 131072 MAXEXTENTS 2147483645 MINEXTENTS 1 )
    CREATE UNIQUE INDEX "DEV"."XPKSTAFF" ON "DEV"."SYSTEM_USER_TB" ("RID" ) TABLESPACE "USERS"
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033033" PRIMARY KEY ("RID") USING INDEX "DEV"."XPKSTAFF" ENABLE VALIDATE )
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033032" CHECK ("RID" IS NOT NULL) ENABLE VALIDATE )
    CREATE TRIGGER "DEV"."SYSTEM_USER_TRG1"
    BEFORE
    INSERT
    ON "DEV"."SYSTEM_USER_TB"
    FOR EACH ROW
    begin
         select SYSTEM_USER_SEQ.nextval into :new.RID from dual;
    end;
    In my new Oracle Database Project, if I right click on the script and select "Run" or "Run On", the script fails saying:
    Connected.
    CREATE UNIQUE INDEX "DEV"."XPKSTAFF" ON "DEV"."SYSTEM_USER_TB" ("RID" ) TABLESPACE "USERS"
    ERROR at line 2:
    ORA-00922: missing or invalid option
    If I then add, a slash between lines, the script runs successfully and creates the table/trigger and whatever else just fine. For example, I changed the above generated code to look as follows:
    CREATE TABLE "DEV"."SYSTEM_USER_TB" ("RID" NUMBER(10,0),"USER_NAME" VARCHAR2(256 CHAR),"APPLICATION_RID" NUMBER(10,0),"FIRST_NAME" VARCHAR2(256 CHAR),"LAST_NAME" VARCHAR2(256 CHAR),"PW" VARCHAR2(128 CHAR),"PW_FORMAT" NUMBER,"PW_SALT" VARCHAR2(128 CHAR),"LAST_ACTIVITY_DT" DATE,"EXPIRATION_DT" DATE,"EMAIL" VARCHAR2(256 CHAR),"PW_QUESTION" VARCHAR2(256 CHAR),"PW_ANSWER" VARCHAR2(256 CHAR),"APPROVED_FLG" NUMBER(1,0),"LOCKED_OUT_FLG" NUMBER(1,0),"LAST_LOGIN_DT" DATE,"LAST_PW_CHANGED_DT" DATE,"LAST_LOCKOUT_DT" DATE,"FAILED_PW_ATTEMPT_CNT" NUMBER(6,0),"FAILED_PW_ATTEMPT_WINSTART" DATE,"FAILED_PW_ANSW_ATTEMPT_CNT" NUMBER(8,0),"FAILED_PW_ANSW_ATTEMPT_WINSTRT" DATE,"CREATED_BY_RID" NUMBER(10,0),"CREATED_DT" DATE,"MODIFIED_BY_RID" NUMBER(10,0),"MODIFIED_DT" DATE) TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 131072 MAXEXTENTS 2147483645 MINEXTENTS 1 )
    CREATE UNIQUE INDEX "DEV"."XPKSTAFF" ON "DEV"."SYSTEM_USER_TB" ("RID" ) TABLESPACE "USERS"
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033033" PRIMARY KEY ("RID") USING INDEX "DEV"."XPKSTAFF" ENABLE VALIDATE )
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033032" CHECK ("RID" IS NOT NULL) ENABLE VALIDATE )
    CREATE TRIGGER "DEV"."SYSTEM_USER_TRG1"
    BEFORE
    INSERT
    ON "DEV"."SYSTEM_USER_TB"
    FOR EACH ROW
    begin
         select SYSTEM_USER_SEQ.nextval into :new.RID from dual;
    end;
    So, does anyone know if this is a bug? Could I be missing an option to add in the slashes to the generated code? Is there an option to not require the slashes? Could there be another way to execute these scripts?
    Seriously, I think I'm having deja vu from the last release of the Dev Tools: Generate Create Script creates scripts that won't run: ORA-00922: missing..
    ...except this time the documentation says I should be able to use the "Run" and "Run On" commands in the Oracle Database Project (see page 8): http://www.oracle.com/technology/tech/dotnet/pdf/ODT11_whatsnew.pdf
    null

    There are 2 issues in the generated script :
    1. Missing semicolons at the end of the create stmts
    2. Missing slashes
    Both of these fixes will be available in the ODT 11.1 release.

  • Issue with Generate Create Script in new ODT 11.1.0.6.10 beta

    I've tried this on several tables in my database. I choose Generate Script to ... a file, for a given table it gives me the error message "An error occurred while writing to fil: \nValue was either too large or too smal for an Int32."
    (It doesn't matter if I'm in a Oracle database project or some other project.)
    Trying to Generate Script To Project... when I'm in a Oracle Database Project, Visual Studio (2005) crashes. It appears to be some overflow exception according to crashinfo:
    EventType : clr20r3 P1 : devenv.exe P2 : 8.0.50727.762 P3 : 45716759
    P4 : mscorlib P5 : 2.0.0.0 P6 : 461eee3d P7 : 407b P8 : a3
    P9 : system.overflowexception
    (With ODT 11.1.0.5.10 beta it worked fine dispite the issue discussed in thread: Re: Issue with Generate Create Script in new ODT 11.1.0.5.10 beta
    /Tomas

    Tried to debug this error and got these exception details. Hope it helps!
    /Tomas
    System.OverflowException was unhandled
    Message="Value was either too large or too small for an Int32."
    Source="mscorlib"
    StackTrace:
    Server stack trace:
    at System.Decimal.ToInt32(Decimal d)
    at System.Decimal.op_Explicit(Decimal value)
    at Oracle.Management.Omo.TableSpaceQuotaDetails.FillTableSpaceQuota(OracleDataReader reader)
    at Oracle.Management.Omo.User.FillTableSpaceQuotas(OracleDataReader reader)
    at Oracle.Management.Omo.Connection.GetUserCollection(Boolean refresh)
    at Oracle.Management.Omo.Connection.GetUsers(Boolean refresh)
    at Oracle.Management.Omo.TableSQLGenerator.GetCreateSQLs(OmoObject obj, ArrayList& typeAndNames, Boolean checkRequired, Boolean appendSchemaName)
    at Oracle.Management.Omo.TableViewBase.GetCreateSQLs(Boolean appendSchemaName)
    at Oracle.VsDevTools.OracleUILDBProjectServices.GenerateCreateScript(OracleUILConnCtx connCtx, String[] objectNames, String objectOwner, OracleUILObjectType objectType)
    at Oracle.VsDevTools.OracleUILDBProjectServices.GenerateCreateScriptAsyncMethod(IntPtr ppvObj, OracleUILConnCtx connCtx, String[] objectNames, String objectOwner, OracleUILObjectType objectType, ICollection& scriptText)
    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
    at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
    at Oracle.VsDevTools.OracleUILDBProjectServices.GenerateScriptAsyncMethodDelegate.EndInvoke(ICollection& scriptText, IAsyncResult result)
    at Oracle.VsDevTools.OracleUILDBProjectServices.OnGenerateScriptAsyncCompletion(IAsyncResult ar)
    at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(IMessage msg)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
    at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(Object o)
    at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

  • Regarding the Cheque printing in SAP Script. Issue with Layout Change.

    I have to modify the layout of a predeveloped script.
    The issue with the existing one is that, the Labels (on the window, that is printed) and the data (corresponding to it) are not on the same line.
    To be more clear, I have like this on the cheque,
    Payee : _______________________
    Amount : ____________________
    The Data corresponding to the Pay & Amount is not in the respective line (as I shown above).
    How can I get that both on the same line.?
    Shall I need to modify the layout or what else to do ?
    Pls. guide me.
    Your guidance is appreciable.
    Edited by: ravikanth seal on Mar 9, 2011 5:09 AM
    Edited by: ravikanth seal on Mar 9, 2011 5:10 AM

    Hi niraj gadre ..
    Ur idea may not workout fir me.
    My idea is :
    Can I use any formating options in the corresponding window's text elements..
    Pressing F9 on the windiw (in the Windows list) displays the Text Elements (Goto Edit-> Text Elemets on the Window chosen) in the Windows list.
    Here can we do any formating options, so as to change the layout alignment of window's Text Elements ??
    Guide me please.
    Your guidance is Appreciable
    Thanks.
    Edited by: ravikanth seal on Mar 9, 2011 7:55 AM

  • Script issue with multiple lines printing

    Dear All,
    I'm trying to print multiple lines of my internal table in a script.
    But only the last line is being printed all the time in all the lines.
    Attached is my code.
        CLEAR GS_REGUP.
        LOOP AT GT_REGUP INTO GS_REGUP.
    * Start the Form
          CALL FUNCTION 'START_FORM'
            EXPORTING
              ARCHIVE_INDEX = TOA_DARA
              FORM          =  'ZFORM'                                    "T042E-ZFORN
              LANGUAGE      = SY-LANGU                          "T001-SPRAS
              STARTPAGE     = 'FIRST'
              PROGRAM       = 'ZPROG'.
    * Net Amount
          CLEAR GV_NETWR.
          GV_NETWR = ( GS_REGUP-WRBTR - GS_REGUP-PSSKT ).
    * Print the Content
          CALL FUNCTION 'WRITE_FORM'
            EXPORTING
              ELEMENT  = '525'      "Header
              FUNCTION = 'APPEND'
              TYPE     = 'BODY'
              WINDOW   = 'MAIN'.
    * End the Form
          CALL FUNCTION 'END_FORM'
            IMPORTING
              RESULT = ITCPP.
          IF ITCPP-TDPAGES EQ 0.       "Print via RDI
            ITCPP-TDPAGES = 1.
          ENDIF.
        ENDLOOP.
    Please let me know the flaw in it.
    Regards,
    Deepu.K

    Dear All,
    As i Mentioned in my earlier post, the same coding working fine in Quality server --> Printing multiple lines in script output.
    But now, I have the same reqt. in another window.
    So, I did the same coding.
    But, this time it's printing the last line of the internal table in all the lines.
    This is happening in Quality Server only.
    The only difference between the previous internal table and this int. table is:
    1. The first int. table content is printing in MAIN Window. ---> working fine
    2. The second int. table content is printing in VARIABLE window. ---> NOT WORKING.
    Can any one tell me what's the issue with this ?
    Regards,
    Deepu.K

Maybe you are looking for

  • Tecra A8, WinXP SP2 - issue with built-in speakers

    Hello there, I know this issue has been brought up a few times, but I can't find a solution. I recently inherited a Toshiba Tecra A8. Problem is : the built-in speakers can't seem to work, but the sound is just fine on external speakers or headphones

  • Solution Manager Change Management Master Guide

    Hi We are looking into implementing Solution Manager 7.0 and have the following questions: - Can we implement change managment in Solution Manager with only one satellite system (i.e. Development) as the other systems are not ready yet (i.e. Test, QA

  • Client opening in production/Quality systems

    Hi Gurus, I need your inputs on my thoughts regarding client opening in production or quality systems. Am a BASIS administrator and sometime we get requests from functional teams to open a production or quality client to do some direct changes which

  • Select multiple LOV values & display in a grid

    How to implement an LOV where user can select any multiple values and these values will be displayed in a grid?

  • F9N7- IDOC FINSTA not created

    Hi, We are using IHC for inter company cash within group. Normally an IHC process chain runs overnight and we have no issue. However, today we manually ran F9N7, as overnight job did not pick up some payment orders and did not create bank statement.