0

I took the nice example clientPrintDescription.py and modified it to return HTML.

Now I see this:

screenshot-uc_length-is-16

Since the parameter type is RFCTYPE_TABLE I think nuc_length and uc_length don't play a role. Am I right, or do have both values (here 16) have any meaning if RFCTYPE_TABLE?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
guettli
  • 25,042
  • 81
  • 346
  • 663
  • Does this answer your question? [SAP RFC: nuc\_length vs uc\_length](https://stackoverflow.com/questions/58199184/sap-rfc-nuc-length-vs-uc-length) – Suncatcher Oct 29 '20 at 11:29
  • @Suncatcher I don't know if this answers my question, since I switched the job, and don't code ABAP any more. – guettli Oct 29 '20 at 12:38

2 Answers2

1

A variable which is a string of characters, a string of bytes, an internal table, a reference, or a boxed component, is basically a pointer which occupies statically 8 bytes in memory, and refers to another place in the extended memory.

"nuc_length" and "uc_length" have always the same value for these types. Only variables containing characters have a different value for "nuc_length" and "uc_length".

I don't understand why python shows 16 bytes for an internal table, it should be 8 bytes.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
1

I'm not familiar with Python, but I looked at the original program (printDescription.c in the samples.zip of https://wiki.scn.sap.com/wiki/x/zz27Gg ), and what this program does, explains it:

For each function module parameter it prints to total "width" of (a line of) that parameter. (Which is basically the sum of the width of all its fields plus some padding.)

So in your case: "IV_DYNAMIC_PARAMETER_LIST" is a table whose line type is a structure with two fields: "KEY" of type STRING and "VALUE" of type STRING. As Sandra already mentioned above, variable ABAP types including type STRING are realized via a pointer mechanism, so have width 8.

Two fields of width 8, no padding necessary, results in a total width of 16 for that table line type.

Lanzelot
  • 15,976
  • 4
  • 18
  • 14