Application Development and Automation 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: 
Read only

(ABAP-HR) data retrieval

Former Member
0 Likes
1,315

Hi Experts

How to retrieve the comments in infotype 0019 (Monitoring task)?

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,131

hi,

Since this text is stored in PCL1 cluster, READ_TEXT function module cannot be used to retrieve it. Instead,

Make use of IMPORT ptext FROM DATABASE pcl1(tx) command

here is the piece of code....

LOOP AT it_pa0019 INTO wa_pa0019 WHERE itxex EQ u2018Xu2019.

MOVE-CORRESPONDING wa_pa0019 TO wa_key.

wa_key-infty = u20180019u2032.

IMPORT ptext FROM DATABASE pcl1(tx) ID wa_key.LOOP AT ptext INTO wa_text.

WRITE: p_pernr, wa_text-line.

ENDLOOP.

ENDLOOP.

thanks

Ashu

Hi Experts

How to retrieve the comments in infotype 0019 (Monitoring task)?

Thanks in advance

3 REPLIES 3
Read only

Former Member
0 Likes
1,131

Hi,,

Infotype 0019 (Monitoring of Tasks) has 3 lines of comments that can be used to store comments regarding the tasks assigned to employee. This text is not directly stored in the database table PA0019. This data is stored in the u2018PCL1u2032 cluster with Cluster ID u2018TXu2019.

Since this text is stored in PCL1 cluster, READ_TEXT function module cannot be used to retrieve it. Instead, make use of one of the 2 ways mentioned below to retrieve this text.

Make use of IMPORT ptext FROM DATABASE pcl1(tx) command

Use RP-IMP-C1-TX macro stored in TRMAC table.

Sample program Using IMPORT statement

REPORT zhr_read_cluster.

TYPES:

BEGIN OF t_pa0019,

pernr TYPE persno,

subty TYPE subty,

objps TYPE objps,

sprps TYPE sprps,

endda TYPE endda,

begda TYPE begda,

seqnr TYPE seqnr,

itxex TYPE itxex,

END OF t_pa0019,

BEGIN OF t_text,

line(72),

END OF t_text.

DATA:

gt_pa0019 TYPE STANDARD TABLE OF t_pa0019,

gw_pa0019 TYPE t_pa0019,

ptext TYPE STANDARD TABLE OF t_text INITIAL SIZE 10,

gw_text TYPE t_text,

gw_key TYPE pskey.

SELECTION-SCREEN BEGIN OF BLOCK abc WITH FRAME TITLE text-001.

PARAMETERS:

p_pernr LIKE pernr-pernr,

p_date LIKE sy-datum.

SELECTION-SCREEN END OF BLOCK abc.

START-OF-SELECTION.

SELECT pernr subty objps sprps endda begda seqnr itxex

FROM pa0019

INTO TABLE gt_pa0019

WHERE pernr EQ p_pernr.

LOOP AT gt_pa0019 INTO gw_pa0019 WHERE itxex EQ u2018Xu2019.

MOVE-CORRESPONDING gw_pa0019 TO gw_key.

gw_key-infty = u20180019u2032.

IMPORT ptext FROM DATABASE pcl1(tx) ID gw_key.

LOOP AT ptext INTO gw_text.

WRITE: p_pernr, gw_text-line.

ENDLOOP.

ENDLOOP.

Sample Program using RP-IMP-C1-TX Macro

REPORT ZHUGE_LONGTEXTS .

TABLES: PCL1,PA0000,T582S.

DATA: TX-KEY LIKE PSKEY.

DATA: BEGIN OF TEXT-VERSION,

NUMMER TYPE X VALUE u201802u2032,

END OF TEXT-VERSION.

DATA: BEGIN OF PTEXT OCCURS 200.

DATA: LINE(78).

DATA: END OF PTEXT.

DATA: KEY1 LIKE PCL1-SRTFD.

DATA: KEY2 LIKE PCL1-SRTFD.

DATA: FINAL_KEY LIKE PCL1-SRTFD.

DATA: BLANK(7).

DATA: BLANK1(3).

PARAMETERS: PERNR LIKE PA0000-PERNR,

INFTY LIKE T582S-INFTY,

SUBTY LIKE PA0000-SUBTY,

ENDDA LIKE PA0000-ENDDA,

BEGDA LIKE PA0000-BEGDA.

IF SUBTY IS INITIAL.

CONCATENATE PERNR INFTY INTO KEY1.

CONCATENATE ENDDA BEGDA u2018000u2032 INTO KEY2.

CONCATENATE KEY1 KEY2 INTO FINAL_KEY SEPARATED BY BLANK.

ELSE.

*u2013 if with subtypes

CONCATENATE PERNR INFTY SUBTY INTO KEY1.

CONCATENATE ENDDA BEGDA u2018000u2032 INTO KEY2.

CONCATENATE KEY1 KEY2 INTO FINAL_KEY SEPARATED BY BLANK1.

ENDIF.

MOVE FINAL_KEY TO TX-KEY.

RP-IMP-C1-TX.

LOOP AT PTEXT.

WRITE:/ PTEXT.

ENDLOOP.

Hope it helps.

Regards

Hiren K.Chitalia

Read only

0 Likes
1,131

Thanks Hiren. Its working.

Read only

Former Member
0 Likes
1,132

hi,

Since this text is stored in PCL1 cluster, READ_TEXT function module cannot be used to retrieve it. Instead,

Make use of IMPORT ptext FROM DATABASE pcl1(tx) command

here is the piece of code....

LOOP AT it_pa0019 INTO wa_pa0019 WHERE itxex EQ u2018Xu2019.

MOVE-CORRESPONDING wa_pa0019 TO wa_key.

wa_key-infty = u20180019u2032.

IMPORT ptext FROM DATABASE pcl1(tx) ID wa_key.LOOP AT ptext INTO wa_text.

WRITE: p_pernr, wa_text-line.

ENDLOOP.

ENDLOOP.

thanks

Ashu