Skip to Content
0
Former Member
Dec 09, 2008 at 08:29 AM

header text

13 Views

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