on 10-07-2009 12:09 PM
Hi,
I have a FM "HRCA_GETEMPLOYEEDATA_FROMUSER" which retrieves the employee master details for the user whoever logged in ECC. This User id is attached to pernr in HR.
I have copied this FM to "Z" and made changes to import paratemer (USERNAME) as default value to SY-UNAME.
I run this FM in se37, it is picks the logged in user id by default as import parameters and retrives the employee details from Infotype.
However, I have created WD ABAP component using service call with Import and export parameters. Created the context mapping with the view controller via Input fields, submit button (with Actions to execute FM) and table element with data binding to display output details.
However, it throws error message as "No active nametab exists for SY". When I run this application in IE it says USER_NOT_FOUND.
Does the import parameter SY-UNAME of logged user is not allowed to pass in WD ABAP ? Then how to proceed with this one to implement ESS applications using WD ABAP. How the FM should be designed for ESS to used for WD ABAP applications.
Please share your inputs.
Regards,
Anil Kumar
hi Anil ,
u cn use sy-uname for the logged on user ,r u doing it this way
call function 'HRCA_GETEMPLOYEEDATA_FROMUSER'
exporting
username = sy-uname
validbegin = sy-datum
importing
employeenumber = lv_pernr
exceptions
user_not_found = 1
countrygrouping_not_found = 2
infty_not_found = 3
call_others = 4
others = 5.
it works for me ..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amith,
I am not using import function module (via pattern button) in code as we use in native ABAP. A service call has been created for the FM with import and export parameters for the component controller and mapped these with view controller.
At runtime in IE, user has to confirm his emp ID and click on submit button to retrieve the details in Table element. A simple example similar to "BAPI Usage" tutorials.
Regards,
Anil Kumar.
Perhaps you should post your coding here. SY-UNAME is just as usable in WDA as in any other ABAP application. Have you set a breakpoint and checked the value of SY-UNAME at runtime? Is your application running in the portal? If so, are you using user mapping or SSO - are you sure that the user is being set correctly from the Portal is the gist of that question.
Hi Thomas,
Problem has been resolved. It was only warning message while activation of WD ABAP component (No active nametab exists for SY)
Coding is not much from WD ABAP side. Once service call has been created to WD ABAP component, context mapping is done via component controller to View controller with necessary export parameter.
And the FM is executed in "WDDOINIT" method of view at runtime.
DATA lo_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER .
lo_COMPONENTCONTROLLER = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->execute_zhrca_getemployeedata_(
).
Output is displayed via a Table element throug data binding.
User ids are same in ECC and Portal as well. SSO is also implemented successfully in the landscape.
WD ABAP execute fine in Portal via WD ABAP iview.
Thank you very much for your inputs.
Regards,
Anil kumar
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.