How to read user - logon language (Urgent)

Hi All,
I have written the below code to display the language in english if it exists if not in french & so on, but i would like to know how i can read the language in which the user has logged on & use that as the first criteria.
Eg: S_SPRAS = User Logon language
SELECT SINGLE MAKTX FROM MAKT INTO Y_MAKTX
  WHERE MATNR = MARC-MATNR
    AND SPRAS IN (S_SPRAS,'EN','FR','IT',' ').
Hope my problem is clear, await inputs.
Vivek

Hi,
Let me try to explain the problem
Mtl-A, has description in 3 languages. (En, Fr, It)
Mtl-B, has description in 1 language only. (It)
Mtl-C, has no description
First i want to check for a given mtl if description exists in the user's logon lang, if it does not, then check if description is maintained in English, if not check in French, if not Italian.
Eg1: User logs-in with En language,
Then the description for mtl-A is displayed in english, for Mtl-b description is displayed in Italian (as only italian description is maintained) & for mtl-c no description is displayed as it is not maintained.
Eg2: User logs-in with It language.
Then description for Mtl-A & B is displayed in Italian & for mtl-c it is blank as no description exists
But when i use the below code, the system by default picks up EN which is my default lang, even if i login in French or Italian lang, the description is shown in english only.
SELECT SINGLE MAKTX FROM MAKT INTO Y_MAKTX
  WHERE MATNR = MARC-MATNR
    AND SPRAS IN (SY-LANGU, 'EN', 'FR', 'IT').
Hope i was able to put across my problem clearly.
Await inputs.

Similar Messages

  • How to read user details based on org structure

    hi,
    i want to read which user is logon sap crm 7.0 based on org structure is there any functional module or bapi. how to find out which user is logon.
    jemmi.

    Hi Jemmi,
    Login user can be accessed by sy-uname directly. i think you are interested in finding bp's assigned to org unit of login user.
    I am giving few details, check whichever is relevant for you.
    To get the org unit of the login user ..
       s_logon_orgunit = CL_CRM_AUI_SERVICE=>get_logon_orgunit_of_agent( ).
    To get all the bp's under that org unit
      move-corresponding ls_logon_orgunit to ls_orgunit.
      CALL METHOD CL_CRM_AUI_SERVICE=>GET_BP_DATA_FROM_ORG_UNIT
        EXPORTING
          IV_ORGUNIT   = ls_orgunit
        RECEIVING
          RV_HROBJBUPA = ls_bp.
    Get all org units the user is assigned to as BP's
      CALL FUNCTION 'RH_STRUC_GET'
        EXPORTING
          act_otype       = 'US'
          act_objid       = sy-uname
          act_wegid       = gc_sms_wegid-org_4_usr
          authority_check = ' '
        IMPORTING
          act_plvar       = lv_plvar
        TABLES
          result_tab      = lt_result_tab
        EXCEPTIONS
          no_plvar_found  = 1
          no_entry_found  = 2
          OTHERS          = 3.
    Cheers,
    Sumit Mittal

  • How to read User ID from the request Form and pre populating in the AD User process form before provisioning

    I am trying to read the user Id from the submitted AD User request form( Catalogue AD User form. I need User Id,firstname and lastname inorder to prepopulate the common name as in this format - lastname,firstname (userid)  for the user to be provisioned in Active Directory.
    So after filling the AD User request form with User Id and Organization and submitting the request, I am trying to
    prepopulate the common name in the process form before the provisioning.
    The prepopulate adopter for the common name is configured to read the firstname, lastname and userid. firstname and
    lastname variables are mapped to User definition and user Id is mapped to Process Data. In this setup I am not getting the
    User Id value from process data, it is empty.
    Is this a bug with OIM 11g R2 or I need to do it differently in order to read the user Id that user has entered in the
    request form for populating the common name?
    Thanks

    Ghulam Yassen wrote:
    How to get USER_ID and IP_AddressWhy exactly do you need this data and what do you plan to do with it?
    The data is not reliable and trustworthy. IP addresses can easily be spoofed (a few seconds if you know what to do and how to do it). Also, IP addresses are not static. Users also do not use the same network device to access the database - different devices will have different IP addresses.
    The o/s user on the client is supplied by the client driver. This can also be spoofed.
    The user can also use a virtualised device - which means that recording the IP and o/s user seen from the server side, is pretty much useless and meaningless.
    So if this data is intended to be used for auditing for example - it would be pretty suspect data to use for that purpose.

  • How to change the logon language in module pool program?

    Hello All,
    I had created a module pool program and had desiged a screen.
    When i am logged in English language i am able to see them in english as per the requirement it is working fine.
    But the requirement is wen i am logged in DE then the selection-screen texts should show in English and not in German.
    Kindly give me a solution for this.
    Thanks & Regards,
    Rajesh Kumar

    Hi Rajesh,
    This problem is because you have maintained a standard dictionary fields on selection screen and all the standard dictionary fields are maintained in DE language, on the screen layout, go to the attributes of that particular text field, there is a option MODIFIZ for dictionary fields (it is a drop down), selection F TEXT, now whatever the text u will define, it will remain same for all the languages, once u do this  then u again login in DE,l u will see the text maintained by u and not the DE text.
    Do reply if problem still persist.
    point if useful.
    Rohit G
    Edited by: Rohit Gaharwar on Aug 11, 2009 1:24 PM
    Edited by: Rohit Gaharwar on Aug 11, 2009 1:30 PM
    Edited by: Rohit Gaharwar on Aug 11, 2009 1:36 PM
    Edited by: Rohit Gaharwar on Aug 11, 2009 1:36 PM
    Edited by: Rohit Gaharwar on Aug 11, 2009 1:37 PM
    Edited by: Rohit Gaharwar on Aug 11, 2009 1:38 PM

  • How to read System DSN entries -Urgent

    Hi,
    I need to show list of System DSN entries in JComboBox. So, I want to know the way of reading the entries in Java. Can you please help me ??
    Thanks in Advance
    Kumar

    please stop posting this question.
    the answer.. which you already know is JNI or native code. but a better question which was already asked of you is WHY do you want to show a list of available DSN's on a machine? it sounds like using a dynamic DSN would probably help you.
    please see here...
    http://forum.java.sun.com/thread.jsp?forum=48&thread=200603
    if dynamic DSN's will not help you and you MUST retrieve a list of DSN's available on a system you are looking at native code to do this... good luck.

  • Character Set based on Logon Language

    Hi expert,
    We have an issue here after upgrade from ECC5 to ECC6.
    - In ECC5 (non-unicode), if we login with language ZH (chinese), the character set automatic set to Simplified Chinese.
    - In ECC6(unicode), if we login with language ZH (chinese), the character set remain be Western European.
    How can we set the system to automatic set the correct character set based on user logon language?
    Currently in ECC6, user have to go to application toolbar -> Customize Local Layout -> Character Set to select the correct character set.
    Any advice will be very appreciate.
    Thank you.

    Hi,
    Does someone has any idea on my issue?
    Thank you.

  • User logon history date

    can any one tell me how to find user logon history date:
      i am able to find last logon date in table usr02,
      can any one tell m ehow to use the funaction module to find logon history of       user  RSAU_READ_FILE.
      Thanks in advance,

    use below Function module
    CALL FUNCTION 'RSAU_READ_FILE'.
    Go through below link...
    regarding Shortdump "CALL FUNCTION 'RSAU_READ_FILE"
    Hope it will solve your problem...
    =====================================
    Use <b>BAPIS</b> there are very useful BAPIS to get the user's info.
    BAPI_USER_CHANGE Change User
    BAPI_USER_CLONE Create User with Template in Another System
    BAPI_USER_CREATE Create a User
    BAPI_USER_CREATE1 Create a User
    BAPI_USER_DELETE BAPI to Delete a User
    BAPI_USER_DISPLAY Display users
    BAPI_USER_EXISTENCE_CHECK Check a user exists
    BAPI_USER_GET_DETAIL Read User Details
    BAPI_USER_LOCACTGROUPS_ASSIGN Change Activity Group Assignment for Dependent Systems from Central System
    BAPI_USER_LOCACTGROUPS_DELETE Delete Activity Group Assignments in the Dependent Systems
    BAPI_USER_LOCK Lock User
    BAPI_USER_LOCPROFILES_ASSIGN Change Profile Assignment for Dependent Systems from Central System
    BAPI_USER_LOCPROFILES_DELETE Delete Profile Assignments for Dependent Systems
    BAPI_USER_PROFILES_ASSIGN User: Assign profiles
    BAPI_USER_PROFILES_DELETE User: Delete All Profile Assignments
    BAPI_USER_UNLOCK Unlock user
    ===================================
    U can see tables:
    USR01 User master record (runtime data)
    USR02 Logon data
    USR03 User address data
    USR05 User Master Parameter ID
    USR12 User master authorization values
    <b>Reward points if it is useful..</b>
    Thanks & Regards
    ilesh 24x7

  • Movement type--logon language

    hello ,
    Where and how do we assign logon language to the movement type so that it reflects in table t156ht.
    Thanks
    Joseph
    Edited by: joseph_sweden on Nov 12, 2009 9:52 AM

    Hello ,
    GO TO  OMJJ  Transaction give movement type, select Short test and enter Langauge  and select Help text , here also enter language.      or
    V_157H_VC  Hlpe text
    V_156T_VC  Short Text 
    Enetr values(langauge) in above said tables.
    Regards
    Mahesh Naik

  • Urgetn - User Decision Text in logon language

    Hi,
      I am using a user decision step in my workflow with the workitem text 'Select one of the following'. I want to <b>display the text in logon language .</b>
    Can anyone tell me how to do this???
    Thanks,
    Sivagami

    Hi,
    As I thought if I metion as 'Urgent' it will be answered quickly. Hereafter I wont do this...
    Do we need to do the specified setting for each user separately? Is there any other way of doing it all together?
    Also will this setting also applicable for workflow in the logon language??
    Also the setting is changing only the translated texts & not the standard text like 'Cancel and keep workitem in inbox'.
    Thanks,
    Sivagami
    Message was edited by:
            sivagami rathinam

  • HTTP Sender - how to read URL Parameter USER id into Mapping

    Hi,
    My scenario is HTTP - XI - ABAP Proxy.
    I wanted to capture USER id of the person who posted(HTTP) into XI(Mapping). How to read/evaluate the value of sap-user from querystring of URL ?
    http://HOST:8008/sap/xi/adapter_plain?namespace=http%3A//abc.com/sales_oa&interface=MI_sales_OA&service=DEV_D&party=&agency=&scheme=&QOS=EO&<b>sap-user=SM9999</b>&sap-password=xxxxx&sap-client=001&sap-language=EN
    please help.

    Mallik,
    Try  URL Parameters in HTTP sender communication channel.
    In the sender communication channel set Adapter Specific Message Attributes. Click on Apply URL Parameters. In Parameter1 put sap-user (U can query any URL parameter by giving its name as in the HTTP URL).
    Now in SXMB_MONI, in inbound payload SOAP Header, under Dynamic configuration u can see the value of the user. Query the same in Mapping using Dynamic Configuration using keyName as UrlParamOne.
    Regards,
    Sudharshan N A
    Message was edited by:
            Sudharshan Aravamudan

  • How to allow user to select multiple languages in ESO

    Hi Expert,
    I need your help on ESO languages capability.
    I need to allow end user to change language options like from english to chinese or from chinese to spanish. Now we have this option only tied to profile like user can select only one language in profile in "display langauge" option.
    Please help me how to do this in ESO as i am new to this application.
    Thanks much for your cooperation and help in advance.
    Regards,
    Gurvi.

    use transaction SE63 in order to translate the texts -> menu Translation / ABAP Objects / Short texts then choose OTR in tree
    to find object name, use the matchcode and specify the development class (or package) as collection
    SAP will display texts according to logon language of user

  • How i can find user locale/language from his/her request header ?

    Hi
    thank you for reading my post
    what is request header field that shows user agent language/locale ?
    is there any http header value that shows user locale/language ?
    if yes , how i can extract it ?
    thanks

    Certainly there is.
    http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z12
    The header is "accept-language"
    You can get it via
    request.getHeader("accept-language");
    You can use request.getHeaderNames() to give you an enumeration of all the headers sent by the browser, so you can see them and the values.
    Here is an extract from a test page I use every once in a while that prints out useful information. This bit prints out request headers (using JSTL)
    You can just drop it into a jsp page (don't forget to import the JSTL tag library) and it will show you all the request headers.
    <h3>Headers </h3>
    <table>
    <c:forEach var="h" items="${header}">
      <tr><td><c:out value="${h.key}"/></td><td><c:out value="${h.value}"/></td></tr>
    </c:forEach>
    </table>Cheers,
    evnafets

  • Users by default logon language

    Hi
    I am trying to find out how many users logon to our global EEC5 system from different regions/countries, due to the lack of information entered in SU01 during the creation of users, I think the only reliable information to search on is 'Logon Language' in SU01 defaults, as we do setup the users to logon via their region logon language in the defaults, this should give me a rough guide at least !
    Looking at SU01 and the reports in SUIM, I cannot find a report where I can search using logon language as the key? I've had a look in the technical information for field logon language in SU01 and the field name is LANGU, but when I use this field name in SUIM --> Users by complex selection criteria (RSUSR002) -- > field name LANGU and value as language key = DE for example no matching results displayed, even though we have over 00 users with a logon language default set as DE.
    Does anyone know a way I can list the users by logon language set as their default?
    Thanks for any help.

    This details can be found from the Report RSUSR200 (users by Logon date and password chage). Please deselect all options and keep the following selected:
    Users Valid Today
    Users Not Locked ; Users Locked
    Users with no incorrect Logon attempts
    Dialog Users
    Users with Productive password
    Users with initial Password
    users with deactivated password
    Execute and check / download the list.
    Regards,
    Dipanjan

  • How we Can find out How many Users Logon into the Portal those users Names.

    Hi Friends
    I have one doubt in Portal,
    How we can find how many Users Logon into the Portal and how we can find that users Names in Portal.
    Regards
    Vijay Kalluri

    Hello Vijay,
    If you are at all interested in a 3rd party application to make your life a bit easier getting stats on your users, you could check out Click Stream by Sweetlets.
    Click Stream uses the Usermanagement (UME) API to get more information about the user, groups, roles, LDAP attributes etc. and offers you the ability to filter this information in nearly any report at the click of a button.
    Click Stream also uses the PCD API to get information about the pages your users are visiting too.
    In the very near future Click Stream will also have iView recording to monitor iViews, telling which iViews have been clicked, etc.
    Here are some reviews on the SAP EcoHub from people who have used it: http://ecohub.sdn.sap.com/irj/ecohub/solutions/clickstream
    Please just let me know if you have any question or if you are open to test drive Click Stream. We will certainly help as best as we can.
    Good luck.

  • How can I get the language of the user logged on using only DI API?

    Hello,
    how can I get the language of the user logged on using only DI API,
    without invoking the UI?
    Can I read the value from some table using sql?
    I could write to file the first user's connection to the language code in SAP and then use it from external program, but I do not like this solution ...
    I know only this possibility:
            '_SboCy ==> SAPbobsCOM.Company
            '_SboCys ==> SAPbobsCOM.CompanyService
            '_SboApp ==> SAPbouiCOM.Application
            CodLng Dim As String = ""
            Dim lng As SAPbobsCOM.UserLanguages _SboCy.GetBusinessObject = (BoObjectTypes.oUserLanguages)
            If lng.GetByKey (_SboApp.Language) Then
                codLng = lng.LanguageShortName
                'Etc. ..
            End If
            lng = Nothing
    Thanks

    Hi Enrico,
    The language settings are held on the user's Windows profile and not in the database. In SBO 2007A onwards there is an XML file that is created by the SBO client (previous versions stored the information in the registry). The file is called b1-current-user.xml and you'll find it in the temporary application data under the user's profile (by default this will be C:\Documents and Settings\<profile>\Local Settings\Application Data\SAP\SAP Business One for Windows XP). This XML file contains a node that looks like the following:
    <leaf kind="single" name="Language" type="String">
         <value>8</value>
    </leaf>
    where the value is the language id that should correspond to the same setting in the DI API. If your application will always run on a workstation where the SBO client is installed then you could read this XML file. Of course, this file may not exist for a particular Windows user if they have never opened the SBO client so you'd need to have a default setting.
    If you application will be installed on a workstation which doesn't have an SBO client installed on it then there is no way to tell what default language to use and you'll need to build this logic in to your own application (eg have a screen where the user can choose their preferred langauge and then store this as a config file in a similar way to how the SBO client works).
    Kind Regards,
    Owen

Maybe you are looking for

  • 500 internal server error

    i am using jdk1.3.1_02 java webserver2.0 and internet explorer 6.0 i am trying a servlet sample from "Java Servlet programming" of OREILLY .it contains a html form(one text field and one command button).i entered my name in text field and after click

  • Deploy the .ear file in Oracle 10g Application server10.1.3

    Hi Friends, I have deploy the .ear file in Oracle10g Application Sever 10.1.3 through Enterprise Manager. in Progress Messages shows the application has been successfully deployed,like this when i hit the URL in Web brower, i got a HTTP 403 showing..

  • Sim card in iphone is locked with pin-cod

    hi i changed my passcode to my iphone 5 and i forgot it so i want to restore it, Itune asked to turn of the "find my iphone" i couldn't go in the phone so i wint to the laptop and icloud to find my iphone and i deleted the device from there. and i di

  • Fill Idoc error status

    Hi Folks, I am trying to fill the IDoc error status when processing inbound ORDERS IDoc. Code looks OK. But i am not getting the IDoc in error status. Pl look @ the code and let me know. data: w_errtab like errtab occurs 0 with header line. if condit

  • Implementing a BaDI

    Guys, I have found a BaDI in include LV60AA95 and want to know if I can put my own abap code within an associated method (l_sd_billing_item_exit->vbrk_vbrp_data_transfer). If so, how do I actually put the code there? What steps do I have to follow.