‎2007 Oct 21 9:26 AM
Dear Freinds,
I have developed a custom infotype (9018). The user can maintain the data entering into the database through PA30 and portal screen as well .
The custom infotype has been developed where the employer or the employee contributes towards Insurance. We have two radio buttons a) employee b) the employer and third one the amount . So if the Employer is contributing(based on the eligibility) then he will select the employer radio button and fills the amount and vice versa this is done through PA30 .
The custom Infotype has three fields a) radio button (employer) b) radio button (self) c) Amount field.
However if the user wants to enter through portal for maintaining a Record, he can do
so by selecting the Employer or Employee (as per the scenario)
The portal screen has two fields a ) Employer b) Employee . If the Employer contributing(as the employer is paying on the behalf of the employee)he will select the Employer button to create record and if another case the employee has to make payment by himself he will select the employee button.
Now my doubt , For me to write an RFC how i can i differentiate in my RFC code whether the user has clicked Employer or Employee .
Should i write two RFC for this case when Employer is being selected one RFC and Employee being selected another RFC.
Could any one please let me know how can i found out (logic) in my code (RFC) which
one the user will select (employer or employee) then the logic for the Employer should trigger and vice versa.
Regards
Latha.
‎2007 Oct 22 2:21 AM
Hi,
I think you can differentiate between employer or employee by using IMPORT Parameter. Just create one import parameter ( example: ETYPE type string ) and passing your value ( employer or employee ).
Now in your RFC you know which one the user select.
Regards,
‎2007 Oct 22 6:42 AM
Dear Jatra,
Could you please let me know where i should call the import parameter,
if you could pls give me some peace of code as ex. it would be great help.
regards
latha.
‎2007 Oct 22 6:49 AM
Hi Latha,
In the portal, you have two radio buttons, say p_emplyr & p_emp.
The one which is selected will have value 'X'.
So in portal add code
if p_emplyr = 'X'.
CALL FUNCTION 'ZUPDATE_DATA'
EXPORTING
*EMPLOYEE =
.
elseif p_emp = 'X'.
CALL FUNCTION 'ZUPDATE_DATA'
EXPORTING
EMPLOYEE = l_empid
.
endif.Best regards,
Prashant
‎2007 Oct 22 8:26 AM
Dear Prashant
Thanks allot you have almost answered my question, so as per your answer
i can ask the portal to use the variable (radio buttons) which iam using in my RFC
i can ask him to use the same variable in portal . Right.
if you have a any piece of code which you have(as you have worked in Portal and RFC) relating the logic written in the webdynpro and the RFC(Function module) it would be great help for me. Because i dont have any idea regarind Portal, as iam only an abaper. As being an abaper i have to do an RFC for the portal.
Thanks & Regards
regards
latha.