cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in reading data from Database.

Former Member
0 Kudos

Hi experts,

I have created a custom smartforms and custom print program. In my print program i have read all the data and populated the internal table and i am able to display the data in the smartform output.

I'm using Tcode me23n to print preview the form. i have to read the "text" tab from the me23n tcode using FM "READ_TEXT". The data is getting populated into an internal table. I coded these statements in Initialization tab in global definition.

Now my problem is ..... Can anyone tell me how to display the data into the forms.

please help.

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Just as u create a text element od text module, the smae way u can create an include text.

so create an include text and it takes all the parameters same as read text and directly displays the text.

кu03B1ятu03B9к

former_member196280
Active Contributor
0 Kudos

Follow below example to using FM 'READ_TEXT'

DATA BEGIN OF i_tlines OCCURS 0.

INCLUDE STRUCTURE tline.

DATA END OF i_tlines.

DATA: w_textname(70) TYPE c.

w_textname = vbdkr-vbeln.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'Z006'

language = 'E'

name = w_textname

object = 'VBBK'

TABLES

lines = i_tlines.

IF sy-subrc = 0.

READ TABLE i_tlines INDEX 1.

t_in-m1 = i_tlines-tdline. "Now t_in_m1 will have the value

ENDIF.

.

Regards,

SaiRam

Former Member
0 Kudos

Thanks a lot.

Problem solved

amit_khare
Active Contributor
0 Kudos

Instead of READ_TEXT FM in the form why dont you use the TEXT NODE (INCLUDE TEXT) directly in the form wherever you want to display the data...

Otherwise concatenate the data in an STRING (or as per requirement) type variable and display that variable.