on 08-08-2011 1:02 PM
hello guru's
i am very new webdynpro abap.i strucked at one point.
i have created one webdynpro component with TextEdit UI element.i binded value property of this ui element with one context attribute of 1000 char leangth.and i have two buttons one is 'SAVE' and second One Is 'DISPLAY'.now i execute component it is allowing me to enter the text with 1000 chars.my requirement is when i eneter text in textedit field and click on save button it should create one text using CREATE_TEXT function module.after that if i select disply button it should display the textwhat i have saved using READ_TEXT.for this display action action have used READ_TEXT fm. but my problem is at the time of save action system should read all 1000 char text what ever i have entered using get_attribute.but it is not able to read all text from context attribute through get_attribute method .it is only picking 255 char length.but it should read 1000 char text.
could you please suggest me on this .please send me the sample code if possible.
best regards,
babu.
context attribute should be a STRING_TABLE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
These are the FM that are used to convert STRING_TABLE to TLINE.
CALL FUNCTION 'CONVERT_ITF_TO_STREAM_TEXT'
EXPORTING
language = sy-langu
lf = abap_true
IMPORTING
stream_lines = et_comments
TABLES
itf_text = lt_tline
TEXT_STREAM =
.
2. CONVERT_STREAM_TO_ITF_TEXT
YOU CAN SAVE PAGES,
use.. READ_TEXT and SAVE_TEXT for saving the TEXTEDIT....
Edited by: ssm on Aug 8, 2011 6:08 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Define your UI element as TEXTEDIT.
2. bind this UI element to an attribute of the STRING_TABLE.
3. After user enters the values in the text_edit.. you can a FM which will convert string_table to TLINE.
4. Once when you have the entered data in TLINE, now you can call CREATE_TEXT FM...
WHEN you are displaying ...
1. READ_TEXT
2. CONVERT TO STRING_TABLE
3. BIND TO THE ATTRIBUTE
we have Fm which directly convert STRING_TABLE TO TLINE, and VICE-VERSA... i will search it for you...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Babu,
What is the data type of the context attribute that is bound to the TextEdit UI element? If its not string then could you change it to String and try?
BR, Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Babu,
Ideally if you use string data type then it will accept more than 255 chars. Since its not working for you, we need to identify where exactly the problem. problem might be in either your Function module or might be in webdynpro version you are using.
I would suggest the following
1. in the same view add a text view UI element and bind the same context attribute (which is bound to text edit). On click of Save check whether all the entered text is visible in Text View. If its not visible then I would say its version problem. So here you need to try the suggestion from SSM
2. if the Text view displays all the data entered, then its problem with the function module. check whether they have handled the import parameters properly. and also you need to check how its persited in DDIC. because in DDIC table, String data type is not allowed. Check it out.
BR, Saravanan
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.