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

Convert OTF to xstring or rawstring?

Former Member
0 Likes
10,217

Hello,

How can i convert an OTF format to xstring or rawstring.

Thanks

Amina

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,217

Thanks Harsh.

The i need to convert PDF to Xstring is because i need to upload a PDF document using FM :

HRRCF_MDL_CAND_ATT_CREATE'

This Fm only takes Xsting as input.

This is a case in E Recruitement when i want to create attachments to candidate profiles through the system.

Thanks

Amina

5 REPLIES 5
Read only

Sandra_Rossi
Active Contributor
0 Likes
4,217

OTF is used for storing smartforms. It's an internal table with ITCOO structure (fields TDPRINTCOM 2 char + TDPRINTPAR 70 characters)

If you want to copy internal table into xstring without transformation, first transform internal table into a string with "concatenate lines of itab into string in character mode respecting blanks". Then transform string into xstring using [Dirk Boller method |https://forums.sdn.sap.com/click.jspa?searchID=11347800&messageID=5020890]

But maybe you want to transform OTF into PDF or other external format?

Read only

Former Member
0 Likes
4,217

You are right. Actually, i want to convert PDF to xstring format.

Read only

Former Member
0 Likes
4,217

Hello Amina,

I know one function module which converts PDF to RAW format which looks like,

SX_OBJECT_CONVERT_OTF_RAW - Conversion From OTF to RAW

and for OTF to PDF conversion we have here,

SX_OBJECT_CONVERT_OTF_PDF - Conversion From OTF to PDF

also,

CONVERT_OTFSPOOLJOB_2_PDF - converts a OTF spool to PDF

But, Im still unable to understand your requirement, as I am not aware of any PDF to OTF or PDF to raw/x-string conversion function module.

If you think these are not the appropriate ones then please update me on the correct ones so that I can also know about.

Good Luck & Regards,

Harsh Dave

Read only

Former Member
0 Likes
4,218

Thanks Harsh.

The i need to convert PDF to Xstring is because i need to upload a PDF document using FM :

HRRCF_MDL_CAND_ATT_CREATE'

This Fm only takes Xsting as input.

This is a case in E Recruitement when i want to create attachments to candidate profiles through the system.

Thanks

Amina

Read only

0 Likes
4,217

Hello Amina,

Ok,

I have come across a quite old SCN thread which gives some gist of the requirement,

Check out "Kshitij Devre's" answer for "PDF to X-string".

[SDN - Reference for PDF to Xstring conversion|;

Hope this works out well.