cancel
Showing results for 
Search instead for 
Did you mean: 

what does the Parameter attribute mean?

Former Member
0 Kudos

I am looking at proxy class generated by dot.net connector, following is the method I am looking at:

Crm_Icss_Srvreq_Create(.....) following parameter is one of the many parameters,

[RfcParameter(AbapName= "IV_CONT_ITEM_GUID",RfcType=RFCTYPE.RFCTYPE_BYTE, Optional = true, Direction = RFCINOUT.IN, Length = 16, Length2 = 16)]

[XmlElement("IV_CONT_ITEM_GUID", IsNullable=false, Form=XmlSchemaForm.Unqualified)]

byte[] Iv_Cont_Item_Guid,

what does Optional = true and IsNullable=false mean?

thanks

Yuwen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Yuwen,

Optional = True means when u call the method, u have to or not to pass this parameter in the method call as per your need by setting attribute Removed equal false or true respectively.

Optional = False means when u call the method, u have to pass this parameter in the method call.

IsNullable= False means the value of this parameter can not be NULL while u call this method.

Regards,

Vishal Gupta

Message was edited by: Vishal Gupta

Former Member
0 Kudos

sorry, I still do not quite get it. "optional=true" means I do not have to pass in parameter, but when I did not pass in any value, the value is null, but, it says, "nullable=false".

thanks

Yuwen

reiner_hille-doering
Active Contributor
0 Kudos

The two lines (two custom attributes) represent two protocolls. The RfcParameterAttribute is for RFC. It's Optional property marks the parameter to be optional. It's allowed to skip this parameter. This means that you can remove it in the .sapwsdl designer. If you didn't remove it and pass NULL, the effect is the same (at least for ReferenceTypes).

The other custom attribute XmlElementAttribute is for Soap only. It controlls the way how the Microsoft XML Serializer creates XML from the paramters. "IsNullable=false" means that the corresponding element is simple skipped on serializing. Please see Microsoft documentation for details.

Former Member
0 Kudos

Thank you so much for the explaination.

reiner_hille-doering
Active Contributor
0 Kudos

Please mark the problem as solved (the star on the left-hand side). Thanks.

Answers (0)