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

Make default text data in editor for particular tcode?

Former Member
0 Likes
13,587

Hi,

       I need to make default text in editor for particular functional Tcode. where you can find editor...we should make default text:

         Customer:  --------------------------------------

         Material no: --------------------------------------

Thanks

Neha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
13,222

Hi,

       It's very strange..unable to understand...pls look at my code which is not working..do we need to use tcode in our program which we run?


DATA: it_texts TYPE STANDARD TABLE OF tline,
wa_texts
TYPE tline,
wa_thead 
TYPE thead.


wa_texts
-tdformat = '*'.  "new line
wa_texts
-tdline = 'TEXT1:'.
APPEND wa_texts TO it_texts.
CLEAR: wa_texts.

wa_texts
-tdformat = '='.  "new line
wa_texts
-tdline = ' TEXT2:'.
APPEND wa_texts TO it_texts.
CLEAR: wa_texts.

wa_texts
-tdformat = '*'.  "new line
wa_texts
-tdline = ‘TEXT3:'.
APPEND wa_texts TO it_texts.
CLEAR: wa_texts.


CALL FUNCTION 'CREATE_TEXT'
EXPORTING
fid        
= wa_thead-tdid
flanguage  
= wa_thead-tdspras
fname      
= wa_thead-tdname
fobject    
= wa_thead-tdobject
save_direct
= 'X'
*   fformat     = '*'
TABLES
flines     
= it_texts
EXCEPTIONS
no_init    
= 1
no_save    
= 2
OTHERS      = 3.

Pl provide conclusive solution for that.

Thanks

neha

54 REPLIES 54
Read only

Former Member
0 Likes
2,462

For which tcode you will need this requirement?

Read only

Former Member
0 Likes
2,462

Hello Neha,

Please add some details about your requirement.

If you want default text in text editor then you can use standard texts using SO10 Tcode  OR

If you want default text in screen fields then you can use SET PARAMETER and GET PARAMETER ID.

Also refer this thread. It may help. http://scn.sap.com/thread/686996

Regards,

Sudhir Kothavale.

Read only

0 Likes
2,462

Hi,

        Tcode QA12 where you find word editor in which need to add two default text.

   

       Customer:

         

        Date:

So user can entry the customer name & date....both should be non-editable mode..

Regards

Neha

Read only

Former Member
0 Likes
2,462

Hi,

        Tcode QA12 where you find word editor in which need to add two default text.

  

       Customer:

        

        Date:

So user can entry the customer name & date....both should be non-editable mode..

Regards

Neha

Read only

0 Likes
2,462

hi,

Where you ll find word editor there in QA12,

stil cant get your exact issue..

yo want to add more fields in the tcode QA12 means you have to use Enhancement concepts only,

no other way..

hope it helps,

Mathan R.

Read only

0 Likes
2,462

Hi,

       You'll only get from QA32 and choosing a line and click User decision then you would be able to long text editor. before we open the text editor, We need to display default text in the editor.

Thanks

Neha

Read only

0 Likes
2,462

Hi,

       No need add any fields in dictionary level..Only in the text editor.. i think we have to do using enhancement concept.

thanks

neha

Read only

0 Likes
2,462

hi,

You can add manually there..

i tried and even its working.... even if you want to maintain it in standard text also, it is also possible..

still you face any issues regarding this.. you can post it here..

Thanks,

Mathan R.

Read only

0 Likes
2,462

Hi Mathan,

            We need to do that cause user may enter entries. Tell me any enhancement for that

Read only

0 Likes
2,462

hi Neha,

these are all the available enhancements(exits) which i found for the UD.

QEVA0010

QEVA0009

QEVA0008

QEVA0007

QEVA0006

QEVA0005

QEVA0004

But stil cant figure it out which is to change the long text..

working on it.. if you can means , figure it out and proceed further..

ll post soon with the exact one..

hope it helps.

Mathan R.

Read only

0 Likes
2,462

hello neha,

use this Exit QEVA0007 for achieving your requirement.

hope it helps,

Reward if useful,

Mathan R.

Read only

Former Member
0 Likes
2,462

Hi Mathan,

               As you said i used the exit and i have written code below it's not working

DATA: e_header  TYPE thead,

      i_header  TYPE  STANDARD  TABLE  OF thead,

            w_tline   TYPE tline,

      i_tline   TYPE  STANDARD  TABLE  OF tline  WITH  HEADER  LINE.

   e_header-tdobject =  'ZCHD_OBJ'.

   e_header-tdid =  'Y0B1'.

   e_header-tdspras = sy-langu.

   e_header-tdlinesize =  72.

    CONCATENATE y0bs_Dev-objid e_header-tdid     INTO e_header-tdname.

   APPEND 'DevComments for Obj 1" to  i_tline-tdline.

    CALL  FUNCTION  'SAVE_TEXT'

      EXPORTING

        client          = sy-mandt

        header          = e_header

       savemode_direct =  'X'

      TABLES

        lines           = i_tline

      EXCEPTIONS

        id              =  1

        language        =  2

       name            =  3

        object          =  4

        OTHERS          =  5.

    IF sy-subrc <>  0.

    ENDIF.

Read only

0 Likes
2,462

neha,

Which Exit you used???

Have you tried this EXIT QEVA0007..

or else sen me the exit you followed..

lemme check it and tel yo..

thanks,

Mathan R.

Read only

0 Likes
2,462

Hi mathan,

It's not working... i follow a thread here..http://wiki.sdn.sap.com/wiki/display/ABAP/Long+Texts

Read only

0 Likes
2,462

hi neha,

But under which exit you wrote this code???

the parameters has to match right for doing it??

please post the Exit name which you used..

Sorry fa d delayed response..

Thanks,

Mathan R.

Read only

0 Likes
2,462

Hi Mathan,

           I have written code under this exit QEVA0007 but it's not working.

Thanks

Neha


Read only

0 Likes
2,462

hi neha,

these are all the passing parameters under tables..

T_CHARACTERISTIC_RESULTSLIKEQAMKR
T_NOTIFICATIONSLIKEQFOBJ
T_DEFECTSLIKEQFAAI
T_PROTOCOL_TEXTLIKERQEVP
T_UD_LONGTEXTLIKETLINE

i think , the one i highlighted was the field responsible for it...

try to pass datas into it nad check it out..

thanks ,

Mathan R.

Read only

0 Likes
2,462

Hi Mathan,

                Talking about which functional module..

thanks

neha

Read only

0 Likes
2,462

Hi Mathan,

                Talking about which functional module..

thanks

neha

Read only

0 Likes
2,462

hello neha,

the QEVA0007 Exit i mentioned was a function Exit,

you should write codes in the include present in the function module..

this is the Exit FM name you gonna use.. EXIT_SAPMQEVA_007..

hope this helps,

Mathan R.

Read only

0 Likes
2,462

Hi neha,

to get your requirement you can use BADI: QEVA_SUBSCREEN_1101 ....

-Ganesh

Read only

0 Likes
2,462

hi ganesh,

the actual requirement is to enhance the UD long text..

how is it possible to do it with this BADI...

it wont work..

thanks,

Mathan R.

Read only

0 Likes
2,462

Hi Madhan,

              we can not use the badi which is mentioned by ganesh.

Thanks

neha

Read only

0 Likes
2,462

hi neha,

even i checked the BADI.. its not having any parameters corresponds to Longtext..

okay.. does the issue solved or wat..

have you used the function exit given..

thanks,

Mathan R.

Read only

0 Likes
2,462

mathan,

badi will give required customer number and date and inspection lot there we have to use save_text FM to store or add the text to txt object.

-Ganesh

Read only

0 Likes
2,462

Hi ganesh,

             We need to store default text for any customer no..Just we have to think it's just text to display in the editor...Not to bring any fields or value in it. Just text.....

thanks

Neha

Read only

0 Likes
2,462

hi bro,

BADI ll do the need.. but this BADI wont work in this case.. thats what im saying..

Anyway thanks for the contribution..

Thanks ,

Mathan R.

Read only

0 Likes
2,462

Hi Mathan,

          I have used the enhancement but still haven't got any conclusion...I hope the enhancement may not match or is there there any idea?

Thanks

Neha

Read only

0 Likes
2,462

hi Neha,

Once try like this.. i tried..

go to that Ud editor and type those Ordr, comments , date, reason and all manually and save it..

whenever the user see that, its coming automaticaly.. i didnt did enhancements even..

try and post the results please..

Thnaks ,

Mathan R.

Read only

0 Likes
2,462

Hi Mathan

        There could be a problem in my coding which is not working properly..Just kept constant values in my program.. which has to display in the text editor.

Tell me is there any problem...Can we use SAVE_TEXT or Create_text...

Thanks

neha

Read only

0 Likes
2,462

hi neha,

Save_text FM is used to change the existing txt's..

read_text ll be used to read the existing texts..

but you gonna upload it very new only.. so better use create_text, it ll be helpful..

better manually write there instead of creating it in Texts directly or via FM..

it depends literally..

hope it helps,

Mathan R.

Read only

0 Likes
2,462

Hi mathan

           I hope it's very simple but when start from qa32 which carries qa12 then it open ms-editor but not updating.. What could be the trouble?

Thanks

neha

Read only

0 Likes
2,462

neha,

lemme  figure it out.. where yo ll get the UD texts in qa32..

where xactly it ll display..

thanks,

Mathan R.

Read only

0 Likes
2,462

Hi mathan,

             After QA32 then you would get fields as inspection lot and material..choosing any one row then click User decision(UD) which carries you qa12 then edit long text UD/icon button ms-word editor..finally we have to save some texts..

thanks

neha

Read only

0 Likes
2,462

Hi mathan,

                Do we have any problem using temp object? I haven't created request no..

thanks

Neha

Read only

0 Likes
2,462

hi,

it wasnt a problem in this case.. for transporting only request and al needed..

for me its working fine..

i did like this only..

in QA12 for a particular inspection lot, i gave a Ud text like date and Accounts..

later via transaction qa32, for the above specified.. im going for UD, their im going UD. the same texts what i gave is displaying for user's input..

its working fine.. no need to go for Exit i think.. even the codes what we discussed early was also not needed in this case.. try this.. it ll work for sure..

hope it helps Neha,

Thanks,

Mathan R.

Read only

0 Likes
2,462

Hi Mathan,

      I'm not understanding what you say...Whenever the clicking event UD then I need store the text field Where user may enter some information belongs the text

but i have no idea how to do without user exit...

Thanks

Neha

Read only

0 Likes
2,462

Hi mathan,

   How did you give the texts DATE:               ACCOUNT:

Read only

0 Likes
2,462

But Neha,

Where you ll store the datas which is entering..

its just an reference document texts only.. i referred with my functional guy, he said like.. Even we can enter text manually, i mean your exact requirement. but its only for reference.. should not store it in any tables.. if needed means, create a z'table hez sayin..

so , no need of Exits in this case.. without exit also its working fine..

Suppose if you want to store it in any table means.. what kinda table it is.. gimme some info to explore widely..

hope it helps,

Mathan R.