QUERY IN SCRIPTS

HI,
    CAN WE MODIFY STANDARD SAP SCRIPT FOR  GOODS RECEIPT SLIP, IF YES, CAN PLS TELL ME THE PROCEDURE.
THANKS,
SUJITH
Moderator message : Search for available information, do not post in all "Capitals". Thread locked.
Edited by: Vinod Kumar on Sep 26, 2011 5:20 PM

Your best bet would be to use multiple CFQUERY tags within
CFTRANSACTION tags if you want them all to be handled in a "block"
or "session". Or, put all of your SQL statements in a PL/SQL stored
procedure.
Phil

Similar Messages

  • Query or script for calls with federated users

    Hi all,
    Is there a query or script that can be run in SQL or Lync that gives us a report on calls between our Lync users and federated users?

    Hi,
    There is not native report to achieve this.
    If you want to write a query, the following table is helpful to you:
    http://technet.microsoft.com/en-us/library/gg398589.aspx
    http://technet.microsoft.com/en-us/library/gg412791.aspx
    http://technet.microsoft.com/en-us/library/gg412950.aspx
    Best Regards,
    Lisa Zheng
    Lisa Zheng
    TechNet Community Support

  • Query in script

    Hi Friends,
    I have one query in script.
    Will anybody will tell me how to change the language EN to frech in sap script??
    Plz tell me in detail.

    Hi,
    correct way is:
    Call SE71.
    Enter existing form name.
    Enter desired target language.
    ENTER
    Activate Form.
    All existing windows texts are copied as they are. You will have to do all language-dependent changes manually.
    A good way to make future changes easier is to maintain language-dependent text elements in table TTDTG and use the defined symbols (use Z-namespace) in the text windows.
    If you do this consequently, the change process gets much easier: Make all changes in source language. Delete and recreate target language. Activate.
    All character, paragraph, page, window and so on definitions are languange-independent anyway.
    Regards,
    Clemens

  • SAP Query, SAP Script

    please give the step by step details . SAP Script and SAP Query .

    Hi Krishna,
    <b>SAP query</b>
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=how%20to%20create%20sap%20query&cat=sdn_all
    <b>SAP Scripts</b>
    http://www.sap-img.com/sapscripts.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm
    http://www.sap-basis-abap.com/sapabap01.htm
    http://www.sap-img.com/sapscripts.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci943419,00.html
    http://sap.ittoolbox.com/topics/t.asp?t=303&p=452&h2=452&h1=303
    http://www.sapgenie.com/phpBB2/viewtopic.php?t=14007&sid=09eec5147a0dbeee1b5edd21af8ebc6a
    Regards
    Aneesh.
    ~~The best practice is to search the forum before posting a thread.

  • Out of memory Error while querying SQL Script based Calculation View

    Hi All,
    I wanted to test the performance of Graphical and SQL Script based Calculation views.
    Created Graphical (CA_GRPH) and SQL Script (CA_SQL) Calculation views.
    Analytic View (AN_GRPH) for both Calculation views are the same which is Graphical based (90 Attributes and 5 Measures)
    In Analytic View data foundation I have a Fact table which has 1.5 Billion records and 9 Dimension Tables –collectively 500 million records (7 Attribute Views). 9 Referential joins with cardinality N:1 and 1 Referential join with cardinality N:N.
    I wanted to keep (CA_GRPH) and (CA_SQL) as a base Calculation views and leverage those to create various calculation views (Will be creating different Calc views for respective Business segments)
    In order to test this I have created below calc views on top of base calc views.
    Graphical Based: Created (CA_GRAPH_XYZ) by having CA_GRPH in projection with 30 Calculated Columns. – This retrieves data in 13 secs
    SQL Script Based: Created (CA_GRPH_ABC) by having CA_SQL in projection view with 30 calculated columns – This errors out after 1.50 mins.
    Could not execute 'SELECT "COLUMN_A","COLUMN _B"," COLUMN _C"," COLUMN _D", SUM("COLUMN _REVENUE") AS ...' in 1:50.480 minutes .
    SAP DBTech JDBC: [2048]: column store error:  [2048] column store error: search table error: [1000002] Error executing physical plan: exception 1000002:
    ltt/impl/memory.cpp:63
    Out of memory ; $size$=1507711; $name$=ihm; $type$=pool; $inuse_count$=170104; $allocated_size$=219215007925
    exception 1000002:
    Any suggestion / help in fixing this issue will be greatly appreciated.
    Regards,
    Av

    Hi Raj,
    Thanks for your time, please find edited snap hot of Analytic View (AN_GRPH) below,
    Calculation view(CA_SQL)
            /********* Begin Procedure Script ************/
    BEGIN
           var_out =
         SELECT
                "COLUMN_1"
                "COLUMN_2",
                "COLUMN_84",
                "COLUMN_85;",
                SUM("REVN") AS "REVN",
                SUM("MGN") AS "MGN",
                SUM("ORD_QTY") AS "ORD_QTY",
                SUM("SYS_QTY1") AS "SYS_QTY1",
                SUM("SYS_QTY") AS "SYS_QTY"
    FROM
          "_SYS_BIC"."XYZ/AN_GRPH"
    GROUP BY
                "COLUMN_1"
                "COLUMN_2",
                "COLUMN_84",
                "COLUMN_85";
    END
    /********* End Procedure Script ************/
    Later i have built one more Calculation view(CA_GRPH_ABC) using (CA_SQL)in projection. i have 30 calculated measures in this final calc view. this final calc view is throwing above mentioned error.
    Not sure if i can use SQL script based calc view in graphical based calc views?
    Regards,
    AV

  • Hi all query on script

    what is the use of standard text in scripts.how to use styles in scripts.can u give me a detailed code for the subroutine what we write in se71 as well as the subroutine pool in se38 and scrreen shots if u have . my mail id is [email protected]
    rewards if  it would help , its urgent
    thanks in advance

    hi,
    Have sent the mail....do reward points.

  • QUERY: AppleScript script editor "page break" in Appleworks

    What is the keyword or code sequence required to set text delimiter in AppleScript 1.10.7 to "page break" for the purpose of removing ALL of them at one time in an Appleworks 6.2.9 document using a script?; something like:
    tell application "AppleWorks 6"
    activate
    set the_text to the text body of front document
    set user_tid to AppleScript's text item delimiters
    set user_tid to AppleScript's text item delimiters
    set AppleScript's text item delimiters to (**page break**)
    set temp_list to text items of the_text
    set AppleScript's text item delimiters to ("[PB removed]")
    set temp_string to temp_list as string
    set AppleScript's text item delimiters to user_tid
    set the text body of front document to temp_string
    end tell
    THIS IS SPECIFIC TO APPLEWORKS ONLY, please, since it appears to me that what keywords or code sequences are "recognized" via AppleScript is NOT "standardized" across all MacOSX programs, I do NOT acknowledge that I should be asking this in the Applescript forum.

    Hello Yvan,
    Well, what I was concerned is AppleScript 2.0 (OS X 10.5) might not provide conventional utxt-to-TEXT (Unicode text to plain text) coercion in passing text to AppleWorks 6 and so AW6 receives UTF-16 data and yet interprets them in system's primary script (e.g. MacRoman), which should yield wrong result... (Perhaps "A" wrongly becomes 0x0041 instead of 0x41, "•" becomes 0x2022 (which is interpreted as SPACE and QUOTATION MARK in MacRoman) instead of 0xA5, etc)
    As for replacing text in AW6 document using AppleScript and ignoring case, a complete test code would be like the following one. The point is to get text from text body of AW doc, coerce it to Unicode text, perform text items' dance on Unicode text, put resulting Unicode text back to text body of AW doc.
    If it returns {true, 49, 49, 49} under both OS X 10.4 and 10.5, it would be OK.
    All the best,
    H
    --TEST CODE
    --(0) prepare a sample document
    set t to "The lark's on the wing; The snail's on the thorn."
    tell application "AppleWorks 6"
    activate
    make new document at front with properties {document kind:text document}
    tell document 1
    set text body to t
    end tell
    end tell
    --(1) get text from front document
    tell application "AppleWorks 6"
    tell document 1
    set t1 to text body
    end tell
    end tell
    --(2) replace "T" by "•" ignoring case
    set u1 to t1 as Unicode text
    try
    set AppleScript's text item delimiters to {"T"}
    set uu to u1's text items
    set AppleScript's text item delimiters to {"•"}
    set u2 to uu as Unicode text
    set AppleScript's text item delimiters to {""}
    on error errs number errn
    set AppleScript's text item delimiters to {""}
    error errs number errn
    end try
    u1 = "The lark's on the wing; The snail's on the thorn."
    u2 = "•he lark's on •he wing; •he snail's on •he •horn."
    --(3) put text to front document
    tell application "AppleWorks 6"
    tell document 1
    set text body to u2
    end tell
    end tell
    --(4) check the validity of text of front document
    tell application "AppleWorks 6"
    tell document 1
    set t2 to text body
    end tell
    end tell
    return {t2 as Unicode text = u2, count t, count t1, count t2} -- should be {true, 49, 49, 49}
    --END OF TEST CODE

  • SQL server query output script

    Hi,
    I have a script to give blocking on the sql server. But i want a script to fetch the output of my server blockings and send me a mail.
    Please give me some scripts to do this operation.
    Regards,
    Vinodh Selvaraj

    Try this Powershell script
    https://sqlpowershell.wordpress.com/2013/05/06/powersql-identify-a-head-of-the-database-blocks-and-generate-automated-alert-across-all-listed-sql-instances/
    Schedule this script to run at frequent interval of time
    #First lets create a text file, where we will later save the database blocks
    $MailServer='abcd.dmtp.com'$inputfile='f:\servers.txt'
    $servername='servername'
    $Emlst='[email protected]'
    $fromAddress='[email protected]'
    $Dbblock = "dbblock.htm"
    New-Item -ItemType file $Dbblock -Force
    Function writeHtmlHeader
    param($fileName)
    $date = ( get-date ).ToString('yyyy/MM/dd')
    Add-Content $fileName "<html>"
    Add-Content $fileName "<head>"
    Add-Content $fileName "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"
    Add-Content $fileName '<title>Database Blocks Report</title>'
    add-content $fileName '<STYLE TYPE="text/css">'
    add-content $fileName "<!--"
    add-content $fileName "td {"
    add-content $fileName "font-family: Tahoma;"
    add-content $fileName "font-size: 11px;"
    add-content $fileName "border-top: 1px solid #999999;"
    add-content $fileName "border-right: 1px solid #999999;"
    add-content $fileName "border-bottom: 1px solid #999999;"
    add-content $fileName "border-left: 1px solid #999999;"
    add-content $fileName "padding-top: 0px;"
    add-content $fileName "padding-right: 0px;"
    add-content $fileName "padding-bottom: 0px;"
    add-content $fileName "padding-left: 0px;"
    add-content $fileName "}"
    add-content $fileName "body {"
    add-content $fileName "margin-left: 5px;"
    add-content $fileName "margin-top: 5px;"
    add-content $fileName "margin-right: 0px;"
    add-content $fileName "margin-bottom: 10px;"
    add-content $fileName ""
    add-content $fileName "table {"
    add-content $fileName "border: thin solid #000000;"
    add-content $fileName "}"
    add-content $fileName "-->"
    add-content $fileName "</style>"
    Add-Content $fileName "</head>"
    Add-Content $fileName "<body>"
    add-content $fileName "<table width='100%'>"
    add-content $fileName "<tr bgcolor='#CCCCCC'>"
    add-content $fileName "<td colspan='7' height='25' align='center'>"
    add-content $fileName "<font face='tahoma' color='#003399' size='4'><strong>Database Blocks Report - $date</strong></font>"
    add-content $fileName "</td>"
    add-content $fileName "</tr>"
    add-content $fileName "</table>"
    # Function to write the HTML Header to the file
    Function writeTableHeader
    param($fileName)
    Add-Content $fileName "<tr bgcolor=#CCCCCC>"
    Add-Content $fileName "<td width='10%' align='center'>SERVER</td>"
    Add-Content $fileName "<td width='50%' align='center'>SPID</td>"
    Add-Content $fileName "<td width='10%' align='center'>BLOCKING SPID</td>"
    Add-Content $fileName "<td width='10%' align='center'>DATABASE</td>"
    Add-Content $fileName "<td width='10%' align='center'>COMMAND</td>"
    Add-Content $fileName "<td width='10%' align='center'>STATUS</td>"
    Add-Content $fileName "<td width='10%' align='center'>LOGIN</td>"
    Add-Content $fileName "<td width='10%' align='center'>HOSTNAME</td>"
    Add-Content $fileName "<td width='10%' align='center'>CPU</td>"
    Add-Content $fileName "<td width='10%' align='center'>MEMUSAGE</td>"
    Add-Content $fileName "</tr>"
    Function writeHtmlFooter
    param($fileName)
    Add-Content $fileName "</body>"
    Add-Content $fileName "</html>"
    Function writeDBInfo
    param($fileName,$server,$Spid,$BlockingSpid,$Database,$Command,$Status,$Login,$hst,$CPU,$Memusage)
    Add-Content $fileName "<tr>"
    Add-Content $fileName "<td>$Server</td>"
    Add-Content $fileName "<td>$SPID</td>"
    Add-Content $fileName "<td>$BLOCKINGSPID</td>"
    Add-Content $fileName "<td>$DATABASE</td>"
    Add-Content $fileName "<td>$COMMAND</td>"
    Add-Content $fileName "<td>$Status</td>"
    Add-Content $fileName "<td>$Login</td>"
    Add-Content $fileName "<td>$hst</td>"
    Add-Content $fileName "<td>$CPU</td>"
    Add-Content $fileName "<td>$Memusage</td>"
    #<td bgcolor='#FF0000' align=center>
    Add-Content $fileName "</tr>"
    Function sendEmail
    param($from,$to,$subject,$smtphost,$htmlFileName)
    [string]$receipients="$to"
    $body = Get-Content $htmlFileName
    $body = New-Object System.Net.Mail.MailMessage $from, $receipients, $subject, $body
    $body.isBodyhtml = $true
    $smtpServer = $MailServer
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $smtp.Send($body)
    writeHtmlHeader $Dbblock
    $global:a=0
    function increment {
    $global:a++
    foreach ($server in Get-Content $inputfile)
    [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null
    $server = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Server -ArgumentList $server
    $blocks=$server.EnumProcesses() |Where {$_.BlockingSpid -ne 0 -and $_.spid -gt 50 }
    if ($blocks -ne $NULL)
    foreach ($db in $blocks)
    Add-Content $Dbblock "<table width='100%'><tbody>"
    Add-Content $Dbblock "<tr bgcolor='#CCCCCC'>"
    Add-Content $Dbblock "<td width='100%' align='center' colSpan=10><font face='tahoma' color='#003399' size='2'><strong> $server </strong></font></td>"
    Add-Content $Dbblock "</tr>"
    writeTableHeader $Dbblock
    increment $global:a
    write-host $Dbblock $server $db.Spid $db.BlockingSpid $db.Database $db.Command $db.Status $db.Login $db.host $db.cpu $db.Memusage
    writeDBInfo $Dbblock $server $db.Spid $db.BlockingSpid $db.Database $db.Command $db.Status $db.Login $db.host $db.cpu $db.Memusage
    Add-Content $Dbblock "</table>"
    writeHtmlFooter $Dbblock
    if ($global:a -ge 1)
    $date = ( get-date ).ToString('yyyy/MM/dd')
    sendEmail $fromAddress "$emlst" "Database Blocks Report - $Date" $MailServer $Dbblock
    --Prashanth

  • Schedule or automate a query or script

    Hi all,
    I know of the 'materialized view' where you can effectively refresh table contents at a frequency of your choosing, but I wish to run a script after my materialized view event.
    Is there any way to automate pl/sql code run?
    NT

    look up dbms_scheduler.
    Andre

  • QUERY ON SCRIPT.

    how to use spell amount in medruck.can any one send me detail coding.iam getting a runtime error
    UNABLE TO INTERPRET "XXXXXXXX,XX' AS NUMBER.

    Hi,
    U can use PERFORM in sapscript use the following syntax :
    PERFORM PICK_WORDS IN PROGRAM Z_spellamt using &Amount&
    CHANGING &words&.
    REPORT Z_SPELLAMT.
    FORM pick_words USING amount1 CHANGING words.
    CALL FUNCTION 'SPELL_AMOUNT'
    EXPORTING
    AMOUNT = amount1
    CURRENCY = ' '
    LANGUAGE = SY-LANGU
    IMPORTING
    IN_WORDS = WORDS
    EXCEPTIONS
    NOT_FOUND = 1
    TOO_LARGE = 2
    OTHERS = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use WORD for printing.
    This will solve ur problem.
    Regards,
    Mayank

  • 30EA1: Closing Query Result & Script Output Windows

    It would be nice if you could close these output windows by middle mouse button clicking. You can close object viewing windows (tables, procedures) & SQL worksheet windows this way.
    Thanks,
    Justin

    Yes, please, for consistency. I bump into this limitation also now and then.
    Thanks,
    K.

  • With clause query issue in oracle cloud script editor

    When I am running this query in SQL Workshop > SQL Commands window then its working fine
    with cte as (select * from emp)
    select * from cte
    where deptno = (select deptno from dept where loc = 'DALLAS')
    but its give me error in SQL Workshop > Script Editor window
    When I did copy & paste query from Script Editor window to notepad,
    then I realize that its automatically adding hidden "?" question mark (as per below query)
    how can I resolve this issue?
    please guide me.
    I have confirm that there is no any white space after 'DALLAS')
    & another simple queries working fine in both windows.
    with cte as (select * from emp)
    select * from cte
    where deptno = (select deptno from dept where loc = 'DALLAS')?
    Edited by: Sanjay on 28 Mar, 2013 6:46 PM

    Hi Sanjay,
    You have mentioned "+but its give me error in SQL Workshop > Script Editor window+" - are you referring to the SQL Workshop > SQL Scripts > Script Editor option, while editing a SQL script? If so, then I have been unable to reproduce the behaviour you have reported, and have not received any errors using your test query.
    To assist in identifying the cause of your problem, could you please outline the exact steps that you followed, leading up to the step where you receive an error?
    Regards,
    Hilary

  • Ho to get script result with query's in 11g

    Hi,
    While doing refresh tasks i need to run some select query's. am so lazy to check each query one by one so i placed all querys in one script and i ran
    i went fine but it is showing only result of the query but it is not showing query. Can we get query and out put of query through script.
    Ex : one.sql
    the script have below querys
    select name from v$database;
    select count(*) from v$datafile;
    select count(*) from dba_db_links;
    select owner,db_link from dba_db_links;
    can any one help me on this..
    Regards
    Edited by: 889571 on May 19, 2013 2:59 PM

    [oracle@localhost samples]$ cat sample.sql
    set term on echo on
    select name from v$database;
    select count(*) from v$datafile;
    select count(*) from dba_db_links;
    select owner,db_link from dba_db_links;
    [oracle@localhost samples]$ sqlplus user1/user1 @sample.sql
    SQL*Plus: Release 11.2.0.2.0 Production on Sun May 19 16:06:20 2013
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select name from v$database;
    NAME
    ORCL
    SQL> select count(*) from v$datafile;
      COUNT(*)
             6
    SQL> select count(*) from dba_db_links;
      COUNT(*)
             0
    SQL> select owner,db_link from dba_db_links;
    no rows selected
    SQL>

  • SAP BPC 10.0 NW break query in logic script

    Hi Experts,
    We are facing one issue while copying data from one version to other version.
    logic is like the data in target should get cleared first and then copy the data from source to target version (in same model).
    But while clearing the data, the package is failing with memory allocation error.
    So to break the query we tried maxmembers and xdimpackage but facing performance issue.
    please suggest command to break the query in script logic in BPC 10.0 NW.
    Regards,
    Rachana

    Hi Uros,
    just to make sure, you have entered FX rates in your rate model for the period you are trying to convert?
    Do you need to select an entity when starting the package? If not, could you try to run the script as follows:
    *RUN_PROGRAM CURR_CONVERSION
    CATEGORY = %CATEGORY_SET%
    CURRENCY = %RPTCURRENCY_SET%
    TID_RA = %TIME_SET%
    R_ENTITY = GLOBAL
    *ENDRUN_PROGRAM
    BR,
    Arnold

  • Script query

    Hi Friends,
    I wanted to know how to translate the sap script from one language to other.
    If u use the transaction SE76 then we have to enter the
    form          ZXY
    Source Language     EN
    Target Language     DE
    will u tell me after what i can do so that it will converted from EN to DE.
    I have to also translate some field which are in main window, footer window.. etc...
    so plz tell me how to do this??

    Have a look at below threads.
    Re: query in script
    Printing PDF in a different language
    Best Regards,
    Vibha Deshmukh
    *Please mark all the helpful answers

Maybe you are looking for