Skip to Content

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

Function Parameters

Hi,

I want to retrieve data from PCL4 table for all Person Numbers and Infotypes and Users for a specific date range. I am looking for code example on how to do that using Function HR_INFOTYPE_LOG_GET_LIST. My code is as given below. I am not sure what I am missing since I don't get any result.

I would really appreciate if someone can help me out.

Thanks.

Regards,

bw_newbie

REPORT ZTEST11 .

DATA: BEGDA TYPE BEGDA.

DATA: ENDDA TYPE ENDDA.

DATA: doc_key_tab TYPE PLDOC_KEY_TAB.

DATA: SUBRC like SY-SUBRC.

*

data: pernr_tab type persno_range_tab with header line,

infty_tab type infty_range_tab with header line.

data: date_tab type DATUM_RANGE_TAB with header line.

*

  • Select ranges

RANGES: L_R_PERNR FOR PA0000-PERNR,

L_R_OBJID FOR PLOGI-OBJID.

  • fetch data to be transfered in 2nd call

  • 1. Fill range tables

clear pernr_tab.

pernr_tab-sign = 'I'.

pernr_tab-option = 'BT'.

pernr_tab-low = 00000000.

pernr_tab-high = 99999999.

append pernr_tab.

*

clear infty_tab.

infty_tab-sign = 'I'.

infty_tab-option = 'BT'.

infty_tab-low = '0000'.

infty_tab-high = '3000'.

BEGDA = '20060101'.

ENDDA = '20060110'.

clear date_tab.

date_tab-sign = 'I'.

date_tab-option = 'BT'.

date_tab-low = begda.

date_tab-high = endda.

call function 'HR_INFOTYPE_LOG_GET_LIST'

exporting

begda = begda

endda = endda

importing

subrc = subrc

tables

pernr_tab = pernr_tab

infty_tab = infty_tab

infty_logg_key_tab = doc_key_tab

DATUM_RANGE_TAB = date_tab.

WRITE 'DONE'.

Former Member
Former Member replied

Hi,

When u create a variant for the program in the output options put select New pages per doc, I do not know about other options. U get all the data in an internal table but in a single field, u can split it depending upon ur requirement.

data: begin of downtab occurs 0,

line(255),

end of downtab.

DATA: BEGIN OF L_T_LISTOBJECT1 OCCURS 0.

INCLUDE STRUCTURE ABAPLIST.

DATA: END OF L_T_LISTOBJECT1.

SUBMIT RPUAUD00

USING SELECTION-SET 'ZVAR1'

AND RETURN

EXPORTING LIST TO MEMORY.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

LISTOBJECT = L_T_LISTOBJECT1

EXCEPTIONS

NOT_FOUND = 1.

CALL FUNCTION 'WRITE_LIST'

EXPORTING

WRITE_ONLY = 'X'

TABLES

LISTOBJECT = L_T_LISTOBJECT1

  • EXCEPTIONS

  • EMPTY_LIST = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

call function 'LIST_TO_ASCI'

  • EXPORTING

  • list_index = list_index

TABLES

listasci = downtab

listobject = L_T_LISTOBJECT1

EXCEPTIONS

list_index_invalid = 1

others = 2.

if sy-subrc <> 0.

raise list_index_invalid.

endif.

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Regarding long docs/short docs u have the options in RPUAUD00

Regards

Vick

Message was edited by: vick vennav

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question