New Infotype Framework

Hello!
I'm just going to implement a new Infotype that should use the Data Sharing functionality for Concurrent Employment. I've read a document about the implementation of the "new" Infotype Framework, but I haven't found an example how to use it for my needs. Is there an example for the use of the Infotype Framework (e.g. Classes CL_HRPA_DATA_SHARING, CL_HRPA_INFOTYPE_FACTORY, ...).
Has anyone ever used the framework to insert/modify an IT-record?
Thanks in advance!

Hi Juergen,
I know i am too late in replying to your question.
However, better to be late than naver, I thought I will share with you how i achieved it in my last project.
You can refrer to the below example code ( Logic for inserting record in infotype 0015).
Note: Structure wa0015 type PA0015 contains the data which you want to
        update in infotype 0015.
  FIELD-SYMBOLS: <ls_pnnnn> TYPE p0015.
  ASSIGN p0015 TO <ls_pnnnn> .
create instance
  CALL METHOD cl_hrpa_masterdata_bl=>get_instance
    IMPORTING
      masterdata_bl = g_masterdata_bl.
  CREATE OBJECT g_message_handler.
  MOVE-CORRESPONDING wa0015 TO <ls_pnnnn>.
  <ls_pnnnn>-infty = ‘0015’.
start trial
    CLEAR g_magic_cookie.
  CALL METHOD g_masterdata_bl->start_trial
    IMPORTING
      magic_cookie = g_magic_cookie.
create infotye container
  CLEAR g_is_ok.
  CALL METHOD g_masterdata_bl->get_infty_container
    EXPORTING
      tclas           = c_tclas
      pskey           = <ls_pnnnn>-pskey
      message_handler = g_message_handler
    IMPORTING
      container       = g_container.
  <ls_pnnnn>-pskey     = g_container->a_pskey.
  g_container_nnnn ?= g_container.
  g_container      ?= g_container_nnnn->modify_primary_record( <ls_pnnnn> ).
insert record in infotype
  DATA: ls_bapiret1 TYPE bapiret1.
  CLEAR g_is_ok.
  CALL METHOD g_masterdata_bl->insert
    EXPORTING
      message_handler = g_message_handler
    IMPORTING
      is_ok           = g_is_ok
    CHANGING
      container       = g_container.
success
  IF g_is_ok = c_true.
  CALL METHOD g_masterdata_bl->approve_trial
    EXPORTING
      magic_cookie = g_magic_cookie.
commit work
  CALL METHOD g_masterdata_bl->flush
    EXPORTING
      no_commit = space.
error
  IF g_is_ok IS INITIAL.
discard trial
  CALL METHOD g_masterdata_bl->discard_trial
    EXPORTING
      magic_cookie = g_magic_cookie.
append errors
  DATA: lt_msg TYPE hrpad_message_tab,
        ls_msg LIKE LINE OF lt_msg,
        ps_return TYPE bapiret1.
  IF g_message_handler->has_abend( ) = 'X'.
    CALL METHOD g_message_handler->get_abend_list
      IMPORTING
        messages = lt_msg.
  ELSEIF g_message_handler->has_error( ) = 'X'.
    CALL METHOD g_message_handler->get_error_list
      IMPORTING
        messages = lt_msg.
  ELSE.
    EXIT.
  ENDIF.
  LOOP AT lt_msg INTO ls_msg.
    CALL FUNCTION 'BALW_BAPIRETURN_GET1'
      EXPORTING
        type       = ls_msg-msgty
        cl         = ls_msg-msgid
        number     = ls_msg-msgno
        par1       = ls_msg-msgv1
        par2       = ls_msg-msgv2
        par3       = ls_msg-msgv3
        par4       = ls_msg-msgv4
      IMPORTING
        bapireturn = ps_return.
    APPEND ps_return TO pt_return.
  ENDLOOP.
  ENDIF.
Regards,
Dinesh Pandey

Similar Messages

  • IT0002 New Infotype Framework with Secondary Infotype Short Dump

    In our new ERP 6.0 system, we are seeing a short dump, ASSIGN_BASE_TOO_SHORT  in CL_HRPA_INFOTYPE_0002_BE when hiring a Belgium employee.  It appears in the new Framework, the SPECIFIC_INITIAL_COMPUTATIONS method of CL_HRPA_INFOTYPE_0002_BE is expecting there to already be data in IT0108 (secondary infotype for Belgium IT0002).  However, during a hire, this data has not been filled yet.  That will be done during the processing of the IT0002 itself.
    I looked into IT0021 for the US, where IT0106 is a secondary infotype and the issue isn't present.  The code in the SPECIFIC_INITIAL_COMPUTATIONS of CL_HRPA_INFOTYPE_0021_US is written entirely different without the use of field symbols, so maybe it is a coding issue?
    Has anyone else run into this issue, or know if we are possibly missing configuration that would keep this issue from happening?

    Suresh,
    Yes, we have seen that note, and we have those changes implemented.  We are still having an issue.  The issue is related to any IT0002 with a secondary infotype so that includes Belgium, Brazil, Korea just to name a few.
    It appears the PNNNN2 structure within the SPECIFIC_INITIAL_COMPUTATIONS method is null (because it hasn't been created yet), and that is causing the short dump.  I can't believe this is working as expected because there is no way the IT0108 can be assumed to have a value in it, or you could never hire anyone.
    Bob

  • DIF Time infotypes: Availability of time infotypes in the decoupled infotype framework

    Hi (fellow) experts,
    My primary and most wondered question:
    Does anyone out there has an idea on SAP schedule to release compatibility fix for time infotype (constraint Z) in the decoupled infotype framework?
    Many of us lately talk about and use the decoupled infotype framework; I see many clients interested in HR-Renewal PAOM attractive interface but when question turns around time data I tend to change subjects)... HR Renewal 2.0 has awesome new features such as the Payroll Control Center and the possibility for dynamic action but still no access to time infotypes... Tricky to manipulate infotype 2010, 0416 data without accessing the backend system to correct payroll data... I don't even start on 2001 absence infotype..., etc...
    I also have some question on the SAP official working model for certain PA infotype that update in background time data (e.g. 0080 for instance). 
    There are some country specific infotypes that bothers me a little bit because I don't  understand the SAP working model behind it; it's about french infotype Work stopped (0424) which is a data entry screen for work incapacity derived from illness or accident at work that update infotype 2001 in the background.
    Now if I take a detailed look at the decoupled class CL_HRPA_INFOTYPE_0424 method SPECIFIC_INSERT_COMPUTATIONS for instance I can see how the specific logic to create infotype 2001 is nicely commented out in the code while in the backend both those infotype are completely integrated.
    So what am I to understand: class is actively decoupled and I can use it but I will never have the same functionality that I have in the backend system? or is something else? same question apply to infotype 0080 under not only the french template, but UK, Spain... etc... , in the french version it updates both infotype 0424 and 2001 in the backend but I don't see nothing of the sort in the DIF even though there is an active specif FR convertion class (does not seems to be in working order and no infotype 0424 update anywhere nor of course 2001)...
    Let me be clear: I think the DIF initiative is a great innovation from SAP; very easy to understand, manipulate and so much more versatile. It would be awesome if everything would be ready to use ... very powerful tool.
    Thank you for time gurus!!!
    Antoine

    Hi Gurus:
    Well well sounds like some effort in decoupling time infotype development has been released into EHP8.
    At least I am able to see development class and FPM configurations for infotypes 2001, 2006, 3355... so even if not everything is ready I can now see things are well on the way!
    Cheers.

  • Create employee with detached infotype framework

    Hello,
    I'm desperately trying to create a new employee with the decoupled infotype framework, without success.
    I try to save IT0000 and IT0003 (as secondary record) at first, but when I call the  'if_hrpa_masterdata_bl~get_infty_container' method, a 'cx_hrpa_missing_infty_data' exception is raised because the framework can not find any IT0003 record for the new employee (of course, since I'm trying to create it!).
    So I can't do any insert since I can't get any container...
    Thanks in advance.
    Mathieu

    So, isn't there a way to create an employee with the detached infotype framework?
    Here is the code I used to try to create an employee in the system:
    *-- Get business logic from masterdata factory
      CALL METHOD cl_hrpa_masterdata_factory=>get_business_logic
        IMPORTING
          business_logic = lo_masterdata_bl.
      TRY.
          CREATE OBJECT lo_message_list.
    *-- THIS IS WHAT DOESN'T WORK. Since I can't get a container, I can not do anything else.
          lo_masterdata_bl->get_infty_container(
            EXPORTING
              tclas           = c_employee_tclas
              pskey           = ls_pskey
              massn           = '00'
              massg           = '00'
              no_auth_check   = abap_true
              message_handler = lo_message_list
            IMPORTING
              container       = lo_infty_container
              is_ok           = success
    *-- Message management
    *-- Update old data with new one
          lo_infotype_container ?= lo_infty_container.
          lo_infty_container ?= lo_infotype_container->modify_key( ls_pskey ).
          lo_infotype_container ?= lo_infty_container.
          lo_infty_container ?= lo_infotype_container->modify_primary_record( pnnnn ).
          IF pnnnn2 IS NOT INITIAL.
            lo_infty_container ?= lo_infotype_container->modify_secondary_record( pnnnn2 ).
          ENDIF.
    *-- Insert record
          CALL METHOD lo_masterdata_bl->insert
            EXPORTING
              massn           = space
              massg           = space
              update_mode     = ls_update_mode
              no_auth_check   = abap_true
              message_handler = lo_message_list
            IMPORTING
              is_ok           = success
            CHANGING
              container       = lo_infty_container.
    *-- Flush
          IF flush_immediately EQ abap_true.
            CALL METHOD lo_masterdata_bl->flush
              EXPORTING
                no_commit = space.
          ENDIF.
    *-- Message management
        CATCH cx_hrpa_violated_assertion INTO lo_exception.
    *-- Message management
      ENDTRY.

  • Create IT2013 entry with the decoupled infotype framework

    Hello,
    I tried to create an IT2013 (Quota corrections) entry with the new decoupled infotype framework but I didn't success.
    I first tried by using if_hrpa_masterdata_bl->get_infty_container to get a container (and then change it and save it) but I get an error because the time constraint for IT2013 is set to 'Z' and the framework don't handle it.
    So I guess this is because if_hrpa_masterdata_bl and other related classes/interface can only be used for PA and not for Time.
    Therefore I tried to find Time infotypes dedicated classes and I found some.
    The most interessant one is CL_PT_BLP_IT2013. It looked perfect, with everything I needed, but it doesn't work: when CL_PT_BLP_IT2013->IF_HRPT_BLP_INFOTYPE~GET_INFTY_CONTAINER is called, it tries to create an instance of CL_HRPT_INFTY_TIME_CONTAINER but raises an exception. Not surprising because the only non-commented line its constructor executes is:
    METHOD constructor.
      RAISE EXCEPTION TYPE cx_hrpa_violated_assertion.
    *  if_hrpa_infty_container~a_tclas          = 'A'.
    *  if_hrpa_infty_container~a_pskey          = pskey.
    *  if_hrpa_infty_container~a_infotype_logic = infotype_logic.
    ENDMETHOD.
    Moreover, the description of the class CL_HRPT_INFTY_TIME_CONTAINER is: "DO NOT USE! HR: Time Data Container", so it's not suprising at all it doesn't work.
    I found some other Time infotypes related classes like CL_PT_BLP_INFOTYPE or CL_PT_TD_INFOTYPE but I couldn't figure out how to create a new IT2013 entry with those ones.
    At the end of the day, I couldn't find any way to create a new IT2013 entry using the decoupled infotype framework.
    Can someone please help?
    Thanks in advance.
    Mathieu

    Hi,
    The time infotypes 2XXX are not yet decoupled as per the standard infotype framework. Hence there are no decoupled classes delivered in standard.
    Regards
    Roy
    SAP Labs

  • Error "No entry in table T589A for P" while creating new Infotype

    HI,
    I've created a new infotype (9605). All the tables, structures, screens etc. have been created using transaction PM01 successfully. But upon execution of Infotype from PA30, the infotype screen is displayed with the following error:
    "No entry in table T589A for P"
    Any input will be highly appreciated.
    Thank you,
    Farooq.

    Hi Farooq,
    Untill and unless the the field PSYST-IOPER is cleared explicitly in the program MP960500 (in PBO modules), this error should not occur.
    Also is this error is coming only for 9605 infotype ? Also is any other info availaible in the error message such as entry in table t589a is not available for which value of OPERA (INS, MOD, DEL, LIS etc) ?
    Regards,
    Shrinivas

  • Creation of NEW Infotype

    Hello Experts,
    I need to create new infotype ,which will be replica of Infotype-0008(basic pay). user can enter the wage types in that custom infotype.
    is it possible????
    Thanks & Regards,
    Saurabh

    "there are some employees who works extra apart from their regular position "
    questions:
    1. "there are some employees "--> do they have specific characteristic?
    2. "who works extra apart from their regular position"-->
    is the extra salary payment will be included in their regular payroll or will be paid separately or it is only to record the "extra work"? or
    "work extra" is it a form like overtime payment?
    if it will be included in the salary payment, you can create new wagetype and include it in in IT0014-IT0015 depends on the regularity of the payment.
    "currently in custom infotype there is only limited information ie. position and pay scale area, groups n all and cost centers.."
    did u mean "currently in IT0008" there is only limited info (position, pay scale area, groups ...)
    please check or consider to use IT0014 and IT0015 -- sap standard infotypes for other extra payment not included in the Basic Pay.
    best regards,
    dhenny muliawaty (pei pei)

  • Creation of new infotype 9001

    am trying to create the new infotype 9001 (PM01) for license but SAP not allowing.. asking access key to proceed further.. wot to do?
    Shan

    and also check this
    Go to Transaction PM01.
    2) Enter the custom Infotype number which you want to create (Should be a 4 digit number, start with 9).
    3) Select the u2018Employee Infotypeu2019 radio button.
    4) Select the u2018PS Structure Infotypeu2019.
    5) Click on Createu2026 A separate table maintenance window appearsu2026
    6) Create a PS structure with all the fields you want on the Infotype
    7) Save and Activate the PS structure
    8) Go back to the initial screen of PM01.
    9) Click on u2018Allu2019 push button. It takes a few moments.
    10) Click on u2018Technical Characteristicsu2019. Infotype list screen appears
    11) Click on u2018Changeu2019(pencil) button
    12) Select your Infotype and click on u2018Detailu2019 (magnifying glass) button
    13) Give u2018T591Au2019 as subtype table
    14) Give u2018T591Su2019 as subtype txt tab
    15) Give your subtype field as subtype field
    16) Save and come back to PM01 initial screen
    17) Click on u2018Infotype Characteristicsu2019 u2026 Infotype list screen appears
    18) Click on u2018Changeu2019 (pencil) button
    19) Click on u2018New Entriesu2019
    20) Enter your Infotype number and short text
    21) Here we have to set different Infotype Characteristics as per the requirement. (Better open another session with some standard Infotypeu2019s infotype characteristics screen and use as the reference to fill yours)
    22) Save your entries.
    23) Now the Infotype is created and ready to use.
    24) If you want to change the layout of the Infotype as per your requirementu2026
    25) In the PM01 initial screenu2026Select u2018Screenu2019 radio button and give 2000 as the screen name, then click on edit.
    26) In the next screen.. Select u2018Layout Editoru2019 and click u2018Changeu2019.
    27) Screen default layout appearsu2026here you can design/modify the screen..change the attributes of the fields..etc.
    28) Save and activate. (Donu2019t forget to u2018Activate at every level

  • Need to send mail from new infotype

    Hi,
    i must send email notification when i new PA specific infotype is created/changed.
    Finally, i don't think worflow is the best way... but i don't know where i must implemented my code, i've tested this idea by modifying the PAI but it don't work, e-mail is not sent, but function is correct, if i test it it's ok.
    Cheers

    Hi ,
         I came across the same requirement 2 yrs back and i have done it with workflow. You need to create a workflow
    with a single task which sends the mail to corresponding person .
          I forgot the Business Object name , but it was containing an event "CREATED".  When ever a new infotype is created , this event is triggered which inturn triggers WF and the mail is sent.
    Reward points if the info. is useful to you.
    Regards,
    Vijay

  • Dont want then NavigationTarget to open an entirely new portal framework

    Hi All,
    when i tried with Navigationtarget from webdynpro Linktourl element(target=_main) to open the page which has webdynpro iview opening the page but its coming with whole new portal framework which i dont want . how to avoid that.I just want the page to display in the content area without the whole portal framework with tabs and
    String URL1="/irj/index.html?NavigationTarget=ROLES://portal_content/org.test.dev.folder.test_development/test/Worksets/CustomApplications/ManagersFMLAApproval";
    wdContext.currentContextElement().setUrl1(URL1);
    Thanks,
    pkv

    Hi Pkv,
        If you want to open the new window without the portal framework page then instead of using a LinktoURL UI Element you use a LinktoAction UI element and in the action handler of the LinktoAction you can use the navigateAbsolute portal API. [http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/navigation/api/WDPortalNavigation.html]
    The code should look like this.
    WDPortalNavigation.
    navigateAbsolute("ROLES://portal_content/org.test.dev.folder.test_development/test/Worksets/CustomApplications/ManagersFMLAApproval",
                     WDPortalNavigationMode.SHOW_EXTERNAL,
                     WDPortalNavigationHistoryMode.NO_HISTORY,
                     null);
    Regards,
    Sanyev

  • Creating new Infotype

    I created a new infotype 9015. It works and posts correctly.  Then I tried adding a module within the 9015 code to generate an infotype 0014. So the end result should be a 9015 and a 0014 record.   While Im in PA30 I can see the expected results but if I leave PA30 and come back in the records are gone.  Looks like some type of commit issue but I have tried adding code to COMMIT and it doesnt help.
    Here is the additional IT0014 code.
        move GV_RETIRE-wage_type_ee  to gt_pa0014-SUBTY.
        move GV_RETIRE-wage_type_ee to gt_pa0014-LGART.
        move GV_RETIRE-ee_percent  to gt_pa0014-ANZHL.
        move p9015-endda to gt_pa0014-endda.
        move p9015-begda to gt_pa0014-begda.
        move p9015-pernr to gt_pa0014-pernr.
        move '0014' to gt_pa0014-INFTY.
        Append gt_pa0014.
        CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
          EXPORTING
            NUMBER = p9015-pernr
          IMPORTING
            RETURN = gt_return.
       CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
         EXPORTING
           NUMBER              = p9015-pernr
           VALIDITYBEGIN       = p9015-begda
        IMPORTING
          RETURN              = gt_return.
        CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            infty         = gt_pa0014-INFTY
            number        = gt_pa0014-pernr
            subtype       = gt_pa0014-subty
            validityend   = gt_pa0014-endda
            validitybegin = gt_pa0014-begda
            record        = gt_pa0014
            operation     = 'INS'
            tclas         = 'A'
            dialog_mode   = '0'
            nocommit      = ''
          IMPORTING
            return        = lstr_bapireturn
            key           = lstr_bapikey.
        IF NOT lstr_bapireturn-number = 0.
          lv_bapierror = lstr_bapireturn-message.
          lv_failed = abap_true.
        ENDIF.
           CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
         EXPORTING
           NUMBER              = p9015-pernr
           VALIDITYBEGIN       = p9015-begda
        IMPORTING
          RETURN              = gt_return.
        CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
          EXPORTING
            NUMBER = p9015-pernr
          IMPORTING
            RETURN = gt_return.
        CALL FUNCTION 'RH_UPDATE_DATABASE'
          EXPORTING
            VTASK = 'V'.
        commit work.

    You can try to split the update tasks ie Put the 0014 logic inside a custom function module.. make sure to set the 'Update Module' Processing Type in its Attributes. & then  call this custom function IN UPDATE TASK fom 9015.
    ~Suresh

  • Workflow - Create a new buisness object type for an new infotype.

    Hi all,
    I have an issue with creating a new buisness object type, which is related to a
    supertype, for an new infotype.
    I am new to workflow and business object. I don't have much knowledge in these area. I need to resolve this problem ASAP.
    Could someone please provide me a step-by-step guide on how to create a new business object type, which is related to an existing supertype, for an newly created infotype?
    If would be very much appreciated if someone could assist me in resolving this issue.
    Thank You.

    Business objects are maintained in SWO1 creating a subtype is done with the button: Create subtype (F9)
    If you don't have knowledge of workflow or abap objects, it is perhaps better to tell your employer that and find someone who has.
    If your problem is simply only creating a subtype then go with the instructions I already gave you, if however more things need to be done, like extending the subtype with (virtual)attributes, methods, events, delegating the subtype and implementing the methods in newly created tasks and subsequently workflows I really advise to find someone who can do this, or attend a SAP course on this subject.
    Kind regards, Rob Dielemans

  • Error in new infotype creation

    hi,
    i m copying a infotype and create a new infotype, in this all structures are copied in my program but only one structure q0002 is not copied as q9002 .
    tell me how to do this

    Hi
    Just copy the Qnnnn structure for yourself via SE11,
    I think it is not automatically copied, because it is not part of IT 02. It is only part of the display dynpro.
    regards,
    karl

  • New Infotype

    Hi gurus....
    While creating New infotype...i am facing a problem..
    after giving the required fields..and tyring to save it...
    'm getting an error   """PACKAGE IN ORIGINAL SYSTEM IS MODIFIABLE WITH ORGANIZER TOOLS"""
    Plz throw some light on this issue..
    regards
    krishna

    please go thru the below, i can see similarities with ur issue. itsshld be a pointer..
    http://help.sap.com/saphelp_nw04/helpdata/en/57/38de9b4eb711d182bf0000e829fbfe/content.htm

  • New infotypes from form are displaying in black font instead of red

    Good day,
    I recently created a new form where a manager can submit a form to change their employee's work schdule infotypes in MSS.
    The form can be successfully processed through workflow and the new infotypes from the form are populated in PA40 when executing the corresponding PA40 action.
    The issue is, for all other forms when a new infotype is pulled into PA40 in SAP ECC the data is displayed in red font (making it easy for the data processor to see which feilds have been updated by processing the form). For my new form, the data is successfully pulling in but the font is black.
    How do I change the font of the new infotypes to pull in as red instead of black? Is there a setting/config somewhere that I have missed?
    Thanks,
    Christine

    Hello,
    Is this a workflow question? If not, you may get a quicker and better answer in another SDN forum.
    regards
    Rick Bakker
    hanabi technology

Maybe you are looking for