cancel
Showing results for 
Search instead for 
Did you mean: 

Kindly check my codes using rp-read-infotype, PCL1 cluster

Former Member
0 Kudos

Hi I already used this code in Awards [from Suresh] and it was working But when I used it to displayfor remarks it text table can't import from the dbase pcl1. Please help me again. Thanks!

REPORT Z_SAMPLE .

    • Get Offense and remarks...

tables: pernr.

infotypes: 0743.

  • internal tables

data: key like pskey.

data: offdt TYPE P25_OFFDT,

lv_begda TYPE begda.

data: BEGIN OF lt_remarks OCCURS 200.

data: line(72).

data: END OF lt_remarks.

data: BEGIN OF itab OCCURS 0,

line(72),

offdt TYPE P25_OFFDT.

data: END OF itab.

pernr = '99000001'.

rp-read-infotype pernr 0743 p0743 lv_begda sy-datum.

LOOP AT p0743

WHERE itxex eq 'X'.

refresh lt_remarks.

move-corresponding p0743 to key.

import lt_remarks from database pcl1(tx) id key.

LOOP AT lt_remarks.

WRITE lt_remarks.

ENDLOOP.

ENDLOOP.

Accepted Solutions (1)

Accepted Solutions (1)

suresh_datti
Active Contributor
0 Kudos

Hi Maui,

The following code woked perfect for me..


report  zp_pa_ecm_read_notes                    .
tables:
 pernr.
infotypes:
 0743.
data:  key like pskey.
data: begin of ptext occurs 200.
data:   line(72).
data: end of ptext.

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.

rp-read-infotype p_pernr 0743 p0743 p_date p_date.
loop at p0743 where itxex eq 'X'.
  refresh ptext.
  move-corresponding p0743 to key.
  import ptext from database pcl1(tx) id key.
  loop at ptext.
    write 😕 p_pernr,ptext-line.
  endloop.
endloop.

Regards,

Suresh Datti

Former Member
0 Kudos

How will I separate the content of ptext-line? 'Coz I'm planning to concatenate it in one field.

suresh_datti
Active Contributor
0 Kudos

You would like to put all the text in the ptext table into one variable, right? then you can try this..


data w_text type string.
loop at p_text.
concatenate w_text p_text-line into w_text
                  separated by space.
endloop.

Regards,

Suresh Datti

Answers (1)

Answers (1)

former_member181966
Active Contributor
0 Kudos

After executing this line

move-corresponding p0743 to key.

<u><b>import lt_remarks from database pcl1(tx) id key.</b></u>

can you see the entries in table PCL1 with (TX)?

What is sy-subrc ?

just a clue !!

Thanks