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: 

OTF-Spool to ASCII via "list display" ?

Former Member
0 Kudos

I have a spool file of type OTF, but need to output as TXT (ASCII).
CONVERT_OTF does not work, the format is wrong and limits the character length to 132, I need 141 characters.
When viewed in the spool can select list display, the display is correct and the output file as well.

Unfortunately I can not find that performs the conversion code.
When you call the list display MSSCDFLS is traversed to set the display parameters, then I lose the track.

Does somebody has any idea?

7 REPLIES 7

Private_Member_7726
Active Contributor
0 Kudos

Hi,

Well, the display function module used by spool system is SSFDISPLAY_OTF_LIST, but it's not really intended for the kind of use you need (it displays the list).

I guess, if going for unreleased/undocumented SAP's internal stuff is ok in your case, you could try to "wrap" the FM in a REPORT program, which could be SUBMITed EXPORTING LIST TO MEMORY and import the list from memory.

cheers

Jānis

0 Kudos

Hello Jānis

Thanks for the answer.

I set a breakpoint in the function module SSFDISPLAY_OTF_LIST, but when calling the list display of the flow is not stopped.

Function module PREPARE_OTF_FOR_GUI_PREVIEWER from the same functional group is used, but already in the display of OTF and not in the list display.

The functional modules SAVE_OTF_TO_MEMORY and CONVERT_OTF_MEMORY I had seen, but CONVERT_OTF_MEMORY used functional module CONVERT_OTF (see above).
Other, matching reading memory are functional modules unknown to me.

I use FUNCTION 'RSPO_L_RETURN_RAW_DATA' and then have an internal table, which is equal to the OTF table from the INCLUDE MSSCDFLS the expiry of the list display of SPOOL.


Now I need to convert before the presentation of the display.


thanks

0 Kudos

Is the OTF prepared via SAPscript? That would explain the difference, because I was trying to display Smartform spool (and didn't know there is difference in spool display between Smartform OTF and "other" OTF ...). I'm on SAP Basis 702, btw... there may also be differences between different basis versions.

Try to feed your OTF to the SSF list display function module I posted regardless: the display logic for other type of OTF on our system ultimately calls the same logic, only via CALL DIALOG 'DISPLAY_OTF'. I guess the at some point SAP programmers wraped the OTF list display as a function module, but didn't refactor all the old CALL DIALOG uses...

I find this SAP comment mildly amusing

cheers

Jānis

0 Kudos

Hi

I have SAP_BASIS 731.


But maybe my description is not so good. I made screenshots, the text is in German, but it should be appreciated.

Step 01: SP01
Step 02: Double-click on the OTF file
Step 03: Choose list display


I set a breakpoint in the INCLUDE LSOSTF09, but when calling the list display of the flow is not stopped.


Tomorrow I'll see if I can build from the 'SSFDISPLAY_OTF' something.

Thank you

0 Kudos

Hi,

Yes, I'm using the same steps, but with the document type SMART (produced via smartform) for the OTF spool:

I believe SSFDISPLAY_OTF_LIST must still be in use, because it's corrected for 740 in Note 1822920 - Smart Forms: List display of OTF spool. I also believe that the Document type (what kind of form produced OTF) should play no role for the purposes of displaying OTF as List (SSFDISPLAY_OTF_LIST should also work fine for OTF produced by, say, SAPSCRIPT).

SSFDISPLAY_OTF does use SSFDISPLAY_OTF_LIST, but, the way I understand it, it's designed to try to call "Graphical preview" first, whenever possible. It's pain (or maybe not possible at all) to make SSFDISPLAY_OTF to display the List first, in other words.

I can get the List display when I call SSFDISPLAY_OTF_LIST passing only OTF table:


data: display_parameters type SSFPP .
*display_parameters-tddevice = 'PRINTER' .

    call function 'SSFDISPLAY_OTF_LIST'
      EXPORTING
        i_print_options = display_parameters
      TABLES
        p_otf           = gs_job_output_info-otfdata[]

LSOSTF09 is just one of includes I came across when looking for possible standard SAP uses of SSFDISPLAY_OTF -> SSFDISPLAY_OTF_LIST call chain  (forget it, in other words).

German is no problem

Cheers

Jānis

0 Kudos

Hi,

I'm sure SSFDISPLAY_OTF_LIST is still in use.
But not directly in the list display of the SPOOL because SAP has come up with something special again.

A colleague pointed me to the old debugger. Because you can can be prepared the list display.

With PERFORM LS_SHOWPAGE in MSSCDFLS the display is filled.
The WRITE statements which I had simply ignored.

New Editor > old Editor > List


I hope I can take over the section and push the WRITE statements in a table.


Even if it did not fit right, I want to thank.


Dankeschön

0 Kudos

Yup, fascinating stuff and code that was state of the art maybe 30 or so years ago .

Ok, so there should be functionality for at least two distinct "OTF spool as ABAP List" viewers in SAP then, because I can't seem to come into MSSCDFLS (SAPMSSCD) functionality when working with Smartform OTF Spool... I mean, why the hell not - one viewer is good, two is no doubt doubly good for keeping folks busy!

Edit in: ok, so the magic of choosing the viewer (at least on 702) happens in RSPO_ROUTPUT_JOB:

I suspect there must have been very compelling reasons for having Smartform specific OTF viewer - something like handling Smartform copy windows in preview correctly or who knows what else...

cheers

Jānis