Search for line of code in a program

I have written a program and from within this program I need to check whether a line of code exists in another program. Anyone tried this before? I need a little help getting it done.

try using Submit Prg: rpr_abap_source_scan with relevant parameters...
with rb_code = 'X'
                            with repname = <program name to search>
                            with sstring = <things to search in program>

Similar Messages

  • How do I search for lines with a particular pattern and delete them when a match occurs

    How do I search for lines with a particular patter and delete them when a match occurs? For example delete lines containing SUB_NAME = "?" where ? is any string. 

    How do I search for lines with a particular patter and delete them when a match occurs? For example delete lines containing SUB_NAME = "?" where ? is any string. 
    Lines in what? And what language are you using to develop with?
    Are the lines in a text file? A RichTextBox? A TextBox? Some other control? A List(Of String)?
    Is there some expectation by you that by providing what you wrote in your question post that the knowledge in your mind about what you are thinking about will mysteriously emanate to anybody reading your post so all of the sudden your knowledge will
    become their knowledge and they will be able to provide you with an answer as they will suddenly understand what you are trying to do? Because that's probably impossible. Most people try providing enough information in a question so anybody, even stupid people
    like me, can understand what they want. Maybe you should try that. As well as selecting an appropriate forum for your question in the future. Usually a question like this is related to programming in a particular language therefore a language forum may be
    a good choice. Or not.
    La vida loca

  • How do I stop Imovie from automatically searching for videos when I open up program. I can't do anything when this happens. I checked my pref and it's not set to automatically do this.

    How do I stop Imovie from automatically searching for videos when I open the program. It will not allow me to do anything and I cannot start a new session.

  • Search for the t-code where the specefic output type is used

    Hi
    I want to know how can we search for the t-code used  for a  specefic output type in use?
    I have a requirement where in i have a output type, i knwo teh prog name and the form name...
    i know it is used in SD and billing but i am not able ot exactly pin point as to in which t-code to be used..so that i can check the output throught the T-code.
    Experts sugget!!
    Thanks
    Prashant

    Hi
    It is used for a Standard t-code i want to find that T-code. Through NACE the outputtype (which i already have) i can find teh prog name and the form name.
    and through SPRO also its the same info...
    i want to knwo for SD-> Billing->INvoice i can find the output type...i want to knwo what T-code needs to be run and on givign the data and running the out put type from the menu and choosing my OUTput type...and seeing the output in the print format.
    Hope you got my problem.Thanks for the reply.
    Prashant

  • Search for line feed characters

    Is there any way to search for line feed characters in a query? I want to ignore line feeds in a column.
    Thanks

    CHR(10) is a linefeed and CHR(13) is a carriage return.
    If you are looking for end-of-line then in UNIX it is
    CHR(10) and in Windows it is CHR(13)||CHR(10)
    You can use something like:
    SELECT REPLACE(cr_line,CHR(10),' ')
    FROM (SELECT 'This is a line'||CHR(10)||'and another' cr_line
          FROM dual)to remove linefeeds.
    TTFN
    John

  • I am searching for the Pin Code of the Vodafone UMTS card

    Hi there,
    i bought the Lenovo T400s and was surprised to find a Vodafone SIM Card inside!
    Now i want to use it an seaching for the PIN Code, dose sombody knows where i can find???
    I only find a Card with a P No. and an ICCID Code, there is no Manuel or any other information.
    Thanks for help!
    Solved!
    Go to Solution.

    larsspo, welcome to the forum,
    the PIN code for pre-inserted SIM cards in Germany is 0000.
    Hope this helps
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • Spotlight cannot search for type & creator codes?

    I want to find some old ClarisWorks documents that I know are on my computer somewhere. Simple, I thought: Just search for documents dated before 2000 with creator code BOBO. But looking through the list of search parameters in Spotlight, I don't find either type or creator code. I know Mac OS X no longer uses these metadata, but they can still be useful, as in cases like this. Am I missing something? Is there a way for Spotlight to search on type & creator codes?

    Thanks for the response. I solved my problem by just looking through folders of old files and checking dates of those with AppleWorks icons. Very 21st century. I knew there must be some reason I thought I could do such a search, so I fired up my old 'Pismo' PowerBook and indeed, the Finder search utility in 10.3.9 allows searching for Type and Creator codes. It also will search only on those codes, or on a date or other parameter; while with Spotlight I could find no way to search for, say, all files dated before 1/1/1999 -- it requires something entered in the top field, i.e. a word to search for either in the file's contents or its name. So I put in "the" and got a lot of results, but of course minus any file that doesn't contain "the". Not so smart.
    I've never much liked Spotlight, which is way overkill for 95+% of the searching I do; I almost never used it in 10.4 (used Easy Find); in 10.5 at least it's fast enough to not be a major annoyance, though the fact that I can't make "File Name" the default requires me to keep a Spotlight window open in the Finder all the time (or have to manually click on "File Name" every time I want to do a search). Sure it's nice to be able to search the contents of files -- when I need to, but that's almost never. Meanwhile, Spotlight remains far inferior in simple, day-to-day usability to 10.3's Find utility.
    So how do you find out how to do such a "Raw Query" search? "kMDItemKind" is not an immediately intuitive term, at least for ordinary mortals such as myself.

  • How to Measure time taken for a some lines of code in a program?

    Hi
    I have one requirement to measure time taken for executing a  block of code in report . How we can find it ?
    Is there any way to code something in report to caluculate it ?
    Please send solution as early as possible
    thank u

    Ok.. try this code...
    DATA : t1 TYPE i,
    t2 TYPE i,
    delta(16) TYPE p.
    GET RUN TIME FIELD t1.
    PERFORM get_data. "your block of code
    GET RUN TIME FIELD t2.
    delta = t2 - t1.
    delta = delta / 1000000.
    WRITE :/ 'Time elapsed : ', delta , 'Secs'. "time in secs.

  • Help me in searching huge lines of code

    Hi,
    I have a requirement need a urgent help.
    Requirement states like this:
    I need to write a some program through which I need to search a huge lines code and to find out following information :
    1. Total No of lines of the code
    2. No of DML statements (select,update,insert, delete) used like how many SELECT, How many UPDATE etc used in it.
    3. No of base apps tables referenced like How many tables starting with "CMF_" is present.
    4. No of procedure calls like how many procedures starting with "PROC_" used.
    Can anyone help me in this ? I need the code.
    Thanks in advance
    [email protected]

    Hello Nicol,
    By ALL_SOURCE it can not be solved, ALL_SOURCE from database dictionary table you can get the total code text if you know the table name but not all those following information :
    1. Total No of lines of the code
    2. No of DML statements (select,update,insert, delete) used like how many SELECT, How many UPDATE etc used in it.
    3. No of base apps tables referenced like How many tables starting with "CMF_" is present.
    4. No of procedure calls like how many procedures starting with "PROC_" used.
    If you can tell me how you will get me all those stuffs It will be great.
    Suman

  • How can I 'search' for Line/Page Breaks in Pages 5.5.2?

    In the old version of Pages I was able to Find Line/Page Breaks by copying these symbols from the document and pasting them into the Find box. However, when I do this in Pages 5, all I see pasted is a blank space.
    How can I copy and paste symbols?

    Visit the View menu, and select Show Invisibles. The page breaks will be a blue line across the page with a document icon at the end of that line. The hard (paragraph) returns are the pilcrow ¶ character.
    Select the page or paragraph break symbol, and then press cmd+E. This is shorthand for use the selected character for the search. Next press cmd+F to open the Find panel, which will now be pre-populated with the character you want to find. In the gear icon, choose Whole Word. Then press the > key to advance to the next found character. There is no left panel display that shows the page number(s) that the found characters appear on.

  • My group box is causing problems when searching for a text line in a text file.

    I am developing a booking system, so for this I need to ensure that no two clients can book the same appointment slot. So, on testing my code which prevents double booking, the system doesn't seem to find the text line being searched for in the text file
    when it (purposefully) should.
    I have tried isolating the problem using breakpoints, and I've found that when the 'SearchLine' (referring to my code below) does not include the 'TimeComboBox.text' piece and instead this value is written into the code, the system is able to find the SearchLine
    without any problems. But, when assigning the group box's value to a variable and using this in the SearchLine instead, or without even using a loop and just doing a simple line by line search, the program can't find this line of text in the file.
    I'm lost for ideas. I have tried everything I can think of. Could anyone make any suggestions as for what is the problem with my group box? (I'll explain the code beneath it).
    'Setting the value of the SearchLine (which is a String)
    SearchLine = String.Concat(DateTimePicker1.Value.Date & " " & TimeComboBox.text)
    Dim FoundApp As Boolean
    Dim objReader As New System.IO.StreamReader(basicfilepath & "Text Files\Client Booked Appointment DatesTimes.txt")
    FoundApp = False
    'Reading the file's contents and checking for the SearchLine
    Do While (objReader.Peek() <> -1) or (FoundApp = True)
    If (TextLine = SearchLine) Then
    'Line contains SearchLine. Appointment already exists.
    FoundApp = True
    Else
    'Line doesn't contain SearchLine. Carry on searching.
    Msgbox("Line not found.")
    End if
    Loop
    Explanation
    When the line is searched for, the 'FoundApp' value must be set to 'True' when it is found. If it is not found, it remains false.
    To isolate the problem, I've displayed the SearchLine in a message box in the past to make sure that the correct line of text is being searched for.
    In basic terms, my program is searching for the exact line of text which exists in the text file, but for some reason it is not coming up as 'Found'. The error occurs when the group box's value is used. The text file which is being read is
    definitely correct. Please help, any suggestions would be appreciated.
    Thank you

    Hi
    It would appear that your snippet doesn't actually read the file at all.
    Here is my test which works fine.
    Option Strict On
    Option Infer Off
    Option Explicit On
    Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
    Dim SearchLine As String = "18:09:38 : XTaskSettings.Load PARAMS: begin"
    Dim FoundApp As Boolean = False
    Dim TextLine As String = Nothing
    Dim objReader As New IO.StreamReader(Application.StartupPath & "\Data\Report Q1.txt")
    FoundApp = False
    Do While (objReader.Peek() <> -1) Or (FoundApp = True)
    ' this was missing
    TextLine = objReader.ReadLine
    If (TextLine = SearchLine) Then
    'Line contains SearchLine. Appointment already exists.
    FoundApp = True
    MsgBox("Line found.")
    Else
    'Line doesn't contain SearchLine. Carry on searching.
    MsgBox("Line not found.")
    End If
    Loop
    End Sub
    End Class
    Regards Les, Livingston, Scotland

  • How to search for a badi

    how to search for a badi
    srinivas.

    Hi Srinivas,
    Good
    Check this link
    /people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    Run this program
    *& Report ZNEGI16 *
    REPORT ZNEGI16 .
    TABLES : TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA : FIELD1(30).
    DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS : P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA wa_tadir type tadir.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'PROG'
    AND OBJ_NAME = TSTC-PGMNA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM TRDIR
    WHERE NAME = TSTC-PGMNA.
    IF TRDIR-SUBC EQ 'F'.
    SELECT SINGLE * FROM TFDIR
    WHERE PNAME = TSTC-PGMNA.
    SELECT SINGLE * FROM ENLFDIR
    WHERE FUNCNAME = TFDIR-FUNCNAME.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'FUGR'
    AND OBJ_NAME EQ ENLFDIR-AREA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    ENDIF.
    ENDIF.
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT in ('SMOD', 'SXSD')
    AND DEVCLASS = V_DEVCLASS.
    SELECT SINGLE * FROM TSTCT
    WHERE SPRSL EQ SY-LANGU
    AND TCODE EQ P_TCODE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE:/(19) 'Transaction Code - ',
    20(20) P_TCODE,
    45(50) TSTCT-TTEXT.
    SKIP.
    IF NOT JTAB[] IS INITIAL.
    WRITE:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    endcase.
    Solution 2
    1.Get the Package of the program name of the transaction.
    2.Go to Transaction SE18.
    3.Press F4 on the badi definition name.
    4.Click the information systems button.
    5.Give the Package name and press enter.
    6.Select the BADI that is relevant to the application.
    Good Luck and thanks
    AK

  • What is the error in this one line of code!

    s=s-(s/28)*[1-(s/28)*(29/s+1)*(21-q/11)];
    I am using this line of code in my programe but i am getting the following error.
    C:\shahzad\Easter.java:28: illegal start of expression
    s=s-(s/28)*[1-(s/28)*(29/s+1)*(21-q/11)];
    Please help me solvingg this problem
    thanks.

    s=s-(s/28)*[1-(s/28)*(29/s+1)*(21-q/11)];
    [] brakets ae used to index arrays, are you using an array somewhere????
    arr=5; for example....
    in either event youl need to make changes.
    assuming no array is involved simply change [] to ()
    if still causing problems try adding extara()
    s= (s-(s/28))*( (1-(s/28)) * ( (29/s)+1) * (21-(q/11)) );

  • Searching for a good programming text editor

    Does there exist a text editor for Linux that has got these features?
    -can open multiple documents
    -can easily switch to any open document, e.g. by just clicking the document in a list or tree on the left (tabs alone won't do because there's not enough space to slow 20+ documents if there are only tabs)
    -has a built in command prompt to type compile and debugging commands, which is by default in the folder where your documents are, if all documents are in the same folder at least, otherwise it doesn't really matter to me
    -can save sessions, projects, ..., which basically is a way to quickly open your multiple documents belonging to a certain project
    -has a super cool search function with options like "whole word" and "case sensitive" clearly visible in the search dialog, and remembering these settings for any open document you search in
    -can easily search through all open documents (e.g. like visual studio can)
    -has the type of text editing GUI where you can use the mouse to select text, use ctrl+a to select all, use ctrl+c/ctrl+v to copy paste, home/end to navigate the cursor to begin/end of line, F3 to search for next match, etc... (so no vi derivates I'm afraid)
    -has modern interface, menus, file save/open dialogs, etc..., not something that appears to come from 1995 (so I think emacs is out of the question)
    What I'm looking for is similar to Kate 3.5 or parts of MS Visual Studio. However Kate 4.1 isn't suitable anymore because they destroyed the search function of it. And preferably something that is independent of a desktop, because it's sad that Kate's features can get ruined by people who develop a desktop.
    Does anyone have ideas if there exists such a program?
    Last edited by aardwolf (2009-04-25 09:15:07)

    Wra!th wrote:You described SciTE
    Look good, but ONE thing: I found that F8 "Output" opens a screen that has some properties of a linux terminal except some weird "Exit code:1" messages. However, if I press the "up" arrow, it doesn't scroll through the console history but instead moves a cursor up. I need it to work like a linux terminal with history because I don't want to retype long commands all the time. It also doesn't show the correct type and color of my user prompt. Is there any way to get a more conventional console in the Scite window somewhere?
    Also, scite's interface also looks a bit 1995
    EDIT: oh hmmm and it appears to not be able to open more than 10 files. That's too limited I'm afraid
    Shame, it almost looked like what I needed.
    Last edited by aardwolf (2009-04-25 12:11:21)

  • Parallelized for loop. Searching for a one-line solution

    Hi.
    In an usual day I do a lot of for loops inside of command line. But I noted that my loops don't use the full power of my dual core processor, they only use one processor.
    A lot of the loops I do have independent interactions in the sense that a interaction code don't need the results of another interaction. This is the simplest problem in multiprocessing, I only need to execute N process in parallel.
    I'm searching for a one-line solution that I can use in place of a 'for i in *.txt; do echo $i;done'. With one-line I means that can be used as one-line but the implementation can be longer. And can be in any programming language.
    For now I'm using the following small python solution (the smallest I could get)
    #!/usr/bin/env python
    # -*- coding: utf-8 -*-
    from multiprocessing import Pool
    from glob import glob
    from subprocess import call
    def f(x):
    call(['asy', '-f', 'png', '-render=0', x])
    pool = Pool(processes=4)
    pool.map(f, glob('*.asy'))
    But I like something that can be integrated in my "shell life". Anyone know a solution for my problem?

    http://stackoverflow.com/questions/3816 … ash-script
    http://www.mail-archive.com/bug-bash@gn … 05820.html
    Last edited by karol (2009-11-23 00:30:34)

Maybe you are looking for