cancel
Showing results for 
Search instead for 
Did you mean: 

Field padding removed in .NET connector?

Former Member
0 Kudos

Hi,

Is there any functionality within the .NET connector to remove "spaces" from the end of a field? We have a field of 134 characters that when padded with spaces at the end will be seen by the .NET app as containing less. If we fill up the entire field with "non-space" characters we see the proper length.

In SAP the field is being sent with the proper spaces.

We've had to program a workaround where .NET counts the field length and adds the appropriate spaces to the end in order for the data to be correct. Is this a behaviour of the .NET connector? Is there any way to disable this behaviour?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Is there anything further you can tell me about this? I would like to know if removing field padding could be optional in future releases of the .NET connector.

Former Member
0 Kudos

Hi,

I don't think so. Anyway, it is just a matter of one or two lines of code.

Regards,

Guangwei

Former Member
0 Kudos

Hi,

Also, for transfering binary data like PDF file, using fields of ABAP type X (CLR type Byte) seems to be more suitable than using ABAP C fields (CLR String).

Regards,

Guangwei

Former Member
0 Kudos

Yes, the scenario is the we would like to present customers with copies of invoices online. We are using the fields to send the PDF file from SAP to a website. Unfortunately, since the .NET connector removes "unecessary" padding, the files end up corrupt unless we add in the spaces after the fact.

Former Member
0 Kudos

Hello,

Yes, it is the .NET Connector that removes trailing "spaces" from a character (ABAP C) field when getting data from SAP because the trailing "spaces" are insignificant in ABAP. There is no way, in my opinion also seems no reason ,to disable this behaviour.

Can you explain the scenario where it is necessary to add the appropriate spaces to the end of a field? Are you concatenating fields of a structure and depending on the trailing spaces to keep the offsets correct?

Regards,

Guangwei