Skip to Content
avatar image
Former Member

RH_INSERT_INFTY - infotype 1035

Hi ,

I am trying to create an infotype 1035(hrp1035) record using RH_INSERT_INFTY.

ls_1035-plvar = '01'.

ls_1035-objid = '50367015'.

ls_1035-istat = '1'.

ls_1035-begda = '20100710'.

ls_1035-endda = '20100712'.

ls_1035-infty = '1035'.

ls_1035-ndays = '3'.

ls_1035-nhours = '22.5'.

append ls_1035 to lt_1035.

CALL FUNCTION 'RH_INSERT_INFTY'

EXPORTING

FCODE = 'INSE'

vtask = 'V'

COMMIT_FLG = 'X'

AUTHY = space

  • PPPAR_IMP = ls_pppar

  • REPID = 'MP103500'

  • FORM = '%TAB_DB' ( value passed when 1035 insert happens thru pp01)

TABLES

innnn = lt_1035

  • ILFCODE = ILFCODE

EXCEPTIONS

NO_AUTHORIZATION = 1

ERROR_DURING_INSERT = 2

REPID_FORM_INITIAL = 3

CORR_EXIT = 4

BEGDA_GREATER_ENDDA = 5

OTHERS = 6 .

when I call the above FM programmatically , sy-subrc = 2. On debugging I found that the code expects REPID and FORM to be passed .

Any idea how to use this FM / or any other method ,to create an infotype 1035 record in R/3?

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Jun 01, 2010 at 11:20 AM

    You can aslo check hr_infotype_operation

    check link:[http://searchsap.techtarget.com/tip/0,289483,sid21_gci855741,00.html]

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 01, 2010 at 02:29 PM

    Hi Neelima,

    I dont think there will be any problem using the fm i mentioned, it has a clear documentation.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 01, 2010 at 02:40 PM

    Hi,

    I am using this snippet to insert new infotype entry for HRP1001 in my application. It works fine, try it out.

    Maybe this is a matter of not providing administrative data (changed by, user name etc). So make sure you provide it all:

      data: l_repid like sy-repid.
      data: lt_1001 type table of p1001.
    
      field-symbols: <wa_1001> type p1001.
    
        l_repid = sy-repid.
    
        append initial line to lt_1001 assigning <wa_1001>.
        <wa_1001>-mandt = sy-mandt.
        <wa_1001>-plvar = '01'.
        <wa_1001>-otype = 'S'.
        <wa_1001>-objid = i_position_from.
        <wa_1001>-infty = '1001'.
        <wa_1001>-rsign = 'B'.
        <wa_1001>-relat = '9YE'. "Is Delegator of
        <wa_1001>-istat = '1'.
        <wa_1001>-begda = i_begda.
        <wa_1001>-endda = i_endda.
        concatenate 'S' i_position_to into <wa_1001>-varyf separated by space.
        <wa_1001>-aedtm = sy-datum.
        <wa_1001>-uname = sy-uname.
        <wa_1001>-sclas = 'S'.
        <wa_1001>-sobid = i_position_to.
    
        call function 'RH_INSERT_INFTY'
          exporting
            vtask               = 'D'
            repid               = l_repid
          tables
            innnn               = lt_1001
          exceptions
            no_authorization    = 1
            error_during_insert = 2
            repid_form_initial  = 3
            corr_exit           = 4
            begda_greater_endda = 5
            others              = 6.
    

    Regards

    Marcin

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      >

      > Thanks for the reply. I have tried this, which does not work. I have debugged the code and it fails at the point where sap expects REPID and FORM to be passed through the FM. This check ONLY happens for hrpnnnn insert which have an associated text table entry to be created.

      > In r3 HRP1035 records creates an entry on hrt1035 as well.

      i currently have the same problem. But it seems that REPID has to be filled with the name of your report where the function FORM is defined. FORM must deliver the data to be inserted in hrt1035. An (standard SAP) example can be found in report RHCHECKS.

      Sorry i can give no further information yet, i have to find out first how it works 😊

  • Apr 18, 2013 at 08:31 AM

    Hi,

    I had the same problem but now I have a solution.

    To create a right IT1035 you have to do the following steps:

    1. Create Schedule using Function  'HRIQ_EVENT_SCHEDULE_BUILD'

    2. Create Infotype with function 'RH_PNNNN_MAINTAIN'

    With the function 'HRIQ_EVENT_SCHEDULE_BUILD' you get the structure and the data for Infotype1035 and the data for Table HRT1035. This table contains the special entries for every day of the training (the schedule).

    With function 'RH_PNNNN_MAINTAIN' you will create the infoype and the entries in Table HRT1035.

         e.g.

       CALL FUNCTION 'HRIQ_EVENT_SCHEDULE_BUILD'
      EXPORTING
       PLVAR                      = lv_plvar
       ISTAT                      = '1'
        event_begda                = lv_begda
        event_endda                = lv_endda
       EVENT_OBJID                = lv_objectid
      MONDAY                     = 'X'
       TUESDAY                    = 'X'
       WEDNESDAY                  = 'X'
       THURSDAY                   = 'X'
       FRIDAY                     = 'X'
    *   SATURDAY                   =
    *   SUNDAY                     =
        event_beguz                = '090000'
        event_enduz                = '170000'
    *   SERIES_BEGIN               =
    *   SERIES_END                 =
        frequency                  = '1'
    *   EVENT_LOCATION             =
    *   COUNT_EVENTS               =
    *   SHIFT_BACK_ALLOWED         = ' '
    IMPORTING
       PT_1035                    = lt_p1035
       PT_1035T                   = lt_p1035_t
    *   PT_DAYSOFF                 =
    *   PT_DAYSFREE                =
    EXCEPTIONS
       NO_DATE_NUMBER             = 1
       FREQUENCY_IS_INITIAL       = 2
       OTHERS                     = 3
              .

    LOOP AT lt_p1035 into ls_p1035.
    ENDLOOP.

    call function 'RH_PNNNN_MAINTAIN'
      exporting
        act_fcode                   = 'INSE'
       act_plvar                   = lv_plvar
        act_otype                   = 'E'
        act_objid                   = lv_objectid
       act_infty                   = '1035'
       act_subty                   = '0001'
       act_istat                   = '1'
       act_begda                   = lv_begda
       act_endda                   = lv_endda
       act_new_langu               = 'D'
       act_pnnnn                   = ls_p1035
    *   ACT_INFOTYPEKEY             =
    *   ACT_DPATT                   =
    *   ACT_GDATE                   =
    *   ACT_NEW_HISTO               =
       act_enqueue                 = 'X'
       suppress_dialog             = '2'
       act_vtask                   = 'S'
       act_commit_flg              = 'X'
       act_maint                   = 'X'
       clear_buffer_plog_tab       = 'X'
    *   SUPPRESS_INTEGRATION        =
    *   ACT_PPPAR_EXEP              =
    importing
    *   ACT_OK_CODE                 =
       act_pnnnn_out               = ls_p1035
    *   ACT_MESS_INFO               =
    TABLES
       ACT_HRTNNNN                 = lt_p1035_t
    * EXCEPTIONS
    *   INFTY_NOT_VALID             = 1
    *   NO_PLVAR                    = 2
    *   OBJECT_NOT_DEFINED          = 3
    *   OTYPE_NOT_VALID             = 4
    *   NO_AUTHORITY                = 5
    *   ACTION_REJECTED             = 6
    *   NO_GDATE                    = 7
    *   FCODE_NOT_SUPPORTED         = 8
    *   OTHERS                      = 9
              .

    Add comment
    10|10000 characters needed characters exceeded