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: 

header text

Former Member
0 Kudos

PERFORM GET_READTEXT IN PROGRAM 'ZSLR0124_SUBROUTINE'

USING &TNAME&

CHANGING &T_LINES&

ENDPERFORM

written below program in separate subroutiine.

PROGRAM ZSLR0124_SUBROUTINE.

Form get_readtext TABLES input STRUCTURE itcsy

output STRUCTURE itcsy.

DATA: lv_vbeln TYPE VBELN_VF .

DATA: tname like thead-tdname..

*DATA: VBDKR-VBELN LIKE VBDKR-VBELN.

data : t_lines LIKE tline OCCURS 0 WITH HEADER LINE.

*tname = VBDKR-VBELN.

*lv_vbeln = input-value.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = lv_vbeln

IMPORTING

output = lv_vbeln.

TNAME = lv_vbeln.

READ TABLE input with key 'TNAME'.

TNAME = input-value.

IF sy-subrc = 0.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

ID = 'X001'

LANGUAGE = 'E'

NAME = TNAME

OBJECT = 'VBBK'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = T_LINES

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.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

READ TABLE output with key 'T_LINES'.

IF sy-subrc = 0.

LOOP AT t_lines.

output-value = t_lines-tdline.

ENDLOOP.

MODIFY OUTPUT TRANSPORTING VALUE WHERE NAME = 'T_LINES'.

endif.

endif.

endform.

the subroutine is triggering but header text its not displaying on the layout

2 REPLIES 2

Former Member
0 Kudos

check in debug mode in program and script....

Former Member
0 Kudos

Hi,

If you want to print all lines from the text use the standard way of printing test in SAP scripts

INCLUDE &TNAME& OBJECT VBBK ID X001 LANGUAGE 'EN' as a command

If you only wants one line printed you can use you call to a subprogram. and the displey you returned line. All fields used at sending and recieving fields are single fields and not a table.

Regards

Åsa Thenstedt