2014 Aug 14 11:01 PM
HI Experts,
Standard Long text is capturing using CALL METHOD EDITOR->GET_TEXT_AS_STREAM
but not working for Custom Long text – Only changes
Here is the Issue:
CODE1 ( Custom Long text entry capturing – First Few Lines )
Custom Long text Entries are stored in LS_OUTTAB-TEXT first time when entered few lines and LV_MOD is 1.
PAI of Custom tab
CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
EXPORTING
ONLY_WHEN_MODIFIED = CL_GUI_TEXTEDIT=>TRUE
IMPORTING
TEXT = LS_OUTTAB-TEXT ( FIlled with Lines entered in custom long text )
IS_MODIFIED = LV_MOD ( Value 1 , Modified )
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
OTHERS = 3
CODE2 ( Standard Long Text Entry Capturing – First Few Lines )
Standard Long text Entries are stored in SELECTED_TEXT first time when entered few lines and FLAG_MODIFIED is 1.
PAI of Standard tab
CALL METHOD EDITOR->GET_TEXT_AS_STREAM
EXPORTING
ONLY_WHEN_MODIFIED = YTRUE ( Value 1 , Modified )
IMPORTING
TEXT = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
IS_MODIFIED = FLAG_MODIFIED.
CODE 3 ( Standard Long Text Entry Capturing – Second time Few Lines )
Standard Long text Entries are stored in SELECTED_TEXT second time when entered few lines and FLAG_MODIFIED is 1.
PAI of Standard tab
CALL METHOD EDITOR->GET_TEXT_AS_STREAM
EXPORTING
ONLY_WHEN_MODIFIED = YTRUE
IMPORTING
TEXT = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
IS_MODIFIED = FLAG_MODIFIED. ( Value 1 , Modified )
CODE4 ( Custom Long text entry capturing – Second Time Few Lines )
Custom Long text Entries are not stored in LS_OUTTAB-TEXT Second Time when entered few lines and LV_MOD is 0.
PAI of Custom tab
CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
EXPORTING
ONLY_WHEN_MODIFIED = CL_GUI_TEXTEDIT=>TRUE
IMPORTING
TEXT = LS_OUTTAB-TEXT ( ZERO ENTRIES )
IS_MODIFIED = LV_MOD ( NOT MODIFIED Flag )
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
OTHERS = 3
Can anyone help me out of this.
With Regards,
Bala M
2014 Aug 18 9:50 AM
Hi,
The program included is my attempt to imitate your development on a smaller scale.
The program use TABSTRIP with 4 tabs .
On PAI of each strip I am using: FORM textedit_get .
And I am geting the full data also additions (As I understand it) ..
Please play with this .
Regards.
Hi,
The program included is my attempt to imitate your development on a smaller scale.
The program use TABSTRIP with 4 tabs .
On PAI of each strip I am using: FORM textedit_get .
And I am geting the full data also additions (As I understand it) ..
Please play with this .
Regards.
2014 Aug 15 1:35 PM
Is there any one who can help me in this.
If you didn't understand my Question , Please let me know , I can put you clearly with screenshots.
With Regards,
Bala M
2014 Aug 15 2:02 PM
Hi,
I have never had the chance to use cl_gui_textedit with ONLY_WHEN_MODIFIED but what
exactly are you trying to achieve ?
Regards.
2014 Aug 15 3:06 PM
Excellent Eitan,
Here is what I am trying to Achieve.
In Create Notification IW21 , They need 5 Long Text in Custom Tab ( Say Tab Name is MBR ).
TAB1 NOTIFICATION Standard Information , TAB2 REFERENCE OBJ , TAB 3 MalFunction , Breakdown Standard one...... TAB 7 ( Custom Tab ).
In Custom Tab , I added 5 LONG TEXT ( its 5 WHY Concept ).
When the User enters data in 5 Long text , it should store long text along with Notification number when save.
But Notification number will be generated @ the time of SAVE , but before that its just shows as
%0000000001 ( and Number will be generated 1000065479) at Save.
How to achive this .
I did this:
Added 5 Custom Container. and In PBO / PAI
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
IN PBO
CREATE OBJECT TEXT_EDITOR1 , CREATE OBJECT TEXT_EDITOR2, CREATE OBJECT TEXT_EDITOR3 like wise 5
CALL METHOD TEXT_EDITOR1->SET_TEXT_AS_R3TABLE , CALL METHOD TEXT_EDITOR2->SET_TEXT_AS_R3TABLE .. Like wise 5 , So when the user Click on Custom Tab ( MBR ).
It give 5 Long text.
When he click tab1 or tab2 or tab3 .. and again tab MBR , still data is available.
How to store this data for future retrival ( IW22 or IW23 ) ?
Its working fine when I enter first time and goes here and there and finall save .
IN SAVE BADI , I imported the Long text and created Standard Text SO10 with Notification Number with LONG1 , LONG2 .. means 1000065479LONG1 as standard text.
But not working when I entered first time and go to tab1 and tab2 and then to MBR tab and added few more lines , its not exporting full lines and in IMPORT ( SAVE BADI ) giving ZERO Lines.
Please help and thanks for your quick response.
2014 Aug 15 3:23 PM
Hi,
I have not tried it .
It is my understanding that he user wants to update the text.
At PBO:
Use read_text function and fill the cl_gui_textedit .
The user can update the text .
At PAI :
GET_TEXT_AS_STREAM do not use ONLY_WHEN_MODIFIED .
Is it ok to do the save now ? if not
Export....
in BADI .
Import....
Use save_text function .
Regards.
2014 Aug 15 3:31 PM
Hi , Thanks
I am doing the same. But if you see my initial Question point 12 is the issue.
I am doing the same. In PAI , I am exporting the values and In Save BADI - I am importing long text and then using Notification number and saving it as save text ( SO10 ).
But read point 12
EXPORTING is good when I enter 1st time in that Long text and when I change the TAB MBR to TAB1 its exporting correctly
But when I come back to TAB MBR again and enter few more lines. Its not exporting those few more lines and in SAVE BADI, you will end up importing ZERO Line.
Please check my Point 1 to 12 , Issue is in Point 12.
Thanks and Regards,
Bala M
2014 Aug 15 4:00 PM
2014 Aug 15 4:04 PM
2014 Aug 15 4:09 PM
2014 Aug 15 9:34 PM
HI ,
Yes I did the same and working fine.
Main problem is when you enter text first time ( with only_when_modified = '1' and tried with 0 also ) it is good. I am getting long text into internal table and can do my task.
BUT WHEN I ENTER TEXT AND MOVE TO SOME OTHER TAB AND COMES BACK TO THIS TAB AND THEN ADD SOME MORE ENTRIES IN THE SAME LONG TEXT ..ITS NOT READING INTO ITAB USING THIS METHOD.
MEANS :
First time LONG TEXT Entry :
ABCD ..
now Switch tab and come back to same tab again and then
ABCD ( already exists )
EFGH ( New lines added )
IJKL MNOP ( new lines added )
Now that Method ( with 1 or 0 or comment ) is not considering anytext into returning internal table .
Now whatz next.
With Regards,
Bala M
2014 Aug 18 7:08 AM
Hi,
Are you also exporting to memory when you go to another tab ?
Regards.
2014 Aug 18 9:50 AM
Hi,
The program included is my attempt to imitate your development on a smaller scale.
The program use TABSTRIP with 4 tabs .
On PAI of each strip I am using: FORM textedit_get .
And I am geting the full data also additions (As I understand it) ..
Please play with this .
Regards.
2014 Aug 18 12:41 PM
Thanks Eitan,
let me try this and I will get back to you.
With Regards,
Bala M.
2014 Aug 18 12:46 PM
2014 Aug 18 12:51 PM
Hi Eitan,
Can you attach the Module pool design also, so that I will not confused with the Screen name given by you.
Appreciate and Thanks in advance.
With Regards,
Bala M
2014 Aug 18 12:52 PM
2014 Aug 18 1:00 PM
2014 Aug 18 1:02 PM
2014 Aug 18 3:11 PM
Sorry to bother you Eitan,
Facing difficult in Layout Design of 100/101/102/103/104.
Can you send its screens and its properties and Subscreen also.
STATUS_COMMON is good.
PAI and PBO is good. Unable to active becos of Error at subscreen -->
CALL SUBSCREEN tab_strip_1_sca
INCLUDING g_tab_strip_1-prog g_tab_strip_1-subscreen.
Please help with Final screenshots of this.
With Regards,
Bala M
2014 Aug 18 4:06 PM
2014 Aug 18 4:16 PM
Got it from your before reply. Uploaded all. and working fine as expected in Custom Test Program.
Greate working fine.
Need to implement into my Standard scren.
Will get back to you ASAP once I Implement into Standard SAP Screen IW21.
I need to care fully check where I wrote wrong in my IW21.
Once again Thanks Eitan sir.
With Regards,
Bala M
2014 Aug 18 5:43 PM
Hi,
Good !!! I am happy
Good luck .
Regards
p.s. Eitan is good enough Sir is redundant.....
2014 Aug 19 3:36 PM
Hi Eitan,
I loaded your program and it worked fine as a report.
But when I try to do the same using Standard Tab ( MBR Tab ), it didn't work unforturnately. Please let me know where I am doing wrong.
I am attaching the full PAI and PBO as well as Screenshot of Debug values.
Please help, May be wrong in declaration or Usage of Variables or Designing the Long text with Custom control.
Not sure.
WIth Regards,
Bala M
2014 Aug 19 3:38 PM
2014 Aug 19 6:01 PM
I cannot open your files.
Try to generate the tabs using the wizard I did not create those manually.
When I had the tabs & sub screens I added the rest.
This is my third time that using tab strip since 2006.....
Regards.
2014 Aug 19 7:24 PM
Hey Eitan,
Good News . Working fine in IW21 also.
with minor change:
IN PBO of Custom Screen.
Before Changes :
if EDITOR_CONTAINER1 is initial.
CREATE OBJECT EDITOR_CONTAINER1
endif.
CREATE OBJECT TEXT_EDITOR1
EXPORTING
PARENT = EDITOR_CONTAINER1
WORDWRAP_MODE = CL_GUI_TEXTEDIT=>wordwrap_at_windowborder
WORDWRAP_POSITION = '78'
WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.
After changes :
if EDITOR_CONTAINER1 is initial.
CREATE OBJECT EDITOR_CONTAINER1
CREATE OBJECT TEXT_EDITOR1
EXPORTING
PARENT = EDITOR_CONTAINER1
WORDWRAP_MODE = CL_GUI_TEXTEDIT=>wordwrap_at_windowborder
WORDWRAP_POSITION = '78'
WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.
endif.
2014 Aug 19 10:55 PM
Thanks Eitan,
Now I am facing Different problem. Morning it was working fine. Suddenly it went to dump from CALL METHOD CL_GUI_CFW->FLUSH.
I tried to repalce with UPDATE or some other method and even Commented out, still getting dump .
DUMP:
Short text
Exception condition "SYSTEM_FAILURE" raised.
What happened?
The current ABAP/4 program encountered an unexpected
situation.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
A RAISE statement in the program "SAPLOLEA" raised the exception
condition "SYSTEM_FAILURE".
Since the exception was not intercepted by a superior
program, processing was terminated.
Short description of exception condition:
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
-
How to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"RAISE_EXCEPTION" " "
"SAPLOLEA" or "LOLEAU10"
"AC_FLUSH_CALL_INTERNAL"
or
"SAPLOLEA" "SYSTEM_FAILURE"
or
"SAPLIQS0 " "SYSTEM_FAILURE"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
Information on where terminated
Termination occurred in the ABAP program "SAPLOLEA" - in
"AC_FLUSH_CALL_INTERNAL".
The main program was "SAPLIQS0 ".
In the source code you have the termination point in line 371
of the (Include) program "LOLEAU10".
2014 Aug 20 4:38 AM
Hi,
Are you using cl_gui_cfw=>flush ?
I just run RS_ABAP_SOURCE_SCAN looking for usage of cl_gui_cfw=>flush in my code and there is none.
Can you do without cl_gui_cfw=>flush ?
Found this: http://scn.sap.com/thread/430802
Beyond that I am afraid that I have no answer .
Regards.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |