In fnd_request.add_layout how to get the layout in user login language

Hi All,
I am using fnd_requet.add_layout
function add_layout (template_appl_name in varchar2,
template_code in varchar2,
template_language in varchar2,
template_territory in varchar2,
output_format in varchar2,
          nls_language in varchar2 default null) return boolean;
how to pass these template_language and template_territory to get the output in user login language.
Thanks in advance
Jana

You can get the values from NLS_SESSION_PARAMETERS
Query for language
SELECT LOWER(FL.iso_language)
FROM NLS_SESSION_PARAMETERS NSP
,fnd_languages FL
WHERE NSP.parameter = 'NLS_LANGUAGE'
AND NSP.value = FL.nls_language;
Regards
Nishka

Similar Messages

  • In fnd_request.add_layout how to get the layout in EXCEL Format

    Hi All,
    After applying the patch (5688014), in WSH_DOCUMENT_SETS package fnd_request.add_layout is getting called as below. I am getting the output in PDF format, when called from Document sets.
    But my requirement is i want the report to be in EXCEL Format. Is there any other patch is available to get the report in EXCEL when called from Document Sets/ Or any other alternative solutions to acheive this..
    Can any body help me on this...
    l_print_pdf := 'N';
    IF(l_output_file_type = 'XML' ) THEN
    IF l_debug_on THEN
    WSH_DEBUG_SV.logmsg(l_module_name, 'template' || l_template_code);
    END IF;
    IF (l_template_code is not NULL) then
    IF l_nls_lang.COUNT <> 0 THEN
    select iso_language,iso_territory into l_language, l_territory
    from fnd_languages
    where language_code = l_nls_lang(l_nls_count).lang_code;
    ELSE
    select iso_language,iso_territory into l_language, l_territory
    from fnd_languages
    where language_code = userenv('LANG');
    END IF;
    IF l_debug_on THEN
    WSH_DEBUG_SV.logmsg(l_module_name, ' language ' || l_language || ', territory ' || l_territory);
    END IF;
    l_ret_status :=fnd_request.add_layout(l_appl_short_name,
    l_template_code,
    l_language,
    l_territory,
    'PDF');
    IF l_ret_status THEN
    l_print_pdf := 'Y';
    ELSE
    IF l_debug_on THEN
    WSH_DEBUG_SV.logmsg(l_module_name, 'Error returning from fnd_request.add_layout :'||x_return_status);
    END IF;
    wsh_util_core.add_message(x_return_status);
    END IF;
    ELSE
    IF l_debug_on THEN
    WSH_DEBUG_SV.logmsg(l_module_name, 'No template was specified for this report. Hence could not generate the pdf output' );
    END IF;
    fnd_message.set_name('WSH', 'WSH_NO_DEFAULT_TEMPLATE');
    fnd_message.set_token('CONC_PROG_NAME', document.user_concurrent_program_name);
    x_return_status := wsh_util_core.g_ret_sts_error;
    wsh_util_core.add_message(x_return_status);
    END IF; --} If template_code is not null
    END IF; --} If l_output_file_type = 'XML'
    Thanks in Advance..

    Hi,
    I tried your approach and got the following error..
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 14808954 on node FAHQSNA09SFTD07 at 24-JAN-2012 04:13:08.
    Post-processing of request 14808954 failed at 24-JAN-2012 04:13:09 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    ------------- 2) PRINT   -------------
    Not printing the output of this request because post-processing failed.
    After analysing the log i found there is some issue in OPP Service log.
    Below is the service log error..
    It says there is 'No corresponding LOB data found' in below query
    SELECT l.file_data file_data, DBMS_LOB.getlength (l.file_data) file_length,
    l.LANGUAGE LANGUAGE, l.territory territory,
    b.default_language default_language,
    b.default_territory default_territory,
    b.template_type_code template_type_code,
    b.use_alias_table use_alias_table, b.start_date start_date,
    b.end_date end_date, b.template_status template_status,
    b.use_alias_table use_alias_table,
    b.ds_app_short_name ds_app_short_name,
    b.data_source_code data_source_code, l.lob_type lob_type
    FROM xdo_lobs l, xdo_templates_b b
    WHERE l.application_short_name = :1
    AND l.lob_code = :2
    AND l.application_short_name = b.application_short_name
    AND l.lob_code = b.template_code
    AND (l.lob_type = 'TEMPLATE' OR l.lob_type = 'MLS_TEMPLATE')
    AND ( (l.LANGUAGE = :3 AND l.territory = :4)
    OR (l.LANGUAGE = :5 AND l.territory = :6)
    OR ( l.LANGUAGE = b.default_language
    AND l.territory = b.default_territory
    But i see the data for this query.
    Please let us know is there any setups that needs to be done to achieve this..
    below is the OPP log error...
    Thanks in Advance.
    [1/24/12 4:13:09 AM] [710131:RT14808954] Executing post-processing actions for request 14808954.
    [1/24/12 4:13:09 AM] [710131:RT14808954] Starting XML Publisher post-processing action.
    [1/24/12 4:13:09 AM] [710131:RT14808954]
    Template code: EMP_DETAILS
    Template app: EMP_DETAILS
    Language: en
    Territory: US
    Output type: EXCEL
    [1/24/12 4:13:09 AM] [UNEXPECTED] [710131:RT14808954] java.sql.SQLException: No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA,DBMS_LOB.GETLENGTH(L.FILE_DATA) FILE_LENGTH, L.LANGUAGE LANGUAGE, L.TERRITORY TERRITORY, B.DEFAULT_LANGUAGE DEFAULT_LANGUAGE, B.DEFAULT_TERRITORY DEFAULT_TERRITORY,B.TEMPLATE_TYPE_CODE TEMPLATE_TYPE_CODE, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.START_DATE START_DATE, B.END_DATE END_DATE, B.TEMPLATE_STATUS TEMPLATE_STATUS, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.DS_APP_SHORT_NAME DS_APP_SHORT_NAME, B.DATA_SOURCE_CODE DATA_SOURCE_CODE, L.LOB_TYPE LOB_TYPE FROM XDO_LOBS L, XDO_TEMPLATES_B B WHERE L.APPLICATION_SHORT_NAME= :1 AND L.LOB_CODE = :2 AND L.APPLICATION_SHORT_NAME = B.APPLICATION_SHORT_NAME AND L.LOB_CODE = B.TEMPLATE_CODE AND (L.LOB_TYPE = 'TEMPLATE' OR L.LOB_TYPE = 'MLS_TEMPLATE') AND ( (L.LANGUAGE = :3 AND L.TERRITORY = :4) OR (L.LANGUAGE = :5 AND L.TERRITORY = :6) OR (L.LANGUAGE= B.DEFAULT_LANGUAGE AND L.TERRITORY= B.DEFAULT_TERRITORY ))
         at oracle.apps.xdo.oa.schema.server.TemplateInputStream.initStream(TemplateInputStream.java:402)
         at oracle.apps.xdo.oa.schema.server.TemplateInputStream.<init>(TemplateInputStream.java:235)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.getTemplateFile(TemplateHelper.java:1163)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3450)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
         at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
         at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)

  • How to get the list of users who has access for list of tcodes.

    How to get the list of users who has access for list of tcodes.

    Go to transaction SUIM, this has a number of reports for users/authorisations
    open the Where used>Autorization Values>In Users
    and double click to execute
    in authorisation object, enter S_TCODE
    then press the "Enter Values" button
    It will offer entry boxes to put the transaction code you are interesed in.
    Then execute and the list of users with access to this transaciton code will be returned.

  • How to get the room id & user id in our component

    Hi Experts,
    Collaboration -> Rooms -> Room Directory
    It will show the available rooms
    Select restricted room tab in that.
    That will show the restricted room list, if you are not a member of the room you can request the room by clicking context menu of the room and select the “Request Membership” option. Then it will send the mail to the owner of the room.
    In that UI commend they mapped with the roomid and userid.
    I need to know how to get the room id & user id in our component.
    How to get the Room Id dynamically?
    Can anybody help me for this?
    Helpful answers will appreciate.
    Thanks and Regards,
    Kathiresan R

    Hi Kathiresan,
    you can get the Room ID and the User ID over the API.
    Getting User ID within WebDynpro application:
    IUser user = WDClientUser.getCurrentUser().getSAPUser();
    String logonId = user.getUniqueId();
    Getting User ID within custom Portal Component:
    IPortalComponentRequest request = (IPortalComponentRequest) httpRequest;
    IUser user = request.getUser();
    String logonId = user.getUniqueId();
    Getting Room Id of a user who belongs to this room:
    IUser user = request.getUser();
    IRooms roomsAPI = (IRooms) PortalRuntime.getRuntimeResources().getService(IRooms.PORTAL_SERVICE_ID);
    IRoom[] myRooms = roomsAPI.getAllRoomsForUser(user);
    String roomId = "";
    for (int i=0; i<myRooms.length; i++) {
      IRoom room = myRooms<i>;
      if (room.getName.equals('nameOfRoomToFind')) {
        roomId = room.getId();
    Greets
    Denis

  • How to get the  ESS & MSS users in ECC 6.0  into portal

    Hi Experts
    How to get the  ESS & MSS users in ECC 6.0  into portal
    Thanks
    Daya

    Hi,
    You need to have SSO in between ECC and portal and use ABAP engine as your UME.
    then ECC users can directly login to portal using the same user id and password.
    Or you can create the ECC system in portal and user mapping should be done for every user to the ECC system.
    Thanks,
    gopal

  • How to get the active application users IP address in R12 by sql command

    Hi ,
    I need to know how to get the active application users IP in R12 by sql command
    in order to kill any session by the IP address ?
    Am working on 12.1.3 Application
    And 11.2.0.3 Oracle Database
    Thanks

    936921 wrote:
    Am still couldn't found the IP address for the connected Application users.
    If there any select statement can help me with that?
    Really? Then how do you explain me finding the following docs from the links I referenced above?
    How To Find The IP Address Of The Client Machine From Where A Particular Forms User Is Connected ? (Doc ID 879092.1)
    How to Track IP Address of the Form Session in Oracle application 11i (Doc ID 878931.1)
    Where to find the Client IP Address for a Client in E-Business Suite? (Doc ID 1258415.1)
    How To Get The terminal ID For The Machine From Which A User Is Logged To E-Business Suite Applications (Doc ID 751658.1)
    Thanks,
    Hussein

  • On start up I get the message "C:\users\login name\Appdata\local\temp\225704Log.in iiss Lost"

    on start up I get the message "C:\users\login
    name\Appdata\local\temp\225704Log.in iiss Lost"
    I've gorn though so many discussions on this trying to fix it I've
    do everything and it is still poping up every time i turn my desktop on what do i do?

    Hi,
    The suggestion provided by Maffiow is worthy to try. Msconfig can tell you some on things loaded on startup. Do any of the items listed refer to that file?
    In addition, it states that your windows 7 is missing some system files. And definitely it would be some important to file to your windows. You better check it with performing a Clean Boot.
    How to perform a clean boot to troubleshoot a problem in Windows 8, Windows 7, or Windows Vista
    http://support.microsoft.com/kb/929135
    The path which you have shown here is a path for temporary file. I think there will be something wrong with your system temp folder. For this Clear the redundant files in temporary folder. You can do this by performing the following steps.
    a. Restart the computer to Safe Mode.
    b. Click Start and click Control Panel.
    c. Click Classic View and choose Folder Options.
    d. Click View tab, choose Show hidden files and folders box, click Apply and click OK.
    e. Click Start -> Computer.
    f. Go to C:\Users\your user name\AppData\Local\Temp folder.
    g. Select all files in the Temp folder and delete them. Click Yes when prompted.
    h. Restart the computer to Normal Mode for a test.
    Hope it helps.
    Regards,
    Blair Deng
    Blair Deng
    TechNet Community Support

  • How to Get the Current Logged user location ID in SharePoint online

    Hi All ,
    Please suggest me how we can get the SharePoint online current Login user
    Location ID
    Actually i want to show the weather report in my SharePoint online site (App Part in SharePoint Online Site)
    Suppose SPO user Login From India(Delhi) so that i want to show the India(Delhi) weather report
    If Login user from US(dallas) so that US user see the US(dallas) weather report 
    Thanks
    Deepak Chauhan
    SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design

    @Mohamed
    Derhalli ,
    Suppose SPO user Login From India(Delhi) so that i want to show the India(Delhi) weather report
    If Login user from US(dallas) so that US user see the US(dallas) weather report
    so without using how we can show the weather report can you please suggest me how we can show the weather report
    Reply ..
    Thanks
    Deepak Chauhan 
    SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design

  • How to get the type of user role in ISF?

    We have functionality to hide all the buttons on Monitor task, which was successfully achieved by javascript. But we need to enable these buttons for only Site Administrators, so that they only can do necessary modifications upon request from end users. Can someone point me to correct direction how to get the user role when a user is not a Site Administrator. Thanks in advance.

    What about having your custom ISF onload script first run a db query (on older version called a rcFetch) which would evaluate if the person loading form is a member of the site admin ou.
    Here's a rough example:
    ISF_onLoad()
     rcFetch('Q1','Q1PL=' + UserID);
    This will then run a query to validate if the person is a member of the admin ou.
    SELECT * FROM DirOrganizationUnitPeople WHERE PersonID = #P1# AND OrganizationalUnitID = 1 (this should be the id of the site admin ou or the ou which you are referring to as an admin)
    then have a call back to determine if any records where return, which indicate the person is a member of the site admin ou.  
    function Q81_DataCallback(retArray, queryList)
    if (retArray['Q8500._COUNT_'] == 1)
     {  *Show the fields*  }
    Hope this helps.

  • How to get the name of User NT

    I need to get the name of user NT that access to my web site (intranet),
    I was used the class NTSystem but this return the name of user NT of the server, but I need the current user that access to the site.
    Thanks a lot!
    yaguip

    not sure if this is what you're after, but it returns the os user of the jvm..
    try this...
    System.getProperties().getProperty("user.name");
    Takis

  • How to get the layout by the layout name

    Dear guys:
        I had a program show the oo alv, and it could change the layout and download file with the layout format. My user want to run it in the background now,but the background enviorment not support the GUI,so i want to get the default layout setting when the sy-batch = 'X',I kown the layout name was saved in the table LTDX,but how can I get the field , or any other method ??

    Hi,
    check FM REUSE_ALV_VARIANT_SELECT. Probably you will have to convert field catalog from this FM to your type used in your classes. There are small difference but conversion is pretty straightforward.
    Good luck

  • How to get the layouts in ABAP program/Query

    Hi -
    I had created some layouts for a ABAP query and I can see them in the table LTDX as well.
    But I had deleted the layouts while changing the query settings.
    How can I get those layouts back in my query? Please suggest. Thanks.

    Hi,
    Did you check with the below function modules,
    ALV_LAYOUT_GET
    REUSE_ALV_VARIANT_F4
    Also try executing the report, RSVARDOC_610, which will enable the variants sometimes after some modifications.
    I am not sure, but may be you can have a look.....

  • How to get the layout field setting from the oo ALV

    Hi:
        My user want me to save the data to the email attachment when he change the alv layout.
        For example there are 10 fields in a alv report ,and the user change the layout setting to 5 fields,I need to know which field is he need first, how can I get it ?
        Pls help me ,thanks a lot !

    Hello Jerry
    When you call method go_grid->GET_FRONTEND_FIELDCATALOG you can retrieve the current layout of the ALV list.
    LVC_S_FCAT-COL_POS = Position of column
    LVC_S_FCAT-NO_OUT = 'X' = not visible
    LVC_S_FCAT-TECH = 'X' = technical column, neither visible nor selectable
    Regards
      Uwe

  • How to get the layout values in F4 help from Other program ?

    Hello All,
           I have a program P1which calls other program P2 .
    When I execute P1 I have a parameter for Layout with F4.
    When I press  F4 I want the help values which are there in the lay out of the other program P2.
    For this I'm using the following code :-
    DATA  spec_layout        TYPE  disvariant.  "specific layout
    DATA  v_save             TYPE  c.           "Save mode
    DATA  gs_variant         TYPE  disvariant.  "for parameter IS_VARIANT
    DATA  gv_exit            TYPE  c.
    PARAMETERS:  p_vari  TYPE disvariant-variant.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
    *  gs_variant-report  = sy-repid.
    *  gs_variant-variant = p_vari.
      CLEAR gs_variant.
      MOVE  '/BSHP/FP_CALL_OF_PLAN' TO gs_variant-report. "Report von Original CALL_OF_PLAN
      gs_variant-variant = p_vari.
      CALL FUNCTION 'LVC_VARIANT_F4'
        EXPORTING
          is_variant = gs_variant
          i_save     = v_save
        IMPORTING
          e_exit     = gv_exit
          es_variant = spec_layout
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF gv_exit NE 'X'.
    *     set name of layout on selection screen
          p_vari    = spec_layout-variant.
        ENDIF.
      ENDIF.
    But still I'm not able to get the values.
    Can anyone help me out ?
    Regards,
    Deepu.K
    null

    This question has been asked and answered many times before.  Please read the following blog for a good start:
    /people/yohan.kariyawasan/blog/2009/03/18/ui-framework-news-f4-help
    Before posting further please do a search in this forum and also read the rules of engagement listed here:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/home/rulesofEngagement
    I'm now locking this thread as it is a duplicate of an already answered question.
    Thank you,
    Stephen
    CRM Forum Moderator

  • How to Get  the SSO Logged user information in database trigger

    I need to track which SSO user is inserting data into a table , so how can i get the information of that user in a database trigger on that table
    thanks

    Try using portal30.wwctx_api.get_user returns a varchar2 (PUBLIC) or the Username that is logged in
    I need to track which SSO user is inserting data into a table , so how can i get the information of that user in a database trigger on that table
    thanks

Maybe you are looking for