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

HR_INFOTYPE_OPERATION throws core dump

Former Member
0 Likes
1,625

Hi,

I want to run the run the BAPI HR_INFOTYPE_OPERATION.

I have given the following inputs:

INFTY ==> 0002

NUMBER ==>00000001

SUBTYPE ==>" "

OBJECTID==>" "

LOCKINDICATOR==>" "

VALIDTYEND==>31.12.9999

VALIDTYBEGIN==>24.05.1978

RECORDNUMBER==>000

RECORD==>

OPERATION==>DISPLAY

the remianing are defaults

it throws core dump at

ASSIGN record TO <record> CASTING TYPE (tabname). "XDP UniCode

My question is how to fill the RECORD argument.

I ran the HR_INFOTYPE_OPERATION and took the output of the RECORD export paramter as input to the

RECORD parmater of HR_INFOTYPE_OPERATION..

This record returned me

"000000010002 999912311978052400020090508AKAMBLE AM Patil Amita "

But still it crsahed.

What am i doing wrong.

An example would be very helpful.

Best Regards

Manoj

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
1,467

data: p0002 like p0002.  

"now fill strcuture p0002 with appropriate data i.e with SELECT
...

"and pass this strcutre to RECORD parameter
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
  EXPORTING
    infty                  = '0002'
    record                 = p0002
...

Regards

Marcin

Hi,

I want to run the run the BAPI HR_INFOTYPE_OPERATION.

I have given the following inputs:

INFTY ==> 0002

NUMBER ==>00000001

SUBTYPE ==>" "

OBJECTID==>" "

LOCKINDICATOR==>" "

VALIDTYEND==>31.12.9999

VALIDTYBEGIN==>24.05.1978

RECORDNUMBER==>000

RECORD==>

OPERATION==>DISPLAY

the remianing are defaults

it throws core dump at

ASSIGN record TO <record> CASTING TYPE (tabname). "XDP UniCode

My question is how to fill the RECORD argument.

I ran the HR_INFOTYPE_OPERATION and took the output of the RECORD export paramter as input to the

RECORD parmater of HR_INFOTYPE_OPERATION..

This record returned me

"000000010002 999912311978052400020090508AKAMBLE AM Patil Amita "

But still it crsahed.

What am i doing wrong.

An example would be very helpful.

Best Regards

Manoj

10 REPLIES 10
Read only

MarcinPciak
Active Contributor
0 Likes
1,468

data: p0002 like p0002.  

"now fill strcuture p0002 with appropriate data i.e with SELECT
...

"and pass this strcutre to RECORD parameter
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
  EXPORTING
    infty                  = '0002'
    record                 = p0002
...

Regards

Marcin

Read only

0 Likes
1,467

Hi Marcin,

Thanks for the reply.

This is ok when we invoke it from ABAP code.

But if i ran the transaction "se37".

then i invoke the BAPI HR_INFOTYPE_OPERATION.

now here how can i provide the p0002 data.

Can you provide me an example if possible using the se37 transaction

Best Regards

Manoj

Read only

0 Likes
1,467

does it mean we cannot use the BAPI directly from se37 transaction?

Read only

Former Member
1,467

You can use the following logic for propulating RECORD:


DATA: wa_p0000  type p0000.  " Make sure the structure is defined as type P0000 and not PA0000
FIELD-SYMBOLS: <fs_any> TYPE ANY.


"Fill Up wa_p0000 

ASSIGN wa_p0000 to <fs_any>.

Now you can pass <fs_any> to the FM in the Record argument.

Read only

0 Likes
1,467

hi aparna,

thanks for the response.

but can we use the BAPI directly from se37 transaction

Read only

0 Likes
1,467

Why do you need it directly in SE37? Isn't easier to create a test program for this FM and call/test it there?

Anyhow if you really want it in SE37, then you have to to fill entire strcutre as it would be filled in program, meaning you have to create one long entry like the one you have provided


000000010002 999912311978052400020090508AKAMBLE AM Patil Amita 

but you need to ensure that each value would correspond to its field i.e

000| <- field1

0000010| <- field2

002 | <- field3 (together with space etc)

99991231| <- field4

This is really error prone so might not work as you wish as you have to be highly precise (each field must occupy size exactly declared for it i.e. for PERNR 8 places, for ENDDA 8 places, for SUBTYPE 4 place etc. Spaces here are also importat.

Regards

Marcin

Read only

0 Likes
1,467

Hi Manoj,

SE37 is only for demo purpose and it does not update the DATABASE.

So Update FM/BAPIs do not update any record if run from SE37.

Specially, this FM cannot be run in SE37 as the Record number always has dynamic structure.

Its better testing the FM by writing sample code.

Regards,

Vimal.

Edited by: Vimal V on Aug 12, 2009 6:43 PM

Read only

Former Member
0 Likes
1,467

Record should have the type pxxxx strcuture

Example:

DATA: wa_infty_0002 TYPE p0002.

Fill the details.

wa_infty_0002-pernr =

wa_infty_0002-begda =

Many field can have the default values.

Fill in the required fields mandatory for the infotype.

Use the same for RECORD

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

...

..

RECORD = wa_infty_0002

Read only

suresh_datti
Active Contributor
0 Likes
1,467

Based on your requirement, you should be using the function module HR_READ_INFOTYPE.

~Suresh

Read only

Former Member
0 Likes
1,467

Well i need to do more working on this.