Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV-Image Display

Former Member
0 Likes
560

Hi all

If i suppose want a image should be displayed along with the person details....what function module should i use......?

I have tried till the below but it not displayin the output what should i add more??

report zfoto.

tables : zemployee.

type-pools : cndp.

type-pools : slis,icon.

data : d_fieldcat type slis_t_fieldcat_alv,

d_fieldcat_wa type slis_fieldcat_alv.

DATA : t_header type slis_t_listheader,

wa_header type slis_listheader.

data url type cndp_url.

data : gd_layout type slis_layout_alv.

DATA : BEGIN OF itab_vmoksha OCCURS 0,

empid like zvmoksha-empid,

empname like zvmoksha-empname,

division like zvmoksha-division,

visitors(20) type c,

duration TYPE time,

END OF itab_vmoksha.

data : line(30) type c,

linecount(30) type c.

data : itab_employee like zemployee OCCURS 0 with HEADER LINE,

wa_employee like LINE OF itab_employee.

selection-screen : begin of block blk1 with frame title text-001.

parameters : p_empid like zemployee-empid,

p_name like zemployee-empname,

visitors like itab_vmoksha-visitors,

duration like itab_vmoksha-duration.

parameters : path type rlgrap-filename.

selection-screen : end of block blk1.

select empid empname division from zvmoksha into TABLE itab_vmoksha where empid = itab_vmoksha-empid.

INITIALIZATION.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

PROGRAM_NAME = SYST-CPROG

DYNPRO_NUMBER = SYST-DYNNR

FIELD_NAME = 'FILE'

IMPORTING

FILE_NAME = path.

if sy-subrc = 0.

write 😕 itab_vmoksha-empid,

10 itab_vmoksha-empname,

30 itab_vmoksha-division,

50 itab_vmoksha-visitors,

70 itab_vmoksha-duration.

endif.

Thanks

asha

Hi all

If i suppose want a image should be displayed along with the person details....what function module should i use......?

I have tried till the below but it not displayin the output what should i add more??

report zfoto.

tables : zemployee.

type-pools : cndp.

type-pools : slis,icon.

data : d_fieldcat type slis_t_fieldcat_alv,

d_fieldcat_wa type slis_fieldcat_alv.

DATA : t_header type slis_t_listheader,

wa_header type slis_listheader.

data url type cndp_url.

data : gd_layout type slis_layout_alv.

DATA : BEGIN OF itab_vmoksha OCCURS 0,

empid like zvmoksha-empid,

empname like zvmoksha-empname,

division like zvmoksha-division,

visitors(20) type c,

duration TYPE time,

END OF itab_vmoksha.

data : line(30) type c,

linecount(30) type c.

data : itab_employee like zemployee OCCURS 0 with HEADER LINE,

wa_employee like LINE OF itab_employee.

selection-screen : begin of block blk1 with frame title text-001.

parameters : p_empid like zemployee-empid,

p_name like zemployee-empname,

visitors like itab_vmoksha-visitors,

duration like itab_vmoksha-duration.

parameters : path type rlgrap-filename.

selection-screen : end of block blk1.

select empid empname division from zvmoksha into TABLE itab_vmoksha where empid = itab_vmoksha-empid.

INITIALIZATION.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

PROGRAM_NAME = SYST-CPROG

DYNPRO_NUMBER = SYST-DYNNR

FIELD_NAME = 'FILE'

IMPORTING

FILE_NAME = path.

if sy-subrc = 0.

write 😕 itab_vmoksha-empid,

10 itab_vmoksha-empname,

30 itab_vmoksha-division,

50 itab_vmoksha-visitors,

70 itab_vmoksha-duration.

endif.

Thanks

asha

2 REPLIES 2
Read only

Former Member
0 Likes
495

Hi

See the following

Change the logo in the right-hand side of the initial Log-on screen

- To put your company logo in the right-hand side of the initial

screen:

Put your picture in the database with the transaction SMW0

"Binary data" options, e.g. in ".GIF" format.

Put a record with the picture name in the key "START_IMAGE" of

the table SSM_CUST in the View maintenance transaction SM30.

- You can adjust the picture to the window size automatically or

center it in the right-hand side of the initial screen

("RESIZE_IMAGE" "YES" or "NO" in the table SSM_CUST).

- You can deactivate the picture globally so that no one sees it

with "HIDE_START_IMAGE" "YES" in the table SSM_CUST.

Refer the links -

See following link:

http://www.sap-img.com/basis/changing-the-sapgui-logo-on-the-right-hand-side.htm

See the link

http://www.sap-img.com/bc052.htm

In the transaction OAOR, you should be able to insert your company Logo.

GOTO - OAOR (Business Document Navigator)

Give Class Name - PICTURES Class Type - OT..... then Execute

It will show you the list, then select ENJOYSAP_LOGO.

On that list, you will find one control with a "create" tab.

Click std. doc types.

Select SCREEN and double-click.

It will push FILE selection screen.

Select your company logo (.gif) and press OK.

It will ask for a description- for instance: "company logo".

It will let you know your doc has been stored successfully.

You can find your logo under ENJOYSAP_LOGO->Screen->company logo.

Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.

FORM TOP-OF-PAGE.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = HEADING[]

I_LOGO = 'ENJOYSAP_LOGO'

I_END_OF_LIST_GRID ='GT_LIST_TOP_OF_PAGE'.

.

ENDFORM. "TOP-OF-PAGE

Here 'ENJOYSAP_LOGO' will replace by ur created logo.

Refer this link

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm

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

http://www.sap-img.com/fu002.htm

regards

Anji

Read only

Former Member
0 Likes
495

Hi asha,

This cannot be done using fn mod. U have to use objects concepts here.

There is a standard global class avilable.

<b>CL_GUI_PICTURE</b>

U have to use that class in ur program.

And in the screen u have to place a container.

If u have further doubts, shoot here.

Please reward points if helpful.