‎2007 Dec 28 3:06 AM
Hi to all
I am developing a module pool in which i am using table contro.
In table control one field contain longtext.
Please tell me how to impose a button on table control and when i double click on that a* edito*r window should open and there text is to be inserted and store in table.
Plz guide me and send me coding if possible.
Thanks & Regards
Anubhav
‎2007 Dec 28 3:36 AM
Place a 'Pushbutton' in the table control.
Assign a Process code to the Pushbutton.
In PAI of the Subject Screen.
At User command,
Validate against the OK_CODE and check for the Process code that you have assigned for the Pushbutton.
If yes, Call any SAP Text editor ( For Eg 'CATSXT_SIMPLE_TEXT_EDITOR').
CALL FUNCTION 'CATSXT_SIMPLE_TEXT_EDITOR'
EXPORTING
im_title = TITLE
im_display_mode = 'X'
IM_START_COLUMN = 10
IM_START_ROW = 10
CHANGING
ch_text = ITAB.
Text Editor will be available for Entry now. Data entered will be available in ITAB. Same can be transferred to your Database Table.
Hope this helps.
Le'me know if you need any more info.
Vinodh Balakrishnan
‎2007 Dec 28 8:32 AM
Thank you very much for your response...
I got the text editor when clicking on table control push button.
Now tell me ..
I have imposed a push button on table control field (yfcbp-yjust) .
Defined a push button also.
But how to store this database table and multiple lines because itab is be of type CATSXT_LONGTEXT_ITAB .
What should be the type of my table field YJUST. so that multiple lines can be stored.
Thanks & Regards
Anubhav
‎2007 Dec 28 10:19 AM
‎2007 Dec 28 10:38 AM
Hi Anubhav
You cannot store this in your DB table field. I would suggest this design,
When user presses the save button use the FM "SAVE_TEXT" and the key for this text id may be primary key fields of that DB table concatenated. And to retrrieve the value back on screen you can use the FM "READ_TEXT" which the key you have stored for that record in your DB table.
But i would suggest you to use Editor control. You can use the class CL_GUI_TEXTEDIT for that purpose.
~ Ranganath