cancel
Showing results for 
Search instead for 
Did you mean: 

Printing File from DMS in smartform from IW33

Former Member
0 Kudos

Hi SAP Gurus,

My requirement is as follows,

In order(IW33)>Operations>Production Resources/ Tools, A document is maintianed. I need to print file from there in a smartform regardless of the file format.

For this I have searched and found the following logic.

from Tables dms_doc2loio, dms_ph_cd1 I am getting Doc details, these details are passed to the below FM,

*This function module will give the content of the file in binary format

CALL FUNCTION 'SDOK_PHIO_LOAD_CONTENT'

EXPORTING

object_id = wa_object_id

client = sy-mandt

  • AS_IS_MODE =

  • RAW_MODE =

  • TEXT_AS_STREAM =

TABLES

  • FILE_ACCESS_INFO =

  • FILE_CONTENT_ASCII =

file_content_binary = it_file_content_binary

EXCEPTIONS

not_existing = 1

not_authorized = 2

no_content = 3

bad_storage_type = 4

OTHERS = 5.

After getting the data in binary format, how to print in smartforms, Please help..

Regards,

Pavan.

Accepted Solutions (1)

Accepted Solutions (1)

Venkat_Sesha
Advisor
Advisor
0 Kudos

I am Sorry I dont understand why you are moving the data into a binary format conversion.

Is there any particular thing which makes you to do so? If so, Please explain.

Instead have you try to convert them into Xstring and then into String. By doing so. If any special characters or any special symbols or anything. the system wont give any error. instead it is a easy method also.

check out these function Modules: NLS_STRING_CONVERT_FROM_SYS

NLS_STRING_CONVERT_TO_SYS

Former Member
0 Kudos

HI Venkat,

THanks for the reply,

The main requirement is like, a file is maintained in DMS, I need to print it using smart forms.

Regards,

Pavan.

Former Member
0 Kudos

hi

did u solved this problem

please help i have the same requirment..

Answers (0)