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

Text element language issue

Former Member
0 Likes
903

Hi Gurus,

We are using text-elements for building subject and body of email and sending it to desired receipent. Our coding is like that Check langu from adrp table for pernr of user, if langu is found then only use set language to langu.So in case if langu is not found then text-element should be determined as per login language. Now we have got randomly scenario where if  langu of user is not found then mail is sent in different language(es) despite of that  login language is en. While analyzing this issue I have observed similar pattern in SOST that there are two notification exactly sent on the same time where first notification is sent in ES language which is ideally correct and second is also sent in ES language instead of EN language(which is issue).For this user ,notification not always sent to ES which means there is not a default setting for him.

Regard,Shiv"

6 REPLIES 6
Read only

former_member222709
Contributor
0 Likes
829

Hi Shiv,

Frankly, since your e-mail is getting triggered and sent correctly in the first instance, I believe the issue should be with the conditions.

I think you've used a loop and there are if conditions verifying the Language in adrp. Here, in de-bug mode just clear the work area in your second loop pass and verify the values. This should solve your problem.

Regards,

Pranav.

Read only

0 Likes
829

Hi Pranav,

Thanks for response,But we don't have any conditions like this.

Read only

0 Likes
829

Hi Shiv,

As mentioned above that your coding "Our coding is like that Check langu from adrp table for pernr of user, if langu is found then only use set language to langu."

Where is this coding done because here if you debug for a user whose language is not set in ADRP, you will get the reason for the system not setting your Language to EN.

Regards,

Pranav

Read only

0 Likes
829

Ok, Let me explain you our scenario. This mail is for notification about approval of shopping cart that 'there are some workitems are pending in your inbox, pls approve it.'

Two notifications which I have refereed is belongs to two different shopping carts and for different approvers. So for different shopping cart, different session will get started as they belong to different persons.

Only problem which I observe  that notification is going on same time then some how system login language value changes which causes this problem.

Read only

0 Likes
829

Hi Shiv,

In this case I would disagree with your observations because:

1. Even if there are 2 sessions of users simultaneously, SAP dispatcher ensures that each session operates independently and parallely based on the Work Process assigned.

2. Now when different approvers act on the notifications, it might be possible that the select condition on table ADRP fails for one. Here, you need to add a node for capturing this error and returning to the user that select query failed or the next step of language assignment failed.

3. Also, the code of sending the e-mail might be processed in a seperate sub-routine where the value assigned to sy-langu is no longer valid or SAP overrides your language assignment.

You will have to test out these possibilities based on the user and scenario where you've faced the error because random errors is hard/difficult to accept.

I agree that some extra efforts and hard work is required to identify the error. Simple to say but..

Possible Solution: Language re-assignment for the e-mail and generation of error logs inserted into a 'Z' temporary table till the system is stable and works fine.

Regards - Pranav

Read only

0 Likes
829

Hello Pranav,

Thanks for details explanation. Permanent solution could be find out for these types of problems while creating these difficult scenario in quality system.

Regards-Shiv