0

I am trying to fix a bug in the Form Painter which is related to the VBDKR-WAERK. The problem is as shown in the screenshot below:

enter image description here

So in place of VBDKR-WAERK should be EUR. The code in Form painter for this part is:

&VBDKR-ZTERM_TX1(IC)&
&'(='SKONTOWERT1(ICZ)' VBDKR-WAERK&)'&
&VBDKR-ZTERM_TX2(IC)&
&'(='SKONTOWERT2(ICZ)' VBDKR-WAERK&)'&
&VBDKR-ZTERM_TX3(IC)&

SKONTOWERT1 and SKONTOWERT2 are type KOMVD-KWERT.

May anyone know what the problem may be? Please do tell me if you need additional information.

Thank you all in advance!

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Frank
  • 153
  • 3
  • 17

2 Answers2

3

Field names in SAPScript always have to be entered with leading and closing '&':

VBDKR-WAERK& => &VBDKR-WAERK&

&VBDKR-ZTERM_TX1(IC)&
&'(='SKONTOWERT1(ICZ)' &VBDKR-WAERK&)'&
&VBDKR-ZTERM_TX2(IC)&
&'(='SKONTOWERT2(ICZ)' &VBDKR-WAERK&)'&
&VBDKR-ZTERM_TX3(IC)&
József Szikszai
  • 4,791
  • 3
  • 14
  • 24
2

Although the question is not about Smart Forms, I just saw that SAPScript and Smart Forms interpret differently the notation &'pre-text'symbol'post-text'&. SAPScript accepts symbols in pre-text and post-text, but Smart Forms doesn't (with &'(='SKONTOWERT1(ICZ)' &VBDKR-WAERK&)'&, I get the exception FORMATTING_ERROR, message ID SSFCOMPOSER, message number 308, message "Fields within fields are not allowed (SKONTOWERT1).").

This notation works in both technologies:

(=&SKONTOWERT1(ICZ)& &VBDKR-WAERK&)

meaning

  • Text "(="
  • followed by variable/symbol SKONTOWERT1 (with ICZ being 3 individual characters each meaning respectively initial value (zero) not output, compress spaces, omit leading zeroes)
  • followed by one space
  • followed by variable/symbol VBDKR-WAERK
  • followed by text ")"
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48