Application Development 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 Aditional Text - PA30

Former Member
0 Kudos

Dear All

i have big problem

in the PA30 tcode select any infotype "Action" .......

goto Edit menu and select Maintain Text or Maintain Description

then you can write large text there

after you save it you can see text icon in the main screen

my problem is i want to get that text to my report

please send any idea how can i get these text

i can use Read-Text function but how can i find there Text object and Text ID

please Help me

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor

You can use the function module <b>HR_ECM_READ_TEXT_INFOTYPE</b>

Or directly read from <b>cluster table PCL1 relid "TX".</b>

RP_PROVIDE_FROM_LAST P0545 SPACE PN-BEGDA PN-ENDDA.
move-corresponding p0545 to key.
import ptext from database pcl1(tx) id key.

Or use the class <b>cl_hrpa_text_cluster</b>

data : pskey type pskey.
DATA : mytext TYPE hrpad_text_tab .
pskey-pernr = '27'.
pskey-infty = '0545'.
pskey-subty = '9K'.
*pskey-objps = '00'.
pskey-endda = '20060713'.
pskey-begda = '20060713'.
CALL METHOD cl_hrpa_text_cluster=>read
  EXPORTING
    tclas         = 'A'
    pskey         = pskey
    no_auth_check = ''
  IMPORTING
    text_tab      = mytext.

*

Regards

7 REPLIES 7

Former Member
0 Kudos

Hi

Double click on the Long Text or change

it takes to Long Text editor

from text editor Menu

GOTO-> HEADER

you will see the OBJECT,ID,OBJECTNAME and LANGUAGE

pass these parameters to READ_TEXT fun module and get the long text in ITAB-LINES and display in report.

Regards

ANJI

0 Kudos

Thanks Anji

but in this case no Header sub menu in the GOTO main menu. thats the reason i m in doubt.

raymond_giuseppi
Active Contributor

You can use the function module <b>HR_ECM_READ_TEXT_INFOTYPE</b>

Or directly read from <b>cluster table PCL1 relid "TX".</b>

RP_PROVIDE_FROM_LAST P0545 SPACE PN-BEGDA PN-ENDDA.
move-corresponding p0545 to key.
import ptext from database pcl1(tx) id key.

Or use the class <b>cl_hrpa_text_cluster</b>

data : pskey type pskey.
DATA : mytext TYPE hrpad_text_tab .
pskey-pernr = '27'.
pskey-infty = '0545'.
pskey-subty = '9K'.
*pskey-objps = '00'.
pskey-endda = '20060713'.
pskey-begda = '20060713'.
CALL METHOD cl_hrpa_text_cluster=>read
  EXPORTING
    tclas         = 'A'
    pskey         = pskey
    no_auth_check = ''
  IMPORTING
    text_tab      = mytext.

*

Regards

0 Kudos

Dear Raymond

Im tired with you code but still i couldn't solve my problem.

i think i can get some thing from you

if you can please send me full sample code

my info type is 395 and no sub type

0 Kudos

<b>Explanations </b>

Infotype Text Modules

The SAP System enables you to create a text module when entering master data for individual

infotype data records. These text modules are stored in file PCL1 under cluster ID TX.

To ensure that text modules can be created for an infotype, the Text allowed field (T582AINFTX)

must be flagged when the infotype characteristics are maintained (table T582A).

<b>Samples</b>

<i>Direct import from PCL1 cluster </i>

* Include for PCL1
INCLUDE RPC1TX00.
  
 CLEAR gs_p0219.
  CLEAR gt_p0219_text.
  REFRESH gt_p0219_text.
 
  SELECT * INTO CORRESPONDING FIELDS OF gs_p0219
   FROM pa0219
   WHERE pernr = gd_pernr
     AND subty = '5'
     AND endda = '99991231'.
  ENDSELECT.
 
  IF gs_p0219-itxex = 'X'.
    gs_p0219-infty = '0219'.
* Get IT0219 comments from cluster table PCL1
    CLEAR tx-key.
    MOVE-CORRESPONDING gs_p0219 TO tx-key.
    MOVE '0219' TO tx-key-infty.
 
    IMPORT  text-version
            ptext
            FROM DATABASE pcl1(tx)
            ID tx-key.
    IF sy-subrc = 0.
* Write out text
      LOOP AT ptext.
        WRITE ptext-line TO gt_p0219_text-text_line.
        APPEND gt_p0219_text.
        CLEAR  gt_p0219_text.
      ENDLOOP.
    ENDIF.
  ENDIF.

Regards

Former Member
0 Kudos

hi

If u r using read_text func module, then this is the code

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = id

language = sy-langu

name = name

object = obj

  • ARCHIVE_HANDL = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

lines = it_itab

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8

.

IF sy-subrc <> 0.

I ahve used the abov function module for Tcode ME23N. Double click on the long text, it will take you to Script Editor. clickon goto menu -> slect header....there you get

Text Name

Language

Text ID

Text Object

you canuse the arguments for the func. module tat are displyed on that screen.

Reward if useful

Former Member
0 Kudos

Dear All

thanks for your response and already rewarded useful anserwers.

Dear Raymond

thanks you very much i worked with your part thanks again.