How to fetch Employee Picture in Smartforms
Hi Experts
Please help me out in getting employee picture in Smartforms
I have used the following FMs
1. HR_IMAGE_EXISTS
2. SCMS_DOC_URL_READ
By using these two FM i got the URL and i am able to get the picture in my Report Program,by using FM 'ISM_URL_SHOW'.
But Please tell how to get this picture in Smartform .
As i am generating Employee Biodata and in that i need employee Picture.
Please HELP me ....
Thanks & Regards
Shaveta Prabhakar
Hi Shaveta,
The question has been raised earlier as well on SDN.
Please search for 'Smartforms dynamic picture' on sdn and you will get a good number of solutions.
The one answer which i found to be promising one is the one which mentioned somethig like:
<b>Create a graphic node in the Smartform and under the tab 'General Attributes' fill the Name, Object and Id with variables (e.g. &NAME&, &OBJECT& and &ID&) and fill these parameters to get the picture you want at runtime.</b>
See if this helps.
check this link too
smartforms dynamic logo
and revert for more clarifications if any.
<b>Always reward points to useful suggestions.</b>
regards,
Vikas
Similar Messages
-
How to get Employee Picture in Smartforms
Hi Experts
Please help me out in getting employee picture in Smartforms
I have used the following FMs
1. HR_IMAGE_EXISTS
2. SCMS_DOC_URL_READ
By using these two FM i got the URL and i am able to get the picture in my Report Program,by using FM 'ISM_URL_SHOW'.
But Please tell how to get this picture in Smartform .
As i am generating Employee Biodata and in that i need employee Picture.
Please HELP me ....
Thanks & Regards
Shaveta PrabhakarHi,
U need pictures in smartforms for that just try this one I think so it will help full to u.
First Upload that picture in the se78 that photo must be in the bitmapformat(picture.bmp).
steps are:
goto se78>graphics->import--->it asks the file path here,fill those details
Then goto Smartform--->In which page u want to put the picture,
there click that page and goto Background picture,
here give the name of that picture and select the resolution and positin of the picture there.
Then u will get the picture in the output.
Regards,
Surya -
Put employee picture in Smartform
Hi,
I have a problem... I have to put in a smartform The employee picture ( like PA20 or PA30 )
I checked the following functions :
HR_ESS_WHO_PROG_GET_PICT_URI
HR_ESS_WHO_PROG_GET_PICTURE
But Those aren`t the solution ...
Somebody has an idea to solve my problemHi,
For putting the Picture in the smartform you must have employee's picture in the system.
Then fetch that picture from the table based on the employee number and call this picture in the smartform dynimcally as per the employee records.
First to findout in which table the pictures are getting saved and whats the logic for retreiveing those pictures.
With Regards,
Sumodh.P -
How to upload employees picture thru API
Hi All,
Can anybody say me how to upload the employees pictures thru PER_IMAGE_UPLOAD_PKG.LOAD(). Here i am having 2500 employees photos.
and if it is step wise manner it will be more helpful and where we have to place the pictures in server , in which locationOkay. This is pretty old code, and I don't quite remember how it works entirely, but here it is. I created a Formbuilder form with some custom java beans to read the directory where the badge photos resided, and create a SQL*Loader control file for each .jpg file. Here is the main code, from the client_pkg package and the OK button when-button-pressed trigger:
PACKAGE client_pkg IS
staging_dir varchar2(200) := 'c:\userapps\empphotos';
photo_dir varchar2(200) := '\\Netser1\server dir\APPD\Human Resources Badging System\Photos';
template varchar2(2000) := 'options (bindsize 400000)' || chr(10)
||'load data' || chr(10)
||'infile ''$INFILE$'' "fix $FILESIZE$"' || chr(10)
||'$OPERATION$' || chr(10)
||'into table per_images' || chr(10)
||'(image raw ($FILESIZE$), -- filesize' || chr(10)
||'parent_id constant $PERSON_ID$,' || chr(10)
||'table_name constant "PER_PEOPLE_F",' || chr(10)
||'image_id char "hr.per_images_s.nextval")' || chr(10)
missing_template varchar2(2000) := 'options (bindsize 400000)' || chr(10)
||'LOAD DATA' || chr(10)
||'INFILE ''$INFILE$'' "fix $FILESIZE$"' || chr(10)
||'$OPERATION$' || chr(10)
||'INTO TABLE lac.lac_photo_dir' || chr(10)
||' (IMAGE raw($FILESIZE$) -- filesize' || chr(10)
||' , FILENAME constant "$FILENAME$"' || chr(10)
||' , FILESIZE constant $FILESIZE$' || chr(10)
||' , FILEDATE constant "$FILEDATE$"' || chr(10)
||' )' || chr(10)
END client_pkg;
--OK Button - When-Button-Pressed
declare
alert_msg varchar2(2000);
button_pressed number;
in_file Text_IO.File_Type;
out_file Text_IO.File_Type;
log_file Text_IO.File_Type;
v_buffer varchar2(200);
v_ctl_txt varchar2(2000);
v_dir_find_string varchar2(20) := 'Directory of ';
v_dirstring varchar2(200);
v_pos integer;
v_slash varchar2(2) := '\';
v_filesize varchar2(20);
v_filename varchar2(20);
v_ctl_filename varchar2(120);
v_log_filename varchar2(120);
v_operation varchar2(20);
v_emp_num varchar2(20);
v_emp_name varchar2(80);
v_payroll_id number;
v_person_id number;
v_load_count integer;
v_qry_count integer;
v_instance varchar2(20);
v_username varchar2(20);
v_password varchar2(20);
v_connect_string varchar2(100);
v_exec_string varchar2(200);
v_success_count integer;
v_beg_pos integer;
v_end_pos integer;
cursor c_badges(p_payroll_id in number) is
select xref.emp_num
, ppf.employee_number || ' - ' || ppf.full_name emp_name
, xref.filename
, ppf.person_id
, decode(pi.image_id, null, 'N', 'Y') image_exists_yn
from hr.per_all_people_f ppf
, hr.per_all_assignments_f paf
, lac.lac_emp_badge_xref xref
, hr.per_images pi
where paf.person_id=ppf.person_id
and xref.emp_num = ppf.employee_number
and sysdate between ppf.effective_start_date and ppf.effective_end_date
and sysdate between paf.effective_start_date and paf.effective_end_date
and paf.assignment_type<>'B'
-- and paf.payroll_id = p_payroll_id
and lower(filename) like '%.jpg'
-- and ppf.employee_number in ('00012','08278') -- Temp debugging line
and pi.parent_id(+) = paf.person_id
order by emp_num
cursor c_photo_dir is
select xr.emp_num
, pd.filename
, pd.filesize
, pd.filedate
from lac.lac_emp_badge_xref xr
, lac.lac_photo_dir pd
where xr.filename(+) = pd.filename
and xr.emp_num is null
and lower(pd.filename) like '%.jpg'
order by pd.filename
begin
break;
:System.Message_Level := '5';
v_instance := get_application_property(CONNECT_STRING);
v_username := get_application_property(USERNAME);
v_password := get_application_property(PASSWORD);
v_connect_string := v_username || '/' || v_password || '@' || v_instance;
if :replace_cb = 'Y' then
v_operation := 'Replace';
else
v_operation := 'Append';
end if;
v_load_count := 0;
set_custom_property('FILEIO_BEAN',1,'SOURCEDIR',:photo_file_dir);
set_custom_property('EXEC_BEAN',1,'CMDSTRING','echo TEST');
for v_badges in c_badges(to_number(:payroll_list))
loop
:work_file := v_badges.filename;
set_custom_property('FILEIO_BEAN',1,'SOURCEFNAME',:work_file);
v_filesize := get_custom_property('FILEIO_BEAN',1,'FILELENGTH');
-- alert_msg := 'File Size for ' || :work_file || ' = ' || v_filesize || chr(10);
-- SET_ALERT_PROPERTY('GENERIC_ALERT',ALERT_MESSAGE_TEXT, alert_msg);
-- button_pressed := Show_Alert('GENERIC_ALERT');
if v_badges.image_exists_yn = 'Y' then
delete from hr.per_images
where parent_id = to_number(v_badges.person_id);
commit;
end if;
v_ctl_txt := client_pkg.template;
v_ctl_txt := replace(v_ctl_txt, '$OPERATION$', v_operation);
v_ctl_txt := replace(v_ctl_txt, '$INFILE$', :photo_file_dir || v_slash || v_badges.filename);
v_ctl_txt := replace(v_ctl_txt, '$FILESIZE$', v_filesize);
v_ctl_txt := replace(v_ctl_txt, '$PERSON_ID$', v_badges.person_id);
v_ctl_filename := 'sqlldr' || v_badges.emp_num || '.ctl';
v_ctl_filename := :staging_dir || v_slash || v_ctl_filename;
v_log_filename := replace(v_ctl_filename,'.ctl','.log');
out_file := Text_IO.Fopen(v_ctl_filename, 'w');
text_io.put_line(out_file, v_ctl_txt);
text_io.fclose(out_file);
v_exec_string := 'sqlldr ' || v_connect_string || ' control=' || v_ctl_filename
|| ' log=' || v_log_filename;
-- alert_msg := 'before, v_exec_string= ' || v_exec_string || chr(10);
-- SET_ALERT_PROPERTY('GENERIC_ALERT',ALERT_MESSAGE_TEXT, alert_msg);
-- button_pressed := Show_Alert('GENERIC_ALERT');
:emp_name := v_emp_name;
synchronize;
set_custom_property('EXEC_BEAN',1,'CMDSTRING',v_exec_string);
-- alert_msg := 'after, v_exec_string= ' || v_exec_string || chr(10);
-- SET_ALERT_PROPERTY('GENERIC_ALERT',ALERT_MESSAGE_TEXT, alert_msg);
-- button_pressed := Show_Alert('GENERIC_ALERT');
v_operation := 'Append';
v_load_count := v_load_count + 1;
exit when v_load_count >= nvl(:proc_limit,99999);
end loop;
set_custom_property('EXEC_BEAN',1,'CMDSTRING','echo TEST');
if false then
v_operation := 'Append';
for v_photo_dir in c_photo_dir
loop
v_pos := instr(v_photo_dir.filename,'.jpg');
v_end_pos := v_pos - 1;
v_pos := instr(v_photo_dir.filename,'-',-1,1);
if v_pos > 0 then
v_beg_pos := v_pos + 1;
else
v_beg_pos := 1;
end if;
v_emp_num := lpad(substr(v_photo_dir.filename,v_beg_pos, v_end_pos + 1 - v_beg_pos),5,'0');
v_payroll_id := to_number(:payroll_list);
begin
select ppf.employee_number || ' - ' || ppf.full_name
, ppf.person_id
into v_emp_name
, v_person_id
from hr.per_all_people_f ppf
, hr.per_all_assignments_f paf
, hr.per_images pi
where paf.person_id=ppf.person_id
and sysdate between ppf.effective_start_date and ppf.effective_end_date
and sysdate between paf.effective_start_date and paf.effective_end_date
and paf.assignment_type<>'B'
and pi.parent_id(+) = paf.person_id
and decode(pi.image_id, null, 'N', 'Y')='N'
and ppf.employee_number = v_emp_num
-- and paf.payroll_id = v_payroll_id
exception
when no_data_found then
v_emp_name := null;
v_person_id := null;
when others then
alert_msg := 'Error looking up Employee: ' || v_emp_num || chr(10) || sqlerrm;
SET_ALERT_PROPERTY('GENERIC_ALERT',ALERT_MESSAGE_TEXT, alert_msg);
button_pressed := Show_Alert('GENERIC_ALERT');
raise form_trigger_failure;
end;
if v_person_id is not null then
:work_file := v_photo_dir.filename;
v_ctl_txt := client_pkg.template;
v_ctl_txt := replace(v_ctl_txt, '$OPERATION$', v_operation);
v_ctl_txt := replace(v_ctl_txt, '$INFILE$', :photo_file_dir || v_slash || v_photo_dir.filename);
v_ctl_txt := replace(v_ctl_txt, '$FILESIZE$', v_photo_dir.filesize);
v_ctl_txt := replace(v_ctl_txt, '$PERSON_ID$', v_person_id);
v_ctl_filename := 'sqlldr' || v_emp_num || '.ctl';
v_ctl_filename := :staging_dir || v_slash || v_ctl_filename;
v_log_filename := replace(v_ctl_filename,'.ctl','.log');
out_file := Text_IO.Fopen(v_ctl_filename, 'w');
text_io.put_line(out_file, v_ctl_txt);
text_io.fclose(out_file);
v_exec_string := 'sqlldr ' || v_connect_string || ' control=' || v_ctl_filename
|| ' log=' || v_log_filename;
-- alert_msg := 'before, v_exec_string= ' || v_exec_string || chr(10);
-- SET_ALERT_PROPERTY('GENERIC_ALERT',ALERT_MESSAGE_TEXT, alert_msg);
-- button_pressed := Show_Alert('GENERIC_ALERT');
:emp_name := v_emp_name;
synchronize;
set_custom_property('EXEC_BEAN',1,'CMDSTRING',v_exec_string);
-- alert_msg := 'after, v_exec_string= ' || v_exec_string || chr(10);
-- SET_ALERT_PROPERTY('GENERIC_ALERT',ALERT_MESSAGE_TEXT, alert_msg);
-- button_pressed := Show_Alert('GENERIC_ALERT');
v_operation := 'Append';
v_load_count := v_load_count + 1;
-- exit when v_load_count >= nvl(:proc_limit,99999);
end if;
end loop;
set_custom_property('EXEC_BEAN',1,'CMDSTRING','echo TEST');
return;
end if;
exit_form;
exception
when no_data_found then
Text_IO.Fclose (in_file);
exit_form;
when others then
text_io.fclose(in_file);
text_io.fclose(out_file);
alert_msg := 'Error outside loop: ' || chr(10) || sqlerrm;
SET_ALERT_PROPERTY('GENERIC_ALERT',ALERT_MESSAGE_TEXT, alert_msg);
button_pressed := Show_Alert('GENERIC_ALERT');
raise form_trigger_failure;
end;
Hope that helps.............Dave -
How to Print Employee Photo using Smartform
Dear All,
I have requirement to print Employee photo using Smartform.
Here I want to give breif backgorund to uploading employee image procedure,we are uploading employee Image using transaction code OAOH by providing Business Object PREL and Document Type HRICOLFOTO. Click on create button on second screen by providing employee Code XXXXXXX and infotype 0002 after click on enter button system ask path for uploading image file.After storing image we can see the employee image by using transaction code PA30 after passing employee code.
These employee image I want to print in Smartform layout.If any body have done this type of the requirement.Pl.explain me .
Thanks ,
RegardsHi ABAP Programmer,
Refer this link
i want to retrieve a photo image of an Employee to display in smartforms
Regards,
Sravanthi -
How to upload chunks of Jpeg pictures in smartform using BDC.
helo expert,
Could you please tell me how can i upload pictures in sap tables using bdc or something else.
actually i would like to display pics as a field value dynamically in samrtforms while printing an invoice.
IS there any facility to upload JPEG type pics because i need clarity in pics while printing ?
Thanks........
Santosh.............Use the standard process and BMP's uploaded into the graphics manager. BMP's work fine for photos and you can mass upload them directly using the code from SE78 via LSMW or a program (no BDC required) and then call them dynamically in your smartforms.
-
Displaying Employee Photo in smartform in SAP-HR
hi all,
how can i display employee photo in smartform which is not uploaded in the sytem with tcode se78 but throgh diff tcode (OAAD) by HR functional. There are mainly two parts: 1. Procedure to retrieve that photo from the system
2. Display it in the smartform.
This photo is stored as graphics and so in smartform i am unable to put the name in graphic option which we normally follow.Please suggest what can i do.
Regards
RajTHe below links should help you
Smart forms
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://help.sap.com/saphelp_46c/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm
http://www.sap-img.com/smartforms/smart-001.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sap-img.com/smartforms/smart-002.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
Try to upload the pictures via SE73 as it's described in the Online help.. As far as I remember it works all the mentioned formats
Please check this FM perhaps they may help.
HR_IMAGE_*
HRWPC_RFC_EP_READ_PHOTO_URI
HR_ESS_EMPLOYEE_PHOTO_CHECK
HR_ESS_EMPLOYEE_PHOTO_INIT
HR_ESS_EMPLOYEE_PHOTO_RESET
HR_ESS_EMPLOYEE_PHOTO_SAVE
HR_ESS_EMPLOYEE_PHOTO_SHOW
HR_ESS_EMPLOYEE_PHOTO_TAKE
Reward points if found helpful .
Cheers,
Chandra Sekhar. -
How to Fetch a data from HR Master Tables?
HI,
For all employees who have Infotype 0194 records valid in the time period or payroll period selected who have the vendor selected on the selection screen, you have to read the payroll results and find the Garnishment document in the GRORD if it exists. If a time period is selected, you must search for all payroll results with a check date that falls in that time period. If a payroll period is selected, search for that particular payroll and any off-cycle payroll whose check date falls between the begin date and end date of that pay period.
Once you searched IT 0194 for Employees (EE) with the Garnishment Vendor selected and then found the payroll results to process, you must search through payroll internal GRDOC and find the same vendor. If the vendor is found, search the payroll Results Table (RT) for the V0 split which matches the GRDOC record. Then use this amount(s) for the Deduction Amount field.
I have to fetch the Deduction amount according to the given Scenario,and I have to create an Outbound Interface Program to which creates an TXt file in Client Application server with Required fields
Case Number:
P0194-GCASE
Social Security Number:
P0002-PERID
Employee First Name:
P0002-VORNA
Employee Last Name:
P0002-NACHN
Deduction Amount:
Payroll Results RT
Can any one pls know me the entire procedure how to fetch the deduction amt based on the given scenario and what r the select statements i have to write to fetch required fields listed above.to provide infotype data you should use logical database PNP (see docu there)
that will create a selection screen by default.
In your report you have to specify
TABLES: PERNR.
INFOTYPES: 0002, 0194, ....
start-of-selection.
get pernr.
here you get all the specified infotypes in tables pxxxx
end-of-selection. " ends processing one pernr and starts with next GET PERNR
there is a function module to read payroll results
PYXX_READ_PAYROLL_RESULT
in your report you have to initialize the buffers first
HR_PCLX_INIT_BUFFER
and then get the cluster directory (RGDIR)
CU_READ_RGDIR -
Employee Photo In Smartform or Adobe Interactive Form
Hi Everybody,
We need to diaplay employee Photo in smartforms or adobe interactive form for Employee ID Card.
We are not uploading employee photo tru SE78. We need to get Photo from archieve Link, image being displayed in PA20/PA30 transaction.
I had been tru Many threads, but couldn't find any proper solution.
Please suggest.
Thanks in advance.
Regards
RaviIn forums, there are answers, but not the exact code. The most achieved is that one: Dynamically include a picture in smartform
Tell us if you need more information. -
How to fetch sqltable from JFrame
i created a jframe with some employee details including add, delete edit buttons. When i try to connect it shows NullPointer Exception.
can anybody tell me how to fetch the tablei created a jframe with some employee details
including add, delete edit buttons. I see.
When i try to
connect it shows NullPointer Exception.Does it now.
can anybody tell me how to fetch the tableNo. We are not mind readers. We do not know why you are getting a NullPointerException. You'll need to resolve that one on your own. -
How to add Profile Picture in Jabber
I would like to ask, how to add profile picture in Jabber ?
For your information, my callmanager with 10.5.1.10000-7 version have been integrated with Active Directory in Windows Server 2008
Thanks and Best Regads,
FerlyHi Ferly,
Cisco Jabber by default will fetch the image from AD using the thumbnailPhoto attribute once it is configured on AD.
Please check "Contact Photo Retrieval with EDI"
http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/jabber/Windows/9_7/JABW_BK_C4C679C9_00_cisco-jabber-for-windows-97/JABW_BK_C4C679C9_00_cisco-jabber-for-windows-97_chapter_0111.html#CJAB_RF_C9FFDD8D_00
HTH
Manish -
How do I get pictures from my camera to my computer using a small card from the camera
There is a small scan card in my digital camera with the numbers SDHC, which I was told when inserted into my computer would give me instructions on how to load the pictures, which it does not. I was given this camera with no book.
This question was solved.
View Solution.texaslas,
Is auto-play enabled?
You could install Picasa3.9 and it will let you import the pictures.
If autoplay is enabled for pictures, see Tutorial
I am a volunteer. I am not an HP employee.
To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
(2) HP DV7t i7 3160QM 2.3Ghz 8GB
HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
Both Customs use Rosewill Blackhawk case.
Printer -- HP OfficeJet Pro 8600 Plus -
How to print horizantal lines in smartforms?
hi friends,
how to print horizantal lines in smartforms.
waiting for ur valuble replies.
Thanks,
KiranHI,
If u use templates or table,then use borders to print the horizontal lines.
Eg : Create template-->Table painter->click select pattern button->Display framed pattern->select 3rd one.it will display only horizantal lines.
if want to print horizantal line under the text, then create one paragraph or character formate with Underline in smartstyles.Use that paragraph or character to u r text element -
How to print a bullet in smartforms?
Hi All,
How to print a bullet in smartforms?
I need it urgently.
Any help would be appeciated.
Regards,
Mahesh.Hi,
if i remember correct <600> is the value for bullets.
you can insert this using sap system symbols ---> select bullets (before this place your cursor where ever you want the bullets.
eg:
P1 <600> test.
Thanks,
Sree. -
How to print Check Box in smartform
HI,
How to print check box in smartforms. I am using Include Sap Symbol but in the print it is coming as #. Do we need to do any setting like we do for barcode?
Thanks
Raghavendrahi,
u can print a check box in different ways.. by inserting symbols and making window as check box..
once go through the thread u will get to k now differnt ways
putting checkboxes in smartform?
Please Close this thread.. when u r problem is solved. Reward all Helpful answers
Regards
Naresh Reddy K
Maybe you are looking for
-
Move Selection Shape, Not Contents, To Another Layer
I understand that after creating any selection, CTRL-J copies the selection to a new layer, but that's not what I want to do. I want to copy just the selection shape (i.e. its outline), not its contents, so that I can then apply that selection shape
-
Getting ASCII code of a character in ABAP. How?
Hi, i need use ascii codes in my program. I must get ascii code of a character. How can i get ascii code of a character? Thanks.
-
Need keyboard short cuts document
went to muse tutorial page it lists short cuts for mac and pc both links go to mac short cuts what up wit dat?
-
InterMedia Image Import & Shared Pool Problem
Hi All I have a SYS.ImagePkg.ImportImage stored procedure that its body described below: (dest_nid number, filename varchar2, img_date varchar2) is img_blob BLOB; ctx raw(64) := null; file_string varchar2(4) := 'file'; dir_string varchar2(8) := 'IMAG
-
Hi Experts, I am installing the ECC 6 SR3 on Windows 2003 64 bit platform but I am stucked with JDK version. I am not able to get the correct JDK version for my installation. Tried to search a lot but could not get any success. So any help in this re