11-04-2011 7:59 AM
Dear Gurus,
I have a Problem with HR Form. I have to Add Company Logo to a payslip. I created a Window for the Logo with PE51 but How to add the Image to that Window.
Or any other method of adding a LOGO to payslip. Please Guide me.
regards
Ankit Vasavada
11-04-2011 11:10 AM
Hi,
There is a way to upload logo into you form .
THERE IS A STANDARD SMARTFORM " HR_ESS_PAYSLIP_TO_PDF "
MAKE A COPY OF IT TO Z AND CREATE A LOGO WINDOW .
UPLOAD YOUR LOGO THERE .
AND THEN IDENTIFY WHICH STANDARD PROGRAM HR PEOPLE ARE USING . ex : - HINCEDT0
2) COPY THE STANDARD PROGRAM TO Z .
3) YOU CAN FIND A INCLUDE PROGRAM -- 'RPCEDS29'
4) IN THAT INCLUDE CODE U WILL FIND FOLLOWING SUBROTINE 'PRINT_XFORM'
NOW CALL YOUR SMARTFORM IN THAT SUBROTINE .
SAMPLE CODE :
FORM print_xform USING $form TYPE tt_form.
IF NOT $form[] IS INITIAL.
DATA: $form_wa LIKE pc408.
DATA: fm_name TYPE rs38l_fnam.
DATA: pinfo TYPE pc407.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZHR_ESS_PAYSLIP_TO_PDF' ****SMARTFORM NAME
IMPORTING
fm_name = fm_name.
DATA: l_devtype TYPE rspoptype,
ls_output_options TYPE ssfcompop,
ls_output_data TYPE ssfcrescl,
ls_control_parameters TYPE ssfctrlop.
ls_control_parameters-no_dialog = 'X'.
ls_control_parameters-getotf = 'X'.
ls_output_options-TDPRINTER = 'LOCL'.
Combina SmartForm con el listado
CALL FUNCTION fm_name
EXPORTING
control_parameters = ls_control_parameters
output_options = ls_output_options
user_settings = space
pinfo = pinfo
pform = $form[]
IMPORTING
job_output_info = ls_output_data
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
DATA: l_pdf_xstring TYPE xstring,
lt_lines TYPE TABLE OF tline,
ls_line TYPE tline,
l_pdf_len TYPE i,
P_DOC TYPE DOCS occurs 0 .
Crea PDF
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
IMPORTING
BIN_FILESIZE = l_pdf_len
TABLES
OTF = ls_output_data-otfdata
DOCTAB_ARCHIVE = p_doc
LINES = lt_lines
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = l_pdf_len
CODEPAGE = ' '
FILENAME = 'C:_RESULTS.PDF '
FILETYPE = 'BIN'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = lt_lines
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'HR_EFI_SHOW_PDF_FORM'
EXPORTING
TOP_EDGE = 30
LEFT_EDGE = 20
TABLES
OTF_TABLE = ls_output_data-otfdata
.
endif.
ENDFORM. "PRINT_XFORM.
11-04-2011 9:09 AM
Isnt it the same as adding a logo in a smartform ?
try this
http://www.sap-basis-abap.com/smartforms/inserting-logo-in-smartform.htm
07-22-2014 2:05 PM
i m new to sap. so any one pls send step by step document for screen painting .
11-04-2011 9:19 AM
11-04-2011 11:10 AM
Hi,
There is a way to upload logo into you form .
THERE IS A STANDARD SMARTFORM " HR_ESS_PAYSLIP_TO_PDF "
MAKE A COPY OF IT TO Z AND CREATE A LOGO WINDOW .
UPLOAD YOUR LOGO THERE .
AND THEN IDENTIFY WHICH STANDARD PROGRAM HR PEOPLE ARE USING . ex : - HINCEDT0
2) COPY THE STANDARD PROGRAM TO Z .
3) YOU CAN FIND A INCLUDE PROGRAM -- 'RPCEDS29'
4) IN THAT INCLUDE CODE U WILL FIND FOLLOWING SUBROTINE 'PRINT_XFORM'
NOW CALL YOUR SMARTFORM IN THAT SUBROTINE .
SAMPLE CODE :
FORM print_xform USING $form TYPE tt_form.
IF NOT $form[] IS INITIAL.
DATA: $form_wa LIKE pc408.
DATA: fm_name TYPE rs38l_fnam.
DATA: pinfo TYPE pc407.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZHR_ESS_PAYSLIP_TO_PDF' ****SMARTFORM NAME
IMPORTING
fm_name = fm_name.
DATA: l_devtype TYPE rspoptype,
ls_output_options TYPE ssfcompop,
ls_output_data TYPE ssfcrescl,
ls_control_parameters TYPE ssfctrlop.
ls_control_parameters-no_dialog = 'X'.
ls_control_parameters-getotf = 'X'.
ls_output_options-TDPRINTER = 'LOCL'.
Combina SmartForm con el listado
CALL FUNCTION fm_name
EXPORTING
control_parameters = ls_control_parameters
output_options = ls_output_options
user_settings = space
pinfo = pinfo
pform = $form[]
IMPORTING
job_output_info = ls_output_data
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
DATA: l_pdf_xstring TYPE xstring,
lt_lines TYPE TABLE OF tline,
ls_line TYPE tline,
l_pdf_len TYPE i,
P_DOC TYPE DOCS occurs 0 .
Crea PDF
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
IMPORTING
BIN_FILESIZE = l_pdf_len
TABLES
OTF = ls_output_data-otfdata
DOCTAB_ARCHIVE = p_doc
LINES = lt_lines
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = l_pdf_len
CODEPAGE = ' '
FILENAME = 'C:_RESULTS.PDF '
FILETYPE = 'BIN'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = lt_lines
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'HR_EFI_SHOW_PDF_FORM'
EXPORTING
TOP_EDGE = 30
LEFT_EDGE = 20
TABLES
OTF_TABLE = ls_output_data-otfdata
.
endif.
ENDFORM. "PRINT_XFORM.
05-16-2012 10:37 AM
Hi Rajesh,
Please can you help me out. On QA I didn't have to effect the sample code you detailed above. All i did was a copy of " HR_ESS_PAYSLIP_TO_PDF " and then inserted my logo, did my necessary configs on HRFOR, EDTIN and EDPDF features and everything was perfect. However now on Production when I did exactly the same thing, the font on the payslip only changes from Black to blue and my logo is missing. Please what is it that I could have missed out. All serches on SDN tells me I have done the correct thing. The only thing I have not effected is the code in your reply above however one of the Basis guys says if i didn't configure that in QA then there is no need for it in PROD and that it is possible I have not done something.
Your help will be greatly appreciated and the responses of other gurus as well
Regards
07-22-2014 1:58 PM
hi can one explain alv interactive report in document way step by step. pls share.
regards
saranya
11-05-2011 8:57 PM
To show a picture in smartform you need firstly upload the picture in transaction SE78 than define it in the smartforms .
11-07-2011 9:14 AM
Dear Eliram
Thanks for the reply But I do not want Smart form. I have HR form already created. I m changing with PE51.
regards
Ankit V
Edited by: Ankit Vasavada on Nov 7, 2011 2:44 PM
11-10-2011 2:09 PM
we created a Smart form and Add a Logo to it and call HR forms from that smart form.
05-06-2012 4:39 PM
Hi Ankit,
Can you just brief me about the solution you have done.
1. From where did you called smartform
2. How you have call HRFROM from Smartform.
It would be help a lot
Best regards,
Gaurav
05-09-2012 8:00 AM
Hi gaurav
My ABAPer helped me by creating the copy of HINCEDT0 to ZHINCEDT0 and in that program we copied the include rpcedd09. to zrpcedd09.
and ABAPer refferd the solution given by rajesh in this thread,
hope ABAPer can do some thing for this,
regards
Ankit Vasavada