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

Uploading image

Former Member
0 Likes
796

Hi all,

How can i upload an image to a specific table from my PC

is there any function modules which can do that.

Regards

Simin.R

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
756

Hi,

I have refered to the Program RSTXLDMC. Finally, i came to an conculsion , that By WS_upload it is uploading.

RSTXLDMC 303 CALL FUNCTION 'CHECK_TEXT_AUTHORITY'

EXPORTING LANGUAGE = TXLANG

OBJECT = 'TEXT'

NAME = TEXTNAME

ID = TXID

ACTIVITY = 'EDIT'

EXCEPTIONS OTHERS = 1.

316 CALL FUNCTION 'CHECK_TEXT_AUTHORITY'

EXPORTING LANGUAGE = TXLANG

OBJECT = 'GRAPHICS'

NAME = TEXTNAME

ID = TXID

ACTIVITY = 'EDIT'

EXCEPTIONS OTHERS = 1.

338 CALL FUNCTION 'READ_TEXT'

EXPORTING LANGUAGE = TXLANG

ID = TXID

NAME = TEXTNAME

OBJECT = TXOBJECT "B20K083806

IMPORTING HEADER = NEWHEADER

TABLES LINES = LINES

EXCEPTIONS OTHERS = 1.

350 CALL FUNCTION 'POPUP_TO_CONFIRM_LOSS_OF_DATA'

EXPORTING TEXTLINE1 = 'Der Text existiert bereits.'(022)

TEXTLINE2 = 'Soll er überschrieben werden?'(023)

TITEL = 'Text überschreiben?'(024)

IMPORTING ANSWER = ANSWER.

361 CALL FUNCTION 'INIT_TEXT'

EXPORTING ID = TXID

LANGUAGE = TXLANG

NAME = TEXTNAME

OBJECT = TXOBJECT "B20K083806

IMPORTING HEADER = HEADER

TABLES LINES = LINES

EXCEPTIONS ID = 1

LANGUAGE = 2

NAME = 3

OBJECT = 4.

373 CALL FUNCTION 'SAPSCRIPT_MESSAGE'. "error in INIT_TEXT

408 CALL FUNCTION 'WS_UPLOAD'

EXPORTING FILENAME = FILENAME

FILETYPE = FILETYPE

IMPORTING FILELENGTH = FILESIZE

TABLES DATA_TAB = DATA_TAB

EXCEPTIONS CONVERSION_ERROR = 1

FILE_OPEN_ERROR = 2

FILE_READ_ERROR = 3

INVALID_TYPE = 4

NO_BATCH = 5

OTHERS = 6.

553 CALL FUNCTION 'SAVE_TEXT'

EXPORTING HEADER = HEADER

IMPORTING FUNCTION = FUNCTION

NEWHEADER = HEADER

TABLES LINES = LINES

EXCEPTIONS OTHERS = 1.

595 CALL FUNCTION 'SAPSCRIPT_MESSAGE'. "error in SAVE_TEXT

1443 CALL FUNCTION 'SYSTEM_CODEPAGE'

IMPORTING

CODEPAGE = SYSTEM_CODEPAGE

CURRENT_DYNAMIC_CODEPAGE = CURRENT_DYNAMIC_CODEPAGE.

1464 CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'

EXPORTING

PERCENTAGE = P

TEXT = STRING

EXCEPTIONS

OTHERS = 0.

6 REPLIES 6
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
756

Hi,

Through SE78 you can upload images in application server.

Read only

0 Likes
756

I Want to upload the image to a custom table created by me

Read only

Former Member
0 Likes
756

HI,

<b>RSTXLDMC</b> FM to upload image in tiff format.

<b>SE76</b> to upload the Bitmap Files

Regards

Sudheer

Read only

0 Likes
756

Here i cannot upload to the table created by me

Read only

0 Likes
756

Hi,

Try Debugging the code related to SE78 or RSTXLDMC, so that you can find out a way to store Graphic Images into custom defined tables. Any Specific Reasons to upload image to custom Tables?

Regards;-

Santosh

Read only

Former Member
0 Likes
757

Hi,

I have refered to the Program RSTXLDMC. Finally, i came to an conculsion , that By WS_upload it is uploading.

RSTXLDMC 303 CALL FUNCTION 'CHECK_TEXT_AUTHORITY'

EXPORTING LANGUAGE = TXLANG

OBJECT = 'TEXT'

NAME = TEXTNAME

ID = TXID

ACTIVITY = 'EDIT'

EXCEPTIONS OTHERS = 1.

316 CALL FUNCTION 'CHECK_TEXT_AUTHORITY'

EXPORTING LANGUAGE = TXLANG

OBJECT = 'GRAPHICS'

NAME = TEXTNAME

ID = TXID

ACTIVITY = 'EDIT'

EXCEPTIONS OTHERS = 1.

338 CALL FUNCTION 'READ_TEXT'

EXPORTING LANGUAGE = TXLANG

ID = TXID

NAME = TEXTNAME

OBJECT = TXOBJECT "B20K083806

IMPORTING HEADER = NEWHEADER

TABLES LINES = LINES

EXCEPTIONS OTHERS = 1.

350 CALL FUNCTION 'POPUP_TO_CONFIRM_LOSS_OF_DATA'

EXPORTING TEXTLINE1 = 'Der Text existiert bereits.'(022)

TEXTLINE2 = 'Soll er überschrieben werden?'(023)

TITEL = 'Text überschreiben?'(024)

IMPORTING ANSWER = ANSWER.

361 CALL FUNCTION 'INIT_TEXT'

EXPORTING ID = TXID

LANGUAGE = TXLANG

NAME = TEXTNAME

OBJECT = TXOBJECT "B20K083806

IMPORTING HEADER = HEADER

TABLES LINES = LINES

EXCEPTIONS ID = 1

LANGUAGE = 2

NAME = 3

OBJECT = 4.

373 CALL FUNCTION 'SAPSCRIPT_MESSAGE'. "error in INIT_TEXT

408 CALL FUNCTION 'WS_UPLOAD'

EXPORTING FILENAME = FILENAME

FILETYPE = FILETYPE

IMPORTING FILELENGTH = FILESIZE

TABLES DATA_TAB = DATA_TAB

EXCEPTIONS CONVERSION_ERROR = 1

FILE_OPEN_ERROR = 2

FILE_READ_ERROR = 3

INVALID_TYPE = 4

NO_BATCH = 5

OTHERS = 6.

553 CALL FUNCTION 'SAVE_TEXT'

EXPORTING HEADER = HEADER

IMPORTING FUNCTION = FUNCTION

NEWHEADER = HEADER

TABLES LINES = LINES

EXCEPTIONS OTHERS = 1.

595 CALL FUNCTION 'SAPSCRIPT_MESSAGE'. "error in SAVE_TEXT

1443 CALL FUNCTION 'SYSTEM_CODEPAGE'

IMPORTING

CODEPAGE = SYSTEM_CODEPAGE

CURRENT_DYNAMIC_CODEPAGE = CURRENT_DYNAMIC_CODEPAGE.

1464 CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'

EXPORTING

PERCENTAGE = P

TEXT = STRING

EXCEPTIONS

OTHERS = 0.