Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

FM 'HR_READ_INFOTYPE'

Hi,

I'm creating a FM, where FM 'HR_READ_INFOTYPE' is called, to validate requests. I have a run time error after entering input. sample code is given below:

******************************************************************

TYPES : BEGIN of ty_0001,

pernr TYPE pa0001-pernr,

PERSG TYPE pa0001-PERSG,

PERSK TYPE pa0001-PERSK,

massn TYPE pa0000-MASSN,

END OF ty_0001.

DATA : it0001 TYPE TABLE OF ty_0001 with header line.

*tables:

*it0001.

infotypes:

0001, 0000.

msg = 'Business Assignment Action has not been Initiated ...Please Contact HR'.

DATA: p_pernr TYPE ty_0001-pernr,

P_PERSG TYPE TY_0001-PERSG, P_PERSK TYPE ty_0001-PERSK, wa_0001 TYPE ty_0001.

>>>>>call FUNCTION 'HR_READ_INFOTYPE'

EXPORTING

pernr = p_pernr

infty = '0001'

tables

infty_tab = p0001

exceptions

infty_not_found = 1

others = 2.

append wa_0001 to it0001.

**************************************************

The error occurs when the FM is called.

Here is the complete algorith for the FM I'm creating.

Screen processing:

If Traveler / Travel Planner selects trip Activity Type u2018Contractors Travelu2019

Read IT 0000 for PENR

If Employee Group (PERSG) =3 &

PERSK = K1 / K2 /V1/ V2/ W1 / W2 read Action Type (MASSN) from IT 0000 SJ / SK. If Action type is found as of date and has end date later than the system date, Allow to Create a Travel Request

If no action found, give an error message u201CBusiness Assignment Action has not been Initiated ...Please Contact HRu2019

points would be rewarded for useful answers.

thanks&regards;

Edited by: abbas ali on Sep 16, 2008 9:17 AM

Former Member
Not what you were looking for? View more on this topic or Ask a question