Skip to Content
author's profile photo Former Member
Former Member

purchase requisition report

hi

i am making purchase requisition report in which i want a header text

i am using funtion module read_text to fatch the data but i am not getting it

my code is:

FORM call_txt .

data: fs_readhead type THEAD,

fs_line type table of TLINE with header line,

wf_mandt type sy-mandt,

wf_lang type THEAD-TDSPRAS,

wf_id type THEAD-TDID.

wf_mandt = sy-mandt.

wf_lang = sy-langu.

wf_id = 'B01'.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = wf_mandt

id = wf_id

language = wf_lang

name = '0015000151'

object = 'EBANH'

ARCHIVE_HANDLE = 0

IMPORTING

HEADER = fs_readhead

tables

lines = fs_line

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8.

LOOP AT fs_line

.

IF NOT fs_line-tdline IS INITIAL.

CONCATENATE fs_readhead fs_line-tdline INTO fs_readhead SEPARATED BY space.

ENDIF.

ENDLOOP.

WRITE: fs_readhead .

ENDFORM. " call_txt

can any one tell me the suitable answer .

its urgent

regards

Rakesh kumar singh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 26, 2008 at 06:01 AM

    instead of passing directly pass it to the variable and see..

    w_tdname = '0015000151'.
    w_object = 'EBANH'.
     
    
     CALL FUNCTION 'READ_TEXT'
        EXPORTING
          id                      = w_tdid
          language                = w_spras
          name                    = w_tdname
          object                  = w_object
        TABLES
          lines                   = it_line
        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 EQ 0.
    
    endif.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.