Sales Opportunity Contact Person showing numeric in query & want full name

Hi,
I have two sql queries as under :
SELECT T0.OpprId,T0.OpenDate,  T0.Name, T0.Territory, T1.descript, T0.CardCode, T0.CardName,   T0.U_eqno, T2.Name FROM [dbo].[OOPR]  T0 INNER JOIN [dbo].[OTER]  T1 ON T0.Territory = T1.territryID INNER JOIN OCPR T2 ON T0.CprCode = T2.CntctCode
In the above query the problem is that I want that the Contact Person name which is selected in the sales opportunity to come. But by which query it is only showing those opportunities in which Contact person is there and NOT showing the ones in which Contact person is not there.
and the second query
SELECT T0.OpprId,T0.OpenDate,  T0.Name, T0.Territory, T1.descript, T0.CardCode, T0.CardName, T0.CprCode,   T0.U_eqno FROM [dbo].[OOPR]  T0 INNER JOIN [dbo].[OTER]  T1 ON T0.Territory = T1.territryID
Its showing the Contact person code but I want the name of the contcat person as avaliable in the sales opprtunity.
I want result in which the above details come along with the Contact person name. Where I am getting wrong in the query....Please help.
Regards,
Kamlesh Gupta

For Your Second Query, use the following Code that Displays both
Contact person code and Name
SELECT T0.OpprId,T0.OpenDate, T0.Name, T0.Territory, T1.descript, T0.CardCode, T0.CardName,T0.CprCode, (Select T1.Name from OCPR t1 where t1.cntctCODE=T0.CprCode),T0.U_eqno  FROM dbo.OOPR T0
INNER JOIN dbo.OTER T1 ON T0.Territory = T1.territryID

Similar Messages

  • HT4623 My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message. 

    My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message.  How an I get rid of that

    Try this...
    have a text convo with the person you want to delete. Go to the top contact in the text convo, hit edit contact, and delete that contact.
    That resolution came from another thread on this issue, and this did solve to poster's issue.

  • My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message.  How an

    My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message. How an I get rid of that

    Try this...
    have a text convo with the person you want to delete. Go to the top contact in the text convo, hit edit contact, and delete that contact.
    That resolution came from another thread on this issue, and this did solve to poster's issue.

  • My deleted contacts still show up when I want to send a text message

    My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message.  How an I get rid of that

    This is a big problem!!!!!! Deleting is deleting!
    I'm surprised more people aren't annoyed by this bizarre Apple tech problem.
    I love my Apple iPhone, but...
    This problem is enough for me not to buy another iPhone :(
    This should be simple to solve, Apple...right???????????????????
    Dear Apple, PLEASE FIX this BUG in NEXT UPDATE asap !!!!!!!!!!!!!!!!
    Most appreciated.

  • On ipad 4 how can I get the contacts to show up in alphabetical using first name first

    How is it possible to set up the contacts on my ipad 4 to display in alphabetical order using first name first????

    Finally figured it out...under settings> Mail, contacts, calendars> Contacts, sort order> Then choose first, last or last, first then do the same for display order

  • My wife and I have iPhones 4s,s. We also have an iPad. We share hue same email address. When I send an email from my phone or the iPad it looks as if it comes from my wife instead of me(her name comes up as the person who sent it) I want my name on the ma

    My wife and I have a iPhone 4S each and an I pad. When I send a email from my phone and from my iPad her name comes up as the sender. We only have one contact email address and that is the way we warn to keep it.
    Please can someone tell me how  I can change this so when I send a mail from my phone and from the IPad that it reads from me.
    Thanks

    Rectory wrote:
    Please can someone tell me how  I can change this so when I send a mail from my phone and from the IPad that it reads from me.
    You need a separate email address but you've already ruled out that solution.

  • TS3672 Messages don't show the contact person name. Instead the number appears. How to get over the problem

    All of a sudden, messages that I send and recieve from contact persons show the number instead of the name/ It happens to some of the contacts and when I open the list of messages to the person, the name show correctly above the list of the messages.
    How do I overcome this?
    Dov

    Nah, it happens to all of us, at one time or another.
    Glad to help!

  • How to extract,list of users linked as contact person to which customer?

    Hi
    Is it possible to extract from CRM production system a complete list showing which users are
    linked as contact persons to which customers?
    As you can imagine it is top critical that customer users are never linked to any other customer accounts than their own, so we need to implement a regular validation of these relationships. With our  number of customers and users it is impossible to check one-by-one in CRM, but with following information in a regularly provided list, it would be reasonably easy:
    Customer BP
    Customer name
    Customer Sales Office
    Contact person BP
    Contact person name
    Contact person user ID
    Date of relationship creation
    Please advice.
    Regards
    Pravin Babu

    Hi Pravin,
    The information you need is available in three tables/visions:
    - BUT000 - For BP numbers and names
    - BUT050 - For BP relationships (BUR001 is the one for contact person)
    - CRMV_BP_FRG0140 - For sales office (you have to use partner_guid field)
    I don't know any standard report that will delivery this information as this. But based on this tables, you can build your own, or make a sap query/quickviewer to get this information.
    Hope that helps!
    Kind regards,

  • How to fetch the contact person of the Vednor in SRM

    Hi All,
       I need to display the Contact Person of the vendor which is maintained in XK03(contact person(view)).
         ->How to fetch that name in the SRM ?
        ->Is any FM exists ?
    Thanks and Regards
    Channappa

    Hello Channappa,
    Contact person is only significant for Bid Invitations.
    For Bid Invitations, you don't have a Vendor but a Bidder with one or several Contacts Persons.
    So, when you are in BBP_BID_INV transaction, when you look for bidders to link to your bid invitation, you will find their contacts: this is standard process.
    In SAP GUI transaction BP, you will see bidder contacts if customizing done to use BBP_VENDOR_SYNC report to replicate vendors is correctly maintained.
    Regards.
    Laurent.

  • No address data found in contact person

    Hi all
    I am getting an error while creating a transaction No address data  in the contact person.
    I am able to see the bp id of the contact person.
    I have maintained the first name and last name  and other details including the standard address in that bp.
    Kindly let me know from where the system picks the address and where do i maintain that.
    Thanks in advance
    Kumar Hari

    Hello,
    This is a common mistake when processing Contact Persons. In fact, the address data you see in the WebUI for your contact person is the address of the Company - Contact Person relationship and not the contact data of the contact person itself. The error message is probably referring to the address data of the person itself.
    Eg I work for my company, my address data as a contact person for my company will the the company's address, fax, e-mail, ... Beside that I also have my personal address, where I actually live with a private e-mail and so on.
    My company -_-_-_ has the contact person  -
    > Me
    Address data         (=address data eq to comp)       My personal address
    Hope this helps,
    Joost

  • Query For BP Contact Person

    Hello -
    I would like to make a query that pulls a specific BP Contact Person and e-mail for that contact.  We have assigned a contact called A/P for most of the BP's in our database.  The A/P contact is the one that we use to e-mail invoices. 
    Could someone help us to come up with a query that will pull the following: CardCode, CardName, Phone1, Contact A/P, Contact A/P E-mail?  If there is no contact named A/P in the BP Contact Persons tab then this could be left blank in the query. 
    Anyone know how to do this?
    Thanks,
    Mike

    Hey Guys -
    Thanks for the help!  Krishnan's query is more in line with what I am looking for.  It looks like it pulls just the BP Customers that have A/P listed as a contact in the Contacts Person tab and includes the A/P contact's e-mail. 
    However, I would like it to pull all the BP Customers so we have a complete list.  However, if there is no A/P listed in the Contact Person then just leave it blank.  
    Also, would like to pull data from one other column of into -- UDF we use for internal order notes.  The system information shows that this UDF is labeled as OCRD, U_ORDN. 
    Thanks!!
    Mike

  • Contact person of partner function sales orders

    Hi,
    i need to save in all the sales orders the contact person. But i need to know who is the contact for the AG partner and the contact for RE ,....
    How can i do? How i know the contact person is from who partner function.
    Thanks

    Dear Friend,
    Option 1:
    From KNVK you can get Customer-wise Contact Partner Details.
    From KNVP you can get Partner Function-wise (AG, RE, etc) details of Customer codes.
    Now take these data into Excel & run a Vlookup. You will have a ready list of Partner Function-wise Contact Persons.
    Option 2:
    You can gererate a Query in SQ00 & Link KNVK & KNVP Tables.
    Hope this helps...
    Thanks,
    Jignesh Mehta

  • Sales Opportunity Stage Tab - Want last updated row details in query

    Dear Experts,
    I have a query as under :
    SELECT T1.Name, T1.OpprId, T1.OpenDate, T0.Step_Id, T0.Line, T0.OpprId, T0.U_status, T2.Name FROM OPR1 T0  INNER JOIN OOPR T1 ON T0.OpprId = T1.OpprId INNER JOIN [dbo].[@STAGE]  T2 ON T0.U_status = T2.Code WHERE T1.Name = 'ORDER'
    Now I want that this query should give me the last row detail in the Stage TAb of Sales opportunity. Now this query is giving me every row stage details which are put in the Stage Tab. For example in the Stage Tab of Sales Opportunity there are 4 rows of Stages, its giving me all the 4 row stages in the query. I want that only the last stage should be displayed in the query may be it's on 2 second stage or 3 rd ot 4 th. I want only last stage to be shown.
    Please advise what I need to do for the above query.
    Regards,
    Kamlesh

    Hi All,
    I have been working in a query to generate the last stage details in the query but still not able to resolve it.
    SELECT T0.Status,T0.OpprId, max(T1.Line) 'Stage',T0.OpenDate, T0.CardCode, T0.CardName, T0.Territory, T0.CloPrcnt,T1.OpprId, T1.Line, T1.OpenDate, max(T1.OpenDate) 'Open Date',T1.CloseDate, T1.Step_Id,T2.descript, T3.Name, T0.MaxSumLoc, T4.U_swl, T0.MaxSumSys, T0.U_eqno, T0.MaxSumLoc, T4.U_partno, T4.U_desc, T4.U_unit, T4.U_amt, T4.U_qty, T4.U_amt, T4.U_span FROM OOPR T0  INNER JOIN OPR1 T1 ON T0.OpprId = T1.OpprId INNER JOIN OTER T2 ON T0.Territory = T2.territryID INNER JOIN [dbo].[@STAGE]  T3 ON T1.U_status = T3.Code, [dbo].[@SALES_ENQ_ITEM]  T4 WHERE T0.OpprId = T4.U_opprNo AND T0.Status = 'O' group by T0.Status,T0.OpprId, T0.OpenDate, T0.CardCode, T0.CardName, T0.Territory, T0.CloPrcnt,T1.OpprId, T1.Line, T1.OpenDate, T1.CloseDate, T1.Step_Id,T2.descript, T3.Name, T0.MaxSumLoc, T4.U_swl, T0.MaxSumSys, T0.U_eqno, T0.MaxSumLoc, T4.U_partno, T4.U_desc, T4.U_unit, T4.U_amt, T4.U_qty, T4.U_amt, T4.U_span
    The above query is generating and giving me the Last Stage through max(T1.Line) 'Stage' field. But I want to have if any opportunity Number has 1,2,3 Stage then only Max should should which is 3 but in this query all 3 are showing.
    As per Noratam ''There are other options by checking max of the start-date and stage-key fields of the sage table''.
    I can use the Start Date which seems to be max(T1.OpenDate) 'Open Date' but how to give a formula or write a query by which only Max Date is selected as per the stage in the query.
    I think I am not able to use the Max funtion properly. Please help what is wrong with it.
    Can you please help in this regard.
    Regards,
    kamlesh
    Edited by: Kamlesh Gupta on Mar 22, 2009 11:33 PM

  • Help Required for Open Sales opportunity query

    Hi Experts
    I need to create a query on Open Sales Opportunity where quotation has not been submitted. also all opportunities with respective sales quotation
    How can i link Opr1 ( Stage), OOPR, oqut table.
    Regards
    Raman

    Thanks Gordon ,
    But this query is for all sales opportunity linked with Sale quotation. also it showing only last quotation .
    In case in 1 sales opportunity i have 3 quotation how can it will manage toh show all quotations linked with one opportunity.
    Regards
    Raman

  • FM to read Sales Rep and contact person name

    Is there a function module that gets the corresponding name for the following:
    1. Sales Rep, obtained from VBPA-PERNR with PARVW = 'PE'.
    2. Sales Contact person, obtained from VBPA-PARNR with PARVW = 'CP'.
    If no function module exists, at least where to get the required text?
    Thanks in advance.

    Hi
    Get the Name of the Contact person and the sales rep from the KNA1 or ADRC tables
    first get the Partner Number from the VBPA table with the respective Partner function and fetch name from KNA1
    or try/use the fun modules
    <b>EBPP_GET_PARTNER_TEXT
    ISU_GET_PARTNER_ADDRESS</b>
    Reward points for useful Answers
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

Maybe you are looking for

  • 90% cpu load on ubuntu 8.04

    Hello all, I made a visualization for sorting algorithms. (The code is to long to post it here) I developed the app under this system: Windows Vista Home x64 Dualcore ~2.6GHz Java Version: 1.6.0 Update 7 32bit and i have a cpu load of ~10% when i run

  • Getting the rawValue of a Drop-Down list on the "change" event

    I am having problems getting the rawValue of a Drop-Down list on the "change" event. It seems that you have to select the same item twice in a row to get the rawValue to be the value of the selected item. ::dropdownlist onChange event:: xfa.host.mess

  • How do I know what the current printer firmware is?

    I have an HP Lazerjet 2055dn.  Its firmware version is V.37.12.IR6498. My question is, how can I tell if this is the current version?  Is there some sort of resource on the HP support pages that says what the current version is? Thanks, Raymond Vough

  • My iPhone 5 lock button doesn't work half the time. What can I do about this?

    For the past month or so my lock button hasn't been working. It takes three or more tries to get it to work and sometimes I just can't even use it. Pressing harder doesn't work. Is there anything anyone can help me out on with this? It's getting anno

  • Canon EOS 7d RAW

    I am having trouble getting RAW files from my EOS 7d using either the 7d utils or iphoto. Any ideas?