Query to get Contact person in UDF

Dear experts,
I am trying to create Query to get Contact person in UDF
SELECT T0.[CntctPrsn] FROM OCRD T0 WHERE T0.[CardCode] =$[OQUT.CardCode]
changes may be made to contact person.
how can i link OQUT to OCRP with Contact person?
Or any other way to get Contact person in UDF?
Pls advise
Thanks in advance
jo

HI
Use this query:
select t1.name from OCPR t1 on t0.CntctCode = t1.CntctCode where t1.CardCode = $[OQUT.CardCode]
Edited by: kambadasan on Feb 20, 2012 3:22 PM

Similar Messages

  • 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

  • FM for Vendor vs contact person

    Please suggest FM for getting contact person numbers for vendors in SRM.

    Hello,
    have a look at this thread:
    FM ot Table for User deatols based on user id
    Regards.
    Laurent.

  • Activate Contact Person Functionallity in Vendor master

    Hi Colleagues,
    We have an issue with Contact Person functionality in Vendor master, specifically with his activation in order to use that funtion menu (Goto -> General Data -> Contact Person). Actually this command is missing in our  system.
    Customizing nodes about contact person (IMG -> Materials Management -> Purchasing -> Vendor Master -> Contact Persons) specify as mandatory requisite set the system as a Retail SAP System.
    We analized the information and executed report GETSYSDEF and the system showed message SYSTEMSWITCH016 "System is set as a manufacturing system"
    Our SAP system is a mySAP ERP 5.0 with component SAP_APPL level 0021.
    We have several doubts related above explanations:
    Is the system able to be customized as a Retail system without loose or damage some actual component (his functionality) as manufacturing system?
    Which is the procedure to follow in order to activate Retail SAP System?
    Is enough to make settings on IMG node "Activation Switch for SAP R/3 Enterprise Extension Set" flagging on application "EA-RET" or in other hand, there are other additional or different steps to make?
    I appreciate any help you can offer me. Thanks in advance.
    Regards,
    Horacio Miranda

    Dear Jurgen,
    First thanks for your response.
    We don´t want to change manufacturing system for retail system, We try to find the way to add retail system to our actual manufacturing system only for get contact person functionality.
    We need to use that functionality on vendors at tx XK01 or tx XK02 / MK02, in order to link all vendor contacts making a validation of each one against a table Z containing prohibited values. If a contact person would exist in that table the system would show an error message.
    I hope to be clearly in my explanation. Thanks again for your help.
    Regards,
    Horacio Miranda

  • Collection contact persons relationship in FSCM

    Hi All,
    Request your help in creation of Collection contact persons relationship in FSCM and find them in process receivables screen.
    We are not mantaining customer contacts in customer master. But only in FSCM
    What is the use of collection contact person if they donot show up in process receivables screen?..Please help. i want collection contact person to show up in "Get contact Person" list  in process receivables.
    Thanks - Donny

    Donnesh,
    If you dont record the contact person in the customer/ BP then it needs to be stored somewhere for it to be defaulted.
    The only way to do this is to add the name once in the process receivables screen and it will then stay there and also be copied through in to the create customer contact screen.
    You could look for a BAPI to load the name and number into the process receivables screen, but this would mean processing the customer via the worklist.

  • Collection Contact person

    Hi All,
    Request your help in creation of Collection contact persons relationship in FSCM and find them in process receivables screen.
    We are not mantaining contact persons in customer master. But only in FSCM business partner relationship.
    i want collection contact person to show up in "Get contact Person" list in process receivables.
    What is the use of collection contact person if they donot show up in process receivables screen?..Please help
    Thanks - Donny

    please note this is a duplicate - therefore this thread is locked.

  • Diff contact persons

    dear all,
    can u please tell me where we maintain diff cantact persons for one vendor we can maintain diff cantacts but where we maintain name of the persons
    please clear me,
    regards,
    snb

    Hi
    You can maintain contact persons name in MK02,XK02 transaction. In the initial screen you can get contact person check box. Select that one and give enter. In that screen you can maintain persons name
    Shobana

  • 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

  • How to get the Contact person name of Account site level contact person

    Hi All,
    I have contact person defined at account level and other at account site level.
    I am trying to print the site leve contact name in my AR Invoice report.
    What i used is bill_to_site_use_id a input in the below query
    select hp2.party_name
    from
    HZ_CUST_SITE_USES_ALL hcs,
    HZ_CUST_ACCT_SITES_ALL has,
    hz_party_sites hps,
    hz_parties hp,hz_parties hp2,
    hz_relationships hr
    --HZ_ORG_CONTACTS HO
    where hcs.CUST_ACCT_SITE_ID=has.CUST_ACCT_SITE_ID
    and hps.PARTY_SITE_ID=has.PARTY_SITE_ID
    and hp.party_id=hps.PARTY_ID
    and hr.subject_id=hp.party_id
    and hr.RELATIONSHIP_TYPE = 'CONTACT'
    and hp2.party_id=hr.OBJECT_ID
    and hr.OBJECT_TYPE ='PERSON'
    --and ho.PARTY_RELATIONSHIP_ID=hr.relationship_id
    and hcs.SITE_use_ID=3398 -- from (ra_customer_trx_all)
    But I get two records. So how can I differentitate the account contact and site contact.
    Am I missing any table or join. Or is the input provieded is not fine.
    Please help
    Thanks

    Hi -
    Please use the below code to get the Contacts at the Account level.
    where Sold to Org id is the Customer Account Id.
    SELECT hp2.person_last_name||', '||hp2.person_first_name
    FROM apps.hz_parties hp,
    apps.hz_parties hp2,
    apps.hz_relationships hr,
    apps.hz_cust_accounts hca
    WHERE 1 = 1
    AND hca.party_id = hp.party_id
    AND hca.cust_account_id = :sold_to_org_id
    AND hr.subject_id = hp.party_id
    AND hr.relationship_type = 'CONTACT'
    AND hp2.party_id = hr.object_id
    AND hr.object_type = 'PERSON'
    AND hp.party_id = hr.subject_id
    Thanks
    Vyaghresh
    Edited by: user11990386 on Jun 20, 2011 2:33 PM

  • Getting all contact person names through XL Reporter

    Hi All,
    I am trying to get a list of all contact persons associated with a business partner.
    I am having difficulty to pull all contact persons associated with a business partner. I am trying to get this information through the Report composer of XL Reporter.
    When I drop the Business Partner and Contact Person dimensions from Business Partner tab into Report Composer and run the report, I only get Business Partner and just one contact person(the first contact person created for that BP).
    I am trying to get all contact persons associated with that business partner. Is there something I am missing or is this the issue with XL Reporter.
    Please let me know. Than you for your input.
    Regards,
    Payal

    Hi Gordon,
    Thank you very much. Yes, I know a query will work.
    But, the customer is more inclined to get this information via XL Reporter. I just wanted to check if it is possible to achieve via XL Reporter and that I am missing anything.
    Thank you,
    Payal

  • Get Selected Employee Contact Persons Details

    Hi all,
    Created One Value set(DFF) to get Employee Contact Persons Details.
    That value set is getting all Employee's Contact Person's Details(From HRMS Manger)
    Here I want to Restrict Only Selected Employee Contact person's Details Has to Shown in Value Set(DFF) when ever HR Selects any Specific Employee
    Example:
    HR selected 'ABCD' Employee in People Enter and Maintain Form .In My DFF Value Set I want to see only 'ABCD' Employee Contact Persons Details instead of All Employees Contact Persons Details
    Edited by: user10357646 on May 24, 2009 3:28 AM

    Hi Sharath Gajula ,
    How to Get the Selected Person Id ?
    Value Set Query
    select papf1.FULL_NAME from per_all_people_f papf,
    per_all_people_f papf1,
    per_contact_relationships pcr
    where papf.PERSON_ID=pcr.PERSON_ID
    and pcr.CONTACT_PERSON_ID=papf1.PERSON_ID
    and sysdate between papf.EFFECTIVE_START_DATE and papf.EFFECTIVE_END_DATE
    and papf.EMPLOYEE_NUMBER is not null
    --How to get Selected Person Id In Run time
    Edited by: user10357646 on May 24, 2009 3:44 AM

  • Contact person Rel.ship Data not getting updated in B2B Web User Mngt

    Hi CRM Gurus,
    Need some help on Web User Management functionality.
    Sub: Contact person Relationship data not getting updated when we change the company (to wich contact person belong to) in ISA CRM 5.0 Web User Management.
    we are currently on CRM ISA 5.0 and using Web User Managment for our B2B scenario. New creation of users is working fine. But when we want to change the company (Sold to pary) for the existing contact person, the relationship data in CRM is not getting updated and the below are the details.
    Contact person No: XXXX (has a Relationship: "Is contac person for YYYY company in CRM)
    Company/Sold to Party: YYYY (has a relationship "Has contact person XXXX in CRM).
    When I chage the contact person's (XXXX) company  from  YYYY to ZZZZ,
    - Relationships of the new assignment for ZZZZ in CRM not getting updated.
    - Old Records in YYYY is not getting deleted (i.e. relationships.
    - There is No relationship data appear in XXXX.
    Appreciate any inputs on the same.
    Thanks,
    Rahul >>>

    Hi Rahul,
    I'd suggest you running a session trace / ABAP debugging to see if some information is not getting passed from the Java stack onto the ABAP stack. An alternate move would be to create a new OSS customer message.
    Cheers,
    Ashok.

  • Needs Query to get the cycle time automatically based on the value provided in the UDF on OWOR  table

    Dear all,
    Need a query to get the Cycle time in hr based on the value provide in the udf on OWOR table.
    Details of UDF:-
    1.Start date =10/07/14  (Field Name U_EA_REST)   
    2.Start time =10:00        (Field Name U_EA_REASTARTTIME)
    3.End date =11/07/14    (Field Name U_EA_REET)
    4.End Time=14:00          (Field Name U_EA_REAENDTIME
    Cycle Time=_______      (Field Name U_EA_REACYCLETIME)
    Regards,
    BanugopanRajendran

    Dear all,
    Need a query to get the Cycle time in hr based on the value provide in the udf on OWOR table.
    Details of UDF:-
    1.Start date =10/07/14  (Field Name U_EA_REST)   -  Date Type
    2.Start time =10:00        (Field Name U_EA_REASTARTTIME) - Hour Type
    3.End date =11/07/14    (Field Name U_EA_REET) - Date Type
    4.End Time=14:00          (Field Name U_EA_REAENDTIME - Hour Type
    Cycle Time=_______      (Field Name U_EA_REACYCLETIME) - Hour Type
    Regards,
    BanugopanRajendran

  • How to get list of FMs while creating Contact Person from User Admin Link

    Hi Experts,
    We are implementing SAP ECommerce for my SAP ERP. In one of our requirements, we need to develop MASS UPLOAD program which will take input as Contact Person's first name, last name, address and authorization details and create new Contact Person as it is done through User admin link.
    To develop above tool, I want to trace all the Function Modules which are called while creating new Contact Person from User admin link.
    Please provide your inputs on how I can get the trace of FMs.
    Thanks,
    Keya

    Hi Keya,
    For a B2C eCommerce solution, you are looking at FMs BAPI_CUSTOMER_CREATEFROMDATA1 and ISA_USER_CREATE and the table USAPPLREF which holds the reference to the customer and user.
    To get the FMs called, you would have to do a session trace during B2C user registration / B2B user creation from UME. You could search this forum on a 'how-to' for doing a session trace or lookup the development and extension guide that provides a lot of useful information.
    Cheers,
    Ashok.

  • BP_CONT: not getting the contact person email value from custom controller

    Hi Experts
    not able to find the email address in any of the context node, actually my requirement is while creating the BP contact , get the email address  BP_ADDR/StandardAddress STRUCT.E_MAILSMT . take this email id and check whether this email id exists in system if exists throw the error while saving . for this I did the codin in BP_CONT component on save method but while saving some times my custom controller is getting initiated some times it was not containing any value , kindly let me know how can I get the email value of contact person in BP_CONT  component in view BPCONTOverview .
    here is my code on method eh_onsave
    lr_curo_bpcont_custcntrlr ?= me->get_custom_controller( controller_id = 'BP_CONT/BPCont' ).
      IF  lr_curo_bpcont_custcntrlr IS BOUND.
        TRY.
            lr_entity_privstdaddr ?= lr_curo_bpcont_custcntrlr->typed_context->privstdaddr->collection_wrapper->get_current( ).
            lv_privstdaddr_e_mailsmt = lr_entity_privstdaddr->get_property_as_string('E_MAILSMT'). " Get runtime email value of contact person
            lr_entity_bpcategory ?= lr_curo_bpcont_custcntrlr->typed_context->builheader->collection_wrapper->get_current( ).
            lv_partner_category = lr_entity_bpcategory->get_property_as_string('BP_CATEGORY'). " Get Partner Category value
          CATCH cx_sy_ref_is_initial cx_sy_move_cast_error cx_crm_genil_model_error.
        ENDTRY.
      ENDIF.
    here the problem is some times I'm getting the value and some times I'm not getting value the related objects also through get related entities contact person emial is not getting populated any where
    kindly help what is going wrong
    Thanks & Regards
    Rajasekhar

    Hello Rajasekhar,
    Could you please share how you resolved this issue? I have the exact same requirement (duplicate check based on email).
    Kind regards

Maybe you are looking for

  • Can't run a 10.7.4 VMWare VM on MBP with Retina

    I have an old 13" Aluminum Macbook and a purchased copy of Lion that I created a VMWare OSX 10.7.4 VM with that I could use for work.  I had it running fine on my 13" that runs 10.7.4.  I just got a new MBP writh Retina display.  It came with 10.7.4

  • How to fix "Adobe RoboHelp 7 has encountered a problem" error?

    I am using Adobe RoboHelp 7 to create WebHelp, with Windows XP. I haven't worked on my help project for about 10 days, and suddenly when I try to open the project I get this message: "Adobe RoboHelp 7 has encountered a problem and needs to close. We

  • Iphoto to video projector

    Help: I woud like to connect my iMac (10.6.2) to a video projector for a slide show. However, the projector doesn't show up on the device list when connected. I tried using the file export in iPhoto but to no avail. I'm using the iMac usb port to exp

  • Spaces won't switch spaces more than 1 time

    Since I switched to Leopard, when switching between spaces, I can move in any direction one time using the hotkeys (I have it set to move with Apple Key + Arrow Key). With 10.5 I could move around all I wanted while holding down the Apple Key and pre

  • Email recipient shows attachment to email, but I didn't send one

    Strange story here and I need some help so it doesn't happen again. My boyfriend sent an email to a realtor accidentially using my email account instead of his. It was a simple written inquiry. The realtor replied that he was confused, not only becau