How to calculate age for a business partner for segmentation purposes?

How do I calculate the age of a BP based on this person's maintained birthday on BP master data?  I need to use this information to segment based on age groups, eg age 30-40, age 25 and below etc.
I did quite a bit of search on this forum but couldn't find anything.  I know I've seen them somewhere before.  Would appreciate any help and will reward points.  Thanks!

Hi Jo,
You can achieve this by using infosets.
Create Infoset using direct read of table BUT000.
In infoset select extras for additional field button and give following code for calcualting the difference between Birthdate and system date.
CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
    EXPORTING
      i_date_from          = but000-BIRTHDT
      I_KEY_DAY_FROM       =
      i_date_to            = sy-datum
        I_KEY_DAY_TO         =
        I_FLG_SEPARATE       = ' '
   IMPORTING
     e_days               = test
        E_MONTHS             =
        E_YEARS              =
Create a datasource with Business partner GUID and assign it attributelist.
Choose the additional field for filter criteria.
Hope it solves your problem.
Reward points if it helps.
Regards,
Madhu

Similar Messages

  • ABAP-HR MODULE(HOW TO CALCULATE AGE & YEARS OF SERVICE)

    HI,
    HOW TO CALCULATE AGE & YEARS OF SERVICE means for example
    I AM USING PNPCE LDB.
    (1) whose age is greater than 52.833 years with 7.833 years of service, with annual rate of pay $170,000 or more, or
    (2) age plus employment service is 65 or more, with annual rate of pay of $ 170,000 or more.
    Note that the $ 170,000 parameter would be a variable that could change annually when this report would be generated. In the past, age and service value were determined as of the run date. The determination date would also be a variable that would change when the report would be generated.
    Thanks&Regards
    Rahul.

    Hi Rahul,
    This is the 2nd warning !!! Please... use the correct or most appropriate forum.
    The ABAP Objects Forum should be used for: ABAP Object definition and implementation including encapsulation, interfaces and inheritance in ABAP Objects.
    This thread will be moved from to .
    You're asking this question in two thread, so the duplicated thread will be deleted.
    Please have a look at [Forum Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting.
    Also read this thread Welcome and Rules of Engagement.
    Greetings,
    Marcelo Ramos

  • How to Assign Business partner for Vendor Organisation

    Hi,
    We are in SRM upgrade from SRM 3.0 to SRM 7.0.
    For Vendor organisation say 0 50002381  there is no Business partner assigned.
    Under this organisation there are 200 vendors .
    When i run the report: BBP_XPRA_ORGEH_TO_VENDOR_GROUP
    it is showing an error -No partner assigned
    How to assign the Business partner for the organisation .
    Please give your inputs
    Regards
    G.Ganesh Kumar

    Hi Muthu,
    Thanks for the reply
    Already the SAP NOTES : 1372409 is applied.
    I am running the Migration report: BBP_XPRA_ORGEH_TO_VENDOR_GROUP. I am getting an error
    " Check mode 9: :Invalid Object on supplier node"
    How to resolve this issue.
    Already one more thread is open for this issue
    Regards
    G.Ganesh Kumar

  • How can one see all printdocuments for a business Partner

    How can one see all printdocuments for a business Partner(only transaction, no table please)
    Thx

    Avajit,
    Use T-Code CORRHIST
    Hope this helps
    Rgds
    Rajendra

  • Count of number of campaigns executed for a business partner?

    Hi all
    I'm hoping someone can advise me on how to fulfil this requirement. Basically I need to find a way of ensuring that customers are only included in a maximum of five campaigns per month.
    My current idea centres around
    1) Creating an interaction object for each business partner every time they are included in an executed campaign
    2) To execute a custom-developed program (or a BW query?) that will count the number of interaction objects created per business partner in the past month and write the count value to a marketing attribute called "campaign count" assigned to each business partner
    3) Exclude any business partners with "campaign count" >=5 from the target group of future campaigns
    I'm sure there's a cleaner and better way of doing this. Can anyone point me in the right direction?
    Thanks
    Mike

    Greetings from ABAP General.
    Please do not leave meaningless comments when closing age old threads only to make room for new ones.
    The comment box can be left empty. Only fill it when you have something to say about the solution that might help the community.
    Thanks
    Thomas

  • To Get the list of sales orders for a Business partner in CRM.

    Hi all
    Is there any Function module or BAPI to get the Sales orders for a Business partner in CRM. I know there is a BAPI to get the list of sales orders for a customer in ECC, but I donu2019t know how to get the list of sales orders for a Business Partner in CRM.
    Can anybody tell me if there is an inbuilt function module or BAPI available?
    If not how can I pick the sales orders of a business partner in CRM? Between which tables should I apply a join and write SELECT statement to get list of sales orders for a business partner in CRM.

    Hi Jessica,
    Try CRM function module CRM_BUPA_READ_ORDER_OBJECTS.
    You'll get a table with the documents associated to that partner, where you can work on.
    Kind regards.

  • Marketing attributes for a business partner

    Hi,
    how can I input marketing attributes for a business partner with a BAPI?
    Or can I use BATCH-INPUT (the transactions is "BP")?
    Thanks and best regards.

    Hi JoJo,
    I don't know about LSMW. But I have done something similar in a program by calling the following function module in a loop for each of the business partner:
    CALL FUNCTION 'CRM_MKTBP_CHANGE_BP'
          EXPORTING
            IV_PROFILE_TEMPLATE_ID = lv_attribute
            IV_PARTNER             = lv_partner
          TABLES
            IT_IMP_SELTAB          = lt_attr
            ET_RETURN              = et_return.
    Here you can provide the attribute set in lv_attribute
    and business partner in lv_partner. lt_attr contains all the attributes (name and value).
    Example:
        ls_attr-atname = 'Z_CUST_TEAM_ASSGN'.
        ls_attr-atwrt = 'Test Team'.
        APPEND ls_attr to lt_attr.
    Hope this helps.
    Regards,
    Chandrika

  • How to calculate age in oracle

    Hi,
    T was trying do calculate age as on todays date in ORACLE but after a lot of brain storming i didn't get it.
    Kindly tell me how to calculate age as in years month days.
    For ex.. My DOB- 02-feb-1984 so my age should get as 27 Years 2 months 8 days
    How to do it.
    I tried this
    select
    TRUNC( months_between( sysdate, TO_DATE('02-02-1984','DD-MM-YYYY') )/12 ) Year,
    TRUNC( mod(months_between( sysdate, TO_DATE('02-02-1984','DD-MM-YYYY') ),12) ) Month,
    mod(months_between( sysdate, TO_DATE('02-02-1984','DD-MM-YYYY') ),12) /30 Days
    from dual
    but days are not calculating correctly...
    RGds,
    PC

    sorry..i didn't chck your query..it is right but give wrong answer..
    WITH got_months AS
         SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
         ,     FLOOR (MONTHS_BETWEEN (SYSDATE, TO_DATE('02-02-1984','DD-MM-YYYY')))     AS months
         FROM     dual
    SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
    ,     TO_CHAR (FLOOR (months / 12))     || ' years, '     ||
         TO_CHAR (MOD (months, 12))      || ' months, '     ||
         TO_CHAR ( CEIL ( SYSDATE
              - ADD_MONTHS ( TO_DATE('02-02-1984','DD-MM-YYYY')
                        , months
              )               || ' days'
    FROM got_months
    o/p
         TO_DATE('02-02-1984','DD-MM-YY     TO_CHAR(FLOOR(MONTHS/12))||'YE
    1     2/2/1984     27 years, 7 months, 9 days
    1 day more..1     it sud be.. 2/2/1984     27 years, 7 months, 8 days
    if i make correction with add_months like below..
    WITH got_months AS
         SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
         ,     FLOOR (MONTHS_BETWEEN (SYSDATE, TO_DATE('02-02-1984','DD-MM-YYYY')))     AS months
         FROM     dual
    SELECT     TO_DATE('02-02-1984','DD-MM-YYYY')
    ,     TO_CHAR (FLOOR (months / 12))     || ' years, '     ||
         TO_CHAR (MOD (months, 12))      || ' months, '     ||
         TO_CHAR ( CEIL ( SYSDATE
              - ADD_MONTHS ( TO_DATE('02-02-1984','DD-MM-YYYY')
                        , months
                        )-1
              )               || ' days'
    FROM got_months
    then o/p is..
         TO_DATE('02-02-1984','DD-MM-YY     TO_CHAR(FLOOR(MONTHS/12))||'YE
    1     2/2/1984     27 years, 7 months, 8 days
    correct but cdnt understand why sud -1?

  • Enter at least one number for the business partner

    Hi Experts,
    SRM 5
    Classic scenario
    R/3 4.6c
    I am trying to execute users_gen transaction for integrating the user with the org. structure. However upon doing so I get an error message "Enter at least one number for the business partner"
    Please provide pointers on the cause for this and how it can be rectified.
    Thanks.
    Regards,
    Amish

    Hi Muthu,
    I am integrating a single user at a time - through users_gen.
    Infact I am getting the same error message while moving the users within the org. structure.
    Steps -
    1. Execute users_gen
    2. Select the user to be integrated
    3. Click execute check mark
    Please provide any pointers.
    Regards,
    Amish

  • New user created. How to create Central Person and Business partner

    Hi,
    I got a new users created in SRM 5.0 .how to create Central person and business partner.
    Without CP & BP we cannot work. please guide.
    Regards
    G.Ganesh Kumar

    HI GANESH
    As you aware , assign the user to organisation structure via users_gen , the system will create a BP and Central Person , Position and user for you.
    br
    muthu

  • Days Sales Outstanding DSO for a Business Partner

    Hi ,
    Any idea how to use the Method of Least Squares (MLS), to compute Days Sales Outstanding DSO for a Business Partner?  suggestions?

    Hi,
    In  the BP go to Sales Area Data and select sales tab. In that select the sales Org,D.Channel,division for which you want to maintain and enter all the detail in all the tabs (shipping,Sales,Billing etc) and save the BP.
    Regards
    Vinod

  • The visit frequency specified for the business partner

    Hi.
    Anybody knows how I can specificy the visit frequency specified for the business partner ?
    CRM  Mobile  5.0
    Thanks.
    Antonio.

    ok, in transaction FPP3, for a given business partner, you can see the standard address and connection object address.
    Is there any function module which can enable me to change the connection object address.

  • Extract Mobile Phone for CRM Business Partner

    Hi Experts
    I would like to extract the mobile phone number for a business partner from CRM. Transaction BP shows the number in the address tab, communication area together with the telephone number and the fax number.
    The business content DataSource 0BP_DEF_ADDRESS_ATTR delivers only the telephone number and the fax number. Does anyone know of a DataSource that also delivers the mobile phone? Otherwise, in which table is the mobile phone number stored?
    Thanks in advance
    Daniel

    Hi Daniel,
    I'm currently attempting to extend the 0BP_DEF_ADDRESS_ATTR for the same reason, and sending support call to SAP to see if standard extractor can be updated to include mobile number.
    Can you give more detail on how you extended?
    We have appended a field to the extract structure & are now trying to fill it from ADR2 where r3_user = 3
    In particular a copy of any code you added to EXIT_SAPLRSAP_002 would be helpful.
    Cheers
    Don

  • Maintain Reference Business Partner for Consumers

    hi all,
    i have Maintain Reference Business Partner for Consumers  through the spro ( t-code : CRMC_BUPA_CONSUM ) that I find it wrong in another day, so can i delete one of the field that i have mantained for a particular reference bus partner ? if i can...please show me how ? i read once i mantain ..i can not change it , is that true ?
    best regards
    indah puspita

    Hi Indah,
    If you are using version 5.0 try this,
    Start Transaction SE37. Create function module CRM_BUPA_CONSUMER_ADD_SA in function group CRM_BUPA_CONSUMER with short text "Transfers changes ( added sales area) to all consumers". Define the following import parameters:
    Parameter Name: IV_MAX_BLOCK_SIZE
    Type specification: TYPE
    Associated Type: I
    Default value: 100
    Optional: X
    Define the following table parameters:
    Parameter Name: IT_SALES_AREA
    Type specification: LIKE
    Associated type: BAPIBUS1006_SALES_AREA
    Parameter Name: ET_RETURN
    Type specification: LIKE
    Associated type: BAPIRET2
    Optional: X
    Save the changes.
    Create function module CRM_BUPA_CONSUMER_CHANGE_SA in function group CRM_BUPA_CONSUMER with short text "Transfers changes of a sales area to all consumers". Define the same parameters as for the above function module.
    save changes.
    Create report CRM_BUPA_REF_BP_ADAPT_CHANGES in package CRM_BUPA with Transaction SE38.
    Title: "Distribution of changes to reference business partner"
    Type: 1
    Status: P
    Package: CRM_BUPA
    Save the changes.
    Use Transaction SE38 to open report CRM_BUPA_REF_BP_ADAPT_CHANGES and maintain the following text symbols (menu: Goto -> Text elements -> Text symbols):
    For CRM Release 5.0, define additionally:
    010 Sales organization 20   50
    011 Distribution channel 12   50
    012 Line of business 6    50
    On the "Selection texts" tab page (menu path "Goto -> Text elements -> Selection texts"), maintain the following texts for the variables already defined:
    Name: GV_P1
    Text: New sales area
    Name: GV_P2
    Text: Changes to sales area
    Save and activate all changes.
    check the OSS notes 1014356 if the problem still persists.
    reward with points.
    cheers,
    MARK

  • Error while changing the PO BOX value for a Business partner

    Hi Friends,
    We are getting an error when we try to change the PO Box value for a Business Partner.
    We have the dependency like when we give the value for the PO Box we also need to give the postal code value. And also we have a specific format for the Postal code. We gave both the values (a valid postal code) and try to save the details, then error message "The attribute GUID of Organization (a Contact Person is assigned to) of the Business Object contact person is not valid" is displayed. We have no clue why there is a conflict for the contact person details.
    Can any one suggest the reason for this?
    Thanks & regards,
    Swarna Seeta

    Hi Swarna,
    You are getting this message not because you have entered wrong Post code .It will come even if you try to change some other field and save it. This is because on saving a business object, the framework tries to validate all the associated objects depending on the relation.In this case the data in the mobile client is either not present or is no longer valid.
    Check if the field of the Business object which is being shown as invalid, has some data in the table. Check the combo associated to it and from where the combo is doing the validation. The table from where the combo is doing the validation does not have that data and so the value is invalid.
    Also compare the number of entries in smokna1sht table in ides and in CDB.
    Regards
    Vivek

Maybe you are looking for

  • Where can I get a new keyboard for my Tecra A3 in the UK?

    I spilt some water - damn! - a couple of days ago on my Tecra A3 and I think it is beyond fixing, though please correct me if I am wrong. I haven't been cleaning it regularly and I think there was probably quite a bit of dust - and other foreign matt

  • Need to write ABAP Routine at infopackage Selection Options

    Hi All, I need to write ABAP Routine at Info Package Selection Options. Requiremnet i need to bring  some Sales Document Types (Sales Orders Types) only from R/3. Ex I need OrderTypes ZQT,ZSIV etc Can any body help to resolve this. Regards, P.C.V.

  • How to change the size of a simple brush by tilt by more than 200%?

    Hi, how to change the size of a simple brush with tilt by more than 200%? Greetings! Daniel Ps: sorry for saying this, but your forum is surprisingly userunfriendy designed for a design oriented company.

  • IOS 5 Siri on iPhone 4

    I have an iPhone 4 and just downloaded the iOS 5 software. I can't seem to access the "SIRI" software, or the voice controlled software in the new update. Is anyone else have this problem? How would I access this? And is it only for the iPhone 4S?

  • E61 WLAN Vodafone problem

    Hi, I just bought a brand new e61 from Vodafone, but problem is they seem to have disabled the WLAN from working. I input my settings for the WEP key onto the handset, and set up the access point. I configured the router to accept the MAC address of