How to find entries for the particular month

hi  all,
I have a table ZTOS4 where i store the trips, trips created timestamp.
in my selection screen , i give the month as parameter.
now i need to select the trips created for the select month. how can i put the select query???
select trips timestamp
from ztos4
where timestamp = month ??????? (as timestamp is date and time and month is 01,02,03,....12)
how to put the where condition?????
points will be rewarded
thanks in advance

Hi jayasree muthaiyan,
USE LIKE keyword in where condition of your select query...
However its better to provide the month and year both form the selection screen because there can be many years data in the table which r having same month ...
eg .. 02 then it will give Feb months data for all years say 2004 2005 .... 2008 ...
Also..
Here is the "help" for the syntax of LIKE in SELECT statement.
f NOT LIKE g
Addition:
... ESCAPE h
Effect
The condition is met for a table entry if the statement "f (does not) equal the pattern in g" is true for the values of f and g. f must always be a field descriptor, and g an ABAP field. If f has the value NULL, then the result of the check for the statement is unknown. Within a pattern, there are two special characters:
'_' (underscore) stands for any single character.
'%' (percentage sign) stands for any sequence of characters, including an empty string.
Examples
Example to select all customers whose name begins with 'M':
TABLES SCUSTOM.
SELECT ID NAME FROM SCUSTOM
INTO CORRESPONDING FIELDS OF SCUSTOM
WHERE NAME LIKE 'M%'.
WRITE: / SCUSTOM-ID, SCUSTOM-NAME.
ENDSELECT.
Example to select all customers whose name contains 'huber':
TABLES SCUSTOM.
SELECT ID NAME FROM SCUSTOM
INTO CORRESPONDING FIELDS OF SCUSTOM
WHERE NAME LIKE '%huber%'.
WRITE: / SCUSTOM-ID, SCUSTOM-NAME.
ENDSELECT.
Example to select all customers whose name does not contain 'n' as the second character:
TABLES SCUSTOM.
SELECT ID NAME FROM SCUSTOM
INTO CORRESPONDING FIELDS OF SCUSTOM
WHERE NAME NOT LIKE '_n%'.
WRITE: / SCUSTOM-ID, SCUSTOM-NAME.
ENDSELECT.
Notes
LIKE can only be used for alphanumeric database fields. In other words, table field f must have Dictionary type ACCP, CHAR, CLNT, CUKY, LCHR, NUMC, UNIT, VARC, TIMS or DATS. The comparison field g must always have type C.
The maximum length of the pattern is 2n - 1 characters, where n is the length of field f.
Trailing spaces are ignored in comparison field g. If a pattern contains trailing spaces, you must enclose it in single inverted commas ('). If your pattern is enclosed in inverted commas and you also want to include inverted commas as part of the pattern, the inverted commas in the pattern must be doubled.
You cannot use this variant in the ON addition to the FROM clause.
Hope it will solve your problem
Reward points if useful...
Thanks & Regards
ilesh 24x7

Similar Messages

  • How to Find BADI for a particular FM

    Dear Abapers,
    How do I find a BADI for a Particular Function Module.
    I did google and found three methods but none helped.
    1) going to Transaction se37 to find your function module.  Locate the function SXV_GET_CLIF_BY_NAME.
    this doesnt help me because i dont want to find badi for a transaction.
    2) got se24 and put a break point in the method of class cl_exithandler. I tried this didnt help.
    3) taking the pacake name and going to se80 and enter it there, you see enhancements. I did this , found the package name of that FM which is WZRE. but there are lots of enhancements and badis. i cant find the related one with discription.
    my FM is IDOC_INPUT_SINGLSETTRQS_CREATE. I really need help to find the correct badi for this.
    any help is appreciated.
    thanks.

    Hi,
         To find a BADI for any enhancement follow these steps,
    1) Put a brak point in method CL_EXITHANDLER=>GET_INSTANCE. This will give you the EXIT_NAME and the implementing class name of the BADI.
    2) Remove IF_EX from the implementing class this provides you the BADI name.
    Regards
    Ram

  • How to find BADI for the enterprise service?

    Hi Experts,
      We are enhancing an enterprise service for Businesspartner  creation by adding an additional field in the structure. But we are not able to find out the correct BADI for the enterprise service.  We are using the following enterprise service - 'BusinessPartnerERPCreateRequestConfirmation_In' . I could not find any BADI in ES workplace also .How to search for a BADI for this ES.
    Any help on this will be well appreciated.
    Thanks in advance
    Sanu

    Hi Sanu.
    Not all the services is an BAPI or BAPI, maybe this is an interface.
    To see the related object go to esworkplace and find the service.
    You will find in the page the label "Related Web Service Definition".
    Copy the related value(in your case ECC_BusinessPartnerCrtRC) it and go to SAP GUI. In transaction SE84, go to enterprise service and choice service definition.
    Paste the value copied in esworkplace in field Service Definition, then F8.
    In the next screen double click in the returned value.
    In the next screen you will see a Reference Object field. Double click in the value and you will see the related object.
    In this case is an interface. You can see in Provider Class.
    Hope that's help you.
    Marcos

  • How to find tables for a particular business object.

    Dear Friends,
    I want to display, all the tables related to a particular business object.
    So I think there must be way of doing it using packages.
    example:-
    I will have list of all packages referencing to all business Components
    (ex.SALES) then i will get a list of all the tables related to SALES and then I would like to get all the METADATA regarding that TABLE.
    please give me some ideas How to achieve this.
    thanks,
    jeevan

    hai Naveen ,
    Thanks for the reply.
    I had gone through the Link.
    I want to know "How could I get the list of all the Tables of a particular Business Component"
    like suppose i entered Sales i sould get all the tables related to Sales ....if  MM then list of MM tables...
    in Se80 the package VA is for sales .....
    and there i can get all the tables for sales...
    but If u know any searching criteria by which i will be able to the list of tables.
    thx,
    jeevan

  • How to find suborders for the given production orders?

    can any one give solution for finding the sub-orders for my given finished product,
    prodution order?
    my finished product may have the hierarchy as.....
    Finished Goods-> Semi-finished  goods ->  Semifinished-> up to n numbers
    > at last raw material.
    how to find the relation ship between production orders and corres ponding
    cost for this requirement?
    Thanks .
    <u><b>Solution Rewarded.</b></u>

    Hello Meeta
    If you are considering Reporting Manager as appraiser.
    First get pernr, find out position ID from the infotype 0001, check the relationship A002 maintained for the appraisee's position (HRP1001), and finally to find out Appraiser ID check the relationship A008 (HRP1001) of the appraiser's position.
    BR
    Reddy

  • How to Find Vendor for the material  before posting  a PO

    Hi,
    I am using BAPI_PO_CREATE1 to post a PO(ME21N), in the order to fill header data I need to give Vendor information. I have filled that data with one ZTable and executed. When i executed the BAPI, it gave me result as "VENDOR is declared as some thing else for the material". Now my Query is how to know the vendor the particular material.
    Even MSEG is showing no vendor.

    Hello Krishna,
    I do not think there's any direct assignment between a material and a vendor. And I would be surprised if there's one. Let's say there are 4000 materials and 600 vendors in an R/3 System. Doesn't it sound needless to maintain for each material all the vendors ?
    Just go to the Purchasing tab for a material (MM03) and also refer to the Purchasing data for a Vendor (XK03). you will see that there's something called a <i>Purchasing Group</i>, which is common to them both. Now just read the F1 help for this field.
    Regards,
    Anand Mandalika.

  • How to find ObjectKey for the workflow, or Task for a ObjectKey

    Hi,
    I am developing a custom workflow for a customer request,
    I need to apply a condition like, If there is a open workflow request for this customer, then it should not start another workflow.
    how do I do that ?
    I tried to look into SWi6, it gives results till I keep the Object key Blank, if I use this with the object key then it gives no result.
    I have also tried function module SAP_WAPI_WORKITEMS_TO_OBJECT, but still no success.
    I have developed my own Business object for this with key fields.
    thanks
    Siddharth

    Hi,
    You can check in the table SWW_WI2OBJ, whether for the key and business object, there is workflow exist or not.
    Get the last workitem based on the timestamp and pass that work item in SWWWIHEAD and get the top work item.
    Now check whether the status is COMPLETED or INPROCESS or READY, based on which you can trigger or not.
    Regards,
    JMB

  • How to find description for the bugs fixed in a CPU ( Critical patch alert)

    Hi
    I am having a hell of a time trying to figure out WHICH BUGS are fixed in the recent Critical patch alert
    I looked into the README file of the patch ( in my case its 8534387 for Solaris SPARC ) - but even in the README file there is only the list of the bugs fixed:
    +2.1 Bugs Fixed by This Patch+
    This patch includes the following molecules:
    +7155248 - DB-10.2.0.4-MOLECULE-001-CPUJUL2008+
    +7155249 - DB-10.2.0.4-MOLECULE-002-CPUJUL2008+
    +7155250 - DB-10.2.0.4-MOLECULE-003-CPUJUL2008+
    +7155251 - DB-10.2.0.4-MOLECULE-004-CPUJUL2008+
    +.....+
    +.....+
    But its impossible to even find them in metallink by the bug ID !
    I tried the first one and you get multiple document where this patch is mentioned , but no clear place for the bug description .
    Is there a convenient way to know exactly the DESCRIPTION of each bug that was fixed in a CPU ?
    thanks in advance
    Orna

    >
    But its impossible to even find them in metallink by the bug ID !
    I tried the first one and you get multiple document where this patch is mentioned , but no clear place for the bug description .
    Is there a convenient way to know exactly the DESCRIPTION of each bug that was fixed in a CPU ?
    thanks in advance
    OrnaDo a BUG search using the BUG ID rather than a Knowledge Base search. After that if you look closely at those multiple documents you mentioned that was returned, there should be only one for your Platform and for your product. Ignore the rest and click on only the one relevant to your Platform and Product.

  • How to find Extract for the bank key/ bank account changed in vendor maste

    Hello Gurus,
    I need help in finding the extract for the bank details of vendors changed for a period of time. I tried using FK04 under multiple selection and ran the report for the selected vendors. It only shows  the "bank details created" or "bank details deleted" under Old Values and New Values but doe not actually shows the values for the field changed.
    Is there a way where i can get a report which shows a log of change in bank details with old and new values,
    Thank you,
    Prakash

    HI,
    Try using report RSSCD100 and give the selection condition
    Object id --> BANK
    and then you can limit the results by specifying the time and date range..

  • How to find links for the KM resource

    Hi,
    I would like to know the details about the links, which are created for the KM resource.
    I want to search how many links and where these links are created for some perticular resource in KM.
    Please let me know how to achieve this.
    Thanks

    Hello -
    For archive pls refer below
    THere is no standard archive functionality in KM. but you can use time based publishing where you can give validity of the documents. Once the time is expired then automatically it will not display to the end users who have read permissions.
    kept in your directory but it will not visible to enduser (those are having a read access) section.
    So Go to folder (Life time enable on folder level) ---> Details ---> Click on Lifetime --> Enable it
    Afterthat you can select the appropriate file and assign the life time .Here is the process....
    A(file name)-> Details-> Properties ---> lifetime.
    /thread/103302 [original link is broken]
    http://help.sap.com/saphelp_nw70/helpdata/en/8d/2813418366f023e10000000a155106/content.htm
    Regards
    satya

  • My Firefox history is shortened to a few entries for the last months, weeks, days. How is this even possible?

    The title says it all.

    If a large amount of history items were removed then this is either caused by deleting those entries manually or with a problem with the places.sqlite database file.
    Also make sure not to use Clear Recent History.
    Is a specific (month) range gone or are only specific entries missing possible from the same server?
    Problems with bookmarks and history not working properly can be caused by a corrupted places.sqlite database file.
    You can check for problems with the places.sqlite database file in the Firefox profile folder.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file
    *History Export: https://addons.mozilla.org/firefox/addon/history-export/

  • How to find package for a particular command[SOLVED]

    I had seen somewhere a package which can be used to find the package if you know the command. But I cannot seem to find it now. I want to know which package contains 'netstat' command. Thanks for your help.
    Last edited by rnarch (2012-05-08 05:23:03)

    'ss' looks like a good command. I am reading up its options. Thanks.

  • How to find ClassID for the installed JDK/JRE?

    I am using JDK 1.6.24. I want to get the ClassID for that.. how to get that?

    http://www.oracle.com/technetwork/java/javase/deployment-policy-135751.html

  • How to find the transaction code for the particular program or include

    Dear All,
    Please help me on this queary.
    1) How to find what is the transaction assigned for the particular Report
    2) How to find the particular include is used in which programs and also transaction codes
    I have one ZProgram that contains only includes no selection screen, I have to find where this program is used, in that one include is ther I would like to know in which program and in which transaction that is used,
    They have given ME9F, ME21N/22n, wheren this includle is calling.
    Please kinely help on this.
    Thanks and Regards,
    Muralikrishna

    HI
    1. you can find the transaction for your report by opening in se80. On the left side window it will show the transaction if there is any.
    2. to find in which programs particular inclue is called , just open include in se38 and press where used list icon. in the pop up window select programs.
    regards
    vijay
    reward points if helpful

  • How do I find/search for a particular app or genre of them

    How do I find/search for a particular app or genre of them in Maverick app store...thx for any help...byeGeorge

    Just go to App store and type in what you want in the search box.   Say, apps for word processors, Anti virus apps, Games apps and so on.   You could also go via Google with a similar approach and lastly, the system divides up particular subjects in any event ...  under the term Categories.
    Having said that, the system isn't a mind reader.   It's up to you to refine what you've  been presented with.

Maybe you are looking for

  • SCSM 2012 R2 -Portal Opens with Full Content on Portal Server but not for other Machines

    Setup: SharePoint 2010Sp2 installed onto a Server, it uses a Remote SQL DB for SharePoint. Both WebContent Server and SharePoint Webparts are installed onto one computer. Both websites are using the exact same certificate that is registered as comput

  • Error: "Cannot access a property or method of a null object reference"

    I am getting the following action script error when I try to play my exported .swf in flash player 9.  If I hit "continue" or "dismiss all" it plays the file fine.  Is there a way to fix or at least supress this error message? Action Script Error: Ty

  • Duplicate Records Found?

    Hi Experts,    Is there any Permanent solution for Duplicate Records Found?     Info Package> only PSA subsequent Data Targets- Ignore Duplicate Records. Can u explain clearly for this Issue to close Permanently. Note : Points will be assinged. With

  • Snd_sb16 module loading problem

    Every time I boot Arch, I have to manually load the snd_sb16 module. It works great while loaded with modprobe snd_sb16, but when rebooting, it won't load. I tried adding the module to /etc/modprobe.conf, but I get an error when rebooting. Perhaps th

  • Moving the cursor inside a file being written.

    Is there any way to move the cursor to a specific location in a file that I am editing. for example: moveCursor(int row, int col) moveRight(int col) moveToEnd(); //Move to end of current rowI know that I can use RandomAccessFile but that only provide