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

set multiple default values to RFC

Former Member
0 Likes
1,870

Hi all,

     

      can we assign multiple default values for RFC's to import parameter.

Regards,

Hemanth Reddy.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,681

No

Regards,

Raymond

11 REPLIES 11
Read only

Former Member
0 Likes
1,681

You can only set one default value to one parameter.

The default value is what will be put in the parameter if a value is not supplied in the call.

For your purposes, what is your intent in having multiple values?  Maybe there is another way.

Neal

Read only

former_member420878
Active Participant
0 Likes
1,681

please elaborate your query.

otherwise for Import parameters we can have only 1 default value.

Thanks

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,682

No

Regards,

Raymond

Read only

0 Likes
1,681

HI Giuseppi,

                  Is thai any way to assign,for example by using 'OR' or 'AND' conditions.

Regards,

Hemanth.

Read only

0 Likes
1,681

An RFC can take a table parameter.  The table can be a range.  Ranges can be used in an "IN".

Would that help?

Neal

Read only

0 Likes
1,681

You cannot put multiple values in an IMPORT/EXPORT parameter, so default value can only have one value, even if it is internally an internal table. We don't manage FM like transactions SELECTION-SCREEN.

Else you could define your import parameter as an internal table (ddic internal table type) and in the code use something like

IF it_inttab IS INITIAL.

   APPEND value1 to lt_inttab.

   APPEND value2 to lt_inttab.

ELSE.

  lt_inttab = it_inttab.

ENDIF.

And use lt_inttab in the fllowing code so your FM would perfrom like it had a default value for an internal table ?

Regards,

Raymond

Read only

0 Likes
1,681

Hi ,

No it is not possible, default can be set as single value and not multiple.

Regards,

Vinodkumar.

Read only

former_member196490
Active Participant
0 Likes
1,681

There can be only one default value for each importing parameters. If you want the default value to be set based on different conditions you can program the same.

Please elaborate if you need more help

Read only

pankaj_sandanshi
Product and Topic Expert
Product and Topic Expert
0 Likes
1,681

Hi Hemant,

It is not possible to set assign multiple default values for RFC's to import parameter. There can be only one default value for import parameter.

Regards

Pankaj

Read only

Former Member
0 Likes
1,681

Hemanth,

You can have default values for every single input parameter in your RFC.

But for one parameter, you can have only one default value.

Read only

arindam_m
Active Contributor
0 Likes
1,681

Hi,

Multiple default Values... bit confusing as default values can be only one that's why its default value its the value when no other is used. But looking at it are you looking at limiting the values to definite multiple values?

Cheers,

Arindam