Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to show the content of a table (long text) in a scrollable textbox?

Hi,

I have to say first, many thanks to the ones who answers to threads in this forum, it's very helpfull when we're learning web dynpro!

I have a RFC function that return a table containing a long text (node "it_text", with elements "Tdformat" and "Tdline").

1) I want first to copy all the Tdlines in a new node "text_box" (that I made specially for the screen, it contains only the element "Tdline" [the text itself]);

2) Then I want to show the content of the node "text_box" in a scrollable textbox on the screen (to show 8 lines of text, for example).

How to do that easily? What is the UI Element needed to show that?

Thanks!

Former Member
Former Member replied

If you want to display as it is then you can use Table UI element. You can change the design property to 'transparent' and set column header visibility property to none. Then you need not to write any code simple you can map the node to table field.

Even with TextEdit you can achieve what you want. Try this code...

	StringBuffer tmpBuffer = new StringBuffer();
	
	for(int index=0;index<wdContext.nodeLines().size();index++)
	{
		wdContext.nodeLines().setLeadSelection(index);
		tmpBuffer.append(wdContext.currentLinesElement().getLine()+"n");
	}
	wdContext.currentContextElement().setData(tmpBuffer.toString());

Regards

Abhilash

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question