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

input required- urgent

Former Member
0 Likes
2,803

hi all,

i am writing one rfc function module it contains only one input parameter i.e name when i am entering sun* as input parameter it showing the data correctly when i am entering the input as SUNX Limited. in debugging it is considering this input as SUNX LIMITED for this input we dont have data input in kna1 table.

i am sending my code below. please tell me where i made a mistake.

ranges : r_siteinfo for kna1-name1.

r_siteinfo-sign = 'I'.

r_siteinfo-option = 'CP'.

r_siteinfo-low = iv_name1.

append r_siteinfo.

clear r_siteinfo.

select kunnr

name1

ort01

pstlz

from kna1

into table et_siteinfor

where name1 in r_siteinfo and "IV_NAME1 AND

katr1 ne '05' and

ktokd = '0001'.

thanks,

maheedhar.t

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,781

use like instead of in

where name1 like r_siteinfo and "IV_NAME1 AND

Hope this will solve ur problem..

<b><u>Dont forget to reward all the useful replies</u></b>

Sudheer

hi all,

i am writing one rfc function module it contains only one input parameter i.e name when i am entering sun* as input parameter it showing the data correctly when i am entering the input as SUNX Limited. in debugging it is considering this input as SUNX LIMITED for this input we dont have data input in kna1 table.

i am sending my code below. please tell me where i made a mistake.

ranges : r_siteinfo for kna1-name1.

r_siteinfo-sign = 'I'.

r_siteinfo-option = 'CP'.

r_siteinfo-low = iv_name1.

append r_siteinfo.

clear r_siteinfo.

select kunnr

name1

ort01

pstlz

from kna1

into table et_siteinfor

where name1 in r_siteinfo and "IV_NAME1 AND

katr1 ne '05' and

ktokd = '0001'.

thanks,

maheedhar.t

24 REPLIES 24
Read only

Former Member
0 Likes
2,781

anybody can please respond to my post its urgent for me.

thanks in advance.

Maheedhar.T

Read only

0 Likes
2,781

Hi

Just Try This.......

SELECT-OPTIONS: r_siteinfo FOR kna1-name1 LOWER-CASE.

Reward All Helpfull Answers......

Read only

former_member225631
Active Contributor
0 Likes
2,781

Declare like this.

select-options r_siteinfo for kna1-name1 lower case no-display.

Read only

0 Likes
2,781

hi,

i am writing rfc function module how i can write select option statement?

Read only

former_member225631
Active Contributor
0 Likes
2,781

In your sample code where you have written ranges declaration? In same way try with the select-options. Or elabrate the problem.

Read only

Former Member
0 Likes
2,781

use like

Read only

Former Member
0 Likes
2,782

use like instead of in

where name1 like r_siteinfo and "IV_NAME1 AND

Hope this will solve ur problem..

<b><u>Dont forget to reward all the useful replies</u></b>

Sudheer

Read only

0 Likes
2,781

i tried like this also same problem is coming....

Read only

0 Likes
2,781

the rfc's import parameter has to use a data type where lower case is marked (you want it to be case sensitive right?)

for example this data element (NAME1_GP) can be referred.

Raja

Read only

0 Likes
2,781

HI ALL,

problem is when i am giving input in small letters in debug mode it is considering in capital letters . this is not required in my program. if i am giving input in small letter it has to consider as small letter only. if iam giving capital letters it has to consider as capital letter . this is my requirement.

thanks,

maheedhar.t

Read only

0 Likes
2,781

what is the type of import parameter you have used

Read only

0 Likes
2,781

IV_NAME1 TYPE NAME1_GP

eventhough when i declare like char30 or name1 also same problem is coming.

thanks,

maheedhar.t

Read only

0 Likes
2,781

if u want u can write this rfc its very small rfc.

inout is name1

based on this inout i am writing select query as follows...

select kunnr

name1

ort01

pstlz

from kna1

into table et_siteinfor

where name1 in r_sitein and "IV_NAME1 AND

katr1 ne '05' and

ktokd = '0001'.

for this i declared ranges as follows...

ranges : r_sitein for kna1-name1.

r_sitein-sign = 'I'.

r_sitein-option = 'CP'.

r_sitein-low = iv_name1.

append r_sitein.

clear r_sitein.

at the beginig of debug mode plz check iv_name1 value is showing in capital letters when we search the entry in master table kna1 there is no entry with that name. this is the problem. my question is why it is considering as capital letters..

Read only

0 Likes
2,781

make sure that the type name1 assigned to inout supports lowercase .

(double click on name1 to navigate to dataelement->then to domain where lower case check box should be checked)

and for ranges change the code as follows.

data: r_sitein type RSELOPTION ,

wa_data type RSDSSELOPT .

wa_data-sign = 'I' .

wa_data-option = 'CP'.

wa_data-low = iv_name1.

append wa_data to r_sitein.

clear wa_data.

this should work fine.

Read only

0 Likes
2,781

hi durai raj,

i tried in this way also. problem is when i am going to debug mode at the first when i enter iv_name it is showing input data in capital letter wventhogh when i entet input data in small letters.

and chenbox is checked for the corresponding dataelemets.

thanks,

maheedhar.t

Read only

0 Likes
2,781

surprising. are you sure that the data passed is in mixed case?

Read only

0 Likes
2,781

HI ,

Same problem.

in debug mode at the begining of the line iv_name1 is showing in capital letter when i enter the name in small letters. this is the problem onc eit is fixed . then this rfc should work fine. and that checkbox is checked in the data element.

thanks,

maheedhar.t

Read only

0 Likes
2,781

my input parameter is : SUNX Limited

in debug it is considering in capital letter where as in KNA1 there is no entry with capital letter. this is the problem.

Maheedhar.T

Read only

0 Likes
2,781

Hi Maheedhar,

If you are using transaction SE37 to test your the function in debug then any input will always be converted to upper case. On later releases transaction SE37 comes with a checkbox marked "Uppercase/Lowercase" allowing you to test without your input switching to Uppercase.

In your case write a very simple test program that calls your function, run this program in debug mode and no conversion will take place.

Hope it helps

Read only

0 Likes
2,781

good catch Surbjeet Dhillon . Maheedar are you testing from se37?

Read only

0 Likes
2,781

hi durairaj,

issue solved thanks for ur help ......

i am giving points to you.

thanks again.

Maheedhar.t

Read only

0 Likes
2,781

Just curious what was the solution?

Read only

0 Likes
2,781

Surbjeet Dhillon , my guess is that your point would have resolved the issue for him

Maheeder , if thats the case you should award the resolved points to Surbjeet Dhillon

Read only

0 Likes
2,781

Durairaj are you saying I need the points? HA HA just kidding, very kind of you to offer though, thanks.