cancel
Showing results for 
Search instead for 
Did you mean: 

COMPANY LOGO in HR FORM

Former Member
0 Kudos

Dear All,

I have designed Payslip in 46C throgh HR form deesigner

PE51 . Now I want to add my company logo .

How I do it.

Any possiblities ?

Regards

Siladitya

Accepted Solutions (0)

Answers (3)

Answers (3)

ChrisSolomon
Active Contributor
0 Kudos

This is done with the BACKGROUND attrib. However, this assumes you have a pre-printed form and are not printing the image also. There are no elements that allow for the same functionality as SAPScript, SmartForms, etc. The only elements are:

Language-dependent:

-Group text for a group in a window

-Background

-Text modules

-Documentation

Language-independent:

-Attributes

-Windows

-Group and subgroups in a window

-Individual fields

-Line layout

-Cumulation identifiers

-Rules

None of which allow for display/printing of an image.

From SAP doc...

Background=================

Definition

The form background contains information that is usually included in a prepared form (for example, the name of the form, the name of the enterprise, or a graphic). This information is always printed in the same position in the form and does not vary.

Structure

The form background is set up using lines. You must define all lines in a form. This means that lines containing only individual fields or windows need to be defined as blank lines on the form background. If you are using form templates, a blank page must be set up with the corresponding number of line as the form background. You can edit the documentation in the Form Editor under Background ® Change.

Integration

When you create a form, you must decide whether the information can be modified. If you need to change the information frequently, specify this in the individual fields.

Former Member
0 Kudos

Hi,

Thanks for your suggestion . It helps me to deal with

some other problem.

But regarding this problem. I am using TCODE PE51 for

developing HR form and this form I am using for

displaying and printing PAYSLIP.

In PE51 there is no options (as fas as my knowledge is concern) for GRphic import . You have any idea ?

Or any other way to display the logo in payslip

printing using HR form developed through PE51.

Thanks and Regards

Siladitya

Former Member
0 Kudos

Siladitya:

I have the same problem. Did you find the solution?

Thanks.

Ariel.

Former Member
0 Kudos

Hi,

Have a look into his code

Insert image onto SAP screen

This is very simple to do, first create a dialog program with one screen (any number i.e. 0100) and create a custom control called 'CUST_CONTROL'. Now use the below sections of code to create a top include and a PBO module/process. And then finally create a transaction code for it. This version does not work for version 4.6 so click here for alternative code.

CONSTANTS: CNTL_TRUE TYPE I VALUE 1,

CNTL_FALSE type i value 0.

data:

h_picture type ref to cl_gui_picture,

h_pic_container type ref to cl_gui_custom_container.

  • h_tree type ref to cl_gui_list_tree,

  • h_docking type ref to cl_gui_docking_container,

  • h_application type ref to lcl_application.

data: graphic_url(255),

graphic_refresh(1),

g_result like cntl_true.

data: begin of graphic_table occurs 0,

line(255) type x,

end of graphic_table.

data: graphic_size type i.

----


***INCLUDE ZDISPLAYIMAGEPBO .

----


&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


module STATUS_0100 output.

data: l_graphic_xstr type xstring,

l_graphic_conv type i,

l_graphic_offs type i.

CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp

EXPORTING

p_object = 'GRAPHICS'

p_name = 'ENJOY' "IMAGE NAME - Image name from SE78

p_id = 'BMAP'

p_btype = 'BMON'

RECEIVING

p_bmp = l_graphic_xstr

EXCEPTIONS

not_found = 1

OTHERS = 2.

  • IF sy-subrc = 1.

  • MESSAGE e287 WITH g_stxbitmaps-tdname.

  • ELSEIF sy-subrc <> 0.

  • MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

  • WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

  • EXIT.

  • ENDIF.

graphic_size = XSTRLEN( l_graphic_xstr ).

CHECK graphic_size > 0.

l_graphic_conv = graphic_size.

l_graphic_offs = 0.

WHILE l_graphic_conv > 255.

graphic_table-line = l_graphic_xstr+l_graphic_offs(255).

APPEND graphic_table.

l_graphic_offs = l_graphic_offs + 255.

l_graphic_conv = l_graphic_conv - 255.

ENDWHILE.

graphic_table-line = l_graphic_xstr+l_graphic_offs(L_GRAPHIC_CONV).

APPEND graphic_table.

CALL FUNCTION 'DP_CREATE_URL'

EXPORTING

type = 'image' "#EC NOTEXT

subtype = cndp_sap_tab_unknown " 'X-UNKNOWN'

size = graphic_size

lifetime = cndp_lifetime_transaction "'T'

TABLES

data = graphic_table

CHANGING

url = graphic_url

EXCEPTIONS

  • dp_invalid_parameter = 1

  • dp_error_put_table = 2

  • dp_error_general = 3

OTHERS = 4 .

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

EXIT.

ENDIF.

create object h_pic_container

exporting container_name = 'CUST_CONTROL'.

create object h_picture exporting parent = h_pic_container.

call method h_picture->load_picture_from_url

exporting url = graphic_url

importing result = g_result.

endmodule. " STATUS_0100 OUTPUT

Check this link too

http://www.sapdevelopment.co.uk/tips/tips_sapalogo.htm

http://www.sap-img.com/workflow/work-004.htm

http://www.sap-img.com/abap/alv-logo.htm