Application Development 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: 

HR_ECM_READ_TEXT_INFOTYPE problem ....

Former Member
0 Kudos
354

Hi abapers ..

I am using the HR_ECM_READ_TEXT_INFOTYPE FM to find the texts on an infotype .

When i am running the FM like the code below is running :

CALL FUNCTION 'HR_ECM_READ_TEXT_INFOTYPE'

EXPORTING

PERNR = '7568'

INFTY = '0040'

SUBTY = '30'

OBJPS = ' '

BEGDA = '20080101'

ENDDA = '99991231'

SEQNR = '000'

NO_AUTH_CHECK = ' '

MESSAGE_HANDLER = message_handler

IMPORTING

TEXT_TAB = INFOS

IS_OK = X .

When i use the following code it doesn't run and say something about Zero ...

CALL FUNCTION 'HR_ECM_READ_TEXT_INFOTYPE'

EXPORTING

PERNR = pa0040-pernr

INFTY = '0040'

SUBTY = '30'

OBJPS = ' '

BEGDA = pa0040-begda

ENDDA = pa0040-endda

SEQNR = '000'

NO_AUTH_CHECK = ' '

MESSAGE_HANDLER = message_handler

IMPORTING

TEXT_TAB = INFOS

IS_OK = X .

Please help ...

Points will be rewarded ....

3 REPLIES 3

Former Member
0 Kudos
81

Where u r6 using this function module in the program??

how u r getting the pa0040-pernr value? u r using inside the loop??

U r using LDB or not???Iam unable to get why u r using pa0040-pernr rather pernr-pernr ,If u give u r complete code I can get what the problem is.

0 Kudos
81

The exact code is :

REPORT TEST.

TABLES : PA0040,PA0002.

DATA: MESSAGE_HANDLER TYPE REF TO CL_HRPA_MESSAGE_LIST.

DATA: INFOS TYPE HRPAD_TEXT_TAB.

DATA: INF LIKE LINE OF INFOS.

DATA: X TYPE BOOLE_D.

DATA: XXX(30) TYPE C.

DATA: D1 LIKE SY-DATUM.

DATA: D2 LIKE SY-DATUM.

CLEAR PA0040.

SELECT * FROM PA0040.

CALL FUNCTION 'HR_ECM_READ_TEXT_INFOTYPE'

EXPORTING

PERNR = PA0040-PERNR

INFTY = '0040'

SUBTY = '30'

OBJPS = ' '

BEGDA = PA0040-BEGDA

ENDDA = PA0040-ENDDA

SEQNR = '000'

NO_AUTH_CHECK = ' '

MESSAGE_HANDLER = MESSAGE_HANDLER

IMPORTING

TEXT_TAB = INFOS

IS_OK = X.

ENDSELECT.

LOOP AT INFOS INTO INF.

WRITE: / INF.

ENDLOOP.

0 Kudos
81

Definetly it will not work,bcoz pa0040-perrnr doesnt have any value in it,and what u need to do is create an internal table like pa0040 and use select statement.

Select * from pa0040 into IT_DATA.

Loop at IT_DATA into WA_DATA.

then use wa_data-pernr iin FM HR_ECM_READ_TEXT_INFOTYPE.

I dont have any idea about classes,else I migt have solved u r problem completely.Give me u r complete requirement,I will try.

REWARD If helpful.