Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table control with function code

Former Member
0 Likes
1,067

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

4 REPLIES 4
Read only

Former Member
0 Likes
714

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

Read only

0 Likes
714

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

Read only

0 Likes
714

Hi Vinodh

Please solve my problem..

Thanks & reagrds

Anubhav

Read only

0 Likes
714

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