Skip to Content
avatar image
Former Member

logo in smartform

Hi

I have difficulties to display logo which depends on company in a smartforms.

Well in the window, i have defines a graphic like that :

NAME : &LOGO&

OBJECT : GRAPHICS

ID : BMAP

in Color Bitmap Image.

in the program lines i've condition like :

if...

logo = '069'.

if...

logo = '080'.

endif.

I've defined the variable LOGO in GLoabl definition like this :

LOGO type string.

But it doesn't work!

When i fill fixed value in the variable logo, no logo is displayes..

But in the graphic window, if i force like this:

NAME : 069

OBJECT : GRAPHICS

ID : BMAP

The logo is displayed!

What i did wrong?

the declaration of logo is incorrect?

Thank you very much for your help.

Peggy.

Edited by: Peggy Delvincourt on Sep 23, 2008 11:10 AM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Sep 23, 2008 at 03:18 PM

    Hey check out this example

    Tcode SE78 is used to import graphics into the SAP system. The transaction imports the graphics and stores it

    in the BDS (business transaction server) and then it can be displayed in the form.

    · To create the graphic node , call the context menu for that node in the tree structure and choose create-

    >graphic

    · Enter a name (LOGO) for the node and the description (Logo Graphic)

    · On the general attributes determine whether a colored or a black and white

    · On General Attributes use the fields object - GRPAHIC, id u2013 BMAP and name - &G_LOGO& to identify the

    graphic. &G_LOGO& is variable and therefore we can print company code specific logo. Program line preceding

    the graphic is required.

    · Program line COMP_LOGO is used to assign the value to G_LOGO. Concatenate 'ZCOMPANY_LOGO_'

    ZXEKKO-BUKRS INTO G_LOGO. So, the name of graphic for example will be ZCOMPANY_LOGO_0202 for

    company code 0202.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 23, 2008 at 03:19 PM

    Try: DATA: logo TYPE TDOBNAME.

    Also, instead of hardcoding '069' in graph node, make the same to the variable like: logo = '069'. I've done this dynamic assign to graphic name with success.

    Regards,

    Valter Oliveira.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 23, 2008 at 03:22 PM

    Change the type of the variable to some character type say CHAR30.

    Put a break point in your code and check if your field is getting the value of the Logo or not.

    Check if the proper Image type has been selected: Black & White or Color. You can also determine this dynamically.

    Regards,

    Naimesh Patel

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Where are you assigning '069' to the LOGO? In Initialization? Try here. I checked one example I have in my system, and I passed graphic name as an interfaces variable, i.e, your "if" is in the driver program and I pass the LOGO name as a CHAR11 variable.

      But it should work as a global variable in SF.

      Regards,

      Valter Oliveira.

  • avatar image
    Former Member
    Sep 24, 2008 at 09:31 AM

    Hi peggy,

    You did nothing wrong, but you missed only one thing.

    To assign a Variable field first you have to click the button on the right side of the Name Field. If you click it the Arrow in that button will point to Leftside that means the field is a variable.

    This should surely solve your problem.

    Regards

    Karthik d

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I've chanegr, and placed the logical execution before my graphic and it is OK!!

      That's what I suspected when asked you for the location of the code.

      If the query is solved, please close the thread.

      Regards,

      Valter Oliveira.

  • avatar image
    Former Member
    Sep 24, 2008 at 12:36 PM

    Then mark the question as Answered.

    Add comment
    10|10000 characters needed characters exceeded