Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem with HR_INFOTYPE_OPERATION

Former Member
0 Likes
4,313

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....

21 REPLIES 21
Read only

aabhas_wilmar
Contributor
0 Likes
3,280

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

Read only

0 Likes
3,280

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

Read only

0 Likes
3,280

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

Read only

0 Likes
3,280

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...

Read only

vijy_mukunthan
Active Contributor
0 Likes
3,280

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

Read only

0 Likes
3,280

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?

Read only

0 Likes
3,280

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

Read only

0 Likes
3,280

I'm using ECC5.0

but what shall i do with the dump??

Read only

0 Likes
3,280

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

Read only

0 Likes
3,280

I think the classes u have mentioned r not in ECC5.0. I'm using ECC5.0.

Read only

0 Likes
3,280

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

Read only

0 Likes
3,280

yeah i have passed the value as p0002 but again it shows the same error..

Read only

0 Likes
3,280

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.

Read only

0 Likes
3,280

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

Read only

0 Likes
3,280

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....

Read only

0 Likes
3,280

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?

Read only

0 Likes
3,280

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...

Read only

0 Likes
3,280

still it gives a dump..

let me try it usin call function..

thanks to all for the reply..

Read only

0 Likes
3,280

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,

Read only

Nawanandana
Active Contributor
0 Likes
3,280

hi

I think ther is problem in the FM because i also get the same dump for that FM

regard

nawa

Read only

Former Member
0 Likes
3,280

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