RH_INSERT_INFTY to insert HRP1018
Hi Guys,
How will I use this function to upload HRP1018 (Cost distribution). There are fields that I want to upload which reside in another table HRT1018 but is connected to HRP1018.
I would appreciate your response.
Thanks,
~Mark
Has anyone tried to upload HRP1018 or P1610 (US Job attributes) using function modules or user routines?
I would appreciate any responses.
Thanks,
~Mark
Similar Messages
-
RH_INSERT_INFTY not creating new records
Hi All,
I am using the FM RH_INSERT_INFTY to insert new records in HRP1000.
See the below FM call :
CALL FUNCTION 'RH_INSERT_INFTY'
EXPORTING
fcode = 'INSE'
vtask = 'D'
order_flg = 'X'
commit_flg = 'X'
authy = 'X'
PPPAR_IMP =
OLD_TABNR = ' '
REPID = ' '
FORM = ' '
keep_lupd = keep_lupd
TABLES
innnn = it_i1000
EXCEPTIONS
no_authorization = 1
error_during_insert = 2
repid_form_initial = 3
corr_exit = 4
begda_greater_endda = 5
OTHERS = 6.
But instead of creating new records it is changing the existing record in HRP1000.
Actually I want to create new records with different long text and short text in different languages so in case object id and object type even the dates can be same but the language would be different.
So I need to create a new records with a different language key and different short text. But this function module is changing the existing object short text,long text and language.
Could you please reply at the earliest.
Thanks & Regards,
PoonamHi,
you're right, this function didn't create new record when i want to create a record with same object but have different language.
you can use this function for your problem : RH_INSERT_INFTY_DIRECT
i tried and it works.
CALL FUNCTION 'RH_INSERT_INFTY_DIRECT'
EXPORTING
vtask = 'V'
KEEP_LUPD =
tables
innnn = p1000
EXCEPTIONS
NO_AUTHORIZATION = 1
ERROR_DURING_INSERT = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 4
BEGDA_GREATER_ENDDA = 5
OTHERS = 6
Regards, -
Error using FM RH_INSERT_INFTY
Hi Guy's
Im facing an issue while using FM RH_INSERT_INFTY to insert data in Infotype HRP1028
its raising a exception "2-ERROR_DURING_INSERT "
DATA : it_hrp1028 TYPE STANDARD TABLE OF HRP1028 INITIAL SIZE 0.
it_hrp1028-PLVAR = '01'.
it_hrp1028-otype = 'S'.
it_hrp1028-objid = positionid.
it_hrp1028-infty = '1028'.
it_hrp1028-istat = '1'.
it_hrp1028-begda = begda.
it_hrp1028-endda = endda.
it_hrp1028-build = build.
APPEND it_hrp1028.
CALL FUNCTION 'RH_INSERT_INFTY'
EXPORTING
FCODE = 'INSE'
VTASK = 'S'
ORDER_FLG = 'X'
COMMIT_FLG = 'X'
AUTHY = 'X'
PPPAR_IMP =
OLD_TABNR = ' '
REPID = ' '
FORM = ' '
KEEP_LUPD =
WORKF_ACTV = 'X'
TABLES
INNNN = it_hrp1028
ILFCODE =
EXCEPTIONS
NO_AUTHORIZATION = 1
ERROR_DURING_INSERT = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 4
BEGDA_GREATER_ENDDA = 5
OTHERS = 6
IF SY-SUBRC EQ 0.
CALL FUNCTION 'RH_UPDATE_DATABASE'
EXPORTING
vtask = 'S'
EXCEPTIONS
corr_exit = 1
OTHERS = 2.
ENDIF.
Thanks in advance for the helpHi everybody,
Did you solve this issue? I am facing a similar problem with FM RH_INSERT_INFTY, it's also raising a exception "2-ERROR_DURING_INSERT". In my case, i'm trying to insert a new record for the infotype 1028 but not as a position (S), im trying to insert the record as object type 'O'. So, in this case I don't have the field hrp1028-build.
Is there any other way to do this? -
Get error in FM RH_INSERT_INFTY'
Hi Guy's
Im facing an issue while using FM RH_INSERT_INFTY to insert data in Infotype HRP9503
its raising a exception "2-ERROR_DURING_INSERT "
Regards,
S.VelsankarHi,
Debug the form routine INSERT_INFTY in the FM. In the form routine, there are places where subrc = 16 is set. check the same.
Sujay -
Runtime error when inserting rows in hrp1018 and hrt1018 tables
Hi All,
I have a requirement to insert row in hrp1018 and hrt1018 tables.These tables are interlinked.So, I have used FM 'RH_INSERT_INFTY'. The exact code which I have used is as follows.
*****************************************code***************************************************************
<< Please post only the relevant portion of the code >>
The runtime error which is coming is as follows:
Error analysis
An internal error in the database interface occurred during access to
the data of table "HRT1018 ".
The situation points to an internal error in the SAP software
or to an incorrect status of the respective work process.
For further analysis the SAP system log should be examined
(transaction SM21).
For a precise analysis of the error, you should supply
documents with as many details as possible.
Please let me know why this error is coming.I am not able to find out mistake in the FM and form used in the code.
Thanks in advance,
BBKrishna.
Edited by: Rob Burbank on Jun 9, 2009 1:31 PMI am adding the code once again.Please let me know why the error is coming up.
lv_mproj = 'BLDNG'.
wa_p1018-mandt = sy-mandt.
wa_p1018-otype = '9M'.
wa_p1018-objid = '50009650'.
wa_p1018-begda = '20090608'.
wa_p1018-endda = '99991231'.
wa_p1018-infty = '1018'.
wa_p1018-plvar = '01'.
wa_p1018-otype = '9M'.
wa_p1018-istat = '1'.
append wa_p1018 to it_p1018.
repid = sy-repid.
*Updating hrp1018 and hrt1018 tables
CALL FUNCTION 'RH_INSERT_INFTY'
EXPORTING
FCODE = 'INSE'
VTASK = 'D'
AUTHY = ' '
REPID = repid
FORM = 'FILL_TABS'
TABLES
INNNN = it_p1018
EXCEPTIONS
NO_AUTHORIZATION = 1
ERROR_DURING_INSERT = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 4
BEGDA_GREATER_ENDDA = 5
OTHERS = 6
IF SY-SUBRC <> 0.
CALL FUNCTION 'BALW_BAPIRETURN_GET'
EXPORTING
TYPE = SY-MSGTY
CL = sy-msgid
NUMBER = SY-MSGNO
PAR1 = ' '
PAR2 = ' '
PAR3 = ' '
PAR4 = ' '
LOG_NO = ' '
LOG_MSG_NO = ' '
IMPORTING
BAPIRETURN = return_rec
EXCEPTIONS
ONLY_2_CHAR_FOR_MESSAGE_ID = 1
OTHERS = 2
IF SY-SUBRC <> 0.
lv_mproj = text-011
ELSE.
ii_return = return_rec.
CONCATENATE ii_return-type '-' ii_return-message
INTO lv_err_msg SEPARATED BY SPACE.
ENDIF.
ENDIF.
*RHCD_TAB-PROZT
FORM fill_tabs TABLES ins_tab
USING ins_set ins_index.
DATA : BEGIN OF set.
INCLUDE STRUCTURE wplog.
DATA : END OF set.
DATA: BEGIN OF h_pt1018. "to initialize INS_TAB
INCLUDE STRUCTURE pt1018.
DATA: END OF h_pt1018.
REFRESH ins_tab.
set = ins_set.
CASE set-infty.
WHEN '1018'.
h_pt1018-posnr = lv_mproj.
h_pt1018-prozt = '100.00'.
IF NOT ( h_pt1018 IS INITIAL ).
CLEAR ins_tab.
ins_tab+36(8) = lv_mproj. "h_pt1018.
ins_tab+134(5) = '100.00'.
APPEND ins_tab.
ENDIF.
ENDCASE.
ENDFORM. -
Hello!
I am developing an inbound IDoc, during which i am suppose to insert respective segment structure into infotypes PA0000, PA0001, PA0002, PA0006 & PA0008 through Function Module RH_INSERT_INFTY, its throwing error sy-subrc 1, i can give sample code of it
CALL FUNCTION 'RH_INSERT_INFTY'
EXPORTING
fcode = 'INSE'
vtask = 'S'
order_flg = 'X'
commit_flg = 'X'
repid = sy-repid
TABLES
innnn = innnn
EXCEPTIONS
no_authorization = 1
error_during_insert = 2
repid_form_initial = 3
corr_exit = 4
begda_greater_endda = 5
OTHERS = 6.
The internal table innnn has record of type as follows
710 12080033 12/31/2006 12/27/2005 000 01/02/2006
When Idoc is posted through We19 through 'RH_INSERT_INFTY', it throws Sy-Subrc 1.
When the same record is input manually through SE37 into function Module 'RH_INSERT_INFTY', it throws error_during_insert,
Can any guys suggest me to come out of this problem, if possible suggest any other standard Fuction Module to insert data into Infotypes,
Thank You
Regards
RajeshHi Rajesh,
The function module 'RH_INSERT_INFTY lets you insert multiple infotype records for OM objects into the Personnel Planning databases (HRPnnnn). ie the PD infotypes. For updating PA infotypes pl use 'HR_INFOTYPE_OPERATION' as suggested by others earlier.
Regards,
Suresh Datti -
EREC: An error occurred when you tried to insert infotype 1001 in IDOC
Hello Experts,
I have standalone e-Recruitment system and separate SAP HR system. I have ALE configuration done to talk both system.
In the Initial Transfer, I ran PFAL in HR system in 5 steps.
Step 1 Execute PFAL (RHALEINI)for Obj Type O, Infotype 1000 and Transfer mode as Update mode
Step 2 Execute PFAL (RHALEINI)for Obj Type S, Infotype 1000 and Transfer mode as Update mode
Step 3 Execute PFAL (RHALEINI)for Obj Type O and Transfer mode as Insert
Step 4: Execute PFAL (RHALEINI)for Obj Type S and Transfer mode as Insert
Step 5: Execute PFAL (RHALEINI)for Obj Type P and Transfer mode as Insert
All IDOC created in update mode (Step 1 & 2) are green in receiving e-recruitment system but IDOC getting create in Insert mode (Step 3 ,4 &5) are in status 51/52 I mean Red.
Error messages are as below:
1) An error occurred when you tried to insert infotype 1001 using RH_INSERT_INFTY (return code 3).
2) You tried to create a relationship from object 01S 76037685 to object 01AGC:R3HCM:OM_DISPLAY_US. However, object 01AGC:R3HCM:OM_DISPLAY_US does not exist or is not active in the period from 20110101 to 99991231
3) You tried to create a relationship from object 01O 10840305 to object 01O 10299323. However, object 01O 10299323 does not exist or is not active in the period from 20110101 to 99991231.
@ 3rd message : Object 10299323 exist but I still don't understand why I get this message.
Please provide valuable suggestion so that I can get rid of this error in IDOC
Appreciate your help.
Regards,
Krishna Bidwai
Losangeles USA.
818 527 0204.
Edited by: krishna bidwai on Aug 22, 2011 7:19 PMDear Krishna,
Hope you are doing good.
I know its very late in getting into this conversation. Since I am also experiencing the same issue, i need some inputs from you.
The error you posted on the top is same what i am getting when I am doing data transfers from SAP HR to E-Rec systems. Our iDoc is working file in Development server but not in Quality server. I am experiencing the same errors what you have mentioned above.
When i checked the error, this error has occurred in subroutine read_namtb for structure of infotype.
Proceedure is to Check the entry for infotype in table T777D (structure, IDoc segment,
expanded structure) and the corresponding structures.
As you have resolved this issue before, can you please suggest what needs to be maintained in the tables such as T777D, T777E, and T777Z.
Appreciate your valuable inputs on this.
Thank you. -
Insert records in a table infotype
Hi all,
I had create a table infotype using PPCI transaction.
Now I need to insert some records, but I can't find any function module for that.
With RH_INSERT_INFTY I might be able to insert the HRPnnnn record, but not the HRTnnnn records.
Can anyone help me?
Thanks,
Luis CruzFound by myself.
Function module RH_INSERT_INFTY_EXP
DATA: lt_hrp9xxx TYPE TABLE OF p9xxx,
lt_hrt9xxx TYPE TABLE OF hrt9xxx,
ls_hrp9xxx LIKE LINE OF lt_hrp9xxx,
ls_hrt9xxx LIKE LINE OF lt_hrt9xxx.
ls_hrp9xxx-plvar = '01'.
ls_hrp9xxx-otype = 'E'.
ls_hrp9xxx-objid = 'xxxxxxxxx'.
ls_hrp9xxx-infty = '9xxx'.
ls_hrp9xxx-istat = '2'.
ls_hrp9xxx-begda = '2011xxxx'.
ls_hrp9xxx-endda = '2011xxxx'.
ls_hrp9xxx-zzfield = 'xxxxxx'.
APPEND ls_hrp9xxx TO lt_hrp9xxx.
ls_hrt9xxx-tabseqnr = 1.
ls_hrt9xxx-zzfield = 'xxxx'.
APPEND ls_hrtxxx TO lt_hrt9xxx.
CALL FUNCTION 'RH_INSERT_INFTY_EXP'
EXPORTING
vtask = 'D'
TABLES
innnn = lt_hrp9xxx
tnnnn = lt_hrt9xxx
EXCEPTIONS
OTHERS = 99. -
Using FM RH_INSERT_INFTY
Hi,
I want to use FM RH_INSERT_INFTY in background job. If there is no error this FM works as expected, but if an error comes, this FM terminates the background job without any error.
How can i catch errors from this FM in background job?
Regards,
Ashish GuptaHi Richard,
Thanks a lot for your reply.
I am inserting a record in IT1001 (cost centre relationship 1001).
I have used this FM in method FLUSH of HCM Process and Forms Advanced Generic service. If i create a normal program inse38, this FM gives error in exception as sy-subrc = 2, which is correct. But FLUSH method is run in background with user WF-BATCH.
Now what happens is, there is a FM HRCA_COBL_CHECK in this FM RGH_INSERT_INFTY. Now what happens is HRCA_COBL_CHECK give an error message KI 260. To display this error message it is looking for screen which is not available in background and hence just terminates the processing of program without returning any error message or short dump.In HR_INFITYPE_OPERATION we have option to supress dialog but no similar option in this FM.
regards,
Ashish Gupta -
Error message return in RH_INSERT_INFTY
Do you have any idea on how to return error messages from FM RH_INSERT_INFTY? im looking for something similar to HR_INFOTYPE_OPERATION bapi return 2.
Just handling its Exceptions should be enough as it does not have any RETURN tables like the other ones. This is how I did it sometimes ago, you might find it helpful to refer to the below code.
FORM update_pd_infty USING pt_old_pnnnn TYPE piq_p1001_t
ps_new_pnnnn TYPE p1001
CHANGING pv_ok TYPE boole_d.
DATA:
wplog_record TYPE wplog,
wplog_record_tab TYPE wplog_tab.
FIELD-SYMBOLS:
<ls_old_pnnnn> TYPE p1001.
* check the old & new infotype records are not passed blank
CHECK:
pt_old_pnnnn IS NOT INITIAL,
ps_new_pnnnn IS NOT INITIAL.
* convert the Old PNNNN structure to WPLOG structure
LOOP AT pt_old_pnnnn ASSIGNING <ls_old_pnnnn>.
CALL METHOD cl_hrrcf_infotype=>pnnnn_to_wplog
EXPORTING
pnnnn = <ls_old_pnnnn>
IMPORTING
wplog = wplog_record.
APPEND wplog_record TO wplog_record_tab.
ENDLOOP.
* delete the existing records (at buffer level only at this stage)
CALL FUNCTION 'RH_DELETE_INFTY'
EXPORTING
vtask = 'B'
authy = abap_false
TABLES
innnn = wplog_record_tab
EXCEPTIONS
error_during_delete = 1
no_authorization = 2
delete_first_record = 3
corr_exit = 4
OTHERS = 5.
IF sy-subrc <> 0.
RETURN.
ENDIF.
CLEAR:
wplog_record,
wplog_record_tab.
* convert the New PNNNN structure to WPLOG structure
CALL METHOD cl_hrrcf_infotype=>pnnnn_to_wplog
EXPORTING
pnnnn = ps_new_pnnnn
IMPORTING
wplog = wplog_record.
APPEND wplog_record TO wplog_record_tab.
* insert/create the new record (at buffer level only at this stage)
CALL FUNCTION 'RH_INSERT_INFTY'
EXPORTING
vtask = 'B'
authy = abap_false
TABLES
innnn = wplog_record_tab
EXCEPTIONS
no_authorization = 1
error_during_insert = 2
repid_form_initial = 3
corr_exit = 4
begda_greater_endda = 5
OTHERS = 6.
IF sy-subrc <> 0.
RETURN.
ENDIF.
* update the database now for all buffer changes above
CALL FUNCTION 'RH_UPDATE_DATABASE'
EXPORTING
vtask = 'D'
EXCEPTIONS
corr_exit = 1
OTHERS = 2.
IF sy-subrc <> 0.
RETURN.
ENDIF.
pv_ok = abap_true.
ENDFORM. " UPDATE_PD_INFTY
Hope this helps.
Cheers,
Sougata. -
Hello Community,
Anybody knows if it´s posibble insert field HRP1042-NHOURS in tab "Without pattern"( tr.PP01, Schedule Model) by means of RH_PNNNN_MAINTAIN o whatever other MF, BAPI, class, etc.; not BDC.
With MF RH_PNNNN_MAINTAIN, I achieve create a record in table HRP1042, with field HRP1042-NHOURS filled. But It doesn´t work correctly, because in the transaction PP01, if you select Schedule Model( infotype HRP1042), the field Duration/Hours isn´t filled.
I believe that the problem is caused when I call to MF RH_PNNNN_MAINTAIN, the process always choose 1º option, "With Pattern" of the 3 tabs of the option Schedule Model:
-With Pattern
-Without pattern
- User-defined.
I didn´t see what is the way to choose 2º option in this MF.
Best regards.Hi
I think you can use FM RH_INSERT_INFTY with below parameters for each tabstrip.
Schedule Model with Pattern : Time Schedule of Business Event should be having some value (p1042-AMUST).
Schedule Model Without Pattern : Time Schedule of Business Event should be blank (p1042-AMUST) and p1042-tabnr should be blank.
User defined : Time Schedule of Business Event should be blank (p1042-AMUST) and p1042-tabnr should be having some value.
~~~Ganesh Kumar K. -
Insertion of infotype 1002 return code 3
Hello
We are replication data from HR to SRM system. In infotype 1002 subtype 9002 is maintained in HR.
But in SRM server idoc is failing with errir 'insertion of infotype 1002 tthrough rh_insert_infty ,return code 3'.
I could'nt find any record in SRM server with subtype 9002, please tell me if we need to create this subtype 9002 in SRM server
and from where this description we can read in SRM server.
Please help , its severity 1
Thanks and Regards
ManuDear Manu,
Yes you need to create this subtype 9002 in SRM system or else HR transfer will not be successful.
Hopefully it will work.
Regards
Christine -
Insert Infotype with Table Part
Hi All,
I am trying to insert Infotype nnnn including the information in the table part using a Function Module.
I have found FM RH_INSERT_INFTY_EXP. This FM has a parameter called TNNN which is supposed to hold the table part information. However, I have tried to used this but the table part is not filled.
I saw that PNNNN-ITXNR is relevant here.. However, incremeting this number for each entry I write seems unhandy..
Can anybody help me here?
Thanks, JohannesHi Maricella,
Use FM 'RH_INSERT_INFTY'.
Pass values for below parameters while calling the FM.
REPID = SY-REPID
FORM = 'FILL_TASK_DATA'
Create a subroutine with the same name as you have given above for 'FORM'
and in this subroutine you can populate data for HRTNNNN. -
Hi all,
Is there any funtion modules to insert data into HRP1000, HRP1001, HRP1002, HRP1021, HRP1024, and HRP1035 infotype table?
thanks.Hi,
Also try with this
RH_INSERT_INFTY ,RH_INSERT_INFTY_DIRECT
Thanks,
Deb -
Can not insert/update data from table which is created from view
Hi all
I'm using Oracle database 11g
I've created table from view as the following command:
Create table table_new as select * from View_Old
I can insert/update data into table_new by command line.
But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)
Anybody tell me, what's happend? cause?
Thankyou
thiensu
Edited by: user8248216 on May 5, 2011 8:54 PM
Edited by: user8248216 on May 5, 2011 8:55 PMI can insert/update data into table_new by command line.
But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)so what is wrong with the GUI tools & why posting to DATABASE forum when that works OK?
Maybe you are looking for
-
How do I know if my application is running from within WebLogic server
I have an application that could be running either as a standalone application (with its own VM) or as a servlet (within the WebLogic's VM). How can the application determine the environment in which it is running?
-
I have just bought a black Apple TV and it works fine when connecting my iPad to a modern TV. However on an older Philips TV, there is no sound coming through. Do I need to use an audio cable from the optical digital audio port in addition to the H
-
How to upload size 4k file to oracle BLOB field
hi all, i'm using Oracle 9i, Orcale JDBC thin Driver and ibm websphere to develop a java application.i have used java EJB/CMP to insert images into BLOB field in oracle. i used byte[] mapping to BLOB.i did it successfully. however, i'm facing another
-
Problem in JNDI Lookup of Deployable Proxy from the logon par file
Hi, I have customized the Logon par file and have a functionality to call a webservice when the Password Reset happens. <b>from the ResetPassword.jsp , SAPMLogonLogic.java is getting called ,and there is a method called performResetPassword().</b> I
-
IMac has few display options, any way to enable more?
This is my uncle's iMac () and there are a lack of options for resolution. He's running @ 1920x1200 but the next level down is 1344x840. Is there any way to enable more resolutions between those 2, as it seems like a fairly big drop in resolution set