Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to give the vairables used in the RFC for the webdnypro developer

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member223537
Active Contributor
0 Kudos

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

6 REPLIES 6

former_member223537
Active Contributor
0 Kudos

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

0 Kudos

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.

former_member223537
Active Contributor
0 Kudos

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.

0 Kudos

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

0 Kudos

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

former_member223537
Active Contributor
0 Kudos

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