2009 Aug 12 5:10 PM
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
2009 Aug 12 5:22 PM
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
2009 Aug 12 5:22 PM
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
2009 Aug 12 5:26 PM
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
2009 Aug 12 5:28 PM
does it mean we cannot use the BAPI directly from se37 transaction?
2009 Aug 12 5:27 PM
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.
2009 Aug 12 5:30 PM
hi aparna,
thanks for the response.
but can we use the BAPI directly from se37 transaction
2009 Aug 12 5:40 PM
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
2009 Aug 12 5:42 PM
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
2009 Aug 12 11:05 PM
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
2009 Aug 13 12:09 AM
Based on your requirement, you should be using the function module HR_READ_INFOTYPE.
~Suresh
2009 Aug 19 5:38 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |