10-23-2007 1:32 PM
Dear Freinds,
i an abaper i have one specific doubt regarding icon which has been selected on the portal screen.
My requirement is we have portal screen on which i have two Buttons(or links) one Self and another for Dependents. i have to write an Bapi or RFC and give it to webdynpro developer.
i have to write logic in my RFC based on the button selected on the portal screen (self or dependent) .
in my RFC function module i have used import parameters & table parameters( return value for the webdynpro to pick up) . In the table parameters i have given structure z_struc & the Z_Struc has basically three fields
a) self b) depndt c) flag.
so i have written logic as
if v_flag_self = 'A'
logic for the self of the employee
elseif v_flag_dep = 'B'.
logic for the dependent.
endif.
so any one could please let me know how i should pass on to the webdynpro
or to recognize that the value for the Self he has to consider is A
and dependent button he has to take is B. Because based ont he this flag values
(A & B) only my logic works.
how i should pass this values to him .
Regards
latha.
10-24-2007 9:18 AM
Hi,
If the flag is not already set, then depending on which button is clicked, you need to set it.
eg.
if sy-ucomm = 'SELF'.
v_flag_self = 'A'.
elseif sy-comm = 'DEP'.
v_flag_dep = 'B'.
endif.
Best regards,
Prashant
10-24-2007 6:31 AM
HI,
You can pass the flag with value S or D.
Build the logic in webdynpro considering S as self & d as dependent.
Best regards,
Prashant
10-24-2007 7:03 AM
Dear Prashant,
Thank you for replying to my question, i dint get exactly what you have
said you mean to say should i pass the value to the webdynpro as return value.
In the table parameter of the function module i am passing a structure(return values) having three fields a) self b)dependent and third fileda as a Flag.
Prashant if you have any sample code could you please give me or could you give me your mail id can send the code which i have written. so that you can correct my logic please it is little bit urgent, i think in the function module only some logic has gone wrong...so please
regards
lata.
10-24-2007 7:18 AM
Hi,
if you want to send the values to Webdynpro, then use the EXPORT parameter of the RFC.
<b>EXPORT</b>
V_FLAG_SELF type c
V_FLAG_DEP type c.
if v_flag_self = 'A'
logic for the self of the employee
V_FLAG_SELF = 'A'.
elseif v_flag_dep = 'B'.
logic for the dependent.
V_FLAG_DEP = 'B'.
endif.
So if its self, variable V_FLAG_SELF will have value 'A' else it will be blank.
Similarly if its dependent, variable V_FLAG_DEP will have value 'B' else it will be blank.
10-24-2007 9:13 AM
Dear Prashant,
As per your logic you have said int he below code as
if v_flag_self = 'A' -
.but where we r we getting this variable value A from logic for the self of the employee (where we can initialize V_flag_self = A )
LOGIC OF MY RFC for self.
V_FLAG_SELF = 'A'. -
> this ok if we have V_flag_self = A then we can send to
webdynpro the value for A.
elseif v_flag_dep = 'B'. -
logic for the dependent.
V_FLAG_DEP = 'B'.
endif.
Iam really getting confused....sorry to trouble you please .
regards
latha
10-24-2007 9:16 AM
Dear Prashant,
if you could give me your id i will send my logic so that you can please check my logic. or could you plese give to my mail id is madhuri_0820@yahoo.com, please give me a test mail so that i can send my code to you
regards
lata.
madhuri_0820@yahoo.com
10-24-2007 9:18 AM
Hi,
If the flag is not already set, then depending on which button is clicked, you need to set it.
eg.
if sy-ucomm = 'SELF'.
v_flag_self = 'A'.
elseif sy-comm = 'DEP'.
v_flag_dep = 'B'.
endif.
Best regards,
Prashant