User Management - Standard role.

Hi All,
I have to assign standard roles for User's to their respective modules/Areas (e.g MM,SD,QM,PP,FI).
I have searched on sdn regarding this but not got the solution.
So, if anyone has idea related User Management pls share.
All the answers r gr8ly appriciated.
Regards,
San

Hi,
Pls chk this links;
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a07122ae-8216-2a10-c9a5-996717a0648b
SAP BW Authorization
Regards
CSM Reddy

Similar Messages

  • ISetup for use with User Management / Resources - Roles and & RBAC

    Hi,
    I have a requirement to migrate Instance Sets, Roles, Grants to Roles etc. Basically, lots of stuff from the "User Management" OAF pages.
    Is it possible to use iSetup for this, or is there an alternative?
    Thanks in advance.

    Hi Mugunthan ,
    sorry, should have mentioned that on my original post. We are on 12.1.1 on all target and source environments. Can you point me in the direction of some doco for creating the sets?
    Supplementary question: Is it possible to export the custom selection set into an artefact, like a file or something that can be stored in version control? Ultimately, I would like to use isetup to manage the export of these artefacts and then use "a" backend version of isetup, similar to the jrad tools for importing XML documents. Does any backend functionality exist? I presume it's API based?

  • Proble with the Standard role(eu_role)

    Hi All,
    I am facing some problem with Standard Role(eu_role). Actually i copied the standard role from the path
    Portal Content -> Content Provided By SAP -> End user content -> Standard Role and pasted it in Portal Content itself, when i am trying to assign the copied eu_role to the user in User Administration the copied role is not getting displayed in "Available Roles".
    Can any one help me out to solve this problem.
    Thanks & Regards,
    Ramesh.

    I did not find any radio buttons as you said beside the reply
    select radio button whose answer resolved your issue.
    Solved problem (10)
    Very helpful answer (6)
    Helpful answer (2)
    Thanks & Regards,
    Ramesh.

  • Adding a domain user to the admin role within the local user management breaks all metro apps for all users!!

    Hi,
    I have posted this in another large thread under the "Windows 8 General" group but have not had any appropriate feedback from MS.
    After hours of testing and working with other users I have managed to isolate a simple situation that breaks all metro ui applications within Windows 8 for all users on the machine. Here are my exact steps and notes.
    Before continuing if you are running Avast then your solution may be to turn of the behaviour shield functionality as this also breaks metro apps. This is NOT the problem we are having!
    I have performed 3 cleans installs after isolating the problem and am able to reproduce the issue every time using the same steps on two different machines. 
    First thing to say is that for us it has nothing to do with simply joining the domain, domain/group policies nor does it appear to have anything to do with the software we installed, the problem here is much more simple but the result is pretty terrible.
    Here are my exact steps of what I did to reproduce our problem:
    Complete format of HDD in preperation for a clean install
    Clean install performed
    Set up the machine initially with a local account
    Test metro apps - all working fine
    Open control panel from the desktop, click on System, change the system to join the domain, click reboot
    Log into the system using my domain account
    Test metro apps - all working fine
    Here's were the problem starts. I need my domain account to have admin rights on the local machine so I can install programs without the IT men having to come over and enter their password every 5 mins.
    I go to control panel via the desktop and click on User Accounts. From with here I then click on "Manage User Accounts". This requires the IT guys to enter their details to give me access to such functionality. This is fine
    In the dialog box that opens I can only see the local user that was initially created during setup. The "Group" for this local account shows as "Administrators" - Image included below (important to note that metro apps are working at this point)
    I click add and then add my domain account - also giving it administrator access
    Sign off or reboot to ensure the new security is applied
    Sign back in to the domain account
    Test metro - ALL BROKEN
    Sign out
    Sign in as local account
    Test Metro - NOW ALL BROKEN FOR THIS USER ALSO
    So as soon as I add my domain account to the local user accounts and set it as admin it breaks all metro apps for all users. This is on a totally clean install with nothing at all installed other than the OS.
    Annoyingly if I go back and change the domain account to a standard user or if I totally remove the domain account from the local account management system the problem does not go away for either user. basically it is now permanently broken. The only fix I
    could fathom was a full re install and not giving the domain user admin access to the local  machine.
    Screen one - this is the local user accounts window AFTER joining the domain and logging in with my domain account (All metro apps working at this point)
    Screen 2: User accounts AFTER joining the domain and AFTER adding domain account to local user management (METRO BROKEN)
    I have isolated my machine from all group policies so nothing like that is affecting me. Users I have spoken to in different companies have policies that automatically add users to the local user management. This means that metro apps break as
    soon as they join the domain which leads them to wrongly think it is group policies causing the error. Once they isolate themselves from this they can reproduce following my steps.
    Thanks

    Hi Juke,
    Thank you for the response and apologies for the delay in getting back to you. My machine was running a long task so I couldn't try your suggested solution.
    I had already tried running the registry merge suggested at the top of the thread to no avail. I had not tried deleting the OLE key totally so I did that and the problem still exists. I will post all the errors I see in event viewer below. For
    your info, since posting my initial comment I have sent out my steps to 7 different people and we can all reproduce the problem. This comes to 10 different machines (3 of them mine then the other guys) in 3 different businesses / domains. We see the same errors
    in event viewer.
    Under "Windows Logs" --> "Application" : I get two separate error events the first reads "Activation of app winstore_cw5n1h2txyewy!Windows.Store failed with error: The app didn't start. See the Microsoft-Windows-TWinUI/Operational log for additional
    information." The second arrives in the log about 15 seconds after the first and reads "App winstore_cw5n1h2txyewy!Windows.Store did not launch within its allotted time."
    Under "Windows Logs" --> "System" : I get one error that reads "The server Windows.Store did not register with DCOM within the required timeout."
    Under "Applications And Services Logs" --> "Microsoft" -->  "Windows" --> "Apps" --> "Microsoft-Windows-TWinUI/Operational" : I get one error that reads "Activation of the app winstore_cw5n1h2txyewy!Windows.Store for the
    Windows.Launch contract failed with error: The app didn't start."
    If you require any further information just let me know and I will provide as much as I can.
    Thanks

  • Performance tab not working in Enterprise Manager for user with dba role

    Database: 11g2
    New to Oracle. Don't want share SYS user account among dbas. Tried to create user with dba role to perform all tasks.
    1. Removed DBMS_JOB, DBMS_LOB, UTL_FILE, UTL_HTTP, UTL_SMTP, and UTL_TCP from PUBLIC
    2. Created user dbauser1 with dba role
    3. Log in as dbauser1 in Enterprise Manager
    After click Performance tab, it just went straight to "Database Login" page. No error message.
    Any suggestions or advice will be appreciated.
    piaoma

    Hi Gourav,
    This is the wsdl url:
    http://hostname:8000/sap/bc/srt/wsdl/bndg_E04711310A0E55F1A0E3005056B03D6F/wsdl11/allinone/ws_policy/document?sap-client=450
    Kind Regards,
    Richard

  • Error in User Management and Assigning Role

    Hi,
    I have configured LDAP authentication on LiveCycle Server. I get the userlist with LDAP in my admin console under User Management - User & Groups. But as soon I click on any of the LDAP username I am getting error to contact administrator. Same also happens when I check the checbox infront of the username and tries to assing role.
    My Livecycle server is on WAS6.1, I also have server setup on my local where the same LDAP i have configured and I am able to access users and assign role. Is there any problem with WAS6.1 ?
    I checked the logs and i got following exception in server logs.
    [10/24/08 10:57:58:467 EDT] 00000039 IDPLoggedExce W com.adobe.idp.common.errors.Logger$LogConsumer run UserM:GENERIC_WARNING: [Thread Hashcode: 1028668752] | [com.adobe.idp.um.businesslogic.directoryservices.DirectoryServicesManagerBean] errorCode:8193 errorCodeHEX:0x2001 message:getPrincipal public chainedException:java.lang.NullPointerExceptionchainedExceptionMessage:null chainedException trace:java.lang.NullPointerException
    at com.adobe.idp.um.businesslogic.directoryservices.DirectoryServicesManagerBean.getCacheKey s(DirectoryServicesManagerBean.java:1583)
    at com.adobe.idp.um.businesslogic.directoryservices.DirectoryServicesManagerBean.findPrincip al(DirectoryServicesManagerBean.java:1608)
    at com.adobe.idp.um.businesslogic.directoryservices.EJSLocalStatelessDirectoryServicesManage rBean_0dbf3d20.findPrincipal(Unknown Source)
    at com.adobe.idp.um.api.impl.DirectoryManagerImpl.findPrincipal(DirectoryManagerImpl.java:13 8)
    at com.adobe.idp.um.ui.user.CreateNewUserAction.doExecute(CreateNewUserAction.java:139)
    at com.cc.framework.adapter.struts.ActionUtil.execute(Unknown Source)
    at com.cc.framework.adapter.struts.FWAction.execute(Unknown Source)
    at com.cc.framework.adapter.struts.FWAction.execute(Unknown Source)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1075)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1016)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
    at com.adobe.framework.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:1 73)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java: 190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
    at com.adobe.idp.um.auth.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:154)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java: 190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
    at com.adobe.idp.um.auth.filter.PortalSSOFilter.doFilter(PortalSSOFilter.java:113)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java: 190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:771)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:546)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.jav a:90)
    at com.ibm.ws.web

    Hello Do anyone get anything about above exception, or is there any other information needed, please let me know ?
    I still cannot found the solution for above problem, and it stops me to configuring users on Adobe LiveCycle ES, we have purchased Livecycle ES version 8.0

  • Roles appearing in User managment but not in Users Form

    I have used the WF_LOCAL_SYNCH.propagateUserRole API to add roles to new and existing users in our production instance. That seemed to go well.
    When I view that user through the user management screen I see that he has the role assigned to them. Yet when he logs on he cannot see the role. When I view the user through the user form the indirect responsibility is not showing up.
    We have run the Workflow Directory Services User/Role Validation against the user with the following parameters:
    p_BatchSize – 10000 (Default Value 10000)
    p_Check_Dangling – Yes (Default value No)
    Add missing user/role assignments – Yes (Default Value No)
    Update WHO columns in WF tables – No (Default Value No)
    That has worked for some people but not all.
    Does anyone know what is going on or how to fix this?

    this you can find in Web console
    configuration>>user configuration>>action>>attributes
    I am able to add attribute but not able to make field as mandatory,while creating attribute we are not getting option like that you want this field mandatory or not but while modifying the attribute we are getting option like required field radio button if i select that i am getting error "you cant change an attribute to required unless all the user have value for this field"

  • 'Standard Role' 'User' 'Business Partner' and 'Internet User'

    hii
    Currently I m working on E-Recruitment 6.0 BSP's..
    Can somebody explain me....
    1)
    'Role' 'User' 'Business Partner' and 'Internet User'
    Kindly help me undertand the relation between the above mentioned IDs and there creation
    2)
    I have created Business Partner(External Person) ID using BP(txn)...Kindly let me know how to create the 'Internet ID' and 'PW'
    So that I can use it for HRRCF_StART_EXT (BSP)
    kindly explian...or mail me any documention related to
    E-recruitment to my id [email protected]
    Looking for a immediate reply
    Regards,
    Raghav

    Role - is the same as the concept of role in R3. SAP Delivers some pre confogured authorisation profiles for some standard roles.
    Roles are assigned to user depending on the client's requirement.
    Business Partner is the same as BP in CRM. basically, the following will be BPs in ur system:
    Each independent user of the recruitment process - as BP Branch.
    All third party recruitment vendors as BP Type Agency.
    All employees will also be BP in the system.
    All external applicants.
    You can create internet user using the t code SU05. You can also use the R3 sytem user credentials to log on to the url application by configuring the system to use the SAP login. (this is done thru t code SICF)
    Hope this helps.

  • Standard roles, groups, profiles of a rfc-user

    hi,
    can anybody tell me please, which are the standard roles, groups and profiles of a rfc-user in our sap xi-system?
    thanks.
    regards
    Stefan

    Hi,
    Check the links for authorizations.
    http://www.erpgenie.com/sap/netweaver/xi/xiauthorizations.htm
    also check if your user have this roles in abap stack TECODE su01
    SAP_XI_ADMINISTRATOR
    SAP_XI_CONFIGURATOR
    SAP_XI_CONTENT_ORGANIZER
    SAP_XI_DEVELOPER
    SAP_XI_DISPLAY_USER
    SAP_XI_MONITOR
    SAP_ALM_ADMINISTRATOR
    SAP_J2EE_ADMIN
    SAP_SLD_ADMINISTRATOR
    SAP_SLD_CONFIGURATOR
    SAP_SLD_DEVELOPER
    SAP_XI_ADMINISTRATOR_ABAP
    SAP_XI_ADMINISTRATOR_J2EE
    SAP_XI_CONFIGURATOR_ABAP
    SAP_XI_CONFIGURATOR_J2EE
    SAP_XI_ID_SERV_USER
    SAP_XI_IR_SERV_USER
    SAP_XI_RWB_SERV_USER
    SAP_ALM_CUSTOMIZER
    SAP_BC_BASIS_ADMIN
    SAP_BC_BASIS_MONITORING
    ARG_XI_DEV
    Thanks,
    Vijaya.
    Edited

  • Not able to find Remote roles in User Management

    We are using RRA for sharing contents between two portals. In the consumer portal PCD, the contents and roles of the producer portal is showing perfectly. But when i am trying to find the roles in User management in the consumer portal, these remote roles are not showing, and subsequently we are not being able to assign these remote roles to our  local users. I have checked the connection and permission. Please help.

    1. Please make sure that the server clocks on the producer and consumer portal are synchronized. One of the prerequisite for FPN is that the server clocks of the producer portal and consumer portal must be synchronized at all times.
    2. When you are not able to see a remote role, at that time, test your SSO between consumer and producer. You can do this by logging in first into your consumer and then changing the URL to that of the producer and then hit Enter. If SSO is correctly working, you should be logged into the producer portal without having to log in again.
    Thanks,
    Shanti

  • Standard roles Solution Manager

    Is there somewhere a document that explains the standard roles for solution manager (e.g. SAP_SOL_PROJ_ADMIN_ALL)?

    Hi,
    However the roles varies with profiles
    Each of the following needst to be assigned appropriate roles.
    ¡        Project Leader
    ¡        Application Consultant
    ¡        Development Consultant
    ¡        Technical Consultant
    Eg: Technical consultant it is SAP_SOL_TC_COMP
    Hope this helped you.
    --Ragu

  • Hiding fields in standard user management view

    Hi all,
    How to hide fields in user management views.
    Like in the create user view, suppose I want to hide the <b>additional information fieldgroup</b>. how can I do it?
    I have the par file and tried to comment the code which is related to the additional information field group. But when we try creating an iview from the new par(modified par-i changed changed the name ) I do not c the portal component called <b>create user</b>. I am a bit confused.
    Can anyone help me out regarding this.
    thanks,
    Paul

    Hi Paul
    Have a look at
    http://help.sap.com/saphelp_webas630/helpdata/en/d1/956f8b86b2a949913ed22d253e0012/content.htm
    and http://help.sap.com/saphelp_webas630/helpdata/en/91/646d498fd94142a37e90a3b848e45e/content.htm
    By setting the default values you can either have them displayed or hidden.
    Hope this helps,
    Regards
    Uma.

  • USER MANAGEMENT-CO "Assign users to process role"

    HI,How can I assign the CO "Assign users to process role" to one or more users inside of a process?
    Thanks.
    Regards
    David Valenzuela

    Hi David,
    I am not sure whether a callable object can be assigned to more than one user or not, but for assigning one single user to a callable object inside a process, follow the following steps:
    1)Put the callable object in an action.
    2)Put the action in a block.
    3)In the block, under the <b>Roles</b> tab, you will be able to see an item called <b>Processor of <<i>name of action containing this callable object</i>></b>. You don't need to do anything. If you wish, all you can do here that you can consolidate roles of more than one action under a single name such that one user is assigned to all those actions. For the time being, don't do anything.
    4)Put the block in the process.
    5)In the process, under the <b>Roles</b> tab, you would be able to see the same item <b>Processor of <<i>name of action containing this callable object</i>></b> and a drop down in front of it. Choose <b>Initiation Defined</b> from the drop down.
    6)In the process itself, open the <b>Default Roles</b> tab, and now you would be able to see the same item <b>Processor of <<i>name of action containing this callable object</i>></b>. Just click the <b>Add Default</b> button, search for the user, and assign him to this <b>Processor</b>.
    These steps will make sure that when you run the process, the CO <b>Assign users to process role</b> could be opened by only the user you assigned this CO to.
    Bye
    Ankur
    Do reward points if it helps!!

  • User Management in XI implementation

    Hi,
    Could someone provide me the user management and authorization assignment in an XI implementation.
    What are the authorizations that shall be given to an XI developer. In our case the XI developer is doing admuin work also like SLD config etc. But still as an administrator I do not want to give him all the authorizations. Is there any standard XI implementation methodology?
    Regards,
    Shobhit

    Hi Shobit,
    you have several roles:
    SAP_XI_DISPLAY_USER
    SAP_XI_DEVELOPER
    SAP_XI_CONFIGURATOR     
    SAP_XI_CONTENT_ORGANIZER
    SAP_XI_MONITOR
    SAP_XI_ADMINISTRATOR
    SAP_SLD_CONFIGURATOR
    SAP_SLD_ADMINISTRATOR
    Most of them are composed from other roles. Look to transaction PFCG to see the single roles and a description.
    For Java stack authorisations have a look to Michals weblog
    <a href="/people/michal.krawczyk2/blog/2005/05/25/xi-how-to-add-authorizations-to-repository-objects: How to... add authorizations to Repository objects</a>.
    Regards,
    Udo

  • BPC Mass User Management Tool error in BPC 10

    Hello,
    I've downloaded tranport files from How to use BPC Mass User Management Tool in Netweaver. But Transport import fails with RC12 without any shortdump. ABAP program ZUJE_MASS_USER_MGMT is not created.
    Version used - BPC 10 CPMBPC 801 on Netweaver 7.4 .
    Thanks in advance for your inputs.

    Tried changing transport options but no luck. Transport failed with status RC12 without creating ABAP program. However, Old version transport files imported with error. But I could not find METHOD check_bpc_component_is_valid.
    Can anyone please send the updated program.
    *& Report  ZUJE_MASS_USER_MGMT
    *& Created By: Rich Heilman  SAP Labs, LLC
    *& Created On: 08/2/2010
    REPORT  zuje_mass_user_mgmt.
    TYPE-POOLS: abap, vrm.
    *       CLASS lcl_application DEFINITION
    CLASS lcl_application DEFINITION FINAL.
      PUBLIC SECTION.
        CONSTANTS: lc_comma TYPE char01 VALUE ',',
                   lc_pipe TYPE char01 VALUE '|',
                   lc_tab TYPE char10 VALUE 'TAB'.
        TYPES: BEGIN OF t_appldim,
                appl_id TYPE uj_appl_id,
                dimension TYPE uj_dim_name,
              END OF t_appldim.
        TYPES: BEGIN OF t_appldimmembers,
                appl_id TYPE uj_appl_id,
                dimension TYPE uj_dim_name,
                member TYPE uj_dim_member,
              END OF t_appldimmembers.
        CLASS-METHODS: file_f4 RETURNING value(r_file) TYPE string,
                       directory_f4 RETURNING value(r_path) TYPE string,
                       get_initial_directory RETURNING value(r_path) TYPE string,
                       set_delimiter_listbox,
                       set_delimiter,
                       export_users_to_file,
                       import_users_from_file,
                       export_teams_to_file,
                       import_teams_from_file,
                       export_team_assign_to_file,
                       import_team_assign_from_file,
                       export_task_profiles_to_file,
                       import_task_profiles_from_file,
                       export_mem_profiles_to_file,
                       import_mem_profiles_from_file,
                       export_tap_assign_to_file,
                       import_tap_assign_from_file,
                       export_map_assign_to_file,
                       import_map_assign_from_file,
                       get_appset_data IMPORTING i_appset_id TYPE uj_appset_id
                                       EXCEPTIONS appset_not_found .
      PRIVATE SECTION.
        CLASS-DATA: lv_appset_id TYPE uja_s_appset_info-appset_id.
        CLASS-DATA: lv_delimiter TYPE string.
        CLASS-DATA: ls_appset_info TYPE uja_s_appset_info.
        CLASS-DATA: lt_appl_info TYPE uja_t_appl_info.
        CLASS-DATA: lt_appl_dim TYPE TABLE OF t_appldim.
        CLASS-DATA: lt_members TYPE TABLE OF t_appldimmembers.
        CLASS-DATA: lt_teams_list TYPE uje_t_team.
        CLASS-DATA: lt_users_list TYPE uje_t_user.
        CLASS-DATA: lt_tprofs TYPE uje_t_api_profile_id.
        CLASS-DATA: lt_mprofs TYPE uje_t_api_profile_id.
        CLASS-DATA: lt_tasks TYPE uje_t_role_tskasg.
        CLASS-DATA: lt_roles TYPE uje_t_role.
        CLASS-DATA: lo_context TYPE REF TO if_uj_context.
        CLASS-DATA: lt_alv_messages TYPE uj0_t_message.
        CLASS-METHODS: set_global_context,
                       render_alv,
                       upload IMPORTING i_filepath TYPE any
                              RETURNING value(rt_strtab) TYPE stringtab,
                       download IMPORTING i_filepath TYPE any
                                         it_datatab TYPE STANDARD TABLE,
                       user_is_valid IMPORTING i_user_id TYPE any
                                     RETURNING value(r_boolean) TYPE abap_bool,
                       team_is_valid IMPORTING i_team_id TYPE any
                                     RETURNING value(r_boolean) TYPE abap_bool,
                       tprofile_is_valid IMPORTING i_profile_id TYPE any
                                         RETURNING value(r_boolean) TYPE abap_bool,
                       mprofile_is_valid IMPORTING i_profile_id TYPE any
                                         RETURNING value(r_boolean) TYPE abap_bool,
                       role_is_valid IMPORTING i_role_id TYPE any
                                     RETURNING value(r_boolean) TYPE abap_bool,
                       task_is_valid IMPORTING i_task_id TYPE any
                                     RETURNING value(r_boolean) TYPE abap_bool.
    ENDCLASS.                    "lcl_application DEFINITION
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_export RADIOBUTTON GROUP grp1 DEFAULT 'X' USER-COMMAND chk.
    PARAMETERS: p_import RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: p_appset TYPE uja_appset_info-appset_id.
    PARAMETERS: p_file TYPE string LOWER CASE.
    PARAMETERS: p_delmt TYPE char10 AS LISTBOX VISIBLE LENGTH 20
                           DEFAULT lcl_application=>lc_comma.  "delimiter
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: p_eusers RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_eteams RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_eteama RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_etprof RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_emprof RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_etprfa RADIOBUTTON GROUP grp2 MODIF ID exp.
    PARAMETERS: p_emprfa RADIOBUTTON GROUP grp2 MODIF ID exp.
    SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-004.
    PARAMETERS: p_iusers RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_iteams RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_iteama RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_itprof RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_improf RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_itprfa RADIOBUTTON GROUP grp3 MODIF ID imp.
    PARAMETERS: p_imprfa RADIOBUTTON GROUP grp3 MODIF ID imp.
    SELECTION-SCREEN END OF BLOCK b4.
    INITIALIZATION.
      p_file = lcl_application=>get_initial_directory( ).
      lcl_application=>set_delimiter_listbox( ).
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF p_export = abap_true AND screen-group1 = 'IMP'.
          screen-active = '0'.
        ENDIF.
        IF p_import = abap_true AND screen-group1 = 'EXP'.
          screen-active = '0'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN.
      CASE abap_true.
        WHEN p_export.
          CLEAR: p_iusers, p_iteams, p_iteama, p_itprof,
                 p_improf, p_itprfa, p_imprfa.
        WHEN p_import.
          CLEAR: p_eusers, p_eteams, p_eteama, p_etprof,
                 p_emprof, p_etprfa, p_emprfa.
      ENDCASE.
      IF sy-ucomm <> 'CHK'.
        IF p_appset IS INITIAL.
          MESSAGE e001(00) WITH 'Please enter an AppSet Id'.
        ENDIF.
        IF p_file IS INITIAL.
          MESSAGE e001(00) WITH 'Please enter a valid directory or file'.
        ENDIF.
        IF p_delmt IS INITIAL.
          MESSAGE e001(00) WITH 'Please specify a delimiter'.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CASE abap_true.
        WHEN p_export.  p_file = lcl_application=>directory_f4( ).
        WHEN p_import.  p_file = lcl_application=>file_f4( ).
      ENDCASE.
    START-OF-SELECTION.
      lcl_application=>set_delimiter( ).
      lcl_application=>get_appset_data(
                  EXPORTING
                       i_appset_id =  p_appset
                  EXCEPTIONS
                       appset_not_found  = 1 ).
      IF sy-subrc <> 0.
        RETURN.
      ENDIF.
      CASE abap_true.
        WHEN p_eusers.  lcl_application=>export_users_to_file( ).
        WHEN p_iusers.  lcl_application=>import_users_from_file( ).
        WHEN p_eteams.  lcl_application=>export_teams_to_file( ).
        WHEN p_iteams.  lcl_application=>import_teams_from_file( ).
        WHEN p_eteama.  lcl_application=>export_team_assign_to_file( ).
        WHEN p_iteama.  lcl_application=>import_team_assign_from_file( ).
        WHEN p_etprof.  lcl_application=>export_task_profiles_to_file( ).
        WHEN p_itprof.  lcl_application=>import_task_profiles_from_file( ).
        WHEN p_emprof.  lcl_application=>export_mem_profiles_to_file( ).
        WHEN p_improf.  lcl_application=>import_mem_profiles_from_file( ).
        WHEN p_etprfa.  lcl_application=>export_tap_assign_to_file( ).
        WHEN p_itprfa.  lcl_application=>import_tap_assign_from_file( ).
        WHEN p_emprfa.  lcl_application=>export_map_assign_to_file( ).
        WHEN p_imprfa.  lcl_application=>import_map_assign_from_file( ).
      ENDCASE.
    *       CLASS lcl_application IMPLEMENTATION
    CLASS lcl_application IMPLEMENTATION.
      METHOD file_f4.
        DATA: lt_file_table TYPE filetable.
        DATA: ls_file_table LIKE LINE OF lt_file_table.
        DATA: lv_rc TYPE sy-subrc.
        cl_gui_frontend_services=>file_open_dialog(
          CHANGING
            file_table = lt_file_table
            rc         = lv_rc ).
        CLEAR ls_file_table .
        READ TABLE lt_file_table INTO ls_file_table INDEX 1.
        IF sy-subrc  = 0.
          r_file = ls_file_table-filename.
        ENDIF.
      ENDMETHOD.                                                "file_f4
      METHOD directory_f4.
        cl_gui_frontend_services=>directory_browse(
            CHANGING
              selected_folder      = r_path
            EXCEPTIONS
              OTHERS               = 4 ).
      ENDMETHOD.                    "directory_f4
      METHOD upload.
        cl_gui_frontend_services=>gui_upload(
              EXPORTING
                filename = i_filepath
              CHANGING
                data_tab = rt_strtab
              EXCEPTIONS
                OTHERS   = 19 ).
        IF sy-subrc <> 0.
          MESSAGE e001(00) WITH 'File not found, check file path and name'.
        ENDIF.
        DELETE rt_strtab WHERE table_line IS INITIAL.
      ENDMETHOD.                    "upload
      METHOD download.
        DATA: lt_datatab TYPE stringtab.
        DATA: ls_datatab LIKE LINE OF lt_datatab.
        FIELD-SYMBOLS: <ls_data> TYPE ANY.
        FIELD-SYMBOLS: <lv_field> TYPE ANY.
    * Convert table to delimited string table
        LOOP AT it_datatab ASSIGNING <ls_data>.
          CLEAR ls_datatab.
          DO.
            ASSIGN COMPONENT sy-index
                             OF STRUCTURE <ls_data> TO <lv_field>.
            IF sy-subrc <> 0.
              EXIT.
            ENDIF.
            IF ls_datatab IS INITIAL.
              ls_datatab = <lv_field>.
            ELSE.
              CONCATENATE ls_datatab <lv_field>
                              INTO ls_datatab SEPARATED BY lcl_application=>lv_delimiter.
            ENDIF.
          ENDDO.
          APPEND ls_datatab TO lt_datatab.
        ENDLOOP.
        cl_gui_frontend_services=>gui_download(
           EXPORTING
             filename = i_filepath
           CHANGING
             data_tab = lt_datatab
           EXCEPTIONS
             OTHERS   = 24 ).
        IF sy-subrc <> 0.
          MESSAGE e001(00)
              WITH 'File not downloaded, check file path and name'.
        ENDIF.
      ENDMETHOD.                    "download
      METHOD get_initial_directory.
        cl_gui_frontend_services=>get_desktop_directory(
          CHANGING
            desktop_directory    = r_path ).
        cl_gui_cfw=>flush( ).
        CONCATENATE r_path '\*.csv' INTO r_path.
      ENDMETHOD.                    "get_initial_directory
      METHOD export_users_to_file.
        TYPES: BEGIN OF t_output,
                user_id TYPE uje_user-user_id,
                fullname TYPE uje_user-fullname,
                email TYPE uje_user-email,
               END OF t_output.
        DATA: lt_user_id TYPE uje_t_api_user_id.
        DATA: lt_users TYPE uje_t_user.
        DATA: ls_users LIKE LINE OF lt_users.
        DATA: lt_output TYPE TABLE OF t_output.
        DATA: ls_output LIKE LINE OF lt_output.
        lcl_application=>set_global_context( ).
        CALL FUNCTION 'UJE_API_GET_LIST_USERS'
          EXPORTING
            i_appset_id = lcl_application=>lv_appset_id
            is_user     = lcl_application=>lo_context->ds_user
            it_user_id  = lt_user_id
          IMPORTING
            et_user     = lt_users.
        REFRESH lt_output.
        LOOP AT lt_users INTO ls_users.
          MOVE-CORRESPONDING ls_users TO ls_output.
          APPEND ls_output TO lt_output.
        ENDLOOP.
    * Download table
        lcl_application=>download( EXPORTING i_filepath = p_file
                                             it_datatab = lt_output ).
      ENDMETHOD.                    "export_users_to_file
      METHOD import_users_from_file.
        DATA: lv_action TYPE uj_action.
        DATA: lv_success TYPE uj_bool.
        DATA: ls_user_info TYPE uje_s_userinfo.
        DATA: lt_messages TYPE uj0_t_message.
        DATA: ls_alv_messages LIKE LINE OF lt_alv_messages.
        DATA: lt_team_asin TYPE uje_t_user_team.
        DATA: lt_tprofiles TYPE uje_t_profile_id_act.
        DATA: lt_mprofiles TYPE uje_t_profile_id_act.
        DATA: lt_strtab TYPE stringtab.
        DATA: ls_strtab LIKE LINE OF lt_strtab.
        lt_strtab = lcl_application=>upload( p_file ).
        LOOP AT lt_strtab INTO ls_strtab.
          SPLIT ls_strtab AT lcl_application=>lv_delimiter INTO ls_user_info-user_id
                                      ls_user_info-fullname
                                      ls_user_info-email.
    * Check if user already exists, and set action accordingly.
          IF lcl_application=>user_is_valid( ls_user_info-user_id ) = abap_false.
            lv_action = 'I'.
          ELSE.
            lv_action = 'M'.
          ENDIF.
          CALL FUNCTION 'UJE_API_MANAGE_USER2'
            EXPORTING
              i_appset_id      = lcl_application=>lv_appset_id
              is_user          = lcl_application=>lo_context->ds_user
              is_user_info     = ls_user_info
              i_action         = lv_action
              it_team_asin     = lt_team_asin
              it_tprofile_id   = lt_tprofiles
              it_mprofile_id   = lt_mprofiles
            IMPORTING
              e_success        = lv_success
              et_message_lines = lt_messages.
          IF lv_success = 'Y'.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'S'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'User ID' ls_user_info-user_id
                        'has been created/updated successfully'
                                INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ELSE.
            APPEND LINES OF lt_messages TO lt_alv_messages.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'E'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'User ID' ls_user_info-user_id
                        'not created/updated due to error'
                                 INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ENDIF.
        ENDLOOP.
        lcl_application=>render_alv( ).
      ENDMETHOD.                    "create_users_from_file
      METHOD export_teams_to_file.
        TYPES: BEGIN OF t_output,
                team_id TYPE uje_s_team-team_id,
                description TYPE uje_s_team-description,
               END OF t_output.
        DATA: lt_teams TYPE uje_t_team.
        DATA: ls_teams LIKE LINE OF lt_teams.
        DATA: lt_output TYPE TABLE OF t_output.
        DATA: ls_output LIKE LINE OF lt_output.
        CALL FUNCTION 'UJE_API_GET_TEAMS'
          EXPORTING
            i_appset_id = lcl_application=>lv_appset_id
            is_user     = lcl_application=>lo_context->ds_user
          IMPORTING
            et_team     = lt_teams.
        REFRESH lt_output.
        LOOP AT lt_teams INTO ls_teams.
          MOVE-CORRESPONDING ls_teams TO ls_output.
          APPEND ls_output TO lt_output.
        ENDLOOP.
    * Download table
        lcl_application=>download( EXPORTING i_filepath = p_file
                                             it_datatab = lt_output ).
      ENDMETHOD.                    "export_teams_to_file
      METHOD import_teams_from_file.
        DATA: lv_action TYPE uj_action.
        DATA: lv_success TYPE uj_bool.
        DATA: ls_team TYPE uje_s_team.
        DATA: lt_messages TYPE uj0_t_message.
        DATA: ls_alv_messages LIKE LINE OF lt_alv_messages.
        DATA: lt_users TYPE uje_t_user_team.
        DATA: lt_tprofiles TYPE uje_t_profile_id_act.
        DATA: lt_mprofiles TYPE uje_t_profile_id_act.
        DATA: lt_strtab TYPE stringtab.
        DATA: ls_strtab LIKE LINE OF lt_strtab.
        lt_strtab = lcl_application=>upload( p_file ).
        LOOP AT lt_strtab INTO ls_strtab.
          SPLIT ls_strtab AT lcl_application=>lv_delimiter INTO ls_team-team_id
                                      ls_team-description.
    * Check if team is already a valid team, set action appropriatly
          IF lcl_application=>team_is_valid( ls_team-team_id ) = abap_false.
            lv_action = 'I'.
          ELSE.
            lv_action = 'M'.
          ENDIF.
          CALL FUNCTION 'UJE_API_MANAGE_TEAM2'
            EXPORTING
              i_appset_id      = lcl_application=>lv_appset_id
              is_user          = lcl_application=>lo_context->ds_user
              is_team          = ls_team
              i_action         = lv_action
              it_users         = lt_users
              it_tprofile_id   = lt_tprofiles
              it_mprofile_id   = lt_mprofiles
            IMPORTING
              e_success        = lv_success
              et_message_lines = lt_messages.
          IF lv_success = 'Y'.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'S'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'Team' ls_team-team_id
                         'has been created/updated successfully'
                             INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ELSE.
            APPEND LINES OF lt_messages TO lt_alv_messages.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'E'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'Team' ls_team-team_id
                        'not created/updated due to error'
                              INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ENDIF.
        ENDLOOP.
        lcl_application=>render_alv( ).
      ENDMETHOD.                    "create_teams_from_file
      METHOD export_team_assign_to_file.
        TYPES: BEGIN OF t_user_assign,
                user_id TYPE uje_s_user_team-user_id,
                team_id TYPE uje_s_user_team-team_id,
                teamleader TYPE uje_s_user_team-teamleader,
               END OF t_user_assign.
        DATA: lt_user_det TYPE uje_t_user_detail.
        DATA: ls_user_det LIKE LINE OF lt_user_det.
        DATA: ls_user_team TYPE uje_s_user_team.
        DATA: lt_team_assign TYPE TABLE OF t_user_assign.
        DATA: ls_team_assign LIKE LINE OF lt_team_assign.
        CALL FUNCTION 'UJE_API_GET_USERDATA'
          EXPORTING
            i_appset_id = lcl_application=>lv_appset_id
            is_user     = lcl_application=>lo_context->ds_user
          IMPORTING
            et_user     = lt_user_det.
        LOOP AT lt_user_det INTO ls_user_det.
          LOOP AT ls_user_det-t_team_id INTO ls_user_team.
            MOVE-CORRESPONDING ls_user_team TO ls_team_assign.
            APPEND ls_team_assign TO lt_team_assign.
          ENDLOOP.
        ENDLOOP.
    * Download table
        lcl_application=>download( EXPORTING i_filepath = p_file
                                             it_datatab = lt_team_assign ).
      ENDMETHOD.                    "export_team_assign_to_file
      METHOD import_team_assign_from_file.
        TYPES: BEGIN OF t_user_assign,
                user_id TYPE uje_s_user_team-user_id,
                team_id TYPE uje_s_user_team-team_id,
                teamleader TYPE uje_s_user_team-teamleader,
               END OF t_user_assign.
        DATA: lv_success TYPE uj_bool.
        DATA: lt_user_team_temp TYPE uje_t_user_team.
        DATA: ls_user_team_temp TYPE uje_s_user_team.
        DATA: lt_user_team TYPE uje_t_user_team.
        DATA: ls_user_team TYPE uje_s_user_team.
        DATA: ls_team_assign TYPE uje_s_user_team.
        DATA: lt_messages TYPE uj0_t_message.
        DATA: ls_alv_messages LIKE LINE OF lt_alv_messages.
        DATA: lt_tprofiles TYPE uje_t_profile_id_act.
        DATA: ls_tprofiles LIKE LINE OF lt_tprofiles.
        DATA: lt_mprofiles TYPE uje_t_profile_id_act.
        DATA: ls_mprofiles LIKE LINE OF lt_mprofiles.
        DATA: lt_tprofile_ids TYPE uje_t_api_profile_id.
        DATA: ls_tprofile_ids LIKE LINE OF lt_tprofile_ids.
        DATA: lt_mprofile_ids TYPE uje_t_api_profile_id.
        DATA: ls_mprofile_ids LIKE LINE OF lt_mprofile_ids.
        DATA: lt_strtab TYPE stringtab.
        DATA: ls_strtab LIKE LINE OF lt_strtab.
        DATA: ls_teams_list LIKE LINE OF lt_teams_list.
        lt_strtab = lcl_application=>upload( p_file ).
        LOOP AT lt_strtab INTO ls_strtab.
          SPLIT ls_strtab AT lcl_application=>lv_delimiter INTO ls_team_assign-user_id
                                      ls_team_assign-team_id
                                      ls_team_assign-teamleader.
          CLEAR ls_user_team.
          ls_user_team-user_id = ls_team_assign-user_id.
          ls_user_team-team_id = ls_team_assign-team_id.
          ls_user_team-teamleader = ls_team_assign-teamleader.
          TRANSLATE ls_user_team-teamleader USING 'YXyX1XxXN n 0 '. "Translate to X or space
          APPEND ls_user_team TO lt_user_team.
          IF lcl_application=>team_is_valid( ls_team_assign-team_id ) = abap_false.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'E'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'Team' ls_team_assign-team_id 'does not yet exist.'
                        'No user assigments done.'
                              INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
            lcl_application=>render_alv( ).
            RETURN.
          ENDIF.
          IF lcl_application=>user_is_valid( ls_team_assign-user_id ) = abap_false.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'E'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'User' ls_team_assign-user_id 'does not yet exist.'
                        'No user assigments done.'
                              INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
            lcl_application=>render_alv( ).
            RETURN.
          ENDIF.
        ENDLOOP.
        LOOP AT lcl_application=>lt_teams_list INTO ls_teams_list.
          REFRESH lt_user_team_temp.
          REFRESH lt_tprofile_ids.
          REFRESH lt_mprofile_ids.
    * Check that there is data for team assignment, otherwise skip
          READ TABLE lt_user_team TRANSPORTING NO FIELDS
                            WITH KEY team_id = ls_teams_list-team_id.
          IF sy-subrc <> 0.
            CONTINUE.
          ENDIF.
    * Get existing team data for this team.
          CALL FUNCTION 'UJE_API_GET_TEAMDATA'
            EXPORTING
              i_appset_id    = lcl_application=>lv_appset_id
              is_user        = lcl_application=>lo_context->ds_user
              i_team_id      = ls_teams_list-team_id
            IMPORTING
              et_user_team   = lt_user_team_temp
              et_tprofile_id = lt_tprofile_ids
              et_mprofile_id = lt_mprofile_ids.
    * Update with new users.
          LOOP AT lt_user_team INTO ls_user_team
                           WHERE team_id = ls_teams_list-team_id.
            MOVE-CORRESPONDING ls_user_team TO ls_user_team_temp.
            APPEND ls_user_team_temp TO lt_user_team_temp.
          ENDLOOP.
    * Keep existing profiles.
          REFRESH lt_tprofiles.
          LOOP AT lt_tprofile_ids INTO ls_tprofile_ids.
            ls_tprofiles-profile_id = ls_tprofile_ids-profile_id.
            APPEND ls_tprofiles TO lt_tprofiles.
          ENDLOOP.
          REFRESH lt_mprofiles.
          LOOP AT lt_mprofile_ids INTO ls_mprofile_ids.
            ls_mprofiles-profile_id = ls_mprofile_ids-profile_id.
            APPEND ls_mprofiles TO lt_mprofiles.
          ENDLOOP.
    * now update the user/team assignments
          CALL FUNCTION 'UJE_API_MANAGE_TEAM2'
            EXPORTING
              i_appset_id      = lcl_application=>lv_appset_id
              is_user          = lcl_application=>lo_context->ds_user
              is_team          = ls_teams_list
              i_action         = 'M'
              it_users         = lt_user_team_temp
              it_tprofile_id   = lt_tprofiles
              it_mprofile_id   = lt_mprofiles
            IMPORTING
              e_success        = lv_success
              et_message_lines = lt_messages.
          IF lv_success = 'Y'.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'S'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'Team' ls_teams_list-team_id 'user assignments'
                        'have been updated successfully'
                             INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ELSE.
            APPEND LINES OF lt_messages TO lt_alv_messages.
            CLEAR ls_alv_messages.
            ls_alv_messages-msgid = '00'.
            ls_alv_messages-msgty = 'E'.
            ls_alv_messages-msgno = '001'.
            CONCATENATE 'Team' ls_teams_list-team_id 'user assignments'
                        'not updated due to error'
                             INTO ls_alv_messages-message SEPARATED BY space.
            APPEND ls_alv_messages TO lt_alv_messages.
          ENDIF.
        ENDLOOP.
        lcl_application=>render_alv( ).
      ENDMETHOD.                    "import_team_assign_from_file
      METHOD export_task_profiles_to_file.
        TYPES: BEGIN OF t_output,
                identifier TYPE char01, " Row Identifer
                profile TYPE uj_profile_id,
                values TYPE string,
               END OF t_output.
        DATA: ls_tprofs LIKE LINE OF lt_tprofs.
        DATA: lv_profile TYPE uj_profile_id.
        DATA: ls_profile TYPE uje_s_profile.
        DATA: lt_role_id TYPE uje_t_api_role_id.
        DATA: ls_role_id LIKE LINE OF lt_role_id.
        DATA: lt_task_info TYPE  uje_t_task_info.
        DATA: ls_task_info LIKE LINE OF lt_task_info.
        DATA: lt_users_asin TYPE uje_t_api_user_id.
        DATA: ls_users_asin LIKE LINE OF lt_users_asin.
        DATA: lt_teams_asin TYPE uje_t_api_team_id.
        DATA: ls_teams_asin LIKE LINE OF lt_teams_asin.
        DATA: lt_output TYPE TABLE OF t_output.
        DATA: ls_output LIKE LINE OF lt_output.
        LOOP AT lcl_application=>lt_tprofs INTO ls_tprofs.
          lv_profile = ls_tprofs-profile_id.
    * Get relevant data for task profile
          CLEAR ls_profile.
          REFRESH: lt_role_id, lt_task_info, lt_users_asin, lt_teams_asin.
          CALL FUNCTION 'UJE_API_GET_TPROFILEDATA2'
            EXPORTING
              i_appset_id  = lcl_application=>lv_appset_id
              is_user      = lcl_application=>lo_context->ds_user
              i_profile_id = lv_profile
            IMPORTING
              es_profile   = ls_profile
              et_role_id   = lt_role_id
              et_task_info = lt_task_info
              et_user_id   = lt_users_asin
              et_team_id   = lt_teams_asin.
    * Write Header row
          CLEAR ls_output.
          ls_output-identifier = 'H'.
          ls_output-profile  = lv_profile.
          ls_output-values = ls_profile-description.
          APPEND ls_output TO lt_output.
    * Write task assigments
          CLEAR ls_output.
          ls_output-identifier = 'K'.
          ls_output-profile  = lv_profile.
          LOOP AT lt_task_info INTO ls_task_info.
            ls_output-values = ls_task_info-task_id.
            APPEND ls_output TO lt_output.
          ENDLOOP.
    * Write role assigments
          CLEAR ls_output.
          ls_output-identifier = 'R'.
          ls_output-profile  = lv_profile.
          LOOP AT lt_role_id INTO ls_role_id.
            ls_output-values = ls_role_id-role_id.
            APPEND ls_output TO lt_output.
          ENDLOOP.
    * Write user assignments
          CLEAR ls_output.
          ls_output-identifier = 'U'.
          ls_output-profile  = lv_profile.
          LOOP AT lt_users_asin INTO ls_users_asin.
            ls_output-values = ls_users_asin-user_id.
            APPEND ls_output TO lt_output.
          ENDLOOP.
    * Write team assignments
          CLEAR ls_output.
          ls_output-identifier = 'T'.
          ls_output-profile  = lv_profile.
          LOOP AT lt_teams_asin INTO ls_teams_asin.
            ls_output-values = ls_teams_asin-team_id.
            APPEND ls_output TO lt_output.
          ENDLOOP.
        ENDLOOP.
    * Download table
        lcl_application=>download( EXPORTING i_filepath = p_file
                                             it_datatab = lt_output ).
      ENDMETHOD.                    "export_task_profiles_to_file
      METHOD import_task_profiles_from_file.
        TYPES: BEGIN OF t_input,
                identifier TYPE char01, " Row Identifer
                profile TYPE uj_profile_id,
                values TYPE string,
               END OF t_input.
        TYPES: BEGIN OF t_task_profile,
                profile TYPE uje_s_profile,
                roles TYPE uje_t_api_role_id,
                task_info TYPE uje_t_task_info,
                users_asin TYPE uje_t_api_user_id,
                teams_asin TYPE uje_t_api_team_id,
               END OF t_task_profile.
        DATA: lt_task_profile TYPE TABLE OF t_task_profile.
        DATA: ls_task_profile LIKE LINE OF lt_task_profile.
        DATA: ls_alv_messages LIKE LINE OF lt_alv_messages.
        DATA: lt_messages TYPE uj0_t_message.
        DATA: lv_action TYPE uj_action.
        DATA: lv_success TYPE uj_bool.
        DATA: lv_last_profile TYPE uj_profile_id.
        DATA: lt_role_id TYPE uje_t_api_role_id.
        DATA: ls_role_id LIKE LINE OF lt_role_id.
        DATA: lt_task_info TYPE  uje_t_task_info.
        DATA: ls_task_info LIKE LINE OF lt_task_info.
        DATA: lt_users_asin TYPE uje_t_api_user_id.
        DATA: ls_users_asin LIKE LINE OF lt_users_asin.
        DATA: lt_teams_asin TYPE uje_t_api_team_id.
        DATA: ls_teams_asin LIKE LINE OF lt_teams_asin.
        DATA: lt_strtab TYPE stringtab.
        DATA: ls_strtab LIKE LINE OF lt_strtab.
        DATA: lt_input TYPE TABLE OF t_input.
        DATA: ls_input LIKE LINE OF lt_input.
        DATA: lt_obj_asin TYPE uje_t_profile_asin.
        DATA: ls_obj_asin LIKE LINE OF lt_obj_asin.
        DATA: lt_task_asin TYPE uje_t_task_id_act.
        DATA: ls_task_asin LIKE LINE OF lt_task_asin.
    * Upload file
        lt_strtab = lcl_application=>upload( p_file ).
    * Rip import file into internal table
        LOOP AT lt_strtab INTO ls_strtab.
          CLEAR ls_input.
          SPLIT ls_strtab AT lcl_application=>lv_delimiter INTO ls_input-identifier
                                      ls_input-profile
                                      ls_input-values.
          APPEND ls_input TO lt_input.
        ENDLOOP.
    * Build profile table containing all associated data
        SORT lt_input STABLE ASCENDING BY profile identifier values.
        LOOP AT lt_input INTO ls_input.
          IF ls_input-profile <> lv_last_profile
              AND lv_last_profile IS NOT INITIAL.
            APPEND ls_task_profile TO lt_task_profile.
            CLEAR ls_task_profile.
          ENDIF.
    * Based on record identifier
          CASE ls_input-identifier.
            WHEN 'H'.  " Header
              ls_task_profile-profile-profile_id  = ls_input-profile.
              ls_task_profile-profile-description = ls_input-values.
            WHEN 'K'.  " Task info
              SPLIT ls_input-values AT lcl_application=>lv_delimiter INTO ls_task_info-task_id
                                                ls_task_info-description.
              IF lcl_application=>task_is_valid( ls_task_info-task_id ) = abap_false.
                CLEAR ls_alv_messages.
                ls_alv_messages-msgid = '00'.
                ls_alv_messages-msgty = 'E'.
                ls_alv_messages-msgno = '001'.
                CONCATENATE 'Task ID' ls_task_info-task_id  'is not valid.'
                            'No task profile updates done.'
                                    INTO ls_alv_messages-message SEPARATED BY space.
                APPEND ls_alv_messages TO lt_alv_messages.
                lcl_application=>render_alv( ).
                RETURN.
              ENDIF.
              APPEND ls_task_info TO ls_task_profile-task_info.
            WHEN 'R'.  " Roles
              ls_role_id = ls_input-values.
              IF lcl_application=>role_is_valid( ls_role_id ) = abap_false.
                CLEAR ls_alv_messages.
                ls_alv_messages-msgid = '00'.
                ls_alv_messages-msgty = 'E'.
                ls_alv_messages-msgno = '001'.
                CONCATENATE 'Role ID' ls_role_id   'is not valid.'
                       

Maybe you are looking for