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

Reverse Engineering : Getting Layout from SamrtForm OTF.

Former Member
0 Likes
2,273

Hi All,

I need to get the layout and content in a particular Window, Template, Table,..... from the OTF generated from SamrtForm Output.

Well, the requirement seems to be a bit meaningless, but why do I need it ?

I need it since I wanted to convert my SmartForm O/P to .XLS file but SAP did not allowed me, as it allows for PDF.

So, I got the OTF details and again converted the OTF to meaningful texts, so now I am getting my XLS file.

But, my problem is that the XLS file is not well aligned. Even thou I get all the data, as is available in the SmartForm O/P but they are very poorly alligned.

So, I just thought of raising this questin here.

I am using IXML to create my XLS file.

May be some idea, how to identify what all data is present in a particular Window or Templete,

or any such idea by which I can intrepretate the OTF Data, will be helpful.

Any I/P will certainly help me, pls share your views.

Thanking You All.

1 ACCEPTED SOLUTION
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
2,216

Sorry but I seriously doubt you'll have any luck with this as Smartform layout is a proprietary SAP format. Certainly we can download the form in XML but it won't give you the form layout if imported into Excel. Heck, you can't even convert SAPScript into a Smartform very well and they're both in SAP!

15 REPLIES 15
Read only

Former Member
0 Likes
2,216

Hi Ankit,

Jus to get things started. Could you please let us know if it is going to be a standard program or a Z-development so that we can proceed on your reverse engineering. .

-Regards,

Ragavan

Read only

0 Likes
2,216

Hi Ragavan,

It's a Z development.

Thanking You All.

Read only

0 Likes
2,216

Fine. You need to find out on how the OTF data is generated. It primarily could be Function Module where you pass the smartform's output internal table and get the OTF data. Find out this OTF generation code block.

Check for the smartform output table and you would be redirected to ssf_function_module_name where you can find the smartform name.

You can modify your desired window content in the smartform.

Hope this solves your issue.

-Regards,

Ragavan

Read only

former_member206650
Active Participant
0 Likes
2,216

hi Ankit,

can't you do manual downloading of the smartform.

Use the menu Goto->List Display->Then use System->List->Save->Local file and enter the name you want...

hope it helps ....

Read only

0 Likes
2,216

Hi Vishnu,

Thanks for the reply but it does not works.

Thanking You All.

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
2,217

Sorry but I seriously doubt you'll have any luck with this as Smartform layout is a proprietary SAP format. Certainly we can download the form in XML but it won't give you the form layout if imported into Excel. Heck, you can't even convert SAPScript into a Smartform very well and they're both in SAP!

Read only

0 Likes
2,216

Hi Jenela,

Thanks a lot for the sugessition, but I wonder there must be some way SAP would be converting layout to OTF.

If you will see the RAW OTF Internal Table and converted OTF ( meaningful TEXT ) Internal Table, it shows there is a fixed machanism, SAP uses to convert it.

I will have to debug the whole FM to get it, will have to do it.

I thought of collecting expert opinion here.

Thanking You All.

Read only

0 Likes
2,216

Hi,

I hesitated to answer yesterday, because I can't really give any useful info on your specific requirement... but, even if the form is a relatively simple one, I'd put the technical challenge in the same category as printing a smartform to, say, an mpeg video What business need/requirement would this OTF->Excel converter actually cater to..? It should IMO be something really critical and central to the business to justify investing in developing (and maintaining!) something like that inhouse.

Have you already considered outputting Smartform as XSF, HTML or XDF (out of the three only HTML will attempt to preserve layout).

cheers

Janis

Edit in: in case you have not seen it yet, here is the OTF documentation

Message was edited by: Jānis B

Read only

0 Likes
2,216

Hi Janis,

Thanks a lot for your help and sharing the OTF Document.

I will go thru the Doc and will try to map my requirement.

Thanking You All.

Read only

0 Likes
2,216

Hi All,

The OTF Documented OTF documentation helped me to solve the problem.

Any body having any probelm, pls post.

Thanking You All.

Read only

Florian
SAP Champion
SAP Champion
0 Likes
2,216

Hi Ankit,

why don't you convert the OTF-Data to a pdf? Or am I completly wrong here.

Why don't get the data at the point it is generated?

Seems easy to me to get the smartforms name here and create an coding node at the needed spot and pass it whereever you want it to have just at that moment...

Get you necessary data out of the OTF need a lot of work, because you really need the exact positions and you need to interpret the whole stuff. But there might be a way, if you have look at the otf-data the different window-names are still in there

But really, it is a messy work and I know how many hours you can waste by just getting a few informations out of that.

~Florian

Read only

Former Member
0 Likes
2,216

Hi Florian,

Thanks a lot for the sugessition.

1. OTF to PDF will not work for me since, I need the O/P in EXCEL, the end users want to edit it.

     I suggested for editing the PDF but they denied.

2. Creating the EXCEL from data before passing to smartform is not possible since the smartform is

     too complex with a lot of coading and many other conditional nodes.

Yes getting the layout back from OTF will be too complex but probably I am left with no other option.

Thanking You All.

Read only

Former Member
0 Likes
2,216

Please attach OTF as text file and screenshot of form output.

Read only

Former Member
0 Likes
2,216

Hi Manish,

Thanks a lot for helping.

But we are not allowed to share Customer Data, it can't be copied even from Server to my Desktop.

Thanking You All.

Read only

Former Member
0 Likes
2,216

Hi All,

Thanks a lot to all of you for helping me.

By the inputs from different community members, the issue have been solved.

I will certainly post it over here, but its a bit complex, so I need some time.

Thanking You All.