Collecting all the records in the item int table where the same matnr

Hi All,
I have two internal tables with records as below.
HEADER INTERNAL table
material num       plant
   50410              LV01
   50411              AN01
   50412              AN01
   50413              LV01
ITEM TABLE
Material num           stor loc
50410                     ER01
50410                     ALQW
50410                     WFDD
50412                     ER01
50413                    ER01
50413                     XK01
I want to move this to final internal table, here the record 50411 is not there in second int table still i want to move to final table.
in the final int table record should be as follows
material          plant        stor loc
50410            LV01        ER01
50410            LV01        ALQW
50410            LV01        WFDD
50411            AN01      
50412            AN01       ER01
50413            LV01        ER01
50413            LV01        XK01
I'm not getting the full records in the final int table.How to do this.
Thanks & Regards,
Sabu

Hi Sabu,
You can get the data in final internal table as follows :
**First Declare the Final Internal table as :
types : begin of wy_final,
           matnr like mara-matnr,             " Material Number
           werks like mseg-werks,            " Plant
           lgort like mseg-lgort,                 "  Storage Location
           end of wy_final.
data : wt_final type standard table of wy_final with header line.
**Declare a temporary Header Internal Table
wt_header_temp[]  =  wt_header[].
Then loop at Item table as it has multiple entries for same material Number
loop at wt_item.
**Then read Header Table  for mapping material Number & picking the corresponding Plant.
read table wt_header with key matnr = wt_item-matnr.
if sy-subrc eq 0.
wt_final-matnr = wt_item-matnr.
wt_final-werks = wt_header-werks.
wt_final-lgort = wt_item-lgort.
append wt_final.
clear wt_final.
endif.
read table wt_header_temp with key matnr = wt_item-matnr.
if sy-subrc eq 0.
delete wt_header_temp.
endif.
endloop.
loop at wt_header_temp.
read table wt_final with key matnr = wt_header_temp-matnr.
if sy-subrc ne 0.
wt_final-matnr = wt_header_temp-matnr.
wt_final-werks = wt_header_temp-werks.
append wt_final.
clear wt_final.
endif.
endloop.
sort wt_final by matnr.
I Think this would probably solve your purpose.
Thanks & Regards,
Bhavika
Edited by: bhavika kumar on Mar 19, 2009 5:46 AM

Similar Messages

  • How to send a Weekly E-mail to a Distribution list from Sharepoint by collecting all the events available in all Sharepoint calendars

    Hi,
        I have created many Calendars in my Sharepoint site like Meeting Calendar, Downtime Calendar etc. I will be creating some events in these calendars every week. My requirement is to collect all the events available in the calendar for that week
    and send a weekly mail with all this events to the distribution list
         Is this requirement can be done using the Sharepoint designer workflow or does it require any code related activities to accomplish this? If so can you please provide me the Steps by step process to complete this and can you also share
    the code in case if you have it
    Thanks in Advance

    Hi,
    Try with worklfow timer control and send mail to weekly.(Performance good)
    http://infomoss.blogspot.in/search/label/Workflow2010
    one more option try with Timerjob..(if no way use it)
    http://infomoss.blogspot.in/2013/05/companymicrosoft-todo-update-copyright.html
    http://infomoss.blogspot.in/2013/01/webclient-sharepoint-2010-read-image-uri.html
    Thanks
    Jaison A
    http://infomoss.blogspot.in

  • How do I collected all the SMS from iPhone to Mac.

    How do I collected all the SMS from iPhone to Mac. Besides these paymentprograms. And I have no previous backup that I can get it from.

    This is amazing! Pick out everything I need from the iPhone. Just what I've been looking for a long time, but did not find anything I liked. So started to see if I could pick out one and one thing ... Definitely worth the money. Thank you Julian!
    PS. I fully support the payment thing, but theres allot of legal free programs aswell, so just wondered =)

  • How could the Oracle Application Module Browser collect all the interfaces?

    How could the Oracle Application Module Browser comes with the Oracle AS Adapter collect all the interfaces that are available through Oracle Integration Repository? Is it from the XML description file in the Oracle Integration Repository?
    Thanks,
    Qing

    Did you ever figure this out? I'm encountering the same issue.
    Thanks.

  • Merging two records in a single record for the same matnr,werks and bwart.

    Hi I have a requirement to merge two records into one single record using the quantity field from MSEG table.
    I am selecting two records from the table MSEG. Now for these two records i have to add the quantity values into one variable.
    Then there should be only one record for the same matnr,werks,bwart.
    Any suggestion would be appreciated.
    Regards,
    Amit

    hi,
    You can COLLECT statement only if all non key fields are numeric.
    This statement Adds all such fields and give us a single record.
    Regards
    Sumit Agarwal

  • How do you use your pictures for web, iPad & smartphones? All the same size??

    i realy think back and froth about this question.
    i guess it makes sense - to use all the same size -  because newest Ipads and Iphones are with retina-screens !??
    on the other hand i use background-pictures for the website with a lenght of 1800px (it's 400 kbit) so it may slow down my the mobile version
    but i know , people always scroll and zoom into evrything with an Ipad and  smartphone ... So what to do?  What is your hint ?
    Thank you for your time ;-))
    Nachricht geändert durch Ideenautomat

    For me anyways, I 'always' create my images to the size I need and then bring them into what ever web design tool I am using wether it is Muse, Dreamweaver, Coda or a number of others. It takes a few minutes longer but I always get the results I need and expect.

  • How do I open my itunes account on a new computer without having to buy all new songs? It doesn't seem fair to have to buy all the same songs a second time if they are already purchased by me and I just want them on my new computer!

    How do I open my itunes account on a new computer without having to buy all new songs? It doesn't seem fair to have to buy all the same songs a second time if they are already purchased by me and I just want them on my new computer!

    There's a few different ways. The following document is worth checking through:
    iTunes: How to move your music to a new computer

  • How do I keep two different iPads from having all the same apps

    I have an IPOD Touch and an IPAD 2.  My wife would like the IPAD 2 since I am getting the new iPad.  Right now the IPOD Touch and the IPAD have all the same apps on them, since I cannot create a different configuration for each one.   Now that I am getting the new IPAD, how do I set up a different sync configuration for each of the two IPADs?  Right now I have to manually delete the IPOD Touch apps from the IPAD each time I sync, since they do  not display correctly on the IPAD (small screen in middle of IPAD).   I just wonder if I have to manually remove my apps from my wife's IPAD every time I sync the IPADs in ITunes.  She does not want all the stuff I currently have on my IPAD.  I use an iMAC for the sync.
    Thanks

    It sounds like you're using the same AppleID to purchase apps for all devices, is that right? If so, you need to make sure that
    - You turn OFF automatic downloads for Apps (on the device, Settings, Store, Apps, turn off downloading)
    - You manually sync each device through iTunes (once you connect the device, or if you sync through wifi, you can specify which apps get synced to each device). In the Apps tab in iTunes, make sure you only select the apps you want to be on that device.
    Matt

  • Is there a native app/software that will get my photos all the same size?

    I know how to do this with photoshop but I'm not sure if there is any Apple native app/software that will do this for me. 
    Lets say I have 5 photos of different sizes and I want them all the same size.  I know I could reduce them all in preview but that doesn't allow me to move the photo around and cut out stuff I don't want in it.  Or I could crop them in Preview but then they are not automatically all the same size. 
    The way it works in photoshop is:  I open up a new project that is the same size I want the photos to be.  Let say 900x644.  Then I copy one of the photos I want in that size (lets say it somewhat bigger) and when I paste it into that blank new project that is 900x644 I can move the pasted photo around to get it so what I want to fit into that newer smaller size is there.
    Is there any way to do this without special software on a regular Mac.  I'm trying to help a family member who doesn't really want to buy or learn a complicated graphics program.  They have iLife 11 BTW but I don't see a way to do it with iPhoto.
    Thanks for any ideas you may have!
    Susan

    Use the Automator app (it's in the app folder) to resize a batch of photos:
    http://osxdaily.com/2011/12/20/batch-resize-pictures-in-mac-os-x-using-automator /
    I just tried this and it works and is fast.

  • How can i move music purchased on my iphone to my laptop? it's all the same iTunes account.

    How can I move music purchased on my iPhone to my computer? It's all the same iTunes account.

    For purchased content, through iTunes, your phone connected, iTunes running: File>Transfer Purchases.

  • I am debating between the 13in 2.9ghz mac book pro or the 13in 2.5 ghz mac book pro with all the same specs bbut for me i am trying to see which one for the money is better becuase the 2.5 will run me 100-200 dollars less than the other

    I am debating between the 13in 2.9ghz mac book pro or the 13in 2.5 ghz mac book pro with all the same specs bbut for me i am trying to see which one for the money is better becuase the 2.5 will run me 100-200 dollars less than the other

    Only you can make that determination. All things being equal the 2.5 GHz model is slower.

  • Certain apple products (iTunes) require a different password than my apple id password.  Why - and can I make them all the same?

    certain apple products (iTunes) require a different password than my apple id password.  Why? … and can I make them all the same password?

    I assume you never got a solution. My own painful story is here:
    http://tech.kateva.org/2012/06/icloud-transition-went-as-expected.html
    I've given up on Lion/iCloud. I'll try Mountain Lion.

  • When I updated my Apple TV it shows about 10 computers  on my network when I only have one computer on my network and they are all the same....why did this happen? I only have one computer   linked to the Apple TV

    when I updated my Apple tv it now shows about 10 computers on my network which I only have one tv...how do I get rid of the other "computers" listed as they are all the same, this was not happening before I updated the Apple TV

    It looks to be a bug. A reboot to computer and/or Apple TV may resolve it.
    You can provide feedback to Apple and file a report.
    https://www.apple.com/feedback/
    https://bugreport.apple.com/

  • If I upgrade from Firefox 3.6 to firefox 4 Beta on my iMac, will I still have all the same bookmarks, or will I lose them?

    If I upgrade from Firefox 3.6 to firefox 4 Beta on my iMac, will I still have all the same bookmarks, or will I lose them?

    You are using Mac OS 10.4. Firefox 4.0 is not compatible with this OS. It supports only Mac OS 10.5 and above. Please see this article: [http://www.mozilla.com/en-US/firefox/system-requirements.html Firefox 4 system requirements].

  • How can I make my computer restart with all the same windows that were open when a shut it down?

    How can I make my computer restart with all the same windows that were open when a shut it down?

    That is the way Mac OS X 10.8 (aka Mountain Lion) works by default. Are you actually running that system? (See About This Mac in the Apple menu.) If so, make sure the check box in the shut down alert is checked:

Maybe you are looking for

  • Invoice and Goods Receipt Difference Process

    Hi I have a scenario: In PO with quantity 1000 and price is 1$ (Delivery Schedule: about 100 per month, issue invoice after receipt goods)  but when Goods Receipt, quantity is 110, price is 1$ and receipt invoice is 120$. I want to enter invoice 120$

  • CCM related - error while deleting item  from supplier catalog

    Hi experts, I am using CCM 1.0 SP5 and the format of file uploading is in .xls. I am trying to delete one item with deletion indicator 'X' in excel file. Item is present in Supplier catalog. Still while going to delete the item, in the display log it

  • Premiere Pro CC Cutting off frames and shifting audio from .MOV

    Hi everyone! I recently converted from Premiere Pro CS6 to CC. I've noticed an incredibly frustrating problem that I can't diagnose. In CS6 my Quicktime files would come in just fine, with correct audio lining up. However in Premiere Pro CC, the firs

  • Some sites are not reachable in FF however they were before.(In other browser they work). Why?

    Some sites are not reachable in FF however they were before.(In other browser they work). Why It is like some sites are blocked but FF says : "The connection was reset The connection to server was reset while the page download..." == URL of affected

  • Automatic upsampling of low-resolution images?

    I posted about this, it might have been about a year ago now, and got no joy, so I thought I'd try again in case something new has appeared. When exporting to PDF, InDesign CS can downsample images. Some of my images, however, maybe 20-30 at a guess,