Application Development and Automation 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: 
Read only

rfc function module issue

0 Likes
708

hi ,

i created a rfc function module with export , import and changing parameters.

In changing parameter i gave as cd_kunnr type kunnr  passbyvalue.

and then i wrote select statement

   SELECT SINGLE kunnr  INTO lv_kunnr

     FROM kna1

     WHERE kunnr = cd_kunnr.


am passing  kunnr from other system  as

CALL FUNCTION 'Z30FM_RECKAUF_LOG' DESTINATION lv_dest

  EXPORTING

    store                       = lv_store

* IMPORTING

*   VKORG                       =

*   VTWEG                       =

   CHANGING

     kunnr                       lv_kunnr

  EXCEPTIONS

    no_data_found               = 1

    no_customer_for_vkrog       = 2

    OTHERS                      = 3



here am not getting value to cd_kunnr .

can any one help me ?

4 REPLIES 4
Read only

paul_bakker2
Active Contributor
0 Likes
674

Hi,

I'm not sure what you mean. Your custom RFC is not returning a value in lv_kunnr?

If not, have you tried debugging it?

cheers

Paul

Read only

0 Likes
674

hello paul ,

my rfc function module is not receiving the values which i passed from other system . so my select statement is failing .

when i debug there is no value in cd_kunnr .

Read only

Former Member
0 Likes
674

Without knowing anything about what is going on inside the FM, it's hard to say, but you could try SELECTing using KUNNR rather than LV_KUNNR in the WHERE clause.

Rob

Read only

fredericbasilius
Participant
0 Likes
674

Hi,

As far as I know changing parameter cannot be used inside an RFC.  Try with export and import parameters. This is because RFC can be called outside the SAP System Landscape.

Please refer the below thread.

Regards,

FB