Application Development and Automation 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 only

read_text dynamic

Former Member
0 Likes
910

Hi,

how to make read-text dynamic means.....I want to display sales text maintained in material master in place of material description.

How to achieve this for every material.

4 REPLIES 4
Read only

Former Member
0 Likes
738

First use READ_TEXT to get the long text value and then substitute the data in description field.

For this u need to write code in ur program or user exit..

Read only

0 Likes
738

Hi,

I'm writing a subroutine pool program for script.But it is poupalting for only one material no...how to display it for all materials in table......

Read only

0 Likes
738

Hello


loop at ITAB.
  call function 'READ_TEXT'
  ...
*  do thomething here
endloop.

Read only

0 Likes
738

Hi,

PROGRAM zsd.

&----


*& Form zform

&----


text

-


-->IN_TAB text

-->OUT_TAB text

-


FORM zform TABLES in_tab STRUCTURE itcsy out_tab STRUCTURE itcsy.

DATA: BEGIN OF tbl_lines OCCURS 0.

INCLUDE STRUCTURE tline.

DATA: END OF tbl_lines.

DATA:wa_mrk LIKE j_1iexcdtl-rdoc1.

DATA:p_num TYPE string.

DATA: l_name LIKE thead-tdname.

DATA p_vbeln TYPE vbeln.

DATA:p_posnr LIKE lips-posnr.

SELECT SINGLE posnr FROM lips INTO p_posnr.

READ TABLE in_tab WITH KEY 'J_1IEXCDTL-RDOC1'.

MOVE in_tab-value TO wa_mrk.

SELECT SINGLE vbeln FROM lips INTO p_vbeln WHERE vbeln = wa_mrk.

CONCATENATE p_vbeln p_posnr INTO l_name.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'Z001'

language = sy-langu

name = l_name

object = 'VBBP'

TABLES

lines = tbl_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 EQ 0.

LOOP AT tbl_lines.

concatenate p_num tbl_lines-tdline into p_num.

ENDLOOP.

ENDIF.

REFRESH tbl_lines.

READ TABLE out_tab WITH KEY 'J_1IEXCDTL-MRK_PKG'.

MOVE p_num TO out_tab-value.

MODIFY out_tab INDEX sy-tabix.

DATA:p_num1 TYPE string.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'Z002'

language = sy-langu

name = l_name

object = 'VBBP'

TABLES

lines = tbl_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 EQ 0.

LOOP AT tbl_lines.

concatenate p_num1 tbl_lines-tdline into p_num1.

ENDLOOP.

ENDIF.

REFRESH tbl_lines.

break-point.

READ TABLE out_tab WITH KEY 'J_1IEXCDTL-DESC_PKG'.

MOVE p_num1 TO out_tab-value.

MODIFY out_tab INDEX sy-tabix.

DATA:wa_matnr LIKE j_1iexcdtl-matnr.

DATA: l_name1 LIKE thead-tdname.

DATA:p_num2 TYPE string.

DATA:p_matnr TYPE matnr.

DATA:p_vkorg TYPE vkorg.

DATA:p_vtweg TYPE vtweg.

READ TABLE in_tab WITH KEY 'J_1IEXCDTL-MATNR'------->

MOVE in_tab-value TO wa_matnr.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = wa_matnr

IMPORTING

output = wa_matnr.

SELECT SINGLE matnr vkorg vtweg FROM mvke INTO (p_matnr,p_vkorg,p_vtweg) WHERE matnr = wa_matnr.

CONCATENATE p_matnr p_vkorg p_vtweg INTO l_name1.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = '0001'

language = sy-langu

name = l_name1

object = 'MVKE'

TABLES

lines = tbl_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 EQ 0.

LOOP AT tbl_lines.

concatenate p_num2 tbl_lines-tdline into p_num2.

ENDLOOP.

ENDIF.

REFRESH tbl_lines.

READ TABLE out_tab WITH KEY 'J_1IEXCDTL-MAKTX'.

MOVE p_num2 TO out_tab-value.

MODIFY out_tab INDEX sy-tabix.

ENDFORM. "ZFORM

This is my subroutine pool program.......It is reading only first material no from table j_1iexcdtl eventhough it has 4 material nos.....It's not reading next material nos.....