2009 Sep 22 6:09 AM
When I execute the function HR_INFOTYPE_OPERATION, it gives a runtime error or DUMP..
i gave the values as
INFTY-0002
NUMBER-1323
validityENDDATE-31.12.9999
validityBEGINDATE-02.03.1961
Record-pa0002.
The Error is:
*The source field is too short.
The current program, "SAPLHRMM", tried to assign a field to a field symbol.
However, the field is shorter than the type of the field symbol, which
is not allowed.
The statement in question is in the form ASSIGN f TO <fs> CASTING or
ASSIGN f TO <fs> with a field symbol that was created using the
STRUCTURE addition. *
how to correct it?
I jus don't understand why you are trying to display the record with this FM...
I guess this FM is used for Creating/changing the records.... Its my guess....
Try "MOD" for any operation....
2009 Sep 22 6:21 AM
If you are calling it from a prgram (and not testing it using SE37) make sure dates are in internal format, i.e. 20090922 instead of 22.09.2009.
Use proper conversions whereever aplicable, for example dates as mentioned above, PERNR... etc
You may use CONVERSION_EXIT_ALPHA_INPUT or similar conversion exits (CONVERSION_EXIT_*)
Also pass P0002 instead of PA0002 to RECORD parameter.
Thanks,
Aabhas
Edited by: Aabhas K Vishnoi on Sep 22, 2009 3:22 PM
2009 Sep 22 6:26 AM
thankyou for the reply..
I'm executing it through se37.
and if i give the date as 99991231, a poopup window shows that the value entered is invalid format and asks for correct value
2009 Sep 22 6:34 AM
Of course! SE37 expects the external values and converts itself. When you implement your this FM in your program you will need to pass internal values to it.
Don't forget to close the thread if your problem is solved.
Thanks,
Aabhas
2009 Sep 22 7:04 AM
i'm giving the structure name in the Record field and the date is also in the format dd.mm.yyyy
but it gives the dump...I cant understand where i'm going wrong...
2009 Sep 22 7:10 AM
Hi Arunna
Never use the FM HR_INFOTYPE_OPERATION. If you go to se37 and check the attribute tab rite hand side at lost it says Not released. This means this should not be used for customer. We had a hard problem with this FM in production and we raised to SAP. SAP has replied dont use this FM. This FM is not released for customer. So you also dont use. Instead of that use this class for updating the infotype.
CL_HRTNM_DETAILS_MGR_CONTROL in this class there is method UPDATE_DB_BUFFER. Use this for updation of infotypes.
Regards
vijay
2009 Sep 22 7:50 AM
Hi Vijay,
When I try to use the class CL_HRTNM_DETAILS_MGR_CONTROL,it gives the error there is no class/Interface named CL_HRTNM_DETAILS_MGR_CONTROL..
What shall i do now?
2009 Sep 22 8:28 AM
Which version are you on? I believe CL_HRTNM_DETAILS_MGR_CONTROL is available only in ECC 6.0
Though not recommended, but you can still go ahead using HR_INFOTYPE_OPERATION and see if it works for you. It worked pretty well for me and is still working so far...
regards,
Aabhas
2009 Sep 22 8:40 AM
2009 Sep 22 9:31 AM
which version. Am in ECC6 its working fine. Check this class also CL_HR_NL_FBN_UTIL in this method UPDATE_INFOTYPE_RECORD. Check this method whather its working or not.
Regards
vijay
2009 Sep 22 9:47 AM
I think the classes u have mentioned r not in ECC5.0. I'm using ECC5.0.
2009 Sep 22 10:32 AM
You pass the paramaters like this
INFTY -0002
NUMBER -1323
validityENDDATE -31.12.9999
validityBEGINDATE -02.03.1961
Record -pa0002 <-- wrong {color] change to p0002.
Regards
vijay
2009 Sep 22 10:37 AM
yeah i have passed the value as p0002 but again it shows the same error..
2009 Sep 22 10:46 AM
Can you write the "CALL FUNCTION" statement here....
Write the full code of calling...
Example of calling this FM:
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0003'
number = pa0003-pernr
validityend = pa0003-endda
validitybegin = pa0003-begda
record = p0003
operation = 'MOD' -
>>> Try MOD... for your purpose..
view_identifier = pa0003-viekn
IMPORTING
return = wa_return.
2009 Sep 22 10:58 AM
I'm not calling the function module..
I'm Executing it through se37 and giving the values thereby..
as:
infotype-0002
number-00001323
validitybegin-01.01.1996
validityend-31.12.9999
record-p0002
operation-dis
2009 Sep 22 11:07 AM
I jus don't understand why you are trying to display the record with this FM...
I guess this FM is used for Creating/changing the records.... Its my guess....
Try "MOD" for any operation....
2009 Sep 22 11:12 AM
If i use mod it didn't show a runtime error
it shows an error message Error-14 026 in Error handling.
is this the message delivered by bapireturn?
why is it returning error message?
2009 Sep 22 11:14 AM
If there is no data in infotype 0002 in the given inteval...it shows error as MOD indicates change of existing record...
Use INS for inserting new record...
2009 Sep 23 8:03 AM
still it gives a dump..
let me try it usin call function..
thanks to all for the reply..
2011 Nov 26 9:04 PM
Hi,
I tried the same solution but it gives me error
"No data stored for 0003 in the selected period".
kindly suggest the solution to this error.
Regards,
2009 Sep 22 9:21 AM
hi
I think ther is problem in the FM because i also get the same dump for that FM
regard
nawa
2009 Sep 23 8:16 AM
Hi Aruna
Can you tru the same using the FM: HR_MAINTAIN_MASTERDATA.
Pass these values:
PERNR: Ur pernr
ACTIO: INS/MOD depends
BEGDA: 02.03.1961
ENDDA: 31.12.9999
SEQNR: 000
PLANS:00000000
DIALOG_MODE: 0/1
LUV_MODE: 1
Then fill the PROPOSED_VALUES structure.
Finally, execute.
Hope this helps.
Harsh
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |