Skip to Content
author's profile photo Former Member
Former Member

Caching problem two

Hi again,

In the ESS you evaluate the belonging employee record in HR via sy-unane and IT0105.

Problem now.

My user is connected to record number one. The user of a collegue two record number two.

We have created a iview with following RFC function.

We both start the iview with our own users. Be both recive the same values. But we are conected to different employee records and this records have different abcenses.

When we start the function in the backend everything is fine. Different output.

The function in a few words:

User (via sy-uname) checks in INTOTYPE 0105 subtype ESS which personnal number belongs to user.

With this personal number the function evaluates all abcenses and stores it in a table of the function.

This table should be shown in the Iview as output.

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

FUNCTION zp_get_absences_from_pernr_new.

*"----

-


""Local interface:

*" IMPORTING

*" VALUE(BEGDA) LIKE PRELP-BEGDA

*" VALUE(ENDDA) LIKE PRELP-BEGDA

*" TABLES

*" ABSENCES STRUCTURE ZPXX_ABSENCES OPTIONAL

*"----

-


DATA: lwa_2001 LIKE p2001,

lt_2001 LIKE TABLE OF lwa_2001.

TABLES : t554t.

DATA: p_usrid LIKE p0105-usrid,

p_usrty LIKE p0105-usrty,

usr_pernr LIKE p0105-pernr,

pernr TYPE prelp-pernr.

p_usrid = sy-uname.

p_usrty = 'ESS'.

TABLES : pa0105.

SELECT SINGLE * FROM pa0105

WHERE usrty = p_usrty

AND usrid EQ p_usrid

AND begda LE sy-datum

AND endda GE sy-datum.

IF sy-subrc = 0.

pernr = pa0105-pernr.

ELSE.

CLEAR pernr.

ENDIF.

CALL FUNCTION 'HR_READ_INFOTYPE'

EXPORTING

  • TCLAS = 'A'

pernr = pernr

infty = '2001'

begda = begda

endda = endda

TABLES

infty_tab = lt_2001

EXCEPTIONS

infty_not_found = 1

OTHERS = 2

.

IF sy-subrc = 0.

LOOP AT lt_2001 INTO lwa_2001.

absences-pernr = pernr.

absences-begda = lwa_2001-begda.

absences-endda = lwa_2001-endda.

absences-awart = lwa_2001-awart.

SELECT SINGLE * FROM t554t

WHERE sprsl = sy-langu

AND moabw = '01' " muß noch geändert werden.

AND awart = lwa_2001-awart.

absences-atext = t554t-atext.

APPEND absences.

ENDLOOP.

ENDIF.

ENDFUNCTION.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2004 at 08:52 AM

    Hi Georg,

    It is not clear to me how do you refer to the user context in the story board ?

    In order to get two different results for two different users, you need to have the user context reffered to in the model.

    Regards, Eyal

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.