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: 

Converting SAPscript-Text to E-Mail-Text

ralf_wenzel_heuristika
Active Participant
0 Kudos
3,372

Hi.

Given a text table of structure tline, which has to be mailed. cl_document_bcs=>create_document knows parameter i_text type soli_tab.

Which is the best way to convert the text to soli_tab?

1 ACCEPTED SOLUTION

rosenberg_eitan
Active Contributor
0 Kudos
853

Hi,

CALL FUNCTION 'READ_TEXT'

  

CALL FUNCTION 'PRINT_TEXT'

Get the otfdata and convert it to PDF return the result as TYPE solix_tab .

CL_BCS love solix_tab attachments .

See how to convert here

Regards .

17 REPLIES 17

former_member220028
Active Contributor
0 Kudos
853

Hi,

i like FM CONVERT_ITF_TO_HTML

and moving 132 to 256 manually since trailling spaces are ignored.

Regards

Stefan Seeburger

0 Kudos
853

Any way without manually stuff?

rosenberg_eitan
Active Contributor
0 Kudos
854

Hi,

CALL FUNCTION 'READ_TEXT'

  

CALL FUNCTION 'PRINT_TEXT'

Get the otfdata and convert it to PDF return the result as TYPE solix_tab .

CL_BCS love solix_tab attachments .

See how to convert here

Regards .

0 Kudos
853

I want to mail a mail text, not an empty mail with a PDF attachment, sorry.....

0 Kudos
853

Hi,

I wonder...

Is there a way to convert tline to HTML ?

If there is it is worth checking....

Regards .

0 Kudos
853

Do a google using search operators:

site:help.sap.com  itf to HTML

Regards.

0 Kudos
853

Hi,

would it be an Option to use the OTF data to generate the mail?

CALL FUNCTION 'PRINT_TEXT'.

CALL FUNCTION 'CONVERT_OTF_AND_MAIL_NEW' ...

Regards

Oliver

0 Kudos
853

CALL FUNCTION? As mentioned in first question: cl_document_bcs=>create_document knows parameter i_text type soli_tab.

0 Kudos
853

Yes, CALL FUNCTION --- CONVERT_OTF_AND_MAIL_NEW uses the BCS classes. You can pass OFT directly to it if you tell cl_document_bcs=>create_document that it gets OTF (I_TYPE = 'OTF').

Regards

Oliver

0 Kudos
853

Hi,

This is interesting.

Have you tried it ?

What is happening behind the scene any conversions ?

Regards.

0 Kudos
853

Oliver Wurm wrote:

You can pass OFT directly to it if you tell cl_document_bcs=>create_document that it gets OTF (I_TYPE = 'OTF').

This works. Thanks.

0 Kudos
853

Hi,

Great news.

Thanks.

0 Kudos
853

too happy too soon - even if format is set to OTF, the table has to be soli_tab. 😞

0 Kudos
853

Well, changing the Content of one Parameter doesn't Change the type of another. But you can move the OTF structure as it is into the SOLI-LINE without conversion:

LOOP AT otf ASSIGNING <otf>.

  soli-line = <otf>.

  append soli to whatever.

ENDLOOP.

That's it.

Regards

Oliver

rosenberg_eitan
Active Contributor
0 Kudos
853

0 Kudos
853

I know, but I have to convert the converted output. Not very elegant. I'll have to compose my own method for this, I'm afraid....

rosenberg_eitan
Active Contributor
0 Kudos
853

Hi,

See if this is useful for you see :

1 READ_TEXT

2 CONVERT_ITF_TO_HTM

3 Using e_html_text of CONVERT_ITF_TO_HTM as input to cl_bcs_convert=>xstring_to_solix .


See attached program Y_R_EITAN_TEST_10_11 .

Regards.