Application Development 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: 

SAP Campus Management photo display

Former Member
0 Kudos

Hi Experts,

can any one let me know how to work on photo display in abap reports or smartforms.

Actually we are working on campus management, were we require to print the I-Card of students... so for every corresponding roll number we need to display the photos for the students.... is there any function module which can be used for it..

tx in advance.

Sudhanshu

Edited by: Sudhanshu Sharma on Feb 13, 2008 5:21 AM

5 REPLIES 5

BalaMalvatu
Participant
0 Kudos

Hi,

Please check the code which created and display Image on Program.

OBJECTPICT a control should be defined on the Screen.

MODULE pbo_0200 OUTPUT.

DATA: objectpicture  TYPE REF TO cl_gui_html_viewer,

objectpicture1 TYPE REF TO cl_gui_html_viewer,

my_container   TYPE REF TO cl_gui_custom_container,

my_container1  TYPE REF TO cl_gui_custom_container,

t_zispicture   TYPE TABLE OF zispicture,

r_zispicture   LIKE LINE OF t_zispicture,

prog_repid     LIKE sy-repid,

wa_picurl      TYPE zipicurl,

doc_url(255),

doc_url1(255).

CLEAR doc_url.

CALL METHOD g_bl_object->bl_select_picture

EXPORTING

g_db_object_old = g_db_object_old

g_db_object_new = g_db_object_new

r_zisobj        = yisobj

IMPORTING

r_zispicture    = r_zispicture.

IF r_zispicture IS INITIAL.

doc_url = 'http://www.googleimages/ImagesGlobal/nopicture.png'.

ELSE.

doc_url = r_zispicture-zipicurl.

ENDIF.

* registrieren des objects wenn nicht vorhanden.

IF NOT objectpicture IS INITIAL.

CALL METHOD objectpicture->free

EXCEPTIONS

cntl_error        = 1

cntl_system_error = 2

OTHERS            = 3.

CALL METHOD my_container->free

EXCEPTIONS

cntl_error        = 1

cntl_system_error = 2

OTHERS            = 3.

ENDIF.

prog_repid = sy-repid.

CREATE OBJECT my_container

EXPORTING

container_name = 'OBJECTPICTURE'.

CREATE OBJECT objectpicture

EXPORTING

parent = my_container.

IF sy-subrc = 0    AND

NOT doc_url IS INITIAL.

CALL METHOD objectpicture->show_url

EXPORTING

url = doc_url.

ENDIF.

PERFORM dynpro_attribute.

ENDMODULE.                 " pbo_0200  OUTPUT

Regards

Bala.M

0 Kudos

Actually a query here.

Do you REALLY understand the code you have posted here or have you simply copied it from elsewhere. Here are the really important pieces of information you have left out To make the code work you need to define your Y- and Z- objects.



t_zispicture   TYPE TABLE OF zispicture,

r_zispicture   LIKE LINE OF t_zispicture,
wa_picurl      TYPE zipicurl,

* in your application also  -- what are the definitions for these

r_zisobj        = yisobj  


.

Without the Y- and Z- definitions shown in the code in your post THE WHOLE KYBOSH IS WORTHLESS.

I don't doubt your good intentions on trying to help fellow "Sappers"trying to solve problems or answer questions but PLEASE ENSURE THE REPLY IS MEANINGFUL.

Cheers

jimbo

0 Kudos

>

> Actually a query here.

> > > Do you REALLY understand the code you have posted here or have you simply copied it from elsewhere. > > Here are the really important pieces of information you have left out > To make the code work you need to define your Y- and Z- objects. > >

>


> 
> t_zispicture   TYPE TABLE OF zispicture,
> 
> r_zispicture   LIKE LINE OF t_zispicture,
> wa_picurl      TYPE zipicurl,
> 
> * in your application also  -- what are the definitions for these
> 
> r_zisobj        = yisobj  
> 
> 
> .

>

> Without the Y- and Z- definitions shown in the code in your post THE WHOLE KYBOSH IS WORTHLESS.

> I don't doubt your good intentions on trying to help fellow "Sappers"trying to solve problems or answer questions but PLEASE ENSURE THE REPLY IS MEANINGFUL.

>

> Cheers

>

> jimbo

Hi James,

It was Good that You Want that to be Highlighted with Big Red Letters.

Good Critics and I appreciate that.

One thing I would Like to convey is that SDN has become a Too much of spoon feeding and Programmers are completely depending on this without any effor,this hurts me a lot.

Well the person who requested has got no response and see how strange is the you are asking for more clarification.

And I strictly can do that ...Copying the Structute too.Got it.

Bala.M

0 Kudos

Hi there

You still haven't defined the Z* and Y* definitions. Since those definitions are the key to the whole solution it's mystfying that you haven't shown the structure definitions.

I'm of course totally opposed to 100% spoon feeding and whilst there is a HUGE amount on SDN an application which can load and manipulate pictures whether into HR or any other application is a feature a lot of people would like to know how to do --unfortunately your post doesn't clarify the process at all.

If you search most of my posts I usually try and explain EXACTLY what I'm trying to do.

The whole essence of any programming whether OO or not is to apply a set of algorithms against data structures / elements etc.

Without the data structures to work on the algorithms are meaningless.

Cheers

jimbo

0 Kudos

Hi,

I like that too, Get convinced.

Structure : ZISPICTURE

ZIMANDT MANDT CLNT 3 0 Client

ZIINDEX ZIINDEX INT4 10 0 Index

ZIPICCODE ZIPICCODE CHAR 18 0 Picture Code

ZIPICCODETYPE ZIPICCODETYPE CHAR 1 0 Picture Code Type

ZIPICSEASON ZIPICSEASON CHAR 1 0 Picture Season Code

ZIPICTYPE ZIPICTYPE CHAR 2 0 Picture Type

ZIPICRES ZIPICRES CHAR 1 0 Picture Resolution

ZIPICSORT ZIPICSORT CHAR 6 0 Picture Sort

ZIPICGUID ZIPICGUID CHAR 50 0 Picture GUI Id

ZITIMESTAMP ZITIMESTAMP CHAR 40 0 Timestamp

ZIPICCONTYPE ZIPICCONTYPE CHAR 20 0 Picture Content Type

ZIPICFILENAME ZIPICFILENAME CHAR 100 0 Picture File Name

ZIPICURL ZIPICURL CHAR 200 0 Picture URL

ZIPICHEIGHT ZIPICHEIGHT NUMC 4 0 Picture Height

ZIPICWIDTH ZIPICWIDTH NUMC 4 0 Picture Width

ZIPICFSIZE ZIPICFSIZE NUMC 8 0 Picture File Size

Good work..

Regards

Bala.M