How can I filter data in itab.... which was retrived from infotypes.

Hi all,
  I am trying to filter data for one internal table (ex: IT_FINAL ) by comparing those values from standard table (ex: PA0000).First I had sucessfully uploaded all data from presentation server, Now I want to compare all field value (ex: PERNR)  from internal table (IT_FINAL-PERNR) and standerd table (PA0000-PERNR).If there is no matching record. then move those records to  another internal table (ex: IT_ERROR).
  I had tried by keeping that comparing code in loop. But I am not getting what i want.
I am sending my code here.. please suggest me to solve this issue.
SOURCE CODE
TABLES: PERNR, PA0000.
TYPES : BEGIN OF t_final,
         PERNR TYPE PERNR_D,
         BEGDA TYPE CHAR10,
         ENDDA TYPE CHAR10,
         SUBTY TYPE SUBTY,
         FANAM TYPE PAD_NACHN,
         FAVOR TYPE FAVOR,
         GESC2 TYPE GESC2,
         GESC1 TYPE GESC1,
         FGBDT TYPE CHAR10,
        END OF t_final,
        BEGIN OF t_raw,
         line TYPE char100,
        END OF t_raw.
DATA : it_final TYPE STANDARD TABLE OF t_final,
       it_raw   TYPE STANDARD TABLE OF t_raw,
       it_error TYPE STANDARD TABLE OF bdcmsgcoll.
DATA : wa_final TYPE t_final,
       wa_raw   TYPE t_raw,
       wa_error TYPE bdcmsgcoll.
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                      = 'E:\Suri_test\BDC_TEST\test02.txt'
   FILETYPE                      = 'ASC'
  TABLES
    DATA_TAB                      = IT_RAW.
IF SY-SUBRC EQ 0.
LOOP AT it_raw INTO wa_raw.
      SPLIT wa_raw
         AT '/'
       INTO WA_FINAL-PERNR
            WA_FINAL-SUBTY
            WA_FINAL-BEGDA
            WA_FINAL-ENDDA
            WA_FINAL-FANAM
            WA_FINAL-FAVOR
            WA_FINAL-GESC2
            WA_FINAL-GESC1
            WA_FINAL-FGBDT.
  WRITE:/   WA_FINAL-PERNR,
            WA_FINAL-SUBTY,
            WA_FINAL-BEGDA,
            WA_FINAL-ENDDA,
            WA_FINAL-FANAM,
            WA_FINAL-FAVOR,
            WA_FINAL-GESC2,
            WA_FINAL-GESC1,
            WA_FINAL-FGBDT.
APPEND WA_FINAL TO IT_FINAL.
CLEAR WA_FINAL.
ENDLOOP.
*NOW I GOT RECORDS IN IT_FINAL.
LOOP AT PA0000 ??????????.
IF PA0000-PERNR EQ WA_FINAL-PERNR.
WRITE:/   WA_FINAL-PERNR,
               WA_FINAL-SUBTY.
ELSE.
WRITE:/ 'HELLO NOT MATCHED DATA.'.
move to IT_ERROR.??????????
ENDIF.
ENDLOOP.
ENDIF.
*TEST DATA..............................................
5/2/21.04.2007/31.12.9999/BOY/BATLANKI//X/21.04.2007
54099520/12/02.03.2005/31.12.9999/SANTHI/BATLANK/X//20.10.1954
3453/12/02.03.2005/31.12.9999/SANTHI/BATLANK/X//20.10.1954
54099520/13/02.03.2005/31.12.9999/JAGAN/PYDIPALLI//X/25.01.1981
  Thanks in advance,
  Surender. B.V.

Hi Surender,
In the below program it doesnt look like you are querying PA0000 database table @ all.
Do this, once you have the presentation server uploaded into internal table IT_FINAL:
IF IT_FINAL[ ] IS NOT INITIAL.
SELECT DISTINCT PERNR FROM PA0000 INTO TABLE IT_PA0000
FOR ALL ENTRIES IN IT_FINAL
WHERE PERNR EQ IT_FINAL-PERNR.
ENDIF.
sort it_pa0000 by pernr.
Loop at it_final into w_final.
read table it_pa0000 into w_pa0000
with key pernr = w_final-pernr
binary search.
if sy-subrc eq 0.
write:/ 'match for personnel ' , w_final-pernr , ' found'.
else,
write:/ 'match not found for personnel ' , w_final-pernr.
endif.
endloop.
p.s. declaration of internal table It_pa0000 should contain only one field pernr .... if you want you can add more fields and change the SELECT query above accordingly
Edited by: Aditya Laud on Jan 25, 2008 2:57 AM

Similar Messages

  • I wrote a assignment in the microsoft word 97-2003 doc but by mistake replace in the same name but with different thing . how can i retain my orinal file which was as Basel III and Banking law

    i wrote a assignment of almost 2500 words in the microsoft word 97-2003 doc but by mistake replace  a table only in same name  . how can i retain my orinal file which was as Basel III and Banking law

    Hey Christian
    Thanks I havn't seen that post, busy trying it now but no luck so far.
    I defined it in the second one (Content Management - Utilities - MIME Types).
    Tried it now in NWA, no luck either . . .
    What I noticed is no matted what it is defined as in NWA or Content Management, the properties of the mht file still shows Binary File (application/octet-stream)
    Any ideas?
    Regards
    Antonette

  • How can i activate my iphone 4, which was stolen 3 months back but now i find it back, by my old apple ID?

    how can i activate my iphone 4, which was stolen 3 months back but now i find it back, by my old apple ID?

    Restore as new
    http://support.apple.com/en-us/HT201252
    iOS: Device not recognised in iTunes
    Mac: http://support.apple.com/kb/TS1591

  • How can I retrieve my calendar info that was sucked from my iPad 2 after upgrading to OS V and backing up to iCloud (using Windows XP computer with Outlook)?

    How can I retrieve my calendar info that was sucked from my iPad 2 after upgrading to OS V and backing up to iCloud (using Windows XP computer with Outlook)?

    I think (and I'll double check) only the BBLink events will sync on a wired USB sync. I'm fairly certain of that.
    You'll need to use your calendar syncing via an EAS email account (outlook.com, for instance, is free) to sync wirelessly. It works great. I use it and was a former tied to the USB sync guy as well... and I thought I was gonna die a painful death without it. I found more freedom this way.
    This explains the process. But I don't think you'll get BBM Groups to sync.
    http://supportforums.blackberry.com/t5/BlackBerry-​Z10/How-To-OTA-Sync-BB10-and-non-BES-Outlook-Overv​...
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to unlock iphone 5 in india which was bought from UK on contract?

    how to unlock iphone 5 in india which was bought from UK on contract?

    Unless you are a current/former customer, using/used that phone on a network in the UK, you can forget about getting it officially unlocked, as none of the UK carriers will authorize unlocking unless you are a current/former customer.

  • How can I erase a photo album that was uploaded from an old computer that I don't have no more? I have other albums in the Iphone that I don't want to delete.

    How can I erase a photo album that was uploaded from an old computer that I don't have no more? I have other albums in the Iphone that I don't want to delete.

    If you sync with the new computer it will erase the current content from the iphone and replace with the selected content of the new computer.
    The pics that you have taken with the iphone should be imported regularly to your computer as you would with any digital camera.  You can then organize them and sync them back to the iphone if you wish.
    If you have had itunes perform a backup on the new computer, you should get the pics taken with the iphone back, but I would import them before trying anything.

  • Window vs view - how can i jump to a view which was previously created?

    Hello!
    how can i jump to a view previously created without the push or pop to view function?
    I have a UITabBarController with several view(s) (controllers)* and in one of my views i am using a navigation controller which pushes to various views. At the end, i would like to have a button, where the user can go back to its initial view (when the application is starting) i guess, that it has something to do with the rootview Controller.. the problem is: i dont have a root view controller because i am working with the TabBar example from apple, which is using the IB.
    thx for any hints..
    alex
    *which still is not working.. availiable at http://www.learnclip.com/iphone_tutorials/ViewPusher.zip

    You know what, about 30 seconds ago I figured out what I did. I set the Quiz preferences to “Required to pass before continuing” instead of “Required to take quiz”.
    I am sure Action Script is the wrong term (I’ve only used Captivate for 2 weeks). I applied an Advanced action to skip over the knowledge checks. I got the tutorial from this link:
    http://blogs.adobe.com/captivate/2011/07/excluding-knowledge-check-questions-when-reviewin gretaking-the-quiz.html
    Thanks for replying!
      Tiffany Robinson│Instructional Designer│Design and Development Team
       Email: [email protected]<mailto:[email protected]> │ Phone: 386-218-3577
      Check out thousands of free books and reports from Books 24x7 in the Kelly Learning Center!
            Kelly Services, Inc.

  • How can i display Value in Report which i select from Multiple select list

    Dear All,
    i am using multiple select List in form with report page.
    When i create new Entry with select Multiple value in Multiple Select List then in report Value display me in below format
    my SQL Query are
    select NAME D, CODE R from  COUNTRY_MAS WHERE ACTIVE_FLG ='Y' order by NAME
    AS:AI:AG:AM these are return value .i want to display NAME in report .
    How can i do this ?
    Thanks
    Edited by: Vedant on Apr 25, 2012 11:14 PM

    Short answer, use the apex_util.string_to_table to convert to a table; then you can either iterate through the table to generate a string of names, or accomplish the same with a bulk operation.
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_util.htm#CHDFEEJD
    Encapsulate all this within a pl/sql function.

  • How can I filter data by row contents? Similar to Excel's filter feature.

    I would like to view only the rows in which the data in column x is some particular value.
    For instance, I'd like to view (and create a group of channels) containing only data from rows where the text in column 2 is MC1.
    ... guess I can't put a picture inline...
    See attached for sample data.
    Thanks.
    Attachments:
    MyData.PNG ‏40 KB

    Hi ebloohm,
    This script will break out your loaded data rows by the "Station" channel values.  let me know if you want to filter out the "1;2" suffix or leave it differentiated.  If you want to do the same sort of thing not within a single file but across multiple files, then you'd do better to change your DataPlugin to enable the DataFinder to pull only the desired rows from each file.
    OPTION EXPLICIT
    Dim i, j, iMax, jMax, RawGroup, Channel, IdChName, OrderChName, Msg, LastTime
    Dim IdChDict, IdChannel, OrderChannel, RowDict, RowKeys, RowItems, DataChDict
    IdChName = "Station"
    OrderChName = "" ' "Time" or ""
    Set RawGroup = Data.Root.ChannelGroups(GroupCount)
    On Error Resume Next
    Set OrderChannel = RawGroup.Channels(OrderChName)
    On Error Goto 0
    Set IdChDict = CreateObject("Scripting.Dictionary")
    Set IdChannel = RawGroup.Channels.Add(IdChName, DataTypeString)
    IdChDict.Add UCase(IdChannel.Name), IdChannel
    Set Channel = RawGroup.Channels(IdChName) : IdChDict.Add UCase(Channel.Name), Channel
    jMax = RawGroup.Channels.Count-1
    Set DataChDict = CreateObject("Scripting.Dictionary")
    IF IsObject(OrderChannel) THEN
    DataChDict.Add UCase(OrderChannel.Name), OrderChannel
    END IF
    FOR j = 1 TO jMax
    Set Channel = RawGroup.Channels(j)
    IF NOT IdChDict.Exists(UCase(Channel.Name)) AND UCase(Channel.Name) <> UCase(OrderChName) THEN
    DataChDict.Add UCase(Channel.Name), Channel
    END IF
    NEXT ' j
    Msg = "Enumerating all the Groups..."
    Call MsgBoxDisp(Msg, "MB_NOBUTTON", "MsgTypeNote", 0, 0, 1)
    Call CreateIdChannel(IdChDict)
    Set RowDict = EnumerateIdRows(IdChannel)
    RowKeys = RowDict.Keys
    RowItems = RowDict.Items
    iMax = UBound(RowKeys)
    LastTime = Timer
    FOR i = 0 TO iMax
    IF Timer > LastTime+1 OR Timer < LastTime THEN
    Msg = "Sort Extracting Group " & i+1 & " of " & iMax+1
    Call MsgBoxDisp(Msg, "MB_NOBUTTON", "MsgTypeNote", 0, 0, 1)
    LastTime = Timer
    END IF
    Call ExtractIdGroup(RowKeys(i), RowItems(i), IdChDict, DataChDict)
    NEXT ' i
    Call RawGroup.Channels.Remove(IdChannel.Name)
    Call MsgBoxCancel
    Sub TextToNumeric(Group, ChanName, ChanType, Factor, Offset)
    Dim RawChannel, NewChannel
    Set RawChannel = Group.Channels(ChanName)
    Set NewChannel = Group.Channels.Add("New|" & ChanName, ChanType)
    L1 = RawChannel.Properties("Number").Value
    L2 = NewChannel.Properties("Number").Value
    ChnLength(L2) = ChnLength(L1)
    Call ChnCalculate("Ch(L2) = CDbl(Ch(L1))")
    IF Factor <> 1 OR Offset <> 0 THEN
    Call ChnLinScale(NewChannel, NewChannel, Factor, Offset)
    END IF
    Call ChnMove(NewChannel, RawGroup.Properties("Index").Value, RawChannel.Properties("GroupIndex").Value)
    Call RawGroup.Channels.Remove(RawChannel.Name)
    NewChannel.Name = Mid(NewChannel.Name, 5)
    End Sub ' TextToNumeric()
    Sub CreateIdChannel(IdChDict)
    Dim j, jMax, RawGroup, ChListStr, IdChannels, IdChannel
    IdChannels = IdChDict.Items
    Set IdChannel = IdChannels(0)
    Set RawGroup = IdChannel.ChannelGroup
    Call RawGroup.Activate
    ChListStr = ""
    jMax = UBound(IdChannels)
    FOR j = 1 TO jMax
    ChListStr = ChListStr & "Ch(" & IdChannels(j).Properties("Number").Value & ") & ""."" & "
    NEXT ' IdCh
    ChListStr = Left(ChListStr, Len(ChListStr)-9)
    Call ChnCalculate("Ch(" & IdChannel.Properties("Number").Value & ") = " & ChListStr)
    End Sub ' CreateIdChannel()
    Function EnumerateIdRows(IdChannel)
    Dim j, jMax, RawGroup, RawChannel, RawChnStr, RowDict, StartRow, StopRow, RowMax
    Set RawGroup = IdChannel.ChannelGroup
    Call RawGroup.Activate
    RawChnStr = ""
    jMax = RawGroup.Channels.Count-1
    FOR j = 1 TO jMax
    Set RawChannel = RawGroup.Channels(j)
    RawChnStr = ChnStrAdd(RawChnStr, RawChannel.Properties("Number").Value)
    NEXT ' j
    Call ChnMultipleSort(IdChannel, RawChnStr, 0, 1)
    L3 = IdChannel.Properties("Number").Value
    Set RowDict = CreateObject("Scripting.Dictionary")
    StartRow = 1
    StopRow = 1
    RowMax = ChnLength(L3)
    Do While StopRow <= RowMax
    T1 = ChT(StartRow, L3)
    StopRow = ChnFind("UCase(Ch(L3)) <> UCase(T1)", StartRow+1)
    IF StopRow = 0 THEN StopRow = CLng(RowMax+1)
    RowDict.Add T1, StartRow & "|" & CLng(StopRow-StartRow)
    StartRow = CLng(StopRow)
    Loop ' Until End Of Channel L3
    Set EnumerateIdRows = RowDict
    End Function ' EnumerateIdRows()
    Function ExtractIdGroup(RowKey, RowItem, IdChDict, DataChDict)
    Dim j, jMax, RawGroup, RawChannel, NewGroup, NewChannel, RawChnStr, NewChnStr, DataChannels, Cols
    Dim StartRow, RowCount, NewDataType, NewDataDisp, NewOrderCh, IdChannels, IdChannel, OrderChannel
    Cols = Split("|" & RowItem, "|")
    IF UBound(Cols) < 2 THEN Exit Function
    StartRow = CLng(Cols(1))
    RowCount = CLng(Cols(2))
    IF Data.Root.ChannelGroups.Exists(RowKey) THEN Call Data.Root.ChannelGroups.Remove(RowKey)
    Set NewGroup = Data.Root.ChannelGroups.Add(RowKey)
    Call NewGroup.Activate
    IdChannels = IdChDict.Items
    jMax = UBound(IdChannels)
    FOR j = 1 TO jMax
    Set IdChannel = IdChannels(j)
    NewGroup.Properties.Add IdChannel.Name, ChV(StartRow, IdChannel.Properties("Number").Value)
    NEXT ' j
    RawChnStr = ""
    NewChnStr = ""
    DataChannels = DataChDict.Items
    jMax = UBound(DataChannels)
    FOR j = 0 TO jMax
    Set RawChannel = DataChannels(j)
    Set NewChannel = NewGroup.Channels.Add(RawChannel.Name, RawChannel.DataType)
    ChnLength(NewChannel) = RowCount
    RawChnStr = ChnStrAdd(RawChnStr, RawChannel.Properties("Number").Value)
    NewChnStr = ChnStrAdd(NewChnStr, NewChannel.Properties("Number").Value)
    NEXT ' j
    Call DataBlCopy(RawChnStr, StartRow, RowCount, NewChnStr, 1)
    NewChannel = ""
    On Error Resume Next
    Set NewChannel = NewGroup.Channels("Value")
    On Error Goto 0
    IF OrderChName <> "" THEN
    NewChnStr = ""
    jMax = UBound(DataChannels)
    Set OrderChannel = NewGroup.Channels(DataChannels(0).Name)
    FOR j = 1 TO jMax
    Set NewChannel = NewGroup.Channels(DataChannels(j).Name)
    NewChnStr = ChnStrAdd(NewChnStr, NewChannel.Properties("Number").Value)
    NEXT ' j
    Call ChnMultipleSort(OrderChannel, NewChnStr, 0, 1)
    END IF ' can order the rows of each extracted Group
    Set ExtractIdGroup = NewGroup
    End Function ' ExtractIdGroup()
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • How can I handle data that I need to populate from arrays ?

    Hi,
    I am using JDeveloper 10g(10.1.3.3) and I have a case where I consume some web services and populate arrays from these calls.
    Say that I have a search form where the user select a state from a combobox then the city combobox is refreshed according to the selected state.
    And these state and city are based on different views. Since I populate the views programmatically I couldn't use a viewlink.
    Any suggestion? What should I be using to support a data source like this?
    Thanks

    When I do that I get an error saying that
    JBO-30003: The application pool (zzz.activity.model.ActModuleLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.InvalidOperException, msg=JBO-26016: Cannot set user query to view "OCRevenueCenters2" because it is a destination in a view link
    This is happening at line setQuery(null);
        protected void create() {
            super.create();
            // Setup string arrays of codes and values from VO custom properties
            initializeStaticData();
            rows = (revenueCenters != null) ? revenueCenters.length : 0;
            // Wipe out all traces of a query for this VO
            getViewDef().setQuery(null);
            getViewDef().setSelectClause(null);
            setQuery(null);
        }Is there any workaround?
    Thanks

  • How can I redownload recently purchased music that was removed from my mac mini through my itunes account?

    I recently transfered all my music to an external hard drive and then deleted it and emptied the trash.  Most of the musi was transfered successfully but recent purchases did not make it and have been deleted.  When I go into itunes i can see the list of purchsed music, but since it's unable to be located I get the ! sign.  All forums tell me to go to the itunes store and go to pruchases under the quick link bar, but I don't see a quick link bar.  PLEASE HELP!  I am able to download the music onto my iphone and ipad just fine, why cant it be that easy on my new mac mini!  I am so frustrated! 

    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    If you open iTunes and click on Store in the sidebar, then look on the right side you will see a block of links labeled Quick Links.

  • How do I open a Word file which was exported fron PDF?

    how do I open a Word file which was exported from a PDF file?

    Hi alansandy,
    You can find your converted Word file stored in your Acrobat.com account at https://cloud.acrobat.com. You can download your file from your account by selecting it and clicking the Download icon. Then, you can open it right up in Word!
    Best,
    Sara

  • HT204053 How can I delete my iCloud account which I do not remember anything about the information that I entered about 4 years ago. It always asks my birth date but it seems I did not enter my correct date how can I bypass this question???

    How can I delete my iCloud account which I do not remember anything about the information that I entered about 4 years ago. It always asks my birth date but it seems I did not enter my correct date how can I bypass this question???

    You cannot delete the account from the server (partly to prevent the username from becoming available again and some-one else using it to pretend to be you).. Having disengaged your devices from it, go to http://icloud.com and delete any data in there such as contacts and calendars. Then just ignore it.

  • How can I filter a table from Data Control without enter query

    I have a table from a web service data control based on WSDL.
    I want to filter the table without input query at filter text box. Without filter text box, each would filter the table with a hardcoded query internally.
    For example, when user click A menu button then it filters the table where type = '1' and B menu button filters the table by type='2' and C menu button filters the table by type=' ' .
    How can I filter the table without enter query?
    Could anyone point me to a solution please.
    Thanks.
    jdev 11.1.5
    Edited by: 893364 on Oct 26, 2011 12:15 PM
    Edited by: 893364 on Oct 26, 2011 12:21 PM

    Hi,
    when you created the table, did you try selecting the "filter" option. Select the table and go to the Property Inspctor. In the tool bar of the Property Inspector there is an icon to change the configuration. Its adding filter filter fields for the user to search in.
    Option 2: The data of the Web Service actually is held in the iterators. If you wanted to filter the WebService query, I would not use the WS DC but a JAX-WS proxy in a POJO to fetch the WS Data. Then have the Data Control created from the POJO. You could have a method exposed on the POJO that allows you to filter the internally held data
    Frank

  • How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

    How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

    How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

Maybe you are looking for

  • SD - 3rd party process

    Hello Friends We recently found out that we will need a third party drop ship scenario .  Could anyone  guide me  create this scenario in one of our clients for demo?  How is this possible ? Regards

  • Error In Installing BC

    GM BI Gurus.., I am New to BI World... While i am trying to Insall the Objects from the Business Content.. I am getting the below error.. Kl. guide Me... Object '0ARTICLE_ATTR CLXXX' (0ARTICLE_ATTR     CLXX) of type 'Transfer Rules' is not available

  • Quicktime Broadcaster won't let me broadcast

    I have an iBook G3 running Mac OS 10.3.9 and I am getting video from the iSight camera fine but when I try to broadcast, I get this irritating audio squeal and "Broadcaster Error: Connection Failed (-5420)". What could be wrong?

  • What is version control in oracle apps

    hi, I want to know what is version control , why it is done for... please help me in this regard...

  • Sliding canvases between states

    We are building an application with multiple steps (similar to a wizard). Between each step, we would like the panel from the current step to slide to the left and the new panel to slide in from the right. The tricky part is that we would like to def