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,623

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,258

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

0 Likes
10,791

hi,

These texts, date and accounts was entered manually..

you can even maintain it with text modles and standard texts..

Thanks,

Mathan R.

Read only

0 Likes
10,791

Hi Mathan,

        yes we can enter manually..I understand you but client requires the format even the title and should be non-editable mode. client saying all text should be there default before we open text editor...

Thanks

neha

Read only

Former Member
0 Likes
10,791

Hi expert,

              My code is not working...Following just comments to be created in text editor..Not to read any field & text data..Just think all Constant values..


DATA: it_texts TYPE STANDARD TABLE OF tline,

       wa_texts LIKE LINE OF it_texts,

       thead  TYPE thead.

**Populate text table

wa_texts-tdformat = '*'.  "new line

wa_texts-tdline = 'Order:'.

APPEND wa_texts TO it_texts.

CLEAR: wa_texts.

wa_texts-tdformat = '*'.  "new line

wa_texts-tdline = 'COMMENTS:'.

APPEND wa_texts TO it_texts.

CLEAR: wa_texts.

wa_texts-tdformat = '*'.  "new line

wa_texts-tdline = 'DATE:'.

APPEND wa_texts TO it_texts.

CLEAR: wa_texts.

wa_texts-tdformat = '*'.  "new line

wa_texts-tdline = 'REASON:'.

APPEND wa_texts TO it_texts.

CLEAR: wa_texts.

wa_texts-tdformat = '*'.  "continuation line

wa_texts-tdline = 'DETAILS:'.

APPEND wa_texts TO it_texts.

CLEAR: wa_texts.

*Internal table to store standard texts

CALL FUNCTION 'SAVE_TEXT'

   EXPORTING

    client                = sy-mandt

     header                = thead

     insert                = 'X'

     savemode_direct       = 'X'

     OWNER_SPECIFIED       = 'X'

     LOCAL_CAT             = 'X'

* IMPORTING

*   FUNCTION              =

*   NEWHEADER             =

   TABLES

     lines                 = it_texts

  EXCEPTIONS

    ID                    = 1

    LANGUAGE              = 2

    NAME                  = 3

    OBJECT                = 4

    OTHERS                = 5

Read only

Former Member
0 Likes
13,259

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

Read only

0 Likes
10,791

hi neha,

here s your solution for qa12 transaction.

go for implicit enhancement in this case..

goto function group QTXT via se80--> includes --> LQTXTUXX --> goto LQTXTU01.

then from menu--> edit --> enhancemnt options -->show implicit enhancements -->

n

goto form TEXT_VERARBEITEN.. there in the enhancement section go for new abap code..

write these code.. either you can use create text and read text here.. or create standard text and read it via read_text FM.. or manually write code here like what i did.. but use the other parameter in the tline structure.. so that int ll come in next corresponding lines..

it ll work for every inspection lot via qa12 now..

hope it helps,

Reward if useful,

Mathan R.

Read only

0 Likes
10,791

Hi Mathan,

       

      My access key is not accepting when i try edit and to keep my enhancement...is there any other option to keep the enhancement..

thanks

Neha

Read only

0 Likes
10,791

Hi neha,

Temme exactly how you are doing it..

donn click the enhancement button.. goto show implicit enhancement and the in the exact form it ll be like this '''''''''''''''''''''''''''' there, right click and create implementation.. then insert your codes and activate it..

how you are doing? and where exactly u are facing this issue??

thanks,

Mathan R.

Read only

0 Likes
10,791

Hi Mathan,

          I tried as you said but which still disable mode...how to get the create option..

Thanks

Neha

Read only

0 Likes
10,791

hi ,

its working for me.. look..

thanks,

Mathan R.

Read only

0 Likes
10,791

hi neha,

forget to say.. sorry..

click the button enhance in the application toolbar..

then right click and do the procedure..

thanks,

Mathan R.

Read only

0 Likes
10,791

Hi mathan,

           

       sorry... It's been keep extending to complete this task following pictures shows in application tool bar

Read only

0 Likes
10,791

hi,

new.bmp

clich this button after menu--> edit --> enhancemnt options -->show implicit enhancements

then right click on """""""""""""""""""""" under form statement.. their goto--> create enhancement implementation..

then proceed..

thanks,

Mathan R.

Read only

0 Likes
10,791

Hi mathan,

  It's good effort from you but unable to implement it due to disable mode...may be access key required to edit think..

thanks

Neha

Read only

0 Likes
10,791

hi,

clich this button after menu--> edit --> enhancemnt options -->show implicit enhancements

then right click on """""""""""""""""""""" under form statement.. their goto--> create enhancement implementation..

then proceed..

no access key and al required.. juz do like this.. it ll work..

thanks,

Mathan R.

Read only

0 Likes
10,791

Hi Mathan

       

You are absolutely right & great work & idea you found for the enhancement..It's working fine & great success for your patience & response

Thanks

Neha