cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic determination of colour for Graphics in Smartforms

0 Kudos

Hello All,

We have a requirement where we need to print a logo for a smartform. All the different logos needed have been loaded and the logo to be printed is determined based on the company code of the Order being printed.

The problem is in the colour of the logo. Some logos are black and white and some are color.

In the graphic window, there are 3 options for the colour of the graphic, 1. BMON, 2. BCOL and 3. Determine Dynamically.

We want to determine the colour dynamically. I would like to know what is expected to be entered in the field next to the checkbox for 'Determine Dynamically'. Is it the logo name or something else?

Thank you for your help.

Regards,

Johnson

Accepted Solutions (1)

Accepted Solutions (1)

Vasilis
Advisor
Advisor
0 Kudos

The <i>determined dynamically</i> means that you can use a variable or a field of a structure to define the color.

For example:

- create a variable in Global definitions named V_COLOR TYPE CHAR4,

- then you can fill it, let's say, in Initialization of the form:

if company = '1000'. 
   v_color = 'BMON'.
elseif company = '2000'.
   v_color = 'BCOL'.
endif.

- finally enter in the <i>determined dynamically:</i> &V_COLOR&

For your requirement you can do the same for the name of the form so that it can also be dynamic:

For example:

- create a variable in Global definitions named V_COMPANY_FORM TYPE TDONAME,

- then you can fill it, let's say, in Initialization of the form:

if company = '1000'. 
   v_company_form = 'Z_COMPANY1000_LOGO'.
elseif company = '2000'.
   v_company_form = ''Z_COMPANY2000_LOGO'.
endif.

- finally at the logo window instead of the name of the logo, enter at <i>Name</i>: &V_COMPANY_FORM&

Answers (0)