on 09-16-2008 2:44 PM
Hi Experts,
I am doing Textedit using BSP.
i want to edit any text in textedit then click save to SAP Database!!
How is the performed it?
Regards,
S.Suresh.
Bind the Textedit to a Varaible of length what ever you want. when ever you enter some text read the formfields value using the textedit ui id in DO_HANDLE_DATA if it is MVC , if it is Page with flow logic then use ON_INPUTPROCESSING event.
once you have the data in variable you can save it to DB if it is custom table then use Update/modify
if it is standard table field use some standard function/BAPI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in this case you don't need much coding also..
this is the code in the event oninputprocessing
DATA: str TYPE string.
IF event_id = 'htmlb'.
str = request->get_form_field( name = 'te' ).
"here you can update the DB>...
CALL METHOD page->set_attribute
EXPORTING
name = 'TEXT'
value = str.
ENDIF.
layout
have a page attribute name tex
< % @ p a ge lang uage ="abap" % >
< % @ extension name="htmlb" prefix="htmlb" % >
< h t m l b :co ntent de sign= "design2003" >
< h tm l b :page title=" " >
< h t ml b :form>
< h t m l b:textEdit cols = "40"
disabled = "FALSE"
id = "te"
rows = "5"
text = "<%= text %>"
width = "100%" />
< h t m l b :button text = "Press Me"
on Cl i ck = "myClickHandler" />
< / h tm lb :for m >
< / h t ml b:pa ge >
< / h t mlb :co n ten t>
Hi Vijay Babu Dudla ,
This is good code. but type as only one line in text edit then press save button its gone to SAP DB. so i typed as multiple line(next line) then press save button its gone to only one line(add next line)in SAP DB.
i want multiple line(next) in text edit then its gone to multiple line in SAP DB.
Regards,
S.Suresh
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.