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

Translated texts

Former Member
0 Likes
3,042

Hi

Can anyone recommand me a way to introduce texts for different objects in sap?

The idea is that I selected all the objects from a package in an excel and I translated all of their short descriptions in another languge.

Now I have to upload the texts in sap so that the system recognizes them when I logon in the translation language, but I cannot find a way (function or

method) to update them in the sap tables.... please help me sort it out...

Thank you in advance

Vlad

1 ACCEPTED SOLUTION
Read only

jeroen_verbrugge2
Active Participant
0 Likes
2,334

Hi,

To select all objects for a package for translation, you can use the object list functionality of SE63.

Choose Administration in the menu of SE63, then choose tab Evaluations -> Object Lists.

Create a new one and select the object types you want to translate.

Then in collections you could limit this to your package.

When you activate the object list, a job will be scheduled that fills the collection.

This is what SAP provides to create object lists... To my knowledge nothing exists to export and import objects.

In SE63 you can process the object lists manually by choosing Worklist->Standard in the menu.

On the next screen on tab object list, choose object list and then load objects. If there is nothing found, you can try to tick all the checkboxes Deactivate... This is the only way I get some results. Don't know why. Then on the next screen you can choose menu Utilities->Refresh to get some figures how much is translated. Translation can be done by double click in the tree.

For automatic processing, you will need to build a custom program. You can use standard functions which are also used in SE63.

Get all objects of objectlist : LXE_COLOB_GET_ALL_OBJECTS

Read object : LXE_OBJ_TEXT_PAIR_READ

Write object : LXE_OBJ_TEXT_PAIR_WRITE ( it's necessary to call the FM LXE_OBJ_TEXT_PAIR_READ first to fill some buffer...). Also take care that when you're writing texts for a program or function group, you have to write them all, even if they don't change. Whatever you do not provide will be set to blank..

Kind regards,

Jeroen

Hi,

I think you're using the language as available in sy-langu. You should use the format that is used in translation, ex. EN -> enUS. U can do the conversion using FM LXE_T002_CHECK_LANGUAGE.

How did you fill table gt_objectlist? Is this the result of LXE_COLOB_GET_ALL_OBJECTS or do you fill it manually?

Not sure why u are filling table gt_texts before read? Read function will fill this table with result.

You only have to pass  t_lang, s_lang, custmnr = '999999', objtype and objname.

If the read function returns something, just change some target text for test and then call _WRITE function directly. This should just work.

Rgds,

Jeroen.

10 REPLIES 10
Read only

former_member209818
Active Contributor
0 Likes
2,334

Hi

Use SE63 for your various Custom Object translation. You will have to deal with these translations individually

- Harshad

Read only

jeroen_verbrugge2
Active Participant
0 Likes
2,335

Hi,

To select all objects for a package for translation, you can use the object list functionality of SE63.

Choose Administration in the menu of SE63, then choose tab Evaluations -> Object Lists.

Create a new one and select the object types you want to translate.

Then in collections you could limit this to your package.

When you activate the object list, a job will be scheduled that fills the collection.

This is what SAP provides to create object lists... To my knowledge nothing exists to export and import objects.

In SE63 you can process the object lists manually by choosing Worklist->Standard in the menu.

On the next screen on tab object list, choose object list and then load objects. If there is nothing found, you can try to tick all the checkboxes Deactivate... This is the only way I get some results. Don't know why. Then on the next screen you can choose menu Utilities->Refresh to get some figures how much is translated. Translation can be done by double click in the tree.

For automatic processing, you will need to build a custom program. You can use standard functions which are also used in SE63.

Get all objects of objectlist : LXE_COLOB_GET_ALL_OBJECTS

Read object : LXE_OBJ_TEXT_PAIR_READ

Write object : LXE_OBJ_TEXT_PAIR_WRITE ( it's necessary to call the FM LXE_OBJ_TEXT_PAIR_READ first to fill some buffer...). Also take care that when you're writing texts for a program or function group, you have to write them all, even if they don't change. Whatever you do not provide will be set to blank..

Kind regards,

Jeroen

Read only

0 Likes
2,334

Hi,

Don't know where your question is gone if you have to create an object list?

Anyway, the idea is to create object lists in batch (eventually periodically) to avoid that all objects of a package must be selected each time you want to translate.

Please try to get an object list working for manual processing from within SE63, then use the object list number as starting point to use in the function modules mentioned.

Rgds,

Jeroen

Read only

0 Likes
2,334

Hi

Thank you for your answers... the previous question is gone because I deleted it...

But I am having some problems with using the functions.

The idea is that I need a automatic processing... but the second function LXE_OBJ_TEXT_PAIR_READ is returning me the F message (incorrect)...

Can you please help me figure it out why isn't it working...?

And can you please point out which is the field that contains the translated short text of the object?

Here is a sample from my program:

*The internal table gt_objectlist contains all the selected objects from the package.

loop at gt_objectlist into gs_objectlist.

CLEAR gs_lxe_colob.

     gs_lxe_colob-custmnr = '999999'.

     gs_lxe_colob-objtype  = gs_objectlist-obj_type.

     gs_lxe_colob-objname = gs_objectlist-obj_name.

APPEND  gs_lxe_colob TO  gt_lxe_colob.

  gv_t = sy-langu.

     gv_s = '4'.

     CLEAR gs_texts.

    " gs_texts-textkey = 'aa'."gs_objectlist-obj_text.

     gs_texts-t_text = gs_objectlist-obj_text.

     gs_texts-s_text = gs_objectlist-obj_text.

     APPEND gs_texts TO gt_texts.

CALL FUNCTION 'LXE_OBJ_TEXT_PAIR_READ'

       EXPORTING

         t_lang        = gv_t

         s_lang        = gv_s

         custmnr       = '999999'

         objtype       = gs_lxe_colob-objtype

         objname       = gs_lxe_colob-objname

*       READ_ONLY     = 'X'

    IMPORTING

*       COLLTYP       =

*       COLLNAM       =

*       DOMATYP       =

*       DOMANAM       =

         pstatus       = gv_status

*       O_LANG        =

       TABLES

         lt_pcx_s1     = gt_texts

*       LT_CONDITIONS =

*       LT_WHERECLAUS =

       .

     CALL FUNCTION 'LXE_OBJ_TEXT_PAIR_WRITE'

       EXPORTING

         t_lang          = gv_t

         s_lang          = gv_s

         custmnr         = '999999'

         objtype         = gs_lxe_colob-objtype

         objname         = gs_lxe_colob-objname

* IMPORTING

*   PSTATUS         = gv_status

       TABLES

         lt_pcx_s1       = gt_texts

               .

*HERE THE PROGRAMS RETURNS JUST 'F'.

     WRITE:/ gv_status.

     "WRITE: /  gs_objectlist-obj_name,' ', gs_objectlist-obj_text.

   ENDLOOP.

Read only

0 Likes
2,334

Hi,

I think you're using the language as available in sy-langu. You should use the format that is used in translation, ex. EN -> enUS. U can do the conversion using FM LXE_T002_CHECK_LANGUAGE.

How did you fill table gt_objectlist? Is this the result of LXE_COLOB_GET_ALL_OBJECTS or do you fill it manually?

Not sure why u are filling table gt_texts before read? Read function will fill this table with result.

You only have to pass  t_lang, s_lang, custmnr = '999999', objtype and objname.

If the read function returns something, just change some target text for test and then call _WRITE function directly. This should just work.

Rgds,

Jeroen.

Read only

0 Likes
2,334

Hi,

I used to use object lists because of bad performance to select objects via transport or free selection. I came to Note 1413368 - Performance object list run (transport evaluation) which improves performance a lot. If you have this on your system or implement it,you can skip the creation of object list and simply go by using FM LXE_OBJ_OBJECTS_GET and passing your package to in collnam. You have also to pass an object type so you have to use the FM in a loop for all object types selected. You can use FM LXE_ATTOB_OBJTYPES_SELECT to use as F4 on your selection screen to get the desired object types.

Rgds,

Jeroen

Read only

0 Likes
2,334

Hi,

Thank you for the answer.

I've filled the table gt_objectlist manually, selecting the object names and types directly from TADIR and after that calling a function module (REPOSITORY_INFO_SYSTEM_TEXT) that returns their description (OBJ_NAME, OBJ_TYPE).

The problem with the language conversion I've managed to solve it.

The reason that the function didn't return the correct value was caused by the object type which can have different form depending on the table in which it is found.

For example for packages we can have the value K (after I use the function  for the SHORT DESCRIPTION ) and DEVC (as a entry parameter for LXE_OBJ_TEXT_PAIR_READ).

The idea is that I kind of figured that my initial approach is due to failure . I will start over again and I will try to use just the function  LXE_OBJ_TEXT_PAIR_READ and  LXE_OBJ_TEXT_PAIR_WRITE (my problem is that I need EVERY object ( table, field table, program, function etc... ) that was user created in a system and assigned to a package).

I will keep you up to date with my situation and with any problems I'll have.

Regards

Vlad

Read only

0 Likes
2,334

Hi,

I've manage to make all the function return a successful status but when I log in the translation language, the new short descriptions do not appear.

Why does the system does not update the texts?

Does the write function inserts the texts in SAP?

Thanks in advance

Vlad

Read only

0 Likes
2,334

Hi,

When you use FM LXE_OBJ_TEXT_PAIR_READ pass space to parameter read_only, otherwise the buffer is not filled and LXE_OBJ_TEXT_PAIR_WRITE is not working...

You can check if the translation was done in table LXE_LOG for most objects. This is the same table that is used by SLXT to make the transport request.

Also make sure that the target language is at least activated in your system.

If this is not done, translation will not work. SE63 would give you an error message, the function modules don't return this... You can check this via I18N :

Rgds,

Jeroen.

Read only

0 Likes
2,334

Hi,

It seems to be working properly now, thank you for the solution.

Regards

Vlad