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

Problem with reading cluster PCL1

Former Member
0 Likes
1,065

Hi there,

I have a problem with reading data from cluster PCL1.

I use the following code to access PCL1:

IMPORT
        ET_BELEG
  FROM   DATABASE PCL1(TE)
  ID     IW_TE_KEY
  ACCEPTING PADDING
  ACCEPTING TRUNCATION.

If I select data from PCL1 using SE16 and enter the value of IW_TE_KEY into field SRTFD I get exactly one record.

After the execution of the import command I get sy-subrc = 0 but also no data in ET_BELEG. Are there any ideas what the reason might be?

Thanks in advance and regards,

Martin

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
844

Hi,

press f1 on the macro database you will get the syntax and how to use it..

if you want to read PCL1 data you need to put the macro in the ...


DATA: letzt TYPE ptk34_letzt,                             
      ccbel TYPE TABLE OF ptk34 WITH HEADER LINE,           
      inbel TYPE TABLE OF ptk34_inbel WITH HEADER LINE,    
      trans TYPE TABLE OF ptk34_trans WITH HEADER LINE.     


DEFINE rp_imp_c1_tc.
  set extended check off.
  import
         letzt
         ccbel
         inbel
         trans
         from database pcl1(te) id   IW_TE_KEY "check this this might be the personal number
         accepting padding.                                
  rp_imp_tc_subrc = sy-subrc.      "Check Sy-subrc here..
  set extended check on.
END-OF-DEFINITION.


Regards,

Prabhudas

Hi,

press f1 on the macro database you will get the syntax and how to use it..

if you want to read PCL1 data you need to put the macro in the ...


DATA: letzt TYPE ptk34_letzt,                             
      ccbel TYPE TABLE OF ptk34 WITH HEADER LINE,           
      inbel TYPE TABLE OF ptk34_inbel WITH HEADER LINE,    
      trans TYPE TABLE OF ptk34_trans WITH HEADER LINE.     


DEFINE rp_imp_c1_tc.
  set extended check off.
  import
         letzt
         ccbel
         inbel
         trans
         from database pcl1(te) id   IW_TE_KEY "check this this might be the personal number
         accepting padding.                                
  rp_imp_tc_subrc = sy-subrc.      "Check Sy-subrc here..
  set extended check on.
END-OF-DEFINITION.


Regards,

Prabhudas

2 REPLIES 2
Read only

Former Member
0 Likes
845

Hi,

press f1 on the macro database you will get the syntax and how to use it..

if you want to read PCL1 data you need to put the macro in the ...


DATA: letzt TYPE ptk34_letzt,                             
      ccbel TYPE TABLE OF ptk34 WITH HEADER LINE,           
      inbel TYPE TABLE OF ptk34_inbel WITH HEADER LINE,    
      trans TYPE TABLE OF ptk34_trans WITH HEADER LINE.     


DEFINE rp_imp_c1_tc.
  set extended check off.
  import
         letzt
         ccbel
         inbel
         trans
         from database pcl1(te) id   IW_TE_KEY "check this this might be the personal number
         accepting padding.                                
  rp_imp_tc_subrc = sy-subrc.      "Check Sy-subrc here..
  set extended check on.
END-OF-DEFINITION.


Regards,

Prabhudas

Read only

0 Likes
844

Hi Prabhu,

thanks for your reply. But I don't understand the difference between my and your code? Why do I have to define a macro for this?

By the way, ET_BELEG is an internal table of type PTK03.

Thanks and regards,

Martin