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: 

how to read header note and item text of purchase requisition

Former Member
0 Kudos

hi all

i have to develope a program in which i need to read data from header note and item text of purchaser requistion.

pl note : From FM read_text and from tab STXH, this is not possible.

pl suggest if there is other way of reading above 2 text from PR TC me53n.

Thanks in adv.

manoj

5 REPLIES 5

pawan_rai
Participant
0 Kudos

Hi Manoj,

It is possible to read the header note using fm 'Read_text'.

Regards,

Pawan.

Former Member
0 Kudos

Hi,

why cannot you use read_text and STXH?

Can you try table STXL?

Regards, Dieter

Former Member
0 Kudos

You have to use FM 'READ_TEXT'

and pass language as system language

Text ID = B01

Text Object : EBANH

and pass PR into text name

Former Member
0 Kudos

Hi Manoj,

You can do it. Please try again.

CALL FUNCTION 'READ_TEXT'
    EXPORTING
      ID                            = B01
      LANGUAGE                      = SY-LANGU
      NAME                          = PR
      OBJECT                        = EBANH
    TABLES
      LINES                         = i_header_text
    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 NE 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION 'READ_TEXT'
    EXPORTING
      ID                            = Z01
      LANGUAGE                      = SY-LANGU
      NAME                          = PR
      OBJECT                        = EBANH
    TABLES
      LINES                         = i_request_text
    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 NE 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

Regards,

XEric

former_member182485
Active Contributor
0 Kudos

Hi Manoj,

How did u come to this conclusion that this is not possible using Read_text ?