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

Read Text infotype 0337

Former Member
0 Likes
1,590

Hi All,

I need to get the text that is associated to infotype 0337. I've tried many things, but I couldn't get it wright.

tried:

- FM RH_TEXT_GET;

- FM RH_TEXT_GET_TEMPLATE;

- FM HR_ECM_READ_TEXT_infotype;

- ...

Do you have any ideas?

I am a newbie to HR programming.

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,047

Hi,

Please check this sample code from other thread and perhaps you can fine tuning for your requirement.

1. To get the long text,

use the class

CL_HRPA_TEXT_CLUSTER

method READ

2. eg

EPORT ZABC44.

data : pskey type pskey.

data : mytext TYPE HRPAD_TEXT_TAB .

pskey-pernr = '27'.

pskey-infty = '0035'.

pskey-subty = '9K'.

*pskey-objps = '00'.

pskey-endda = '20060713'.

pskey-begda = '20060713'.

*TRY.

CALL METHOD CL_HRPA_TEXT_CLUSTER=>READ

EXPORTING

TCLAS = 'A'

PSKEY = pskey

NO_AUTH_CHECK = ''

IMPORTING

TEXT_TAB = mytext.

DATA : ABC LIKE line of MYTEXT.

LOOP AT MYTEXT INTO ABC.

write : / abc , sy-tabix.

Regards,

Ferry Lianto

4 REPLIES 4
Read only

Former Member
0 Likes
1,048

Hi,

Please check this sample code from other thread and perhaps you can fine tuning for your requirement.

1. To get the long text,

use the class

CL_HRPA_TEXT_CLUSTER

method READ

2. eg

EPORT ZABC44.

data : pskey type pskey.

data : mytext TYPE HRPAD_TEXT_TAB .

pskey-pernr = '27'.

pskey-infty = '0035'.

pskey-subty = '9K'.

*pskey-objps = '00'.

pskey-endda = '20060713'.

pskey-begda = '20060713'.

*TRY.

CALL METHOD CL_HRPA_TEXT_CLUSTER=>READ

EXPORTING

TCLAS = 'A'

PSKEY = pskey

NO_AUTH_CHECK = ''

IMPORTING

TEXT_TAB = mytext.

DATA : ABC LIKE line of MYTEXT.

LOOP AT MYTEXT INTO ABC.

write : / abc , sy-tabix.

Regards,

Ferry Lianto

Read only

0 Likes
1,047

That code looks too familiar to me..

Texts maintained on an Infotype record are stored in the PCL1 cluster & can be read using the IMPORT statement.. pl take a look at the following sample..


report  zp_pa_infty_read_text.
tables:
 pernr.
infotypes:
 0337.

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.

data:  key like pskey.
data: begin of ptext occurs 200.
data:   line(78).
data: end of ptext.

rp-read-infotype p_pernr 0337 p0337 p_date p_date.
loop at p0337 where itxex eq 'X'.
  refresh ptext.
  move-corresponding p0337 to key.

  import ptext from database pcl1(tx) id key.

  loop at ptext.
    write :/ p_pernr,ptext-line.
  endloop.
endloop.

~Suresh

Read only

0 Likes
1,047

It woks fine!

thanks!

Read only

0 Likes
1,047

Thanks for the inputs.!