‎2009 Jun 30 6:37 AM
Hi all,
I want to develop a new module pool program and I want to use Long text screen in this program and also want this text will store in table.I never develop such type of module pool before.This long text will like sales order long text.Please let me know the steps how I can develop such type of program and how I save long text huge data in table.
Thanks & Regards
Nirmal
‎2009 Jun 30 6:47 AM
Hi Nirmal,
Use STRING type for your screen field and for your table field. You cannot use TABLES for declaring your table in your program. Also you cannot use the statement LOOP AT ITAB WITH CONTROL in screen's PBO and PAI. But you can use the variant LOOP WITH CONTROL.
Thanks,
Renjith
‎2009 Jun 30 6:43 AM
hi nirmal..
what you can do is take 4-5(or according to your requirement) text fields with full lengths in the screen. take a bunch of variables for them. say txt1, txt2,txt3.... and keep updating them in the program as one variable as a group.
it will work. i had similar requirement and had used three text fields one under the other.
Regards,
Sumit Nene.
‎2009 Jun 30 6:47 AM
Hi Nirmal,
Use STRING type for your screen field and for your table field. You cannot use TABLES for declaring your table in your program. Also you cannot use the statement LOOP AT ITAB WITH CONTROL in screen's PBO and PAI. But you can use the variant LOOP WITH CONTROL.
Thanks,
Renjith
‎2009 Jun 30 6:49 AM
Hi Nirmal ,
you can use class CL_GUI_TEXTEDIT
see the demo program
SAPTEXTEDIT_DEMO_1
‎2009 Jun 30 6:58 AM
Hi Nirmal
It can be done in this way.
Create one Input text field will some lenght for header text.
now add code in PAI for double clicking on the field or add push button in front of it.
The button will be used to trigger PAI.
in PAI have your own logic to assign text ID, OBJECT and NAME. Call FM CREATE_TEXT assigning these values along with language. The module will call another screen where you can enter long text as you enter while creating Standard texts etc.
Regards
Vijai
‎2009 Jun 30 7:20 AM
Hi Vijay,
Thank you for your reply.I am very new to such type of development.Please let me know how I create Text Id,Object name etc. to develop this program.If possible please inform step by step procedure.How it actually works?
Please inform and it will be very helpfull for me.
Regards
Nirmal
‎2009 Jun 30 7:21 AM
Hai ,
here you have to use custom control, for this
DATA: line(256) TYPE c,
text_tab LIKE STANDARD TABLE OF line,
field LIKE line.
1) Create custom control in your screen
2) CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT', "--> (this is custom control name in screen)
editor EXPORTING parent = container.
3) CALL METHOD editor->get_text_as_stream "This method reads data from custom control , inserts into itab 'text_tab'
IMPORTING
text = text_tab. "
READ TABLE text_tab INTO line INDEX 1. read the text into wa 'line'
if you want more clarity , see 'ABAPDOCU' >ABAP USER DIALOGS> COMPLEXSCREEN ELEMENTS--> DEMO CUSTOM_CONTROL
‎2009 Jun 30 8:34 AM
Please see the below given sap demo programs.
You will get idea form that example.
SAPTEXTEDIT_DEMO_1
SAPTEXTEDIT_DEMO_3
Hope it will solve your problem.
Thanks,
‎2009 Jul 01 1:14 PM
Hi all,
Thank you for your reply.I have developed the screen where I can put long text as custom control by the help of ABAPDOCU ->Custom Control..Now I want to save this long text in R/3 database table.How I can save this to R/3 Database table?What will be the Object ID ,Name & Object so that I can use Read Text function to read this long text in future.Now I stuck on that and I am not able to save this long text in Database.Please clear my doubts and help me out so that I can save this data.
I am waiting for your valuable suggestions.
Advance Thanks
Nirmal