Required Condtion to pull the record in ABAP

Hai Experts-
I have a requirement in which i need to pull the record with only numeric value.
for example.
if v_variable CS 0 or
  v_variable CS 1 or
  v_variable CS 2 ........like this all numeric values 0 to 9.
v_variable = batchadm.
endif.
Is there any other way to achieve this apart from checking all the numerics.
Cheers,
~Srini.....

Use
IF v_ variable CO '0123456789'
<Use select query>
ENDIF.
Reward Pts if helpful!

Similar Messages

  • Programming Logic required for pulling the records for past month /week

    Hi All
    I need help in the SQL programming logic.
    Oracle Database Version: 10.2.0.3.0
    Requirement
    In a data warehouse environment, I need to programme for weekly and monthly automated batch jobs to insert the data from Data_tbl to Reporting_tbl for generating reports. Tables descriptions are given below.
    Table1 - Data_tbl (Source table –this table gets updated everyday).
    Record_dt     first_name     last_name
    Table2 - Reporting_tbl_(Target table)
    Cycle_dt     first_name     last_name
    1. Monthly Report
    In the SQL Query, I have where clause condition—
    Where Record_dt >=’01-nov-08’ and record_dt<=’30-nov-08’
    Using the above condition in development, I am pulling the data from source table for the past month data. This will be repeated every month and it should be automated.
    i.e., if I run this report any time in dec 2008, it should pick records of dates from Nov 01st to Nov 30th 2008. if I run this report any time in Jan 2009, it should pick records of dates from Dec 01st to Dec 31st 2008.
    Date Values should be assigned for past month. Value of Cycle_dt in target table should be end date of past month like 30-nov-2008, 31-dec-2008.
    2. Weekly Report
    In the SQL Query, I have where clause condition—
    Where Record_dt >=’01-dec-08’ and record_dt<=’07-dec-08’
    Here week start day is Monday and end day is Sunday.
    If I run the report between Dec 08th to Dec 14th , it should pull records of dates from Dec 01st to Dec 07th 2008.
    On Dec 15th, it should pick from Dec 08th to Dec 14th.
    Value of Cycle_dt in target table should be end date of past week like 07-Dec-2008, 14-Dec-2008.
    Please help me with the logics for both Monthly and Weekly reports.
    Thanks

    Hi,
    For the monthly report, instead of
    Where Record_dt >=’01-nov-08’ and record_dt<=’30-nov-08’say:
    Where   Record_dt >= TRUNC (ADD_MONTHS (SYSDATE, -1), 'MM')
    and     record_dt <  TRUNC (SYSDATE, 'MM')SYSDATE is the current DATE.
    TRUNC (SYSDATE, 'MM') is the beginning of the current month. (Notice the condition above is less than this date, not equal to it.)
    ADD_MONTHS (STSDATE, -1) is a date exactly one month ago, therefore it is in the previous month.
    For the weekly report, instead of:
    Where Record_dt >=’01-dec-08’ and record_dt<=’07-dec-08’say
    Where   Record_dt >= TRUNC (SYSDATE - 7, 'IW')
    and     record_dt <  TRUNC (SYSDATE, 'IW')TRUNC (dt, 'IW') is the beginning of the ISO week (Monday-Sunday) that contains dt. Again, notice the end condition is strictly less than the beginning of the current week.

  • Without ABAP progrm can we pull the data from ECC table

    Is it possible to define in Table attract XI SAP as a whole what it is, without having to configure ABAP program in R / 3 to collect all send XI?
    JOB is run on XI pull an entire table into a file folder and put it online?
    Can we usse jdbc adapter anyhow to pull the records frm SAP database tables........

    Hi,
    >>Is it possible to define in Table attract XI SAP as a whole what it is, without having to configure ABAP program in R / 3 to collect all send XI?
    Yes, but not recommended by SAP...  Remeber SAPECC or R3 is installed over a DB so you have the tables there, and you can pull data through it.. but always go for an ABAP program to do so..
    >>JOB is run on XI pull an entire table into a file folder and put it online?
    yes this can be done, with the JOB calling an abap program (through XI or any other way)
    >>Can we usse jdbc adapter anyhow to pull the records frm SAP database tables........
    Again yes, but not recommended..
    Regards
    Suraj

  • How do I update all the records in a table from the contents of another table?

    Ok some situation information, I have a pervasive database that runs our accounting software that I am pulling a product list from.  I have that list stored in a table in SQL.  From time to time we update the records in the pervasive database and
    I want to be able to pull those changes into the SQL table.  I don't want to drop the table and recreate it because if a product is no longer active in the pervasive database it will not be returned by the query (if I return all the products even the
    inactive ones I will get thousands of records rather than just a few hundred) and I do not want to loose the products from the table that are now inactive.  
    So what I want to be able to do is pull the list from pervasive, compare it to the list that exists in SQL and update any changed records, add any new records, and leave any now missing records alone(missing from the pervasive list but present in the SQL
    list).  I have no trouble pulling the records from pervasive (now) but I am a little stumped on how to do the rest.  I am not sure if this is a situation to use MERGE or not.  I also do not really need this to be done on a regular basis as the
    changes do not happen often enough for that, the ability to manually trigger it would be enough.
    Any help would be appreciated.
    David

    Hi David,
    lets say you want to go with the lookup transformation.
    lets say u want to move the data from server A table A1 to Server B table B1
    What you need to do is the following:
    Cofigure the Lookup options as follows:
    - In general -> Specify how to handle rows with no macthing entries -> "Redirect Rows to no Match Output"
    -  In Connection -> Set the ole db connection to the Server B and select the table B you want to lookup the values in your case the table where you want to input the changes 
    -  In columns -> link the product column from table A to product column in table B. And do not select any rows to output.
    - now your component is ready next you need to input. so when u connect your lookup to the destination component You will get an option to select which output you want to use - use "Lookup No Match Output".
    this will actually just allow you to add only new items only to the table B.
    Teddy Bejjani - BI Specialist @ Netways

  • Pulling the condition records - help in the ABAP code -urgent!!!!!

    hi folks,
    I need some urgent help here..
    I have discussed this portion before in the forum  but there are some changes and I need some help here.
    The code goes like this....
    select knumv kschl kbetr kwert
      from konv into table cdata
         for all entries in bodyitab21
        where konv~knumv = bodyitab21-knumv
                     and konv~kwert > 0.
    I am successfully pulling the data into cdata here..
    I need to check for various condition types that are around 100. I need to split them into two types because some condition types containe just pricing values while some others have values in % (but the value not stored in that format) To do the extra coding I have use two differetn case statements and that's what i have done here.
    <b>My probelm is I will have to check for each condition type, if the 'kwert' field has some value in it pull the data  and there is a condition text associcated to it in the table 'T685T' that needs to be pulled into the itab.
    This process has to be done for every condition type.</b>Given this scenario how can i do it?
        loop at cdata  into wac.
        case wac-kschl.
             when 'ZRAT' OR 'ZAGR'  OR 'ZRCR' OR 'Y098' OR 'Y007' OR 'ZREW' OR 'Y106' OR 'ZTSR' OR 'Y127' OR 'Y125' OR 'Y126' OR 'Y124' OR 'Y157' OR 'Y092' OR 'Y085' OR 'Y090' OR 'ZMZD' OR 'Y215' OR 'Y214' OR 'Y111' OR 'ZC$D' OR 'ZAUD' OR 'ZTHX' OR 'ZCOL'
    OR 'ZCFE' OR ZSPA' OR 'ZBOX' OR 'ZCOR' OR 'Y130' OR 'ZBOR'
    OR 'Y108' OR 'ZFPP' OR 'Y204' OR 'Y200' OR 'Y202' OR 'Y201' OR 'Y203' OR 'Y002' OR 'ZSCR' OR 'Y128' OR 'Y100' OR 'ZABS' OR 'ZSMG' OR 'ZFRE' OR 'ZREC' OR 'ZCOM' OR 'ZPMG' OR 'BEMG' OR 'ZDTI' OR'ZBET'.
    <b>***** the first set of these condition types have just values</b>     if wac-kbetr = ' ' AND wac-kwert = ' '.
                   continue.
                 else.
                  p = wac-kbetr.
                  i = p.
                  c = i.
                  MOVE c to w_accitab-zrate.
                     MOVE wac-kbetr to w_accitab-zrate.
                  MOVE wac-kwert to w_accitab-zsubtotal.
                endif.
        when 'ZSED' OR 'ZRFQ' OR 'ZIMP' OR 'ZERR'
         OR 'ZECD' 'ZAC1' OR 'ZAC%' OR 'ZAC2' OR 'ZSED' OR 'ZRFQ' OR 'ZIMP' OR 'ZERR' OR 'ZECD' 'ZQUD' OR 'ZEMP' OR 'Y101' OR 'Y012' OR 'ZCHU' OR 'Y054' OR 'Y065' OR 'Y066' OR 'Y067' OR 'Y068' OR 'Y069' OR 'Y096'
    OR 'Y103' OR 'Y010' OR 'Y070' OR 'Y071' OR
    'Y072' OR 'Y073' OR 'Y074' OR 'Y075' OR 'Y076'
    OR 'Y077' OR 'Y078' OR 'Y079' OR 'Y156' OR OR 'Y148'
    OR 'Y102' OR 'Y205' OR 'Y206' OR 'Y207' OR 'Y208' OR
    'Y209' OR 'Y213' OR 'Y210' OR 'Y211' OR 'Y212' OR 'Z%DS'
    OR 'Z%DO' OR 'Y113' OR 'Y151' OR 'Y152' OR 'Y153' OR
    'Y154' OR 'Y155' OR 'Y147' OR'Z%PB' OR 'Y142' OR 'Y131'
    OR 'Y141' OR 'Y149' OR 'ZDEO' OR 'Z%DR' OR 'Y115' OR
    'Y116' OR 'Y095' OR 'Y084' OR 'ZSA$' OR 'ZSA%' OR
    'ZPA$' OR 'ZPA%'.
    the second set of these condition types have just values that has to be converted into %.
               if wac-kbetr = ' ' AND wac-kwert = ' '.
                clear w_accitab-zrate.
                continue.
              else.
                p = wac-kbetr.
                p = p / 10.
                if p < 1.
                  rate+0(1) = '-'.
                endif.
                if i = 0.
                  clear w_accitab-zrate.
                 else.
                i = p.
                c = i.
                shift c right deleting trailing '-'.
                concatenate rate c '%' into rate.
                condense rate no-gaps.
                     MOVE wac-kbetr to w_accitab-zrate.
                MOVE rate to w_accitab-zrate.
                clear rate.
                MOVE wac-kwert to w_accitab-zsubtotal.
              endif.
            endif.
    Thanks alot in advance.
    Santhosh

    Maybe this will help you,  otherwise I'm missing something.
    [code]
    data: begin of wac,
          kschl type t685t-kschl,
          vtext type t685t-vtext,
          end of wac.
    case wac-kschl.
    when 'ZRAT' or 'ZAGR' or 'ZRCR' or 'Y098' or 'Y007' or 'ZREW' or 'Y106'
    or 'ZTSR' or 'Y127' or 'Y125' or 'Y126' or 'Y124' or 'Y157' or 'Y092' or
      'Y085' or 'Y090' or 'ZMZD' or 'Y215' or 'Y214' or 'Y111' or 'ZC$D' or
         'ZAUD' or 'ZTHX' or 'ZCOL' or 'ZCFE' or 'ZSPA' or 'ZBOX' or 'ZCOR'
    or 'Y130' or 'ZBOR' or 'Y108' or 'ZFPP' or 'Y204' or 'Y200' or 'Y202' or
      'Y201' or 'Y203' or 'Y002' or 'ZSCR' or 'Y128' or 'Y100' or 'ZABS' or
         'ZSMG' or 'ZFRE' or 'ZREC' or 'ZCOM' or 'ZPMG' or 'BEMG' or 'ZDTI'
            or'ZBET'.
    Some code
      when 'ZSED' or 'ZRFQ' or 'ZIMP' or 'ZERR'
    or 'ZECD' or 'ZAC1' or 'ZAC%' or 'ZAC2' or 'ZSED' or 'ZRFQ' or 'ZIMP' or
      'ZERR' or 'ZECD' or 'ZQUD' or 'ZEMP' or 'Y101' or 'Y012' or 'ZCHU' or
      'Y054' or 'Y065' or 'Y066' or 'Y067' or 'Y068' or 'Y069' or 'Y096'
      or 'Y103' or 'Y010' or 'Y070' or 'Y071' or
      'Y072' or 'Y073' or 'Y074' or 'Y075' or 'Y076'
      or 'Y077' or 'Y078' or 'Y079' or 'Y156' or 'Y148'
      or 'Y102' or 'Y205' or 'Y206' or 'Y207' or 'Y208' or
      'Y209' or 'Y213' or 'Y210' or 'Y211' or 'Y212' or 'Z%DS'
      or 'Z%DO' or 'Y113' or 'Y151' or 'Y152' or 'Y153' or
      'Y154' or 'Y155' or 'Y147' or'Z%PB' or 'Y142' or 'Y131'
      or 'Y141' or 'Y149' or 'ZDEO' or 'Z%DR' or 'Y115' or
      'Y116' or 'Y095' or 'Y084' or 'ZSA$' or 'ZSA%' or
      'ZPA$' or 'ZPA%'.
    Some code
    endcase.
    select single vtext into wac-vtext from t685t
                  where spras = sy-langu
                    and kschl = wac-kschl.
    write:/ wac-kschl, wac-vtext.
    [/code]
    Regards,
    Rich Heilman

  • ABAP Program to split the records

    Hi Experts,
    As i am new to ABAP please update me with the required ABAP Code or atlease with the skeleton Code
    Source & target fields
    Emp_ID ZEMP_ID (CHAR)
    Start Date: ZESTA_DT (DATS)
    End Date : ZEEND_DT (DATS)
    My requirment is to write a start routine that split the record in to 2
    Emp_ID-Start_Date-Termination Date
    0001----01/01/2005---01/01/2008
    0002----01/01/2007---
    (Termination date will be blank if emp is still working)
    As per my requirment i would like to see data in DSO as
    Emp_ID-Start_Date-Termination Date
    0001----01/01/2005---
    0001----01/01/2005---01/01/2008
    0002----01/01/2007---
    I want to split the records of an employee
    Please let me know if u need any information
    Thanks

    Hi Srinivas,
    Thanks for the update....
    Please correct me my if i was wrong
    Data:
    Emp_ID-Start date------Termination Date
    0001----01/01/2005---01/01/2008
    0002------01/01/2005
    Loop at itab.
    if itab-ZEEND_DT is initial.
    itab1 = itab.
    append itab1.
    else. " split the records ... based on termination ..
    itab1 = itab.
    clear itab1-ZEEND_DT
    append itab1.
    itab1 = itab.
    append itab1.
    endif.
    endloop.
    My requirment is for the above example data
    For the employee 0001 as Termination date is not initial i need that record to be split in to 2
    Emp_ID-Start date------Termination Date
    0001------01/01/2005
    0001----01/01/2005---01/01/2008
    Please update

  • Pulling the latest records from the datasource to BW

    Hi,
    I need to pull the most recent records from a custom table on R/3 side. I make use of infoset query to retrieve data from two different tables. One custom table and the other SAP table MAKT. I created a transaction data... Datasource make use of infoset to extract the data on R/3 side.
    Is there a place where I can write code to play around with the data... is there any user exit to write the code for this purpose.
    Need help...

    Trx CMOD:
    1. Enter the Project name; if you dont have an existing project and u have to create one.
    Select a good name for a project..say ZBIW..and then enter the name and click on create button.It will take u to new screen.There give short text for project name.
    Above u will see 'enhancement assignments' button.Click it and in the new screen add enhancement RSAP0001.
    Save and remember to activate project too..
    (save in appropriate transport request)
    2. go to components select the required function module.
    EXIT_SAPLRSAP_001 for Transactional DS
    EXIT_SAPLRSAP_002 for Master DS
    Hope it helps.
    Regards

  • How to create an XSD for file adaptor which will ignore the records that are not required.

    Hi All,
       I have a requirement, the Fixed Length file contains
    30013742387462382938742      82347023984623087   
    30037348237  983743  9837423098  98347 
    10108472398   98034702398409238 9838472398   09823409238
    300163527 387462398746 38746293874693746324763
    101037642873643 37438724683746837648 873648736
    200138743986493874398
    2002738469837246
    10003784629837469283746937463987469387
    I need to select only the records that startswith 3001 and 3003 which are of different types and ignore the remaining records like 1010,2001,2002,1000.
    Can any one help me on this.

    You can make use of "conditionValue" or "startsWith" attributes while designing you native XSD.
    Check this example - Native Format Builder Wizard - 11g Release 1 (11.1.1.6.3) for better understanding.

  • Calendar forms10g: doesn't display, 'cause items are required in the record

    in the record I have items with the required property set to yes.
    I Display the Calendar on Key-ListVal and When-Mouse-DoubleClick triggers.
    when the triggers are fired, oracle shows me the following error FRM 40202 Field must be entered. and I can't enter the date.
    That's why the record loses the focus when the calendar shows up.
    how I can keep my items with the required property set to yes, without having the frm 40202 error.
    Steve

    Instead of using a different block for the calendar, you could create a separate fmb and use CALL_FORM and a GLOBAL to show the calendar and intercat with it. This way, the record will not loose focus and you won't get the error.

  • Functional Module Extractor not pulling all the record on BW side

    Hi,
    i have written a FM extractor to pull data from CDHDR and CDPOS table. the Records count shows on RSA3 is more than 3,00,000 but while pulling it on BW side it brings only 41,000  Around records.
    I steps i have taken is -
    tried setting and resetting the package side in Info package.
    Tried putting the default package size to 50K in FM setting
    but nothing is working.
    It seems like the pacet size is not incrementing in the code. i have tired to find ou the fault but coult not and RSA3 is working fine.
    can anyone please suggest a correct piece of code or find out where exactly the fault is?

    Vikrant,
    The structure of your generic extractor function module should be something like:
    If initialisation
      Store parameters, clear packet count
    Else
      If first packet
        Create cursor
      Endif
      Read block of records from cursor
      If cursor returns no more records
        Raise NO_MORE_DATA exception
      Endif
      Process records from cursor and output
      Add one to packet count
    Endif
    This function module code can get called repeatedly.  Possibly you are only extracting data for the first packet?
    Mark

  • Record Selection in Japanese not pulling the correct records.

    Hello,
    I am using Crystal XI running off of a Remedy SQL Database that has Japanese data in the records.  When I place the following criteria in the Record Selection, I pull no records.  But, If the put the criteria with the japanese criteria in the Group Selection formula, I get the records that I want but then many of my formulas are adding up all the records.
    {HPD_HelpDesk_VW.Severity} in ["1","2"] and
    {HPD_Affected_Organizations.Organization} like "ジブラルタ"
    How can I get Crystal to recognize the japanese criteria in the Record Selection criteria?
    Any help would be appreciated.
    Thanks, Stacy

    Hello,
    I am using Crystal XI running off of a Remedy SQL Database that has Japanese data in the records. When I place the following criteria in the Record Selection, I pull no records. But, If the put the criteria with the japanese criteria in the Group Selection formula, I get the records that I want but then many of my formulas are adding up all the records.
    {HPD_HelpDesk_VW.Severity} in \"1\",\"2\" and
    {HPD_Affected_Organizations.Organization} like "ジブラルタ"
    How can I get Crystal to recognize the japanese criteria in the Record Selection criteria?
    Any help would be appreciated.
    Thanks, Stacy

  • We are trying to close caption our telecasts. We get the captioning files done out of house, pull them back into Premiere, and then embed them. The TV station requires .mxf files with the file embedded as a 708 stream, to play on their Grass Valley K2 vid

    We are trying to close caption our telecasts. We get the captioning files done out of house, pull them back into Premiere, and then embed them. The TV station requires .mxf files with the file embedded as a 708 stream, to play on their Grass Valley K2 video servers. We have tried multiple scenarios and cannot get the captions to display.
    Whenever I export, it becomes a 608 stream, and will not play on their servers.

    Hello there,
    I'm sorry to hear you are having a problem. Thank you for taking the time to post here.
    Here are some questions:
    1. What version of PPRO are you using? MAC or WIN?
    2. Is the caption data you are embedding a 708 caption stream?
    3. When you re-import the MXF with captioning embedded back into PPRO, does it show 708 closed captions in PPRO?
    PPRO will embed 708 caption streams to MXF -- I just did this, re-imported the embedded MXF to PPRO, and I see the captions in the MXF.
    If you could share one of your files with me, I could take a look.
    Take care and thanks again,
    CM

  • Reduced internet speed after a few hours. Requires pulling the plug

    Can anyone help me out? i just got WRT54GS V7. Everything works fine except after several hours my internet connection would slow down eventually forcing me to pull the power. Everything works fine after i turn it back on. I upgraded the firmware and everything. This computer is wired to the router so I don't even know what the problem is.

    You mentioned that you upgraded the firmware.  After the firmware upgrade, did you reset the router to factory defaults (using the reset button) ?  If not, reset your router to factory defaults, then setup the router again from scratch.  If you saved a router configuration file, DO NOT use it.
    If you do not reset to factory defaults, some of your router variables may not be properly initialized, and this could cause the problem that you are having.

  • How can i pull the

    Hi folks
    iam developing report for following requirement.
    want to disply the vendor transaction file for all company codes  Fiscal year,of 2004,2005,2006, and 2007 (to date).
    The purpose of oureport is to analyze our company  invoices and investigate potential overpayment opportunities.  In order to effectively accomplish this, we need a single invoice record for each invoice that was received by compnay  from their vendors.  The single invoice record would contain at least the following columns: Vendor Number, Vendor Invoice Number, Invoice Date, Invoice Amount, SAP Document Number, Check/Wire Number, Check/Wire Date, Check/Wire Amount.    SAP would have multiple rows in a table for any one invoice, whereas we would only want to see ONE row for every vendor invoice.
    if you know that company pays (for example) 75,000 invoices/year - then the transaction file you would have about 300,000 records in it.  75,000 Invoices * 4 years. 
    inodrer to develop this report iam using table PAYR -payee
    BSIK ( closed items) BSAK ( open items).
    my question is any one tell me how can i pull the payment transactions for each invoice?
    regards
    neeru

    try to use function module GET_CHECK_INFORMATION
    hope that helps
    Andreas

  • How can i pull the payment transactions for each invoice?

    Hi folks
    iam developing report for following requirement.
    want to disply the vendor transaction file for all company codes Fiscal year,of 2004,2005,2006, and 2007 (to date).
    The purpose of oureport is to analyze our company invoices and investigate potential overpayment opportunities. In order to effectively accomplish this, we need a single invoice record for each invoice that was received by compnay from their vendors. The single invoice record would contain at least the following columns: Vendor Number, Vendor Invoice Number, Invoice Date, Invoice Amount, SAP Document Number, Check/Wire Number, Check/Wire Date, Check/Wire Amount. SAP would have multiple rows in a table for any one invoice, whereas we would only want to see ONE row for every vendor invoice.
    if you know that company pays (for example) 75,000 invoices/year - then the transaction file you would have about 300,000 records in it. 75,000 Invoices * 4 years.
    inodrer to develop this report iam using table PAYR -payee
    BSIK ( closed items) BSAK ( open items).
    my question is any one tell me how can write logic to  pull the payment transactions for each invoice?
    regards
    neeru

    Hi rob,
    yes you are right,  an invovice may contaion duplicate records
    example  PAYR table contain
    invice no         compnay code  checkno vendor  fisclyear
    ( doc.number)
    2000134373     001                    10287200          2007
    2000134373     001                    10427890          2007
    so as per my requirement how can i write the logic.
    regards
    neeru

Maybe you are looking for

  • How can I view 2 pages on the screen?

    With old Pages there was an option in Zoom to see One Up or Two Up. But this has now disappeared. How can I see Two Up?

  • Massive help with an iPhone Application...PLEASE!   :(

    Hello. Since yesterday I have been trying to hunt down a bug in a simple iPhone application I made while following an exercise from the iPhone SDK Development book. Its a simple application with a navigation controller and a table view. You can downl

  • Weblogic.application.ApplicationException missing - weblogic server 9.2

    I am using the [url http://e-docs.bea.com/wls/docs92/javadocs/weblogic/application/ApplicationLifecycleListener.html]ApplicationLifecycleListener to register the listener. While building it is giving the error weblogic.application.ApplicationExceptio

  • User password not recognised

    I have recently downloaded flash player and it asked me for my password, which did not work. It then asked for my appple ID and downloaded the app. Since this I have not been able to log on as a main user and I am now only able to use guest as my pas

  • IPhoto albums vs events

    I am having trouble understanding what to use the events for. Lets say the family traveled the East Coast last year and went to around 4 different states. Do I make an album for the trip and events for each state or activity? How does it work? What s