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: 

SY-SPONO empty under ECC 6.0 ???

Former Member
0 Kudos
746

hi friends,

i am testing Z-ABAPS after upgrading from R/3 46c to mysap erp 2005 (ECC 6.0):

at the end-of-selection i am submitting another z-abap which the

parameter sy-spono.the spool will be transmitted into PDF in this z-abap and then got mailed.

BUT: under ECC 6.0 SY-SPONO is always EMPTY ! i have debugged the same program with R/3 4.6.c now and with ecc 6.0. with 46c it is working, sy-spono is allways filled, i can use it as parameter. but in ecc 6.0 it is empty.

any ideas for that ?

reg, Martin

END-OF-SELECTION.

IF sy-batch = 'X'

AND ( p_ftp = 'X' OR p_mail = 'X' ).

SUBMIT zzfl_convert_pdf USING SELECTION-SET 'MIS'

<b>WITH spoolno EQ sy-spono</b>

WITH download EQ p_ftp "03a

WITH p_file EQ lf_file

WITH p_mail EQ p_mail "03a

WITH p_vert EQ p_vert "03a

WITH p_betr EQ p_betr "03a

AND RETURN.

ENDIF.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
180

Hi Martin,

i do it on this way:

NEW-PAGE PRINT ON LINE-SIZE STRL

NO DIALOG

NO-TITLE

NO-HEADING

IMMEDIATELY ' '.

*

TXT_LINE = 'Ich bin ein PDF-Text'.

WRITE: / TXT_LINE.

  • Rücksetzen Spollausgabe auf Bildschirm.

NEW-PAGE PRINT OFF.

*

  • Spoolnummer besorgen

SPOOL_NR = SY-SPONO.

and i have (also under ECC6) no problem.

Regards, Dieter

13 REPLIES 13

Former Member
0 Kudos
180

hi friends,

has nobody an idea for that ? i can't find the problem in the program ;-(

reg, Martin

0 Kudos
180

hi there,

i have found no solution for this problem ;-( has nobody an idea ?

why is sy-spono empty at end-of-selection ? how can i find out the value of the spool-file to use it as parameter for the mentioned call.

regards, Martin

Former Member
0 Kudos
181

Hi Martin,

i do it on this way:

NEW-PAGE PRINT ON LINE-SIZE STRL

NO DIALOG

NO-TITLE

NO-HEADING

IMMEDIATELY ' '.

*

TXT_LINE = 'Ich bin ein PDF-Text'.

WRITE: / TXT_LINE.

  • Rücksetzen Spollausgabe auf Bildschirm.

NEW-PAGE PRINT OFF.

*

  • Spoolnummer besorgen

SPOOL_NR = SY-SPONO.

and i have (also under ECC6) no problem.

Regards, Dieter

0 Kudos
180

hi dieter,

i have tried it with new-page print on and off ! it does not work :-(((

by the way: do U also get the warning message when checking the program that new-page print on should NOT be used any more under ecc 6.0 ???

regards,Martin

0 Kudos
180

btw:

the output is is an ALV-output in batch.

i have debugged it once again, and the sy-spono is ZERO

0 Kudos
180

Hi Martin,

i get the same warning, but i ignore it.

I think you don't get an SPONO because you do not print it

by your report itselve. Yoe print it via alv, and that will be handeld in

REUSE... Why don't you send the email dirkct via ALV-Output.

Another way is to read the spono from TSP01.

Hope it helps.

Regards, Dieter

0 Kudos
180

hi dieter,

the main question is: why has it worked under R/3 46c ??

the second question: what do you mean by 'send the email direct via ALV-Output' ??

To read it direct from TSP01 is another option, BUT: how should i know

that it is the right spoolfile ?

reg, Martin

0 Kudos
180

Hi Martin,

sorry but i thought, that you will need the SPONO to send an email

with this output. I make a mistake.

I have test it in ECC6. We use alv-grid. when i set a break-point direct

after the FM: CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

i get the spoolnumber in SY-SPONO.

How do you use ALV (normal, drod, oo)?

Regards, Dieter

0 Kudos
180

i also use 'REUSE_ALV_GRID_DISPLAY'

and after that i also have sy-spono = zero.

but: i do it in BATCH, as the print-alv-list is produced in batch, not online.

regards, Martin

0 Kudos
180

Hi Martin,

i have tested it in online and batch. in batch i don't get SPONO, but i don't why.

Sorry.

regards, Dieter

0 Kudos
180

thats really bad news.................

i have no solution for this now. i am doing the upgrade in production very soon and it would be a BIG problem for me not having the problem solved.

anyone who can help ?

reg, Martin

0 Kudos
180

Hi Martin,

i think i get it. Try this.

TABLES: TSP01, TBTCP.

DATA: ITSP01 TYPE TABLE OF TSP01 WITH HEADER LINE.

*

DATA: EVENTID LIKE TBTCM-EVENTID,

EVENTPARM LIKE TBTCM-EVENTPARM,

EXTERNAL_PROGRAM_ACTIVE LIKE TBTCM-XPGACTIVE,

JOBCOUNT LIKE TBTCM-JOBCOUNT,

JOBNAME LIKE TBTCM-JOBNAME,

STEPCOUNT LIKE TBTCM-STEPCOUNT.

DATA: SPONO LIKE SY-SPONO.

*

SELECT * FROM TSP01 UP TO 10 ROWS INTO TABLE ITSP01.

*

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_STRUCTURE_NAME = 'TSP01'

TABLES

T_OUTTAB = ITSP01.

*

IF SY-BATCH = 'X'.

CALL FUNCTION 'GET_JOB_RUNTIME_INFO'

IMPORTING

EVENTID = EVENTID

EVENTPARM = EVENTPARM

EXTERNAL_PROGRAM_ACTIVE = EXTERNAL_PROGRAM_ACTIVE

JOBCOUNT = JOBCOUNT

JOBNAME = JOBNAME

STEPCOUNT = STEPCOUNT

EXCEPTIONS

NO_RUNTIME_INFO = 1

OTHERS = 2.

*

SELECT SINGLE * FROM TBTCP WHERE JOBNAME = JOBNAME

AND JOBCOUNT = JOBCOUNT

AND STEPCOUNT = STEPCOUNT.

*

SPONO = TBTCP-LISTIDENT.

ELSE.

SPONO = SY-SPONO.

ENDIF.

WRITE: SPONO.

Hope it helps.

regards, Dieter

0 Kudos
180

hi Dieter,

THANK YOU, this is the solution, now it is working ! a little bit of 'work around', but that doesn't matter.

you have saved my day, i reward full points to U !

regards, Martin