on 08-04-2015 7:14 AM
Hi All ,
I am using SAVE_TEXT to create long text of equipment in IE01 ( create eqp) and IE02(Change Eqp) . Its working fine except in following cases :
1. When in create mode (IE01) long text is manually entered before saving
In this case system is not overwriting the manually entered long text with text from code .
2. When in change mode ( IE02) long text is manually edited before saving
In this case also system is not overwriting the manually edited long text .
In 2nd case , system calls SAVE_TEXT in program LSTXXFTE (line 588 ) and then SAVE_TEXT of my code which I have written in a implicit enhancement point .
After that system calls COMMIT WORK . I don't know why system is not overwriting the text from my code when SAVE_TEXT of my code is called after system calls SAVE_TEXT .
Hi,
Its continuing.. ok
For both the below cases, check the text name in the parameter HEADER (It should always be Permanent equipment number) , If Permanent equipment number is not generated till your point of enhancement , then you have to change that enhancement point . Permanent equipment number is textname so you have to do all the activities (create/change) based on this only .
1. When in create mode (IE01) long text is manually entered before saving
In this case system is not overwriting the manually entered long text with text from code .
INSERT = 'X' and SAVEMODE_DIRECT = ' ' .
2. When in change mode ( IE02) long text is manually edited before saving
In this case also system is not overwriting the manually edited long text .
If you can share your code for the Enhancements and corresponding paramenter values in SAVE_TEXT when triggered during debugging ,, it will be easier to find the reason of ur issue .
Regards
DJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. When in create mode (IE01) long text is manually entered before saving
In this case system is not overwriting the manually entered long text with text from code .
In the above case, keep the values like beow and uncomment the exceptions .
var_insert = 'X'
var_direct = ' '
dt_lines-tdformat = '*'.
dt_lines-tdline = 'This is long text from code' .
APPEND dt_lines.
put a break-point on SAVE_TEXT and check the value of RM63E-EQUNR if its getting populated with Permanent equipment number .
If correct Eqp number is populating as text name, then check the value of sy-subrc after executing SAVE_TEXT .
if sy-subrc = 0 , then text created in the name of Permanent equipment number , else if it is not = 0,, check the value of sysubrc and from the exception list find out the reason .
Let me know the result .
Regards
DJ
Hi,
How did you know text is not generated ?
Call FM save_text
....
....
---> If sy-subrc = 0 .(keep the break-point here and in another session,manually execute(in SE37) function READ_TEXT passing same parameters values i.e Text name, Text ID, Text object, Language . Check the text lines in table parameters, see if it is changed or not .)
else.
endif .
If text lines are changed as per code,
then press F8 and check again in READ_TEXT passing the same parameters values.
In the later READ_TEXT,, if text lines(manually entered) are different than earlier READ_TEXT text lines(entered through code) .Then system is modifying text lines after your modification,, so enhancement point needs to be changed,,so that you can modify after system do .
In all above case, Text name should be same as equipment number generated finally .
Regards
DJ
I have tried doing so . When system reaches the breakpoint on sy-subrc , I have executed READ_TEXT in SE37 with same parameters . Here sy-subrc value was 0 .
But READ_TEXT is going into endless loop.
I have kept the breakpoint on COMMIT WORK ( in std code) which comes after my code . After executing this statement READ_TEXT shows the long text ( not same as that of my code) .
Ok ...
lets do it in other way...
In include - LSTXXFTE ,FM 'SAVE_TEXT' will get triggered , whenever user add any text in the PC Editor .
In both of your cases, some texts are manually entered in the PC editor(for both Tcodes-IE01/2,, that means 'SAVE_TEXT' will be triggered every time .
So in form TE_SAVE_TEXT , create a implicit enhancement in the starting line . Change the content of the variable- ED_TEXT (which contains the text entered manually) according to your requirement . These text lines will reflect in the final text of the equipment .
Regards
DJ
What value you are passing in SAVEMODE_DIRECT field when you call your own SAVE_TEXT?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The standard code does not use SAVEMODE_DIRECT = 'X'. The reason is simple.
it waits for the first commit to happen. But your case you are saving the text immediately and then the commit happens that kicks in the SAVE_TEXT by standard and it is overwriting your text.
Check this in debug mode.
So as per me, the solution would be to call your FM also as SAVEMODE_DIRECT = Blank.
R
I had already tried that in IE02 . In IE02 it works if I pass INSERT = 'X' and SAVEMODE_DIRECT = ' '.
But in this case , if the long text is not edited in IE02 then system will not overwrite it with text from code. Its not known to me that long text is edited or not , so I can not decide value of INSERT and SAVEMODE_DIRECT at run time .
That is why I am alsways passing INSERT = '' and SAVEMODE_DIRECT = 'X'.
Hello!
You could try to place your statement which saves the text into PERFORM ON COMMIT. Then it will be processed just before commit work.
*But if your enhancement is already placed in perform on commit you will get a short dump. Try this approach in development or QAS system first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.