SQ01 Queries; Any rules / Coding posssible?

Hi,
I must make a query and want to use TX SQ01.
When I join the 2 tables I have the issue that the link field has a leading zero in one table and without leading zero in the other table.
So the join will not work.
I am wondering if there is any option to implement a short coding (contatenate '0' with number on one table in the query, I did not find any option in SQ01 however perhaps someone knows....
Thanks in advance,
Thomas

Hi,
1) I suggest better dont select Table join better select direct read from table. Give the Standard Table here.
because if you select the table join the join condition is automatically assigned.
2) The pop up appears "Field Groups" I would suggest using the third option (create empty field groups)
because you donu2019t need all the fields (nobody does), so itu2019s better to choose whatever you really need
from scratch (empty) to improve the query performance. In next screen, choose which fields you want to include
into the infoset, itu2019s fairly simple actually because all you need to do is click and drag the fields
from the left pane into the right pane.
3) Click u2018Codeu2019. in that code selection having so many event and data declaration also. Please write the code over here.
4) In the declaration better declare one internal table.
5) in the start-of-selection write the code as below:
loop at standard table to wa.
"call CONVERSION_EXIT_ALPHA_OUTPUT get the field values as leading zero's
"pass into the newly created itab
append wa to it.
endloop.
"and write the select query with for all entries.
Please see the below link its sample of SQ02.
www dot saptechnical dot com/Tutorials/SAPQuery/ABAPCode/Page1 dot htm
Regards,
Dhina..
Edited by: Dhina DMD on Jun 3, 2011 11:03 AM

Similar Messages

  • SQ01 Queries usage tool

    Hi all,
                    Is there any tool to find out recently used SQ01 Queries.
    i.e can we find if any queries are not being used since long.

    Hi Vidya,
    I am afraid there is no such tool as a one-click solution.
    However there are other options that might help you.
    1) For example you could check out whether the report is already generated.
    To find out the report name for a query go to Query->More functions->Display Report name. If it isn't generated the query was not executed since the last change or system copy if you look in a Test system.
    2) Also there are BASIS tools that can show the usage of transactions and reports. Using those you might be able to find out more. Ask your Basis colleagues for more info.
    Best,
    Ralf

  • HANA - Accelerate SQ01 Queries

    Hello,
    We recently went live with HANA Side Car Configuration and have configured standard Financial accelerators available in HDBC.
    We have also accelerated some custom Z reports and have got great performance improvement.
    Next we would like to tackle a no. of SQ01 queries.
    I created the accelerator for one of the query and loaded using RDA_MAINTAIN. We did no see any significant performance improvement.
    Is it possible to accelerate SQ01 queries ? Has anyone accelerated SQ01 queries ? 
    Regards,
    Manoj

    Hi Manoj,
    You will have to do some analysis to identify if the query can be accelerated.
    I would suggest you to trace the report using ST12 and then have a look at the query in
    SQL cursor cache.
    You can access SQL cursor cache from DB02/DBACOCKPIT transaction. You will see the total response time of the query divided into I/O time, CPU time and others.
    In general, you will see benefits with HANA only when I/O time is maximum.
    You can even think of re-writing the query. e.g. In few cases writing JOIN will help in improving performance rather than relying on FOR ALL ENTRIES.
    Regards,
    Harshad.

  • Recordsets with multiple options - AND, OR If Else and the "Any" Rule

    Hi,
    Been trying to get this to work for days now... I have a form with drop down lists that feeds through variables to a search page... The Recordset Jobsearch2 shown below works great so long as a user chooses and option that has info in the DB.... ie all fields must be present. I cannot seem to work out how to achieve and Any rule?...
    I have had 2 options suggested to me...
    a) the code below...
    if(isset($searchsector) && $searchsector !== "") {
    $query_jobsearch2 .= ' AND Sector LIKE "%' . mysql_real_escape_string($searchsector) . '%"';
    putting this in for each option..... but If Im told I have to add this in before the "$jobsearch2 = mysql_query" line... but when I do this the recordset disappears\is deleted...
    b) Using an Array and "Implode" -  this wouldbe great I'm sure if I had any clue how to do this and what it meant.
    MY CURRENT CODE
    <?php require_once('Connections/steelbakercouk_473245_db1.php'); ?>
    <?php
    $searchsector = $_POST['Sector'];
    $searchlocation = $_POST['clocation'];
    $searchmin = $_POST['minsalary'];
    $searchmax = $_POST['maxsalary'];
    $searchtype = $_POST['Type'];
    ?>
    <?php
    mysql_select_db($database_steelbakercouk_473245_db1, $steelbakercouk_473245_db1);
    $query_jobsearch2 = "SELECT jobs.clocation, jobs.Ref_id, jobs.RefCode, jobs.jobtitle, jobs.blurb, jobs.Consultant, jobs.Salary, jobs.tlocation, jobs.Sector, jobs.Type FROM jobs WHERE jobs.Salary BETWEEN '$searchmin' AND '$searchmax' AND clocation = '$searchlocation' AND jobs.Sector  = '$searchsector' AND jobs.Type = '$searchtype'";
    $jobsearch2 = mysql_query($query_jobsearch2, $steelbakercouk_473245_db1) or die(mysql_error());
    $row_jobsearch2 = mysql_fetch_assoc($jobsearch2);
    $totalRows_jobsearch2 = mysql_num_rows($jobsearch2);
    ?>
    Please help... ... pulling my hair out!
    Thanks

    Ok.. I've tried all methods and still not getting anywhere..
    David... following the link you gave me... and to the letter.. apart from GetSQLValueString()which does not seem to exist.
    All it does is return all the records (as per the basic recordset)
    Heres the code.... please please tell me where I am going wrong.... downloaded your book Foundation PHP but struggaling.,
    <?php require_once('Connections/steelbakercouk_473245_db1.php'); ?>
    <?php
    $searchsector = $_POST['Sector'];
    $searchlocation = $_POST['clocation'];
    $searchmin = $_POST['minsalary'];
    $searchmax = $_POST['maxsalary'];
    $searchtype = $_POST['Type'];
    $any = $_POST['any'];
    ?>
    <?php
    $currentPage = $_SERVER["PHP_SELF"];
    mysql_select_db($database_steelbakercouk_473245_db1, $steelbakercouk_473245_db1);
    $expected = array('Sector' => 'text',
                      'clocation'         => 'text',
                      'minsalary'          => 'int',
                      'maxsalary'      => 'int');
    $query_jobsearch2 = "SELECT jobs.clocation, jobs.Ref_id, jobs.RefCode, jobs.jobtitle, jobs.blurb, jobs.Consultant, jobs.Salary, jobs.tlocation, jobs.Sector, jobs.Type FROM jobs";
    $where = false;
    // Loop through the associatiave array of expected search values
    foreach ($expected as $var => $type) {
      if (isset($_GET[$var])) {
        $value = trim(urldecode($_GET[$var]));
        if (!empty($value)) {
          // Check if the value begins with > or <
          // If so, use it as the operator, and extract the value
          if ($value[0] == '>' || $value[0] == '<') {
            $operator = $value[0];
            $value = ltrim(substr($value, 1));
          } elseif (strtolower($type) != 'like') {
            $operator = '=';
          // Check if the WHERE clause has been added yet
          if ($where) {
            $query_search .= ' AND ';
          } else {
            $query_search .= ' WHERE ';
            $where = true;
          // Build the SQL query using the right operator and data type
          $type = strtolower($type);
          switch($type) {
            case 'like':
              $query_search .= "`$var` LIKE " . GetSQLValueString('%' .
    $value . '%', "text");
              break;
            case 'int':
            case 'double':
            case 'date':
              $query_search .= "`$var` $operator " .
    GetSQLValueString($value, "$type");
              break;
            default:
            $query_search .= "`$var` = " . GetSQLValueString($value,
    "$type");
    $jobsearch2 = mysql_query($query_jobsearch2, $steelbakercouk_473245_db1) or die(mysql_error());
    $row_jobsearch2 = mysql_fetch_assoc($jobsearch2);
    $totalRows_jobsearch2 = mysql_num_rows($jobsearch2);
    $queryString_jobsearch2 = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_jobsearch2") == false &&
            stristr($param, "totalRows_jobsearch2") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_jobsearch2 = "&" . htmlentities(implode("&", $newParams));
    $queryString_jobsearch2 = sprintf("&totalRows_jobsearch2=%d%s", $totalRows_jobsearch2, $queryString_jobsearch2);
    ?>

  • Most of my e-mail goes to Junk e-mail..please help! I have tried the rules...I don't see any rules to be removed. I went to the Apple store and they couldn't revolve the problem ...Help!!!

    Hello, I'm new in Apple Support Communities
    Most of my e-mail goes to Junk e-mail..! I have tried the rules suggestion as soluiton of the problem, but I don't see any rules to be removed. I went to the Apple store and they couldn't resolve the problem ...Help!!! Any other suggestion?

    Is it being marked by your email provider? Check the raw headers and see if there is an x-spam header.
    If so, you can disable Mail trusting spam headers in the Junk preferences.

  • Combining "match" and "match any" rules in smart playlists

    Boy, I would really really like Apple to give us the possibility to combine the "match all rules" and "match any rule" criteria in smart playlist. This woulod make it a lot easier to design playlists.
    Example: I want to make a smart playlist for a celebration party, that plays ONLY music from certain genres. No videoclips are to included. I would expect Apple to give us the possibility to do something like underneath:
    KIND = MUSIC (which I have defined earlier) AND
    (GENRE = Dance & Dj OR Genre = Easy Listening OR Genre = Easy Jazz)
    Unfortunately, I cannot to do this.....
    Greetz, Willem
    Netherlands

    Willem, You can use 2 playlists to do that. Something like:
    PARTYGENRES = Match any (as you have)
    PARTYLIST = Match All (KIND = Music and PLAYLIST = PARTYGENRES)

  • Is there any rule for the JAVA_HOME variable?

    Is there any rule or guideline about the JAVA_HOME variable regarding what should be its contents and how java applications should treat it? Or does it only depend on the particular application?
    If there is such rule, could you give me a URL?
    Thanks

    garava wrote:
    JAVA_HOME
    is an environment variable. It tells you where is your JAVA installed. It can be used to specify PATH for JAVA. It also tells you which JDK you have in your machine, alternatively you can also do the same using java -version.
    Bottom line is it is an environment variable for Java applications.This is misleading. The environment variable JAVA_HOME is used by some applications to find the JRE but it is not mandated by the JRE or the compiler.

  • Any rules for how long a creditor can wait to report a delinquincy?

    I have been working very hard for years to rebuild my credit. I was getting close to the  700 mark, as my mess ups as a teenager rolled off. Then, two weeks ago, a medical debt popped up from 2012. Now, in 2012 I had already started trying to repair my credit, so I am actually fairly sure I paid the bill. I just have no clue how to prove that three years later. Are there any rules that dictate the time they have to report this?How do I know it is worth disputing?

    No. The FCRA only requires that information reported must not knowingly be inaccurate.There are no requirements that they must report, or how long after the fact they must report. What they must report is the month and year that the delinquency occured, as the CRA needs that date to assess when they must exclude the delinquency from credit reports they issue.

  • Is there any rules and regulations to do SOA projects ?

    Hi All,
    1. Is there any rules and regulations to do SOA projects thro' XI?
    2. Is it necessary to use BPM for SOA projects?
    Regards
    Sara
    Points will be rewarded for the helpful answers

    HI,
    See the below links
    /people/kevin.liu/blog/2005/10/17/esa-soa-es
    EAI:
    http://en.wikipedia.org/wiki/Enterprise_Application_Integration
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e01bd5e9-1056-2910-00a6-cad748999126
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6d19c8ee-0c01-0010-619d-92af980436d7
    SOA vs ESA
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e1a61c36-0301-0010-06be-d34e2f379a65
    SOA - http://en.wikipedia.org/wiki/Service-oriented_architecture &
    ESA - /people/kevin.liu/blog/2005/10/17/esa-soa-es
    . Why SOA
    /people/maxim.efimov2/blog/2006/08/22/the-roadmap-to-enterprise-soa-begins-with-150147-why148
    SOA Foundations
    /people/natty.gur/blog/2007/02/27/three-major-foundations-for-soa
    2. SOA with SAP
    /people/oleg.figlin/blog/2006/06/20/sap-discovery-system-for-enterprise-soa--part-1
    /people/oleg.figlin/blog/2006/06/26/sap-discovery-system-for-enterprise-soa--part-2
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c1cb4b2c-0e01-0010-c99e-c272197d970f
    3.XI and SOA
    SAP XI in SOA
    4. /people/community.user/blog/2007/01/30/enterprise-soa-explorations-fragments
    /people/sindhu.gangadharan/blog/2006/06/19/it-scenario-enabling-enterprise-services-with-sap-netweaver
    5. /people/abdulla.fawzi/blog/2007/01/03/enterprise-soa-based-innovations-and-its-benefits
    EAI & EBI
    EAI
    EAI and EDI
    Also see this document on this:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/13926f23-0a01-0010-149c-c1170e7a25db
    Regards
    Chilla

  • EULA question... what do they mean by trade secrets? I don't want to break any rules.

    Hey;
    I am sorry I've asked so many questions lately and thanks for everyone who has helped me. The Dreamweaver EULA says that you can't expose any trade secrets. I have no clue what that means. If they mean their ajax coding or php.... well thats embedded in every Webpage made with their software?
    Are they referring to the criminal type who dissasemble and reverse engineer to find out what makes the program tick? I do not do that!! I hate people who do that. That is jail worthy in my book.
    Any info will help on this matter so I don't break this very oddly worded rule.

    the_missing_link wrote:
    I am sorry I've asked so many questions lately ...
    Stop that! Newbies are supposed to remain newbies for life. It is the only way we can feel ...
    I mean, Stop that! No need to apologize for asking questions in here - especially when you've clearly indicated that you've done some due diligence before asking. You are using this forum exactly as it is supposed to be used.
    Just keep at it, and at some point, you might be the one answering most of the questions. Thus giving the ACEs an opportunity for a vacation/holiday - assuming they know what that means.
    Mark A. Boyd
    Keep-On-Learnin' :-)

  • SQ01 queries disappeared

    Hi all,
    In our production system, Users are reporting saying the query assignment done through (SQ03) has disappeared, that is when users were created (long back in 2006) queries were also assigned, but all of a sudden the assignments are deleted. We as a Security team have not removed this, So Please let me know if there is a way to trace these changes.
    Regards
    Sushma

    Hi Julius,
    We do not have any short dumps, please let me know transport log of which component I need to check, we didn't have any security transports moving, but users reported that they lost access, if you advice what kind of transports effect I can go back check with basis team on that.
    Thanks a lot for your time
    Regards,
    Sushma

  • Queries on Rule Authorizations

    Hi,
    We have certain rules present in a library and we would like these rules to be available to all administrators.
    Currently only the configurator user is able to access these rules in user forms. If an administrator subject tries to access these rules, he gets the error - View access denied to Subject Administrator on Configuration: MyLibrary.
    Old postings in the forum suggest setting the authType and MemberObjectGroups tags to ensure that rules are available to end-users.
    In this context, I would like to know :
    1) Do rules in the library inherit the authorization settings (MemberObjectGroups and authType) of the library?
    2) Is the the authType setting 'EndUserRule' valid for a library object? If not, what value should be assigned to authType to make a library of rules available to administrators?
    3) What is the default value of 'authType' if it is not specified?
    Answers to some of these questions may be obvious. Yet, I would greatly appreciate the answers or pointers to where the answers could be found.
    TIA,
    Chetan

    Saranya Ganesan wrote:
    Q1: Which wsdl i need to use in SOAP UI, so that i should answer the interview questions in request message?
    If you have no previous implementation, then use the WSDL for the latest interview service:
    /determinations-server.war/interview/soap/FirstProj?wsdl
    Since OPA v10.4 is the latest version, this is equivalent to:
    /determinations-server.war/interview/soap/10.4/FirstProj?wsdl
    Q2: Is there any possibility to use the webservice in BPM which can be called by giving answers as input?I don't know the specific details, but in theory we could use BPM to call either the interview service or the assess service.
    Q3: is interview question screen the only way to give input to the rulebase?Yes - for the interview service, all input is driven by the screens, although you can provide any known answers when opening the session.

  • Nothing effect on any tigger/coding in forms?

    Hi,
    I am new to forms 10g, I have created a screen in forms with neccessary triggers for button and etc, which i able to run in individual system where i installed the form and reports.
    After finish my screen and the same of fmx When i move into my Form Standalone Application directry, i can view the screen via middle tier but trigger coding are not getting any effect.
    Please help me what is the boo-boo.
    kanish

    The simplest way to see if your button works is to create a When-Button-Pressed trigger on the button, and in that trigger, write this code:
    Message('Hello World');
    Clicking on the button should at least give you "Hello World" on the status line. If you click it twice, the message should show up in a popup window.

  • Need help in Update rule coding - URGENT

    Hi Gurus,
              I am creating an update rule there i need to compare some filed with the fields in inforsouce so here what should be the name used for the infosource can i use something like this
    read table TAB where
          <fields1>       =  DATA_PACKAGE-<field1>.
    where DATA_PACKAGE is the infosource
    is this the rite method
    waiting for reply
    Ravi

    Hi,
    Use this in Update Routine.
    IF COMM_STRUCTURE-field1 = 'value1' AND
    COMM_STRUCTURE-field2 = 'value2'.
    RESULT=field3*100.
    ELSE.
    RESULT=field*10.
    END IF.
    here field name will be in format of :     /bic/fieldname
    Regards,
    rik

  • Help needed on update rules Coding

    Hi BW Gurus.
    Please help me out.
    I am working on BI 7.0
    This is my scenario.I need to take a project cost report.
    There are some projects in cProjects and some projects in R/3 (Project System).
    Each project in cProjects is linked with one or more projects in R/3.
    They are linked by means of GUID.Now I need to pull out a report from a infocube(Z infocube) which has information both from R/3 and cProjects.I built a Z infocube.
    Here comes my problem.
    I need to write update rule for the requirement explained below.
    For all the projects(in cProjects) I need to find its GUID from the table-DPR_PROJECT . These GUIDs are contained in this table under the field name GUID.
    The same GUID numbers I can find it in another table-DPR_OBJLINK under the field PROJECT_GUID. For this PROJECT_GUID numbers, I need to identify the corresponding EXTERNAL_ID(this field is in the table-DPR_OBJLINK) of the projects(These projects are R/3 projects). These EXTERNAL_ID values has to be pulled out in the report.
    I am using the extractor 0CO_OM_WBS_1.
    Please help me out with the update rule code.
    Please help me out as soon as possible.
    Its really urgent my dear friends
    Thanks in Advance,
    Have a nice day
    Regards,
    Sam Mathew

    Hi Raogovind,
    For which state are you customising this Professional Tax? Professional Tax wage type is /422.
    The system determines the professional tax payable by an employee, based on the following factors:
    Professional tax basis u2013 Comprises those salary components on which a professional tax is applicable. The salary components to be included for calculating the professional tax basis depend on the state. The different components are:
    Basic pay
    Dearness allowance
    Medical reimbursement perquisite
    Housing
    Profits in lieu of salary
    Other remuneration that an employee receives regularly
    Bonus
    It is depending on the combination of the Personnel Area, Personnel sub area and the professional tax grouping of the employee, that the system identifies factors such as the:
    Components of the professional tax basis.
    Method and the frequency of calculating and deducting professional tax.
    Hope this information helps you solve the issue.
    Edited by: chandra.saphr on Aug 6, 2009 7:10 AM

Maybe you are looking for