2006 Aug 11 12:45 PM
Hi Guys,
I need to find the way to read text for particular person number.
Below is the scenario,
1. goto t-code pa30.
2. insert 0019 in "infotype" field.
3. use search help to find "subtypes".
4. use any subtypes in your system.
5. press the display button.
6. you will be taken to "Display monitoring of tasks" screen.
I need to read the text data of "Comment" field.
is there any table, where it is stored.
Do we have any funtion modules to do so ?
Thanks in advance.
cheers.
santosh.
2006 Aug 11 12:49 PM
they are stored in the PCL1 cluster.. you will have to read it form there..try the following..
tables:
pernr.
infotypes:
0019.
data: key like pskey.
data: begin of ptext occurs 200.
data: line(78).
data: end of ptext.
rp-read-infotype p_pernr 0019 p0019 p_date p_date.
loop at p0019 where itxex eq 'X'.
refresh ptext.
move-corresponding p0019 to key.
import ptext from database pcl1(tx) id key.
loop at ptext.
write :/ p_pernr,ptext-line.
endloop.
endloop.
they are stored in the PCL1 cluster.. you will have to read it form there..try the following..
tables:
pernr.
infotypes:
0019.
data: key like pskey.
data: begin of ptext occurs 200.
data: line(78).
data: end of ptext.
rp-read-infotype p_pernr 0019 p0019 p_date p_date.
loop at p0019 where itxex eq 'X'.
refresh ptext.
move-corresponding p0019 to key.
import ptext from database pcl1(tx) id key.
loop at ptext.
write :/ p_pernr,ptext-line.
endloop.
endloop.
2006 Aug 11 12:47 PM
Hi santosh,
1. we have to read such long text using
class method
CL_HRPA_TEXT_CLUSTER=>READ
2. This will return an internal table,
with the data
3. In your case, u will have to
read record 1, 2, 3
(for those 3 lines, which appear in that infotype )
4. sample code
just copy paste
(just change the data as per your requirement)
5.
report abc.
data : pskey type pskey.
data : mytext type HRPAD_TEXT_TAB.
pskey-pernr = '1'.
pskey-infty = '0102'.
pskey-subty = '4'.
pskey-objps = '00'.
pskey-endda = '99991231'.
pskey-begda = '20060601'.
*TRY.
CALL METHOD CL_HRPA_TEXT_CLUSTER=>READ
EXPORTING
TCLAS = 'A'
PSKEY = pskey
NO_AUTH_CHECK = ''
IMPORTING
HISTO =
UNAME =
AEDTM =
PGMID =
TEXT_TAB = mytext
.
CATCH CX_HRPA_MISSING_AUTHORIZATION .
CATCH CX_HRPA_VIOLATED_ASSERTION .
*ENDTRY.
break-point.
regards,
amit m.
2006 Aug 11 1:13 PM
Hi again,
1.
pskey-pernr = '1'.
pskey-infty = '0102'.
<b>pskey-subty = '4'.
pskey-objps = '00'.</b>
pskey-endda = '99991231'.
pskey-begda = '20060601'.
2. For the fields, which are marked in bold,
make sure the data goes AS IT IS
which is there in the table pa0019,
for that particular record.
Most important is the OBJPS value
(it can be blank, 00, etc
just have a look in to the record of the table pa0019)
regards,
amit m.
2006 Aug 11 1:21 PM
Thanks suresh & amit,
Suresh code extracted the required text.
Thanks a lot for both of you.
Have awarded the poitns.
cheers.
santosh.
2006 Aug 11 12:49 PM
they are stored in the PCL1 cluster.. you will have to read it form there..try the following..
tables:
pernr.
infotypes:
0019.
data: key like pskey.
data: begin of ptext occurs 200.
data: line(78).
data: end of ptext.
rp-read-infotype p_pernr 0019 p0019 p_date p_date.
loop at p0019 where itxex eq 'X'.
refresh ptext.
move-corresponding p0019 to key.
import ptext from database pcl1(tx) id key.
loop at ptext.
write :/ p_pernr,ptext-line.
endloop.
endloop.
2006 Aug 11 1:08 PM
Hi friends,
i am checking both the solutions.
solution provided by amit.
The sy-subrc value is 0, but, not data is coming in mytext.
solution provided by suresh,
Can you please provide the structures for p_pernr, p0019, p_date , p_date.
<b>rp-read-infotype p_pernr 0019 p0019 p_date p_date.</b>
Thanks a lot.
cheers.
santosh.
2006 Aug 11 1:10 PM
You don't need to declare p0019 structure as the infotypes statement takes care of it.. here are the other two..
parameters:
p_pernr like pernr-pernr,
p_date like sy-datum.
~Suresh
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |