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: 

pictures display

Former Member
0 Kudos

hi experts,

how can i upload my pictures that located my pc into r/3,and display in my screen program

best regards

zlf

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello

6 REPLIES 6

david_carballido
Active Participant
0 Kudos

Hi ... you can see this example DD_ADD_PICTURES and change the imagen 'ENJOYSAP_LOGO' ... but before you can upload a picture by the OAER transaction ... this transaction allows save pictures into the files ... you should enter with parameters:

CLASS NAME = 'PICTURES'

CLASS TYPE = 'OT'

PD: Sry for my bad english

Thanks and Regards.

David Carballido

0 Kudos

HI David Carballido

THANKS FOR YOUR ANSWER,DD_ADD_PICTURES JUST shows how to display system icon,i think if i wanna use my picture,should i change my picture into system icon,and how

best regards

zlf

former_member188685
Active Contributor
0 Kudos

search the Forum with word OAER , you get lot of posts related.

Former Member
0 Kudos

Hello

0 Kudos

HI ALL,

thanks for all of you,my problem has been done,and i just have a doult if a object key can upload more than one pictures and how i can choose the any one in my programe

best regards

zlf

Former Member
0 Kudos

first of all uplod picture with transaction

'SMW0'.

Then in screen

Create Custom Contain Area

Use this code for sample

***************************************************************

if init is initial.

CREATE OBJECT CONTAINER

EXPORTING

CONTAINER_NAME = 'CC area name'.

CREATE OBJECT PICTURE

EXPORTING

PARENT = CONTAINER.

DATA QUERY_TABLE LIKE W3QUERY OCCURS 1 WITH HEADER LINE.

DATA HTML_TABLE LIKE W3HTML OCCURS 1.

DATA RETURN_CODE LIKE W3PARAM-RET_CODE.

DATA CONTENT_TYPE LIKE W3PARAM-CONT_TYPE.

DATA CONTENT_LENGTH LIKE W3PARAM-CONT_LEN.

DATA PIC_DATA LIKE W3MIME OCCURS 0.

DATA PIC_SIZE TYPE I.

REFRESH QUERY_TABLE.

QUERY_TABLE-NAME = '_OBJECT_ID'.

  • query_table-value = 'ENJOYSAP_LOGO'.

APPEND QUERY_TABLE.

CALL FUNCTION 'WWW_GET_MIME_OBJECT'

TABLES

QUERY_STRING = QUERY_TABLE

HTML = HTML_TABLE

MIME = PIC_DATA

CHANGING

RETURN_CODE = RETURN_CODE

CONTENT_TYPE = CONTENT_TYPE

CONTENT_LENGTH = CONTENT_LENGTH

EXCEPTIONS

INVALID_TABLE = 1

PARAMETER_NOT_FOUND = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

PIC_SIZE = CONTENT_LENGTH.

ENDIF.

CALL FUNCTION 'DP_CREATE_URL'

EXPORTING

TYPE = 'image'

SUBTYPE = CNDP_SAP_TAB_UNKNOWN

SIZE = PIC_SIZE

LIFETIME = CNDP_LIFETIME_TRANSACTION

TABLES

DATA = PIC_DATA

CHANGING

URL = URL.

CALL METHOD PICTURE->LOAD_PICTURE_FROM_URL

EXPORTING

URL = URL.

INIT = 'X'.

CALL METHOD CL_GUI_CFW=>FLUSH

EXCEPTIONS

CNTL_SYSTEM_ERROR = 1

CNTL_ERROR = 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.

ENDIF.