Please any one help me in this query

i have 6 tables. in my object i have to transfer the data to the internal table i_vbrk. it must include the following fields from the respective fields
vbrk   -  vbeln, vkorg, vtweg, fkdat,knumv
vbrp   -  vbeln, matnr, aktnr, arktx, netwr, wavwr
mara   -  matnr, extwg, matkl
marc   -  matnr, mmsta
marm   -  umrez, matnr
konv   -  knumv, kschl, kposn, kbetr.
please help me in joining the tables to one internal table

Hi,
data:begin of it_vbrk occurs 0,
vbeln like vbrk-vbeln,
vkorg like vbrk-vkorg,
vtweg like vbrk-vtweg,
fkdat like vbrk-fkdat,
knumv like vbrk-knumv,
end of it_vbrk.
data:begin of it_vbrp occurs 0,
vbeln like vbrp-vbeln,
matnr like vbrp-matnr,
aktnr like vbrp-aktnr,
arktx like vbrp-arktx,
netwr like vbrp-netwr,
wavwr like vbrp-wavwr,
end of it_vbrp.
data:begin of it_mara occurs 0,
matnr like mara-matnr,
extwg like mara-extwg,
matkl like mara-matkl,
end of it_mara.
data:begin of it_marc occurs 0,
matnr like marc-matnr,
mmsta like marc-mmsta,
end of it_marc.
data:begin of it_marm occurs 0,
umrez like marm-umrez,
matnr like marm-matnr,
end of it_marm.
data:begin of it_konv occurs 0,
knumv like konv-knumv,
kschl like konv-kschl,
kposn like konv-kposn,
kbetr like konv-kbetr,
end of it_konv.
select vbeln vkorg vtweg fkdat knumv
from vbrk
into table it_vbrk.
select vbeln matnr aktnr arktx netwr wavwr
from vbrp
into table it_vbrp
for all entries in it_vbrk
where vbeln = it_vbrk-vbeln.
select matnr extwg matkl
from mara
into table it_mara
for all entries in it_vbrp
where matnr = it_vbrp-matnr.
select matnr mmsta
from marc
into table it_marc
for all entries in it_mara
where matnr = it_mara-matnr.
select umrez matnr
from marm
into table it_marm
for all entries in it_mara
where matnr = it_mara-matnr.
select knumv kschl kposn kbetr
from konv
into table it_konv
for all entries in it_vbrk
where knumv = it_vbrk-knumv.
regards,
sowjanya.

Similar Messages

  • I have to add support company column to the query based on city,location id,country can you please any one help me on this

    select fu.user_id,
          fu.user_name,
          hcp_phone1.phone_number primary_phone_number ,
          hcp_phone1.last_update_date cnts_last_update_date,
          fu.last_update_date user_last_update_date,
          (select hcp_phone2.phone_number
          from ar.hz_contact_points hcp_phone2
          where hcp_phone2.contact_point_type(+) = 'PHONE'
          and hcp_phone2.status(+)               = 'A'
          and hp.party_id                        =hcp_phone2.owner_table_id(+)
          and hcp_phone2.owner_table_name(+)     ='HZ_PARTIES'
          and hcp_phone2.primary_flag            = 'N'
          and rownum                             = 1
          ) secondary_phone_number,
        (select hcp_email.email_address
        from ar.hz_contact_points hcp_email
        where hcp_email.contact_point_type(+) = 'EMAIL'
        and hcp_email.status(+)               = 'A'
        and hp.party_id                       =hcp_email.owner_table_id(+)
        and hcp_email.owner_table_name(+)     ='HZ_PARTIES'
        and hcp_email.primary_flag            = 'Y'
        ) email_address,
        hp.person_first_name ,
        hp.person_middle_name ,
        hp.person_last_name ,
        hp.party_name,
        hp.person_title ,(
      nvl(hp.address1,' ') ||
      nvl(hp.address2,' ') ||
      nvl(hp.address3,' ') ||
      nvl(hp.address4,' ')
    ) address1,
       hp.city,
        hp.state ,
        hp.country ,
        hp.postal_code,
      ' ' industry_group,
        from fnd_user fu,
        ar.hz_parties hp,
        fnd_user_resp_groups furg,
        fnd_responsibility_tl frt,
        ar.hz_contact_points hcp_phone1
      where hp.party_id                      =fu.person_party_id
      and furg.user_id                       =fu.user_id
    -- and ( to_date(fu.last_update_date,'dd-mm-yyyy') > to_date(nvl(p_in_date,sysdate),'dd-mm-yyyy')
    -- or to_date(hcp_phone1.last_update_date,'dd-mm-yyyy')> to_date(nvl(p_in_date,sysdate),'dd-mm-yyyy') 
      and furg.responsibility_id             = frt.responsibility_id
      and frt.responsibility_name            = 'EMR IBE Customer PSG US'
      and frt.language                       = 'US'
      and hcp_phone1.contact_point_type(+)   = 'PHONE'
      and hcp_phone1.status(+)               = 'A'
      and hp.party_id                        =hcp_phone1.owner_table_id(+)
      and hcp_phone1.owner_table_name(+)     ='HZ_PARTIES'
      and hcp_phone1.primary_flag            = 'Y';

    SELECT d.NAME
          FROM
            (SELECT jta.NAME
              FROM apps.jtf_terr_values_all jtva,
              apps.jtf_terr_qual_all jtqa,
              apps.jtf_terr_all jta ,
              apps.hz_party_sites ps,
              apps.hz_locations hl
            WHERE jtva.terr_qual_id     = jtqa.terr_qual_id
            AND jtqa.terr_id            = jta.terr_id
            AND jtva.low_value_char     = hl.postal_code
            AND jtqa.org_id             = jtva.org_id
            AND jta.org_id              = jtqa.org_id
            AND ps.location_id          = hl.location_id
            AND hl.country             in( 'CA', 'US')) D;
            UNION
            SELECT jta.NAME
              FROM apps.jtf_terr_values_all jtva,
              apps.jtf_terr_qual_all jtqa,
              apps.jtf_terr_all jta,
              apps.hz_party_sites ps,
              apps.hz_locations hl
            WHERE jtva.terr_qual_id     = jtqa.terr_qual_id
            AND jtqa.terr_id            = jta.terr_id
            AND ps.location_id          = hl.location_id
            AND jtqa.org_id             = jtva.org_id
            AND jta.org_id              = jtqa.org_id
            AND hl.country              = 'US'
            AND hl.postal_code BETWEEN jtva.low_value_char AND jtva.high_value_char
            )d;

  • While executing TCode F13 and F13E, purchase order number is not appearing.how it should be displayed into tcode f.13, please any one help me

    While executing TCode F13 and F13E, purchase order number is not appearing.how it should be displayed into tcode f.13, what are the requirements need to display into tcode f.13, please any one help me, i am facing this problem in  production server

    Hi Nattu,
    Please check it will show the PO no under Purchasing doc field
    Check which layout you are applied.
    its should be
    SAP&F124
    Without Specification of Crcy
    Regd,
    Khan.

  • Please any one Help me

    Hi,
    I am prasanna.Please any one help me how to write case statement in dashboard prompt sql results.
    Thanks inadvance
    prasanna Undapalli

    Hi,
    While creating the dashboard prompts, you should be able to see 'Show' option which would have 'All Values' as Default. Change to SQL Results-
    For example- I have taken Customer Status from the samplesales RPD . So the result would come as -SELECT "D1 Customer"."C2 Cust Status" FROM "Sample Sales"
    Now modify the SQL as per requirement.
    For Example- SELECT case when 1=1 then 'YTD' else "D1 Customer"."C2 Cust Status" end FROM "Sample Sales"
    union SELECT case when 1=1 then 'QTD' else "D1 Customer"."C2 Cust Status" end FROM "Sample Sales"
    union SELECT case when 1=1 then 'MTD' else "D1 Customer"."C2 Cust Status" end FROM "Sample Sales"
    This is the syntax and in the 'Default to' put the 'YTD' as specific value so that the report shows the report for the 'YTD'.
    And dont forget to add presentation variable and refer them in the intermediate reports.
    Hope this should solve your problem.
    Regards
    MuRam

  • Can any one help me in this code

    Hi all,
    I have created a selection screen and my aim is to display some fields or some block dynamically by choosing some radio button is it possible.
    can any one help me in this.
    REPORT  z_g_test.
    TABLES: spfli,sbook,sscrfields.
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:s_carrid FOR spfli-carrid.
    SELECTION-SCREEN END OF BLOCK 1.
    PARAMETERS:rad1 RADIOBUTTON GROUP g1 USER-COMMAND us1,
               rad2 RADIOBUTTON GROUP g1 DEFAULT 'X' .
    SELECTION-SCREEN BEGIN OF SCREEN 001 as subscreen ."WITH FRAME TITLE text-002.
    SELECT-OPTIONS: s_fldate FOR sbook-fldate.
    SELECTION-SCREEN END OF SCREEN 001.
    DATA ok_code LIKE sy-ucomm.
    INITIALIZATION.
    START-OF-SELECTION.
      SELECT * FROM spfli WHERE carrid IN s_carrid.
      ENDSELECT.
    END-OF-SELECTION.
      WRITE:spfli-carrid.
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.
          WHEN'US1'.
    *      call screen 001 starting at 55 40.
      ENDCASE.
    Is i am going on the right way
    Regards,
    Lisa.
    Message was edited by: Lisa Roy
    Message was edited by: Lisa Roy
    Message was edited by: Lisa Roy

    This is what I meant. Copy this and try as it is and see if it serves your purpose.
    REPORT ztest1 .
    TABLES: spfli, sscrfields, sbook.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 4 LINES.
    SELECTION-SCREEN TAB (25) tabs1 USER-COMMAND ucomm1
                         DEFAULT SCREEN 001.
    SELECTION-SCREEN TAB (25) tabs2 USER-COMMAND ucomm2
                         DEFAULT SCREEN 002.
    SELECTION-SCREEN END OF BLOCK tabb1.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE abc.
    PARAMETERS: p_date LIKE sy-datum.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN .
    SELECT-OPTIONS: s_fldate FOR sbook-fldate.
    SELECTION-SCREEN END OF SCREEN 001.
    SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN .
    SELECT-OPTIONS:s_carrid FOR spfli-carrid.
    SELECTION-SCREEN END OF SCREEN 002.
    INITIALIZATION.
      tabs1 = 'Search by flight date'.
      tabs2 = 'Search by flight number'.
      abc   = 'Some other parameters'.
    AT SELECTION-SCREEN OUTPUT.
      CASE sscrfields-ucomm.
        WHEN 'UCOMM1'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 001.
          tabb1-activetab = 'TABS1'.
        WHEN 'UCOMM2'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 002.
          tabb1-activetab = 'TABS2'.
      ENDCASE.

  • I bought an iphone5 from saudi arabia,can i use it in india?is there any requirements i have to take?many one are saying i need to unlock it,please any one help me,i did'nt activate my phone yet.

    i bought an iphone5 from saudi arabia,can i use it in india?is there any requirements i have to take?many one are saying i need to unlock it,please any one help me,i did'nt activate my phone yet.

    If the phone is unlocked then you can use it in India.
    If your phone is locked, then the only way to get the phone unlocked is to contact your phone company/carrier. The person that sold you the phone in Saudi should have told you whether it was locked or unlocked.  Contact them to check and then contact the carrier to have it unlocked if it is locked.
    Other than that there is not a lot that you can do - perhaps it was unwise to purchase a phone in Saudi - it won't have Facetime on it if you got it there.

  • Hi help needed in Smart form using BAdi ( please any one help me )

    Hi,
        I am working in SRM.I am new to SRM and smartforms .My problem is I need to change the stndard smarform for BBP_BIDINV_BID into zprogram for The text for Published Bid Invitation email should read as:xxxxwith emp name and date,The text for email when Bid is rejected :XXXx,Accepted,Returned.I need to attch the text using BAdi's .So can any one help me how to find out the suitable BADi to this and please send me process to do the oject..
    thanks in advance.
       Regards
         Uday

    Hi,
    check this BADI :
    BBP_OUTPUT_CHANGE_SF
    Regards
    Appana

  • Please any one help

    Hi,
    I am trying to send a mail with attachment using jsp but I couldn't receive the attachment. My code is
    try{
    MimeMessage mm=new MimeMessage(session);
    mm.setFrom(new InternetAddress(from));
    mm.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to,false));
    mm.setRecipients(Message.RecipientType.CC,InternetAddress.parse(cc,false));
    mm.setRecipients(Message.RecipientType.BCC,InternetAddress.parse(bcc,false));
    mm.setSubject(subject);
    mm.setText(message);
    Transport.send(mm);
    // File attachment
    File attach=new File(attachment);
    System.out.println("This is the fileattached"+attachment);
    if (attach.exists()){
    MimeBodyPart mbp1=new MimeBodyPart();
    mbp1.setText(message);
    MimeBodyPart mbp2=new MimeBodyPart();
    FileDataSource fds=new FileDataSource(attachment);
    mbp2.setDataHandler(new DataHandler(fds));
    mbp2.setFileName(fds.getName());
    Multipart mpt=new MimeMultipart();
    mpt.addBodyPart(mbp1);
    mpt.addBodyPart(mbp2);
    mm.setContent(mpt);
    }else{
    mbp.setText(message);
    Transport.send(mm);
    System.out.println("Mail was successfully sent");
    Kindly any one help me to fix the bug
    Thanks for ur help
    Regards,
    Arunkumar

    You are creating a File object called attach but passing attachment to the FileDataSource.
    Take a look at the following:
                   if (!attachmentFile.equals(testString))
                        int stringLength = attachmentFile.length();
                        int nameStart = attachmentFile.lastIndexOf("/");
                        nameStart = nameStart + 1;
                        String fileName = attachmentFile.substring(nameStart,stringLength);
                        String newFile = (attachmentPath + "/" + fileName);
                        File fileData = new File(newFile);
                        MimeBodyPart mbp2 = new MimeBodyPart();
                        FileDataSource fds = new FileDataSource(fileData);
                        DataHandler dh = new DataHandler(fds);
                        mbp2.setFileName(fileName);
                        mbp2.setDescription("Attached File:" + fileName);
                        mbp2.setDisposition(Part.ATTACHMENT);
                        mbp2.setDataHandler(dh);
                        mp.addBodyPart(mbp2);
                   }

  • I can no longer see FaceBook notifications in my notification area on my desk top. Can any one help me with this?

    I can no longer see any Notifications from my FaceBook account in the notifications area on my Mac. I have it in the Notifications Area and it is still not providing me my notifications. Any suggestions?

    Hi Tammy56,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    Click on the link to see more details and screenshots. 
    iCloud: Troubleshooting iCloud Calendar
    http://support.apple.com/kb/TS3999?viewlocale=en_US
    Cheers,
    - Judy

  • HT204302 i get a message when I plug in my ipod to my laptop saying "cannot use this ipod because apple mobile device is not started" can any one help me with this...I have never had this happen before

    Hello anyone
    I get a message when i plug in my ipod touch saying "cannot use this ipod because apple mobile service is not started" can anyone please help me with this problem...I had this message once before but I forgot how to correct it

    From the More Like This section on the right:
    I get error message when I plug in iPhone 4s saying "This iPhone cannot be used because the Apple Mobile Device service is not started"
    can't get my ipod to connect to tunes error message "cannot be used because the apple mobile device service is not started"  fixes? Using Win XP
    im trying to connect my ipod to itunes and its saying it cannot connect because the "Apple Mobile Device is not started" help
    Or see: iPhone, iPad, iPod touch: How to restart the Apple Mobile Device Service (AMDS) on Windows

  • Please any one help n this issue

    ive done a code
    aaa = window.showModalDialog(str,window,"dialogheight:280px;dialogwidth:380px;dialogleft:500px;dialogtop:500px;status: No;");
    the window should not be dragged to some other position.it should b static at the same position.

    hey ive mentioned only the line i got doubt. ive used that line of coding in my jsp page.ok r u clear

  • I am unable to browse internet from my cisco 881 router and configuration is below could any one help me in this regard

    HOME#sho run
    Building configuration...
    Current configuration : 5657 bytes
    ! Last configuration change at 10:51:11 UTC Fri May 17 2013 by admin
    version 15.0
    no service pad
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    hostname HOME
    boot-start-marker
    boot-end-marker
    logging buffered 51200 warnings
    enable secret 5 $1$bgx9$VrtQW3Wg182VyYhKAHLbN.
    no aaa new-model
    memory-size iomem 10
    crypto pki trustpoint TP-self-signed-1190003239
    enrollment selfsigned
    subject-name cn=IOS-Self-Signed-Certificate-1190003239
    revocation-check none
    rsakeypair TP-self-signed-1190003239
    crypto pki certificate chain TP-self-signed-1190003239
    certificate self-signed 01
      3082024A 308201B3 A0030201 02020101 300D0609 2A864886 F70D0101 04050030
      31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274
      69666963 6174652D 31313930 30303332 3339301E 170D3133 30353137 31303333
      35315A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649
      4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D31 31393030
      30333233 3930819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281
      8100C002 80BBF151 E095E469 AA7DBB18 2A9E3CC2 4AC223F6 ABE0AF49 876C1203
      65D0E246 786F174D E5B7897A 44C5755A 2571E58A 184A6C62 DD992A2A D8A24878
      25A8D3C3 03F5D3C2 522EC8BB 302B0CCD 2945087A 7AF01418 D0056679 6F64DB4A
      BE2D5DA1 106CD03A 83B422A2 3CCBAE88 F2413123 12269390 6949DFE0 411118E7
      8F210203 010001A3 72307030 0F060355 1D130101 FF040530 030101FF 301D0603
      551D1104 16301482 12484F4D 452E7777 772E7961 686F6F2E 636F6D30 1F060355
      1D230418 30168014 3D2D854D 1203F50D 77F4ABC5 B61CEAF6 C922F4DF 301D0603
      551D0E04 1604143D 2D854D12 03F50D77 F4ABC5B6 1CEAF6C9 22F4DF30 0D06092A
      864886F7 0D010104 05000381 8100B24C 48BACACE 87ADEA03 386F2045 CC89624A
      4EB1AD09 062EB2A4 CF4C96CA 0B2CF001 BD2C3804 8DC47FED 6A5B5F0D 3965AC6E
      4FC4682F 707E4132 8F27C083 C7FAE1BD 21D055E6 C79D5DAD 051B6321 D35DB4F2
      044E6BBD DAD08B6A 6ED87C7E 08F4F7E1 4EFDFB6F 867AF6FA 84165CFC D219D56F
      A82EABD4 AD9CFA24 A5088145 E571
            quit
    ip source-route
    ip routing protocol purge interface
    ip dhcp excluded-address 10.10.10.1
    ip dhcp pool ccp-pool
       import all
       network 10.10.10.0 255.255.255.248
       default-router 10.10.10.1
       domain-name www.google.com
       dns-server 192.168.1.1
       lease 0 2
    ip cef
    ip domain name www.yahoo.com
    ip name-server 84.235.6.55
    ip name-server 84.235.57.230
    no ipv6 cef
    multilink bundle-name authenticated
    license udi pid CISCO881-SEC-K9 sn FCZ1516933C
    username admin privilege 15 password 0 cisco
    interface FastEthernet0
    interface FastEthernet1
    interface FastEthernet2
    interface FastEthernet3
    interface FastEthernet4
    ip address dhcp
    ip access-group 101 in
    ip nat outside
    ip virtual-reassembly
    duplex auto
    speed auto
    interface Vlan1
    description $ETH-SW-LAUNCH$$INTF-INFO-HWIC 4ESW$
    ip address 10.10.10.1 255.255.255.0
    no ip redirects
    no ip unreachables
    no ip proxy-arp
    ip nat inside
    ip nat enable
    ip virtual-reassembly
    ip tcp adjust-mss 1452
    interface Vlan2
    no ip address
    ip nat inside
    ip virtual-reassembly
    ip default-gateway 192.168.1.1
    ip forward-protocol nd
    ip http server
    ip http access-class 23
    ip http authentication local
    ip http secure-server
    ip http timeout-policy idle 60 life 86400 requests 10000
    ip nat inside source list 101 interface FastEthernet4 overload
    ip route 0.0.0.0 0.0.0.0 FastEthernet4
    access-list 23 permit 10.10.10.0 0.0.0.7
    access-list 101 permit ip any any
    dialer-list 1 protocol ip permit
    no cdp run
    control-plane
    banner exec ^C
    % Password expiration warning.
    Cisco Configuration Professional (Cisco CP) is installed on this device
    and it provides the default username "cisco" for  one-time use. If you have
    already used the username "cisco" to login to the router and your IOS image
    supports the "one-time" user option, then this username has already expired.
    You will not be able to login to the router with this username after you exit
    this session.
    It is strongly suggested that you create a new username with a privilege level
    of 15 using the following command.
    username <myuser> privilege 15 secret 0 <mypassword>
    Replace <myuser> and <mypassword> with the username and password you
    want to use.
    ^C
    banner login ^C
    Cisco Configuration Professional (Cisco CP) is installed on this device.
    This feature requires the one-time use of the username "cisco" with the
    password "cisco". These default credentials have a privilege level of 15.
    YOU MUST USE CISCO CP or the CISCO IOS CLI TO CHANGE THESE
    PUBLICLY-KNOWN CREDENTIALS
    Here are the Cisco IOS commands.
    username <myuser>  privilege 15 secret 0 <mypassword>
    no username cisco
    Replace <myuser> and <mypassword> with the username and password you want
    to use.
    IF YOU DO NOT CHANGE THE PUBLICLY-KNOWN CREDENTIALS, YOU WILL
    NOT BE ABLE TO LOG INTO THE DEVICE AGAIN AFTER YOU HAVE LOGGED OFF.
    For more information about Cisco CP please follow the instructions in the
    QUICK START GUIDE for your router or go to http://www.cisco.com/go/ciscocp
    ^C
    banner motd ^Cuthorized ^C
    line con 0
    login local
    no modem enable
    line aux 0
    line vty 0 4
    access-class 23 in
    privilege level 15
    password cisco
    logging synchronous
    login local
    transport input telnet ssh
    scheduler max-task-time 5000
    end

    HOME#ping 4.2.2.2
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 4.2.2.2, timeout is 2 seconds:
    Success rate is 0 percent (0/5)
    HOME#sh ip int br
    Interface                  IP-Address      OK? Method Status                Protocol
    FastEthernet0              unassigned      YES unset  down                  down
    FastEthernet1              unassigned      YES unset  down                  down
    FastEthernet2              unassigned      YES unset  down                  down
    FastEthernet3              unassigned      YES unset  down                  down
    FastEthernet4              192.168.1.120   YES DHCP   up                    up 
    NVI0                       10.10.10.1      YES unset  up                    up 
    Vlan1                      10.10.10.1      YES NVRAM  down                  down
    Vlan2                      unassigned      YES NVRAM  down                  down
    HOME#
    fast ethernet is connected to my internet connection

  • Pl any one Help me Whats this? NMS - EMS - OSS

    Hi,
    I am new to This forum, I have one Interview in Java Platform
    Anybody Please Help Me,
    What is NMS? EMS? OSS?_
    And What is Difference Between these?
    If Possible Pl give me some Examples...
    Advance Thanks for You All

    findmeravi wrote:
    Hi,
    I am new to This forum, I have one Interview in Java PlatformYou failed.

  • Can any one help me with this chat server

    The code below is of a client and server but the problem is that the msg can be sent only from the server and not the client I want that whenever a msg is sent from the server the control for writing the msg should go on to the client n den vise versa n should continue till the connection is terminated..plz help me....!
    CoDES
    for client
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    class client {
    public static void main(String[] args) throws IOException {
    Socket s =null;
    BufferedReader b=null;
    try{
    s=new Socket( InetAddress.getLocalHost(),98);
    b=new BufferedReader(new InputStreamReader(s.getInputStream()));
    catch(UnknownHostException u) {
    System.err.println("i dont know host");
    System.exit(0);
    String inp;
    while((inp=b.readLine())!=null){
    System.out.println(inp);
    b.close();
    s.close();
    FOR SERVER$
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.ServerSocket;
    import java.net.Socket;
    import java.nio.channels.ServerSocketChannel;
    public class server {
    public static void main(String[] args) throws IOException {
    ServerSocket s1=null;
    try{
    s1=new ServerSocket(98);
    }catch(IOException u1)
    System.err.println("could not find port 98");
    System.exit(1);
    Socket c=null;
    try{
    c=s1.accept();
    System.out.println("connection from"+c);
    catch(IOException e)
    System.out.println("accept failed");
    System.exit(1);
    PrintWriter out=new PrintWriter(c.getOutputStream(),true);
    BufferedReader in=new BufferedReader(new InputStreamReader(c.getInputStream()));
    String I;
    BufferedReader sin=new BufferedReader(new InputStreamReader(System.in));
    System.out.println("i am ready to type now");
    while((I=sin.readLine())!=null) {
    out.println(I);
    out.close();
    sin.close();
    c.close();
    s1.close();
    }

    What you need is to have two loops running at the same time. One for receiving messages and other for waiting user input. This can be done by using separate threads.
    For example after client has made connection to server, start a new thread that runs loop for receiving messages from the socket and printing them to System.out. Then in the default thread start loop for reading users input. The server could have similar structure.
    So, what I think you are looking for are threads.

  • Can any one help me read this panic report

    Ok first let me tell you the story how i got this mac. The ex owner decided to put it on his driveway for some reason and totally forgot he put it there when he came out of his driveway with his pick up truck and boom this mac actually looks like it was ran over lol so he gave it to a friend of mine(as a gift don't know why) he couldn't fix it so then my friend gave it to me i got it up and running everything kinda works even tho the logic board and the casing are bended so this is how how got to the mac world I've played games with it watched movies and use several programs. now my problem is that i use to have mac os lion and now i upgraded to yosemite now every time try to start the mac i get this panic result and the mac keeps restarting i did have the same problem when i had lion but at least after the third or fourth time the mac will boot up I'm trying to fix it peace by peace since i can't afford a brand new one wich pretty much ill end up paying the same price as a new one wich i don't mind since its not gonna be in one shot ok here my report ps I'm in safemode and i just wanna say i fell in love with mac ever since i got this macbook pro
    Anonymous UUID:       9C833C45-DC0A-CF26-7029-AD4C373CFD8A
    Fri Feb  6 01:33:17 2015
    *** Panic Report ***
    panic(cpu 1 caller 0xffffff801541e80a): Kernel trap at 0xffffff7f96e9b483, type 14=page fault, registers:
    CR0: 0x000000008001003b, CR2: 0x0000000000000010, CR3: 0x000000007c64a000, CR4: 0x0000000000002660
    RAX: 0x674c25fc9cce0001, RBX: 0xffffff8045b2d000, RCX: 0xffffff80699c5000, RDX: 0xffffff806ee0b908
    RSP: 0xffffff806ee0bac0, RBP: 0xffffff806ee0bac0, RSI: 0x0000000000000000, RDI: 0x0000000000000000
    R8:  0x000000000000002b, R9:  0xffffff801dd4804f, R10: 0x0000000000000010, R11: 0x000000000000002b
    R12: 0x0000000000000000, R13: 0xffffff801de27800, R14: 0xffffff8045b2d000, R15: 0xffffff8045b2d000
    RFL: 0x0000000000010293, RIP: 0xffffff7f96e9b483, CS:  0x0000000000000008, SS:  0x0000000000000010
    Fault CR2: 0x0000000000000010, Error code: 0x0000000000000000, Fault CPU: 0x1
    Backtrace (CPU 1), Frame : Return Address
    0xffffff806ee0b770 : 0xffffff801533a811
    0xffffff806ee0b7f0 : 0xffffff801541e80a
    0xffffff806ee0b9b0 : 0xffffff801543a443
    0xffffff806ee0b9d0 : 0xffffff7f96e9b483
    0xffffff806ee0bac0 : 0xffffff7f96e8492a
    0xffffff806ee0bb10 : 0xffffff7f96e84878
    0xffffff806ee0bb30 : 0xffffff7f96e60116
    0xffffff806ee0bb70 : 0xffffff7f95e396df
    0xffffff806ee0bbc0 : 0xffffff7f95e395f2
    0xffffff806ee0bbe0 : 0xffffff7f95e3d90a
    0xffffff806ee0bc70 : 0xffffff7f95e358ac
    0xffffff806ee0bcb0 : 0xffffff7f95e85fe8
    0xffffff806ee0bd00 : 0xffffff80158b85b1
    0xffffff806ee0bd50 : 0xffffff80158ff0b5
    0xffffff806ee0bdc0 : 0xffffff80153ea95e
    0xffffff806ee0be10 : 0xffffff801533e91c
    0xffffff806ee0be40 : 0xffffff80153235a3
    0xffffff806ee0be90 : 0xffffff8015333e8d
    0xffffff806ee0bf10 : 0xffffff801540a142
    0xffffff806ee0bfb0 : 0xffffff801543ac66
          Kernel Extensions in backtrace:
             com.apple.iokit.IOGraphicsFamily(2.4.1)[6D99A3BE-D531-3780-880B-13F2FC894A4A]@0 xffffff7f95e2b000->0xffffff7f95e65fff
                dependency: com.apple.iokit.IOPCIFamily(2.9)[87711C74-47D5-3545-8A62-035E1C7C4198]@0xffffff 7f95b24000
             com.apple.nvidia.classic.NVDAResmanTesla(10.0)[796AE430-39FB-3255-8161-D52AFA28 EE2B]@0xffffff7f95e82000->0xffffff7f960ebfff
                dependency: com.apple.iokit.IOPCIFamily(2.9)[87711C74-47D5-3545-8A62-035E1C7C4198]@0xffffff 7f95b24000
                dependency: com.apple.iokit.IONDRVSupport(2.4.1)[F4738C55-B507-3627-A9CA-3D29A5230A03]@0xff ffff7f95e72000
                dependency: com.apple.iokit.IOGraphicsFamily(2.4.1)[6D99A3BE-D531-3780-880B-13F2FC894A4A]@0 xffffff7f95e2b000
             com.apple.GeForceTesla(10.0)[97A18479-CC43-3073-AEB2-C5C92195067A]@0xffffff7f96 e5c000->0xffffff7f96f29fff
                dependency: com.apple.iokit.IOPCIFamily(2.9)[87711C74-47D5-3545-8A62-035E1C7C4198]@0xffffff 7f95b24000
                dependency: com.apple.iokit.IONDRVSupport(2.4.1)[F4738C55-B507-3627-A9CA-3D29A5230A03]@0xff ffff7f95e72000
                dependency: com.apple.iokit.IOGraphicsFamily(2.4.1)[6D99A3BE-D531-3780-880B-13F2FC894A4A]@0 xffffff7f95e2b000
                dependency: com.apple.nvidia.classic.NVDAResmanTesla(10.0.0)[796AE430-39FB-3255-8161-D52AFA 28EE2B]@0xffffff7f95e82000
    BSD process name corresponding to current thread: WindowServer
    Mac OS version:
    14A379b
    Kernel version:
    Darwin Kernel Version 14.0.0: Sat Sep 27 03:58:47 PDT 2014; root:xnu-2782.1.97~11/RELEASE_X86_64
    Kernel UUID: D1F807E1-A660-3126-96DF-6A9E65444DA3
    Kernel slide:     0x0000000015000000
    Kernel text base: 0xffffff8015200000
    __HIB  text base: 0xffffff8015100000
    System model name: MacBookPro5,2 (Mac-F2268EC8)
    System uptime in nanoseconds: 77869146695
    last loaded kext at 77595893148: com.apple.driver.AppleHWSensor 1.9.5d0 (addr 0xffffff7f974c1000, size 36864)
    loaded kexts:
    com.apple.driver.AppleHWSensor 1.9.5d0
    com.apple.driver.AppleHDAHardwareConfigDriver 266.5
    com.apple.driver.AppleTyMCEDriver 1.0.2d2
    com.apple.driver.AGPM 100.14.32
    com.apple.driver.AppleMikeyHIDDriver 124
    com.apple.driver.AppleHDA 266.5
    com.apple.filesystems.autofs 3.0
    com.apple.iokit.IOBluetoothSerialManager 4.3.0f9
    com.apple.driver.AppleOSXWatchdog 1
    com.apple.driver.AppleMikeyDriver 266.5
    com.apple.iokit.IOUserEthernet 1.0.1
    com.apple.Dont_Steal_Mac_OS_X 7.0.0
    com.apple.driver.AppleHWAccess 1
    com.apple.driver.AppleHV 1
    com.apple.driver.ACPI_SMC_PlatformPlugin 1.0.0
    com.apple.driver.AppleLPC 1.7.3
    com.apple.GeForceTesla 10.0.0
    com.apple.driver.AppleSMCLMU 2.0.4d1
    com.apple.driver.AppleUpstreamUserClient 3.6.1
    com.apple.nvidia.NVDAStartup 10.0.0
    com.apple.iokit.IOBluetoothUSBDFU 4.3.0f9
    com.apple.driver.AppleMuxControl 3.7.19
    com.apple.driver.AppleBacklight 170.4.12
    com.apple.driver.AppleMCCSControl 1.2.10
    com.apple.driver.SMCMotionSensor 3.0.4d1
    com.apple.driver.AppleUSBTCButtons 240.2
    com.apple.driver.AppleUSBTCKeyEventDriver 240.2
    com.apple.driver.AppleUSBTCKeyboard 240.2
    com.apple.driver.AppleIRController 327.5
    com.apple.driver.AppleFileSystemDriver 3.0.1
    com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0d1
    com.apple.BootCache 35
    com.apple.iokit.SCSITaskUserClient 3.7.0
    com.apple.driver.XsanFilter 404
    com.apple.iokit.IOAHCIBlockStorage 2.6.5
    com.apple.driver.AppleFWOHCI 5.5.2
    com.apple.driver.AppleUSBHub 705.4.1
    com.apple.driver.AppleAHCIPort 3.0.7
    com.apple.nvenet 2.0.22
    com.apple.driver.AppleUSBEHCI 705.4.14
    com.apple.driver.AppleUSBOHCI 656.4.1
    com.apple.driver.AirPort.Brcm4331 800.20.24
    com.apple.driver.AppleSmartBatteryManager 161.0.0
    com.apple.driver.AppleHPET 1.8
    com.apple.driver.AppleRTC 2.0
    com.apple.driver.AppleACPIButtons 3.1
    com.apple.driver.AppleSMBIOS 2.1
    com.apple.driver.AppleACPIEC 3.1
    com.apple.driver.AppleAPIC 1.7
    com.apple.driver.AppleIntelCPUPowerManagementClient 218.0.0
    com.apple.nke.applicationfirewall 161
    com.apple.security.quarantine 3
    com.apple.security.TMSafetyNet 8
    com.apple.driver.AppleIntelCPUPowerManagement 218.0.0
    com.apple.AppleGraphicsDeviceControl 3.7.19
    com.apple.driver.DspFuncLib 266.5
    com.apple.kext.OSvKernDSPLib 1.15
    com.apple.iokit.IOAudioFamily 200.6
    com.apple.vecLib.kext 1.2.0
    com.apple.kext.triggers 1.0
    com.apple.iokit.IOSerialFamily 11
    com.apple.driver.AppleSMBusPCI 1.0.12d1
    com.apple.iokit.IOSurface 97
    com.apple.iokit.IOBluetoothFamily 4.3.0f9
    com.apple.driver.AppleHDAController 266.5
    com.apple.iokit.IOHDAFamily 266.5
    com.apple.driver.IOPlatformPluginLegacy 1.0.0
    com.apple.driver.IOPlatformPluginFamily 5.8.0d49
    com.apple.nvidia.classic.NVDANV50HalTesla 10.0.0
    com.apple.nvidia.classic.NVDAResmanTesla 10.0.0
    com.apple.iokit.IOUSBUserClient 705.4.0
    com.apple.iokit.IOFireWireIP 2.2.6
    com.apple.driver.AppleGraphicsControl 3.7.19
    com.apple.driver.AppleBacklightExpert 1.1.0
    com.apple.iokit.IONDRVSupport 2.4.1
    com.apple.driver.AppleSMBusController 1.0.13d1
    com.apple.iokit.IOGraphicsFamily 2.4.1
    com.apple.driver.AppleSMC 3.1.9
    com.apple.iokit.IOSCSIBlockCommandsDevice 3.7.0
    com.apple.iokit.IOUSBMassStorageClass 3.7.0
    com.apple.driver.AppleUSBMultitouch 245.2
    com.apple.iokit.IOUSBHIDDriver 705.4.0
    com.apple.iokit.IOSCSIMultimediaCommandsDevice 3.7.0
    com.apple.iokit.IOBDStorageFamily 1.7
    com.apple.iokit.IODVDStorageFamily 1.7.1
    com.apple.iokit.IOCDStorageFamily 1.7.1
    com.apple.iokit.IOAHCISerialATAPI 2.6.1
    com.apple.iokit.IOSCSIArchitectureModelFamily 3.7.0
    com.apple.driver.AppleUSBMergeNub 705.4.0
    com.apple.driver.AppleUSBComposite 705.4.9
    com.apple.iokit.IOFireWireFamily 4.5.6
    com.apple.iokit.IOAHCIFamily 2.7.0
    com.apple.driver.NVSMU 2.2.9
    com.apple.iokit.IOUSBFamily 705.4.14
    com.apple.iokit.IO80211Family 700.52
    com.apple.iokit.IONetworkingFamily 3.2
    com.apple.driver.AppleEFINVRAM 2.0
    com.apple.driver.AppleEFIRuntime 2.0
    com.apple.iokit.IOHIDFamily 2.0.0
    com.apple.iokit.IOSMBusFamily 1.1
    com.apple.security.sandbox 300.0
    com.apple.kext.AppleMatch 1.0.0d1
    com.apple.driver.AppleKeyStore 2
    com.apple.driver.AppleMobileFileIntegrity 1.0.5
    com.apple.driver.AppleCredentialManager 1.0
    com.apple.driver.DiskImages 389.1
    com.apple.iokit.IOStorageFamily 2.0
    com.apple.iokit.IOReportFamily 31
    com.apple.driver.AppleFDEKeyStore 28.30
    com.apple.driver.AppleACPIPlatform 3.1
    com.apple.iokit.IOPCIFamily 2.9
    com.apple.iokit.IOACPIFamily 1.4
    com.apple.kec.corecrypto 1.0
    com.apple.kec.Libm 1
    com.apple.kec.pthread 1
    Unable to gather system configuration information.Model: MacBookPro5,2, BootROM MBP52.008E.B05, 2 processors, Intel Core 2 Duo, 2.8 GHz, 2 GB, SMC 1.42f4
    Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB
    Graphics: NVIDIA GeForce 9600M GT, NVIDIA GeForce 9600M GT, PCIe, 512 MB
    Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142353637334548312D4346382020
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.106.98.100.24)
    Bluetooth: Version 4.3.0f9 14854, 3 services, 27 devices, 0 incoming serial ports
    Network Service: Wi-Fi, AirPort, en1
    Serial ATA Device: WDC WD1600BEVS-00UST0, 160.04 GB
    Serial ATA Device: HL-DT-ST DVDRW  GS21N, 3.92 GB
    USB Device: Built-in iSight
    USB Device: USB 2.0  SATA BRIDGE
    USB Device: BRCM2046 Hub
    USB Device: Bluetooth USB Host Controller
    USB Device: Apple Internal Keyboard / Trackpad
    USB Device: IR Receiver
    Thunderbolt Bus:

    GPU problem or memory problem.
    OS X- About kernel panics
    Visit The XLab FAQs and read the FAQ on diagnosing kernel panics.

Maybe you are looking for