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

Information needed about usage of function modules SX_OBJECT_CONVERT_*

Former Member
0 Likes
1,708

Hello All,

I would like to convert multi page FAX (TIFF) document into OTF in order to be able to split it on pages. There are function modules available for converting to different formats, but I have not enough knowledge about how to use them.

        CALL FUNCTION 'SX_OBJECT_CONVERT___T_PRT'
        
EXPORTING
           format_src            =
'RAW'
           format_dst            =
'OTF'
           addr_type             =
'FAX'
           devtype               =
'PRINTER'
           FUNCPARA              = ???
        
CHANGING
           transfer_bin          = transfer_bin
"BOOLEAN
           content_txt           = content_txt_01
"CHAR25
           content_bin           = content_bin_01
"RAW255
           objhead               = objhead
"CHAR255
           len                   = len
"CHAR12
        
EXCEPTIONS
           err_conv_failed       =
1
          
OTHERS                = 2.

FUNCPARA - what this parameter means? Looks it is not obligatory, maybe in my case it is important.

DEVTYPE - there are several Device types maintained in our system. In which transaction I could check them? Because result of conversion depends on this parameter.

CONTENT_TXT_01 - here I should receive OTF document, is this correct? If yes, how to convert such single column format to 2 column format of typical OTF?

CONTENT_TXT_01 - here I supply my source document in RAW format.

OBJHEAD - how to use this parameter?

Thanks and best regards,

Alex

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,370

Hi,

I think there is a confusion here. SX_OBJECT_CONVERT_* function modules are used for SAPconnect (mails) document conversion. It can't convert RAW to OTF (see SCOT transaction to see the possibilities, for instance conversion of OTF spools into PDF). By the way, here RAW corresponds to the RAW SAPoffice documents, i.e. the short text messages ("raw emails"); it doesn't mean the original binary TIFF file.

Now, if your requirement is to split subfiles from a TIFF file, one subfile being one page, into several files so that to insert a page break between subfiles, you should probably use an external image processing software.

Sandra

Hello All,

I would like to convert multi page FAX (TIFF) document into OTF in order to be able to split it on pages. There are function modules available for converting to different formats, but I have not enough knowledge about how to use them.

        CALL FUNCTION 'SX_OBJECT_CONVERT___T_PRT'
        
EXPORTING
           format_src            =
'RAW'
           format_dst            =
'OTF'
           addr_type             =
'FAX'
           devtype               =
'PRINTER'
           FUNCPARA              = ???
        
CHANGING
           transfer_bin          = transfer_bin
"BOOLEAN
           content_txt           = content_txt_01
"CHAR25
           content_bin           = content_bin_01
"RAW255
           objhead               = objhead
"CHAR255
           len                   = len
"CHAR12
        
EXCEPTIONS
           err_conv_failed       =
1
          
OTHERS                = 2.

FUNCPARA - what this parameter means? Looks it is not obligatory, maybe in my case it is important.

DEVTYPE - there are several Device types maintained in our system. In which transaction I could check them? Because result of conversion depends on this parameter.

CONTENT_TXT_01 - here I should receive OTF document, is this correct? If yes, how to convert such single column format to 2 column format of typical OTF?

CONTENT_TXT_01 - here I supply my source document in RAW format.

OBJHEAD - how to use this parameter?

Thanks and best regards,

Alex

8 REPLIES 8
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,371

Hi,

I think there is a confusion here. SX_OBJECT_CONVERT_* function modules are used for SAPconnect (mails) document conversion. It can't convert RAW to OTF (see SCOT transaction to see the possibilities, for instance conversion of OTF spools into PDF). By the way, here RAW corresponds to the RAW SAPoffice documents, i.e. the short text messages ("raw emails"); it doesn't mean the original binary TIFF file.

Now, if your requirement is to split subfiles from a TIFF file, one subfile being one page, into several files so that to insert a page break between subfiles, you should probably use an external image processing software.

Sandra

Read only

0 Likes
1,370

Hi Sandra,

thanks for reply.

The problem is that I read these FAX(TIFF) files from SAP Archive, so it is not possible to put a page break in advance, the whole file comes up in a single internal table in RAW format.

I tried to debug the SAP ArchiveLink in order to get the idea of how these files should be interpreted, but not really succesfully.

Also I though maybe it is possible to save them in spool and to read from spool as PDF files page by page, but even if this works out, not so easy to convert PDF to image.

Any ideas appreceated.

Thank you again,

Regards,

Alex.

Read only

0 Likes
1,370

Hi,

The only available TIFF converter in SAP is in SE78 transaction, and stores it as a "Form Graphic" in BDS (into a SAP internal format); it is used later for being included into SAPscript forms or Smart Forms. (for information, there is also an obsolete technology to achieve the same, program RSTXLDMC, and it stores it into a SAPscript text). And there's also a program to convert them into the MIME repository so that it can be used within Adobe forms.

I did a test with RSTXLDMC to import a multipage TIFF, though the return code was "success", without any warning, but I could make sure that it only stored the first page, and ignored the second page. I think that SE78 very probably has the same limitation.

I found this blog Web Dynpro ABAP: Display tiff images, but it seems that CL_IGS_IMAGE_CONVERTER is only able to do simple conversions, here it converts the TIFF in only one JPEG image.

If you really want to handle all pages with ABAP, you may adapt SAP's programs.

This question about converting images has been discussed many times in the forum, and it is now clear that SAP is not a format converter except for some very frequent or simple formats. For others, it is more secure to use an external software (because the company will provide support if there are bugs or upgrades needed).

BTW, I was probably not clear: IMHO, within SAP (I mean in SAPoffice/SAPconnect) "RAW" means text, it has not the meaning like "raw image format".

Sandra

Read only

0 Likes
1,370

Hello Sandra,

thank you for help.

I also have checked these ways in past, before writting to forum, but also just first page was processed sucesfully and the second ignored.

I will share the solution, if I find it.

Kind regards,

Alex

Read only

0 Likes
1,370

Hi Alex,

have you found a solution ?

Regards

Daniel

Read only

Former Member
0 Likes
1,370

Hi Alex,

I have similar requirement.

We have multipage Tiff images stored in SAPArchiv table. I get tiff image in Binary format.

I want to conver it to PDF or any other image format and display it in browser.I used class CL_IGS_IMAGE_CONVERTER but it converts only 1st page.

Have you converted tiff image into PDF?

How to handle such scenarios?

Thanks.

Read only

0 Likes
1,370

Hello Anjor, hello Daniel,

in my case requiriment is postponed, no solution so far

It might be a solution to call third party software from ABAP for converting to PDF, but not all customers are keep to this.

BR, Alex

Read only

0 Likes
1,370

Anjor Wagle wrote:

I used class CL_IGS_IMAGE_CONVERTER but it converts only 1st page.

Class CL_IGS_IMAGE_CONVERTER converts multipage-tiff image into single page PNG for me.


Method get_image has a parameter INDEX to get several output files for a single input file.



CALL METHOD lo_converter->get_image
       EXPORTING
         index     = li_index
       IMPORTING
         blob      = lt_data
         blob_size = li_blob_size
         blob_type = lc_blob_type.