PA & OM Infotype
Hi,
What is the main difference b/w PA OM infotype?
Is it possible to add PA Infotype in OM?
with regards
suresh
Hi Suresh,
The main difference is that they store data for different modules, PA and OM.
PA infotypes store Person related data against the Personnel Number (PERNR field). The tables being with PA, e.g. PA0000.
OM infotypes store object data against an object ID and object type. Object types can be O (OrgUnit), S (Position), P (Person - whose object ID will be the PERNR from PA), C (Job), K (Cost Center) etc. The tables begin with HRP, e.g. HRP1000.
For example, OrgUnit data will not be stored in PA infotypes - it will be stored in OM infotypes. Person data is always stored in PA infotypes, although sometimes P objects are represented in OM. This is usually only in table HRP1001 which stores relationships between objects (in this example, S to P (position to holder)).
PA infotypes usually start with a 0 while OM infotypes will start with 1, 2, 3 etc. Customer infotypes of both types start with a 9 (e.g. PA9001 or HRP9003).
I hope that helps.
Best regards,
Luke
Similar Messages
-
Error in creation of custom PD infotype
Hi,
I have a task of creating a custom PD infotype(p9xxx). I created HRI9xxx structure with all the custom fields and when I try to create the infotype using tcode PPCI(selected 'field infotype' option and create button in the 'infotype' block was pressed), it gives an error message that p9xxx-begda is not in ABAP dictionary and then it gives me list of screens, module pools and tables created. This custom infotype entry does not exist in T777I. I have tried regenerating it and same problem persists. If anyone knows the solution, please do let me know.
Thanks in advanceSolved.
-
Error while creating a query for my custom infotype
Hi,
I have created a custom infotype with fields currency amount and currency field .
While I am creating a query for it its giving an error
Message no. AQ_AD_HOC221 Error when generating the report(see long text )
I tried to execute the standard program RPUMS40CCI but still I am facing same error .
I have also maintained table T777i for my infotype but still problem exists.
Please help.
PHi
Check in PM01 -
Error while creating a record in a custom infotype
hi to all experts,
I have created a infotype with 3 screens . But one of the screen im getting this error while saving a record .The Required screen change cannot be made.Im defining using the table pa9005 not the structure p9005
(is it the same)
Please help me ....
Edited by: mohammed abdul hai on Sep 18, 2009 8:20 AM -
Error while transporting modification in module pool of a specific infotype
HI experts,
While transporting some modifications that have be done on the PAI of a module pool of a specific infotype, we have an error with code return = 8, the error is --> Original object R3TRPROGMP900730 must not be changed!!!
Any suggestion .
Tanhks a lot .Hi ,
Nice to know that your problem is solved. If any of the replies were usefull please acknowledge their work.
And it would be great if you can just put in your remarks about the best solution you had in solving that problem.
It might be useful to other users when they encoutner such problem.
BR,
Vijay. -
Error while editing an automaticlly populated record of a custom infotype
hi,
a query in HR ABAP.
i have created a custom Infotype to store the CTC details of an employee. this custom IT needs to get the records auto populated, when they are created in Infotype 0008.
i have used the exit. EXIT_SAPFP50M_002 inside which an include program is written :ZXPADU02
using this, the records made to get create automatically in the custom IT.
but when we try to modify or delete those records thru the tcode PA30,
it does not allow to do so and throws a standard error message. as below.
Specified subtype is invalid
Message no. PG088
please help me out to fix this issue.the exact point of the std error is,
i do the folowing steps.
1)_ for auto creating a record in custom IT Pa**** , i goto transaction, PA30, create record in IT 0008 with a basic Pay., click on save.
on saving , the EXIT_SAPFP50M_002 is called where i ve written a Z inlcude Program, which inserts the record in custom IT PA****. this is successful.
2) when i try to change or delete the same record which i ve created as above, through the Tcode PA30 for custom IT, PA
****, i get the error.
hope the problem is clearly mentioned -
Problem in creation of infotype
Hi,
When i will try to create a custom infotype and am trying to save it ,it gives the following error "Package in non-original system only modifiable with Organizer Tools" and a default package came in the initial screen of PM01.So i cant understand it please help me to saolve this issue.
Waiting for ur reply.....
Thanks,
AliAli,
Please check the package which you are saving. per my understanding, this is routed to non original system.
Use the valid package which is attached and routed to QAT and PRD box path, then it will resolve your issue.
Regards,
Raj -
HR-ABAP Infotype Authorization issue!
Hello Experts,
Need your quick suggestions and inputs, which we're currently facing in our project.
We're using the PNPCE Logical Database for processing/retrieving the records from infotypes and ALV reports are generated.
Currently, we have an authorization control which will restrict the user roles in accessing certain infotypes. Thus, the user role is assigned with necessary infotype access in PFCG.
Now the issue is if a particular user role donot have the authorization to infotye XXXX, which is defined in the Global Declaration (Top Include) in the INFOTYPES statement. Eg: INFOTYPES: XXXX.
Thus, when the report is executed, the following XXXX infotype authorization is checked as it is defined in INFOTYPES statement, but since the user role is not given the XXXX infotype authorization in PFCG the report execution fails when it checks the infotype authorization when it enters GET PERAS. Thus, a blank screen is thrown with standard SAP error... "No authorization for XXXX infotype".
Is there any way this error message which blocks the execution of the report be by-passed? If yes, please help to suggest the necessary steps to do so. Thus, the report execution should not be blocked and the ALV report should be displayed with blank values for those XXXX infotypes which donot have authorization even though defined in INFOTYPES statement in Top Include.
Hope am much clear in describing the major issue that we're currently facing.
Any inputs to get this issue resolved will be highly appreciated.
Thanks in anticipation.
Regards,
SundarHave you explored the option of using the BAdI HRPAD00AUTH_CHECK?
~Suresh -
Hi Masters,
Can you please let me know the perfect reason for infotypes concept in HR-ABAP.
1 Why we are using infotypes and exactly what is purpose?
2.Why we are using LDB's why cannot we extract data directly from database tables?
3.Can you please give me clear explanations about these infotypes.Hi
Infotype(s) are used in the Personnel Management (PA) module primarily. This is where personnel master data is stored. Data is grouped according to subject matter. The Human Resources component aims to enable the user to process employee data in an effective structure in accordance with business requirements. The data structure of infotypes mirrors a logical set of data records. Infotypes can be identified by their four-digit keys, for example, the Addresses infotype (0006). To facilitate reporting on past employee data, infotypes can be saved for specific periods.
Some people use the term HR ABAP to describe the method of managing the infotype data. Typically HR logical databases are used which offers more secure methods of accessing the infotype data. Once the infotypes are declared, you can use standard macros to access the data. Table TRMAC holds the macro name and the code behind it. This makes developing HR programs much quicker and easy to turn around.
HR uses INFOTYPES instead of tables.
There are different sub modules exist in HR.
For Personal Admn the Infotypes start with PA0000 to PA1999
Time Related Infotypes start with PA2000 to PA2999.
Orgn related Infotypes start with HRP1000 to HRP1999.
All custom developed infotypes stsrat with PA9000 onwards.
In payroll processing we use Clusters like PCL1,2,3 and 4.
Instead of Select query we use PROVIDE and ENDPROVIDE..
You have to assign a Logical Database in the attributes PNP.
Go through the SAp doc for HR programming and start doing.
http://www.sapdevelopment.co.uk/hr/hrhome.htm
See:
http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
http://help.sap.com/saphelp_47x200/helpdata/en/bb/bdb041575911d189240000e8323d3a/frameset.htm
see this link you would get information about types of infotypes
Logical databases are special ABAP programs that retrieve data and make it available toapplication programs. The most common use of logical databases is still to read data fromdatabase tables by linkin them to executable ABAP programs.
Logical databases contain Open SQL statements that read data from the database.You do not therefore need to use SQL in your own programs. The logical database reads theprogram, stores them in the program if necessary, and then passes them line by line to theapplication program or the function module LDB_PROCESS using an interface work area .
For further info
check link http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
1. A logical database is in fact
a program only.
2. This LDB provides two main things :
a) a pre-defined selection screen
which handles all user inputs and validations
b) pre defined set of data
based upon the user selection.
3. So we dont have to worry about from
which tables to fetch data.
4. Moreover, this LDB Program,
handles all user-authorisations
and is efficient in all respects.
5. tcode is SLDB.
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
<b>REward fi suefull</b> -
Adding Custom OM infotype in Adhoc Query
Hi All,
I have created a custom OM infotype . This infotype contains only the description of job, i.e job notes . Below is questions on this:
1) When I am trying to add this infotype in infoset,then I am able to see this infotype in "related to object type" folder under TWO different relationship .Why its coming under relationship part. There is no relationship for this infotype .'
To include this in infoset do I have to select this infotype under both the relationship.?
Please find the screenshot of the relationships under which this infotype is coming:
Thanks,
VaibhavHi Vaibhav,
First, your question is not so clear:
You write that you are trying to add a custom infotype, which manages the job's description. Do you mean Infotype 1002? If so - this is not a custom Infotype - it's a standard one.
Second,if you want to enhance the infoset, this is done by SQ01:
Choose the relevant infoset by SQ01 and press the Change button
Choose "Edit" menu --> choose the "Change Info-Type Selection" entry
In the Popup window which appears, mark the checkbox for the relevant infotype
Regards,
Liran -
Infotype 0120 - changes in adhoc query program
Hi All,
I have to make some code changes for the std infotype 0102 - Grievances NA in the adhoc query. My requirement is :-
1) A range from 000-999 should be available for each Employee for the Grievance Number field. P0102-GRNUM.
2) If a record already exists for the employee for a particular Grievance Number -GRNUM(e.g - 467) and Stage- GRSTG(e.g.- Stage1), the system should not allow to enter another record with the same Grievance Number and Stage for the same employee.i.e. No duplication should be allowed. i.e only 3 records for 1 Grievance Number as there are only 3 stages.
Please advice me how to proceed for the same.
Thanks & Regards,
Preetihi
Its not getting clear that u want the changes for ADhoc query or in pa30.
if u want validations in adhoc query as u have mentioned in the question
u need not to go to a user exit.
In adoc query itself u can incorporate these changes
u can go to infoset of this query and write a abap code which checks the Infotype 102 for the grievance no.
If u want the validation on while creating the record then u have to use user exit ZXPAUD01 or can use BADI's also .
Regards
Manish
Award reward paoints If Useful -
Runtime Error in Record INsertion to an Infotype
Hi all,
I have created an infotype PA9035.
In that i want to insert records with value
Data: WA_PA9035 TYPE PA9035.
WA_PA9035-PERNR = P_PERNR.
WA_PA9035-ZZKOKRS = V_KOKRS.
WA_PA9035-ENDDA = '99991231'.
WA_PA9035-BEGDA = SY-DATUM.
I used the below funciton mod to insert data,
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '9035'
NUMBER = P_PERNR
SUBTYPE =
OBJECTID =
LOCKINDICATOR =
VALIDITYEND = '99991231'
VALIDITYBEGIN = SY-DATUM
RECORDNUMBER =
RECORD = WA_PA9035
OPERATION = 'INS'.
TCLAS = 'A'
DIALOG_MODE = '0'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
RETURN =
KEY =
I am getting RUNTIME ERROR in that..the error is....
The source field is too short.
In the running program "SAPLHRMM" a field should have been assigned to a field
symbol, which is shorter than the type of the field symbol.
This is not possible.
It is a statement of the form ASSIGN f TO <fs> CASTING...
or ASSIGN f TO <fs> with a field symbol that was created with the
STRUCTURE addition.
Please help me...
Regards,
Thendral.Hi all,
I have created an infotype PA9035.
In that i want to insert records with value
Data: WA_PA9035 TYPE PA9035.
WA_PA9035-PERNR = P_PERNR.
WA_PA9035-ZZKOKRS = V_KOKRS.
WA_PA9035-ENDDA = '99991231'.
WA_PA9035-BEGDA = SY-DATUM.
I used the below funciton mod to insert data,
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '9035'
NUMBER = P_PERNR
SUBTYPE =
OBJECTID =
LOCKINDICATOR =
VALIDITYEND = '99991231'
VALIDITYBEGIN = SY-DATUM
RECORDNUMBER =
RECORD = WA_PA9035
OPERATION = 'INS'.
TCLAS = 'A'
DIALOG_MODE = '0'
NOCOMMIT =
VIEW_IDENTIFIER =
SECONDARY_RECORD =
IMPORTING
RETURN =
KEY =
I am getting RUNTIME ERROR in that..the error is....
The source field is too short.
In the running program "SAPLHRMM" a field should have been assigned to a field
symbol, which is shorter than the type of the field symbol.
This is not possible.
It is a statement of the form ASSIGN f TO <fs> CASTING...
or ASSIGN f TO <fs> with a field symbol that was created with the
STRUCTURE addition.
Please help me...
Regards,
Thendral. -
About to use HR_INFOTYPE_OPERATION to create customer infotype issue:
hi
i want to create infotype use function(HR_INFOTYPE_OPERATION).
this infotype is customer infotype.
the first scenario is:
i'm be sure no data about one employee in this infotype(9004).
to call with data upload function and put data into internal table IT_PA9004.
and the table data as follow:
one line: it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
it_pa9004-zzvalue = 50 (customer field).
two line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
it_pa9004-zzvalue = 60 (customer field).
three line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
it_pa9004-zzvalue = 70 (customer field).
four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
it_pa9004-zzvalue = 80 (customer field).
i run the programme and get information is:
11022887 insert ok.
11022887 insert ok.
11022887 insert ok.
11022887 insert ok.
but i use the transation PA30 to view all data:
in database just exist one row:
four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
it_pa9004-zzvalue = 80 (customer field).
the second scenario is:
in database the infotype have exist one row:
pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
pa9004-begda = '20080318' , pa9004-endda = '20080318'
pa9004-zzvalue = X (customer field).
and i create another row:
line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
it_pa9004-begda = '20080318' , it_pa9004-endda = '99991231'
it_pa9004-zzvalue = 80 (customer field)
i run the programme and get information is:
11022887 insert ok.
the three scenario is:
set HR_INFOTYPE_OPERATION of import parameter operation = 'MOD'
in any scenario will get error :not exist subtype .
what heppend about HR_INFOTYPE_OPERATION working,i had to use this function to
create other infotype of SAP owner.
and will create successfully.
so i thank it may be config Constraints about customer infotype.
is time Constraints effect?
so i want to how to check it?
and if i want to create one infotype for customer using PM01 what some thing
must be taken into account.
think you advance.
partial source code as follow:
FORM ACTION_INSERT .
DATA: P_FLAG TYPE C.
DATA: WA_LOG LIKE LINE OF DATA_LOG.
DATA: PP_ACTION TYPE PSPAR-ACTIO.
LOOP AT IT_PA9004.
CLEAR P_FLAG.
CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
PERFORM lock_employee USING IT_PA9004-pernr CHANGING P_FLAG.
PP_ACTION = IT_PA9004-ACTION.
PERFORM HR_INFOTYPE_OPERATION USING IT_PA9004 PP_ACTION CHANGING P_FLAG.
IF P_FLAG IS INITIAL.
if test_run = space.
COMMIT WORK.
else.
ROLLBACK WORK.
endif.
write:/ it_pa9004-pernr,'insert ok'.
ELSE.
ROLLBACK WORK.
write:/ it_pa9004-pernr,'error'.
ENDIF.
PERFORM unlock_employee USING IT_PA9004-pernr .
ENDLOOP.
ENDFORM. " ACTION_INSERT
FORM LOCK_EMPLOYEE USING P_PERNR
CHANGING PP_FLAG.
CHECK PP_FLAG IS INITIAL.
CLEAR P_RETURN.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = P_PERNR
IMPORTING
return = P_RETURN
EXCEPTIONS
OTHERS = 01.
CALL FUNCTION 'HR_INITIALIZE_BUFFER'
EXPORTING
pernr = P_PERNR.
IF P_RETURN IS NOT INITIAL.
PP_FLAG = '1'.
ENDIF.
ENDFORM. " LOCK_EMPLOYEE
FORM HR_INFOTYPE_OPERATION USING P_PA9004 LIKE IT_PA9004
P_ACTION type PSPAR-ACTIO
CHANGING PP_FLAG.
CHECK PP_FLAG IS INITIAL.
DATA: bapipakey type bapipakey,
P_SUBTY TYPE P9004-SUBTY,
PP_9004 TYPE TABLE OF P9004 WITH HEADER LINE.
CLEAR P_RETURN.
REFRESH PP_9004.
MOVE-CORRESPONDING P_PA9004 TO PP_9004.
IF P_ACTION = 'INS'.
PP_9004-AEDTM = SY-DATUM.
PP_9004-UNAME = SY-UNAME.
ENDIF.
IF P_ACTION = 'MOD'.
PP_9004-AEDTM = SY-DATUM.
PP_9004-UNAME = SY-UNAME.
ENDIF.
APPEND PP_9004.
P_SUBTY = P_LGART.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '9004'
subtype = 'FQ03'
subtype = P_SUBTY
number = PP_9004-pernr
validityend = PP_9004-ENDDA
validitybegin = PP_9004-begda
RECORDNUMBER = pp_9004-seqnr
record = PP_9004
operation = 'INS'
operation = P_ACTION
nocommit = 'X'
IMPORTING
return = P_RETURN
key = bapipakey
EXCEPTIONS
OTHERS = 0.
IF P_RETURN IS NOT INITIAL.
PP_FLAG = '9'.
ENDIF.
ENDFORM. " HR_INFOTYPE_OPERATION
FORM UNLOCK_EMPLOYEE USING P_PERNR.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = p_pernr
IMPORTING
return = P_RETURN
EXCEPTIONS
OTHERS = 01.
ENDFORM. " UNLOCK_EMPLOYEEhi
i want to create infotype use function(HR_INFOTYPE_OPERATION).
this infotype is customer infotype.
the first scenario is:
i'm be sure no data about one employee in this infotype(9004).
to call with data upload function and put data into internal table IT_PA9004.
and the table data as follow:
one line: it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
it_pa9004-zzvalue = 50 (customer field).
two line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
it_pa9004-zzvalue = 60 (customer field).
three line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
it_pa9004-zzvalue = 70 (customer field).
four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
it_pa9004-zzvalue = 80 (customer field).
i run the programme and get information is:
11022887 insert ok.
11022887 insert ok.
11022887 insert ok.
11022887 insert ok.
but i use the transation PA30 to view all data:
in database just exist one row:
four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
it_pa9004-zzvalue = 80 (customer field).
the second scenario is:
in database the infotype have exist one row:
pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
pa9004-begda = '20080318' , pa9004-endda = '20080318'
pa9004-zzvalue = X (customer field).
and i create another row:
line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
it_pa9004-begda = '20080318' , it_pa9004-endda = '99991231'
it_pa9004-zzvalue = 80 (customer field)
i run the programme and get information is:
11022887 insert ok.
but in database just exist the first data
pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
pa9004-begda = '20080318' , pa9004-endda = '20080318'
pa9004-zzvalue = X (customer field).
the three scenario is:
set HR_INFOTYPE_OPERATION of import parameter operation = 'MOD'
in any scenario will get error :not exist subtype .
what heppend about HR_INFOTYPE_OPERATION working,i had to use this function to
create other infotype of SAP owner.
and will create successfully.
so i thank it may be config Constraints about customer infotype.
is time Constraints effect?
so i want to how to check it?
and if i want to create one infotype for customer using PM01 what some thing
must be taken into account.
think you advance.
partial source code as follow:
FORM ACTION_INSERT .
DATA: P_FLAG TYPE C.
DATA: WA_LOG LIKE LINE OF DATA_LOG.
DATA: PP_ACTION TYPE PSPAR-ACTIO.
LOOP AT IT_PA9004.
CLEAR P_FLAG.
CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
PERFORM lock_employee USING IT_PA9004-pernr CHANGING P_FLAG.
PP_ACTION = IT_PA9004-ACTION.
PERFORM HR_INFOTYPE_OPERATION USING IT_PA9004 PP_ACTION CHANGING P_FLAG.
IF P_FLAG IS INITIAL.
if test_run = space.
COMMIT WORK.
else.
ROLLBACK WORK.
endif.
write:/ it_pa9004-pernr,'insert ok'.
ELSE.
ROLLBACK WORK.
write:/ it_pa9004-pernr,'error'.
ENDIF.
PERFORM unlock_employee USING IT_PA9004-pernr .
ENDLOOP.
ENDFORM. " ACTION_INSERT
FORM LOCK_EMPLOYEE USING P_PERNR
CHANGING PP_FLAG.
CHECK PP_FLAG IS INITIAL.
CLEAR P_RETURN.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = P_PERNR
IMPORTING
return = P_RETURN
EXCEPTIONS
OTHERS = 01.
CALL FUNCTION 'HR_INITIALIZE_BUFFER'
EXPORTING
pernr = P_PERNR.
IF P_RETURN IS NOT INITIAL.
PP_FLAG = '1'.
ENDIF.
ENDFORM. " LOCK_EMPLOYEE
FORM HR_INFOTYPE_OPERATION USING P_PA9004 LIKE IT_PA9004
P_ACTION type PSPAR-ACTIO
CHANGING PP_FLAG.
CHECK PP_FLAG IS INITIAL.
DATA: bapipakey type bapipakey,
P_SUBTY TYPE P9004-SUBTY,
PP_9004 TYPE TABLE OF P9004 WITH HEADER LINE.
CLEAR P_RETURN.
REFRESH PP_9004.
MOVE-CORRESPONDING P_PA9004 TO PP_9004.
IF P_ACTION = 'INS'.
PP_9004-AEDTM = SY-DATUM.
PP_9004-UNAME = SY-UNAME.
ENDIF.
IF P_ACTION = 'MOD'.
PP_9004-AEDTM = SY-DATUM.
PP_9004-UNAME = SY-UNAME.
ENDIF.
APPEND PP_9004.
P_SUBTY = P_LGART.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '9004'
subtype = 'FQ03'
subtype = P_SUBTY
number = PP_9004-pernr
validityend = PP_9004-ENDDA
validitybegin = PP_9004-begda
RECORDNUMBER = pp_9004-seqnr
record = PP_9004
operation = 'INS'
operation = P_ACTION
nocommit = 'X'
IMPORTING
return = P_RETURN
key = bapipakey
EXCEPTIONS
OTHERS = 0.
IF P_RETURN IS NOT INITIAL.
PP_FLAG = '9'.
ENDIF.
ENDFORM. " HR_INFOTYPE_OPERATION
FORM UNLOCK_EMPLOYEE USING P_PERNR.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = p_pernr
IMPORTING
return = P_RETURN
EXCEPTIONS
OTHERS = 01.
ENDFORM. " UNLOCK_EMPLOYEE -
Not able to modify the data for infotype 0008 using FM
Hi All ,
I have got a requirement for updating the infotype 0008 data using FM : HR_MAINTAIN_MASTER_DATA.
While trying to modify the wagetypes data which is of blank ..unable to upload the amount for that partcular field ..
For this am herewith the link of o/p :
http://i55.tinypic.com/28jfw2c.jpg for this am also posting the code...
Please suggest me furthur in what way i can upload..
SELECT * FROM pa0008 INTO TABLE itab_pa0008
FOR ALL ENTRIES IN itab
WHERE pernr = wa_data-pernr
AND begda = wa_data-begda_out
AND endda = wa_data-endda_out.
DESCRIBE TABLE itab_pa0008 LINES lin.
IF lin EQ 0.
c_action = 'INS'.
ELSE.
c_action = 'MOD'.
ENDIF.
LOOP AT itab INTO wa_itab WHERE pernr = wa_data-pernr.
CLEAR: wa_bapireturn, wa_bapireturn1, wa_hr_return.
REFRESH: it_pprop[],it_modified_keys[].
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-TRFAR'. "1
it_pprop-fval = wa_itab-trfar.
APPEND it_pprop.
CLEAR it_pprop.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-TRFGB'. "2
it_pprop-fval = wa_itab-trfgb.
APPEND it_pprop.
CLEAR it_pprop.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-TRFGR'. "3
it_pprop-fval = wa_itab-trfgr.
APPEND it_pprop.
CLEAR it_pprop.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-TRFST'. "4
it_pprop-fval = wa_itab-trfst.
APPEND it_pprop.
CLEAR it_pprop.
flag = flag + 1.
*****************************************************************************************************5
BREAK-POINT.
IF NOT wa_itab-lga1 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA01'.
it_pprop-fval = wa_itab-lga1.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet1.
ENDIF.
IF NOT wa_itab-bet1 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET01'.
it_pprop-fval = wa_itab-bet1.
APPEND it_pprop.
CLEAR it_pprop.
ENDIF.
*******************************************************************************************************6
IF NOT wa_itab-lga2 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA02'.
it_pprop-fval = wa_itab-lga2.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
ENDIF.
IF NOT wa_itab-bet2 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET02'.
it_pprop-fval = wa_itab-bet2.
APPEND it_pprop.
CLEAR it_pprop.
ENDIF.
*******************************************************************************************************7
IF NOT wa_itab-lga3 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA03'.
it_pprop-fval = wa_itab-lga3.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
ENDIF.
IF NOT wa_itab-bet3 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET03'.
it_pprop-fval = wa_itab-bet3.
APPEND it_pprop.
CLEAR it_pprop.
ENDIF.
*******************************************************************************************************8
IF NOT wa_itab-lga4 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA04'.
it_pprop-fval = wa_itab-lga4.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
ENDIF.
IF NOT wa_itab-bet4 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET04'.
it_pprop-fval = wa_itab-bet4.
APPEND it_pprop.
CLEAR it_pprop.
ENDIF.
*******************************************************************************************************9
IF NOT wa_itab-lga5 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA05'.
it_pprop-fval = wa_itab-lga5.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
ENDIF.
IF NOT wa_itab-bet5 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET05'.
it_pprop-fval = wa_itab-bet5.
APPEND it_pprop.
CLEAR it_pprop.
ENDIF.
*******************************************************************************************************10
IF NOT wa_itab-lga6 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA06'.
it_pprop-fval = wa_itab-lga6.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
ENDIF.
IF NOT wa_itab-bet6 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET06'.
it_pprop-fval = wa_itab-bet6.
APPEND it_pprop.
CLEAR it_pprop.
ENDIF.
*******************************************************************************************************11
IF NOT wa_itab-lga7 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA07'.
it_pprop-fval = wa_itab-lga7.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
ENDIF.
IF NOT wa_itab-bet7 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET07'.
it_pprop-fval = wa_itab-bet7.
APPEND it_pprop.
CLEAR it_pprop.
ENDIF.
*******************************************************************************************************12
IF NOT wa_itab-lga8 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA08'.
it_pprop-fval = wa_itab-lga8.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
ENDIF.
IF NOT wa_itab-bet8 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET08'.
it_pprop-fval = wa_itab-bet8.
APPEND it_pprop.
CLEAR it_pprop.
ENDIF.
*******************************************************************************************************13
IF NOT wa_itab-lga9 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA09'.
it_pprop-fval = wa_itab-lga9.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
ENDIF.
IF NOT wa_itab-bet9 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET09'.
it_pprop-fval = wa_itab-bet9.
APPEND it_pprop.
CLEAR it_pprop.
ENDIF.
*******************************************************************************************************14
IF NOT wa_itab-lga10 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA010'.
it_pprop-fval = wa_itab-lga10.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
ENDIF.
IF NOT wa_itab-bet10 IS INITIAL.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET010'.
it_pprop-fval = wa_itab-bet10.
APPEND it_pprop.
CLEAR it_pprop.
ENDIF.
*******************************************************************************************************15
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA11'.
it_pprop-fval = wa_itab-lga11.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET11'.
it_pprop-fval = wa_itab-bet11.
APPEND it_pprop.
CLEAR it_pprop.
********************************************************************************************************16
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA12'.
it_pprop-fval = wa_itab-lga12.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET12'.
it_pprop-fval = wa_itab-bet12.
APPEND it_pprop.
CLEAR it_pprop.
********************************************************************************************************17
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA13'.
it_pprop-fval = wa_itab-lga13.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET13'.
it_pprop-fval = wa_itab-bet13.
APPEND it_pprop.
CLEAR it_pprop.
********************************************************************************************************18
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-LGA14'.
it_pprop-fval = wa_itab-lga14.
APPEND it_pprop.
CLEAR it_pprop.
bet1 = wa_itab-bet2.
it_pprop-infty = '0008'.
it_pprop-fname = 'P0008-BET14'.
it_pprop-fval = wa_itab-bet14.
APPEND it_pprop.
CLEAR it_pprop.
BREAK-POINT.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = wa_itab-pernr
IMPORTING
return = wa_bapireturn1.
BREAK-POINT.
IF c_action = 'INS'.
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
pernr = wa_itab-pernr
actio = 'INS'
tclas = 'A'
begda = wa_data-begda_out "'20110401'
endda = wa_data-endda_out "'99991231'
dialog_mode = '2'
luw_mode = '1'
IMPORTING
return = wa_bapireturn
return1 = wa_bapireturn1
hr_return = wa_hr_return
TABLES
proposed_values = it_pprop
modified_keys = it_modified_keys.
IF NOT wa_bapireturn IS INITIAL.
WRITE : / wa_bapireturn.
CLEAR : wa_itab , wa_bapireturn.
ENDIF.
ELSEIF c_action = 'MOD'.
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
infty = '0008'
pernr = wa_itab-pernr
actio = 'MOD'
begda = wa_data-begda_out "'20110401'
endda = wa_data-endda_out "'99991231'
record = p_record
recordnumber = wa_itab-SEQNR
operation = change
nocommit = nocommit
dialog_mode = '0'
IMPORTING
return = wa_bapireturn
return1 = wa_bapireturn1
hr_return = wa_hr_return
TABLES
proposed_values = it_pprop
modified_keys = it_modified_keys.
IF NOT wa_bapireturn IS INITIAL.
WRITE : / wa_bapireturn.
CLEAR : wa_itab , wa_bapireturn.
ENDIF.
ENDIF.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = wa_itab-pernr
IMPORTING
return = wa_bapireturn1.
ENDLOOP.
ENDLOOP.Here is a sampe, and the logic you are using for wages goes in the internal table for wages (you already have the enqueue & dequeue so you don't have to worry about that, so you only have to add the BAPI_TRANSACTION_COMMIT):
CALL FUNCTION 'BAPI_BASICPAY_CHANGE'
EXPORTING
employeenumber = pa0008-pernr
subtype = pa0008-subty
objectid = pa0008-objps
lockindicator = pa0008-sprps
validitybegin = pa0008-begda
validityend = pa0008-endda
recordnumber = pa0008-seqnr
payscaletype = pa0008-trfar
payscalearea = pa0008-trfgb
payscalegroup = pa0008-trfgr
payscalelevel = pa0008-trfst
* NEXTINCREASE =
* LOCALALLOWLEVEL =
* PARTNERSHIP =
* CURRENCY =
* COMPARISONPAYSCLTYPE =
* COMPARISONPAYSCLAREA =
* COMPARISONPAYSCLGRP =
* COMPARISONPAYSCLLVL =
* COMPNEXTINCREASE =
* CAPACITYUTILLEVEL =
* HOURSWORKEDPERPERIOD =
* ANNUALSALARY =
* CASEGROUPCATALOG =
* CASEGROUP =
* CURRENCYANNUALSALARY =
* REASON =
* NOCOMMIT =
* importing
* return =
TABLES
wagetypes = wages.
Regards,
Ryan Crosby -
Hallo all,
i have just upload a Kapro document from SAP Content repository and hang it up in a record, and i want update that record (infotype) , can anybody show me how to update an infotype,
kind regards
Jimy
Edited by: jimkim on Nov 16, 2009 11:49 AMHi,
thanx for your replay,
yes its a dicnamic infotype, but after uploading tha data, i have used some methods to hang the document in a personnal file.
thanx a lot -
Hi,
What is the use of infotypes statement.
I saw a code block in sdn. here they have used a infotype statement as below.
infotypes: 0041.
tables: pernr.
data: record type standard table of p0041,
lfs_rec like line of record.
parameters: p_pernr type persno.
start-of-selection.
call function 'HRAR_READ_INFOTYPE'
exporting
personnel_number = p_pernr
infotype = '0041'
IMPORTING
RC = RC
tables
infotype_table = record
exceptions
exception_infotype = 1.
loop at record into lfs_rec.
write:/10 lfs_rec-pernr,
30 lfs_rec-begda,
42 lfs_rec-endda,
54 lfs_rec-dar01,
60 lfs_rec-dat01.
endloop.
In the above code they have used
infotypes: 0041.
But 0041 is not used anywhere in the program.
I have read that infotypes statement is used to create a internal table. But here i have no clue they have craeted internal table separately.
Please help
Thanks in advance,
Bala.hi Bala,
You are right, infotypes statement is used to create a internal table. Infotype can be used as reference to the standard table. eg if we consider the case of standard table PA0001, then is infotype is 0001.
in case of this code:
call function 'HRAR_READ_INFOTYPE'
exporting
personnel_number = p_pernr
infotype = '0041'
IMPORTING
RC = RC
tables
infotype_table = record
exceptions
exception_infotype = 1.
we are passing infotype as '0041', so it will read from standard table PA0041 and it will fetch data from that table according to p_pernr and the data will be fetched into the internal table 'record'. That is why infotypes are used.
I hope this explaination is sufficient.
regards
arjun.
Maybe you are looking for
-
Unable to share a fat32 partition with macs (snow leopard)
i have a hard drive with two partitions in it, im able to share one of them formated for mac, but im not able to share the fat32 partition? what is going on? it is connected to an imac (snow leopard) trying to share it with macbook pro and windows pc
-
EEWB fields not showing up in the ET_FIELD_ATTRIBUTE structure of READ meth
Hi there, I have created some EEWB fields, and tried to display them on the screen. While I managed to display them using the READ method, however,I could not get any field attribute from the exporting parameters (ET_FIELD_ATTRIBUTE)! Has anyone enc
-
I download, click "Run" and it shows me a small progress window, asks me the question about admin privileges, then when I click OK, it just disappears and nothing happens. Running Windows 7
-
Existing features under the hood
I know a lot of people have been asking for new features which are already there, unfortunately they're hidden away in undocumented pages and before you can get to them the box has to be unlocked, e.g. Fully editable dial plans etc. I know, I've had
-
How to change the size of a bracket?
I'm editing some scientific documents and they need larger square brackets, even though those brackets are around a single line of variables and operators. How do I increase the size of a square bracket while leaving other square brackets the normal