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

Sapscript problem

Former Member
0 Likes
440

Hi all,

Iam exporting a form to pdf file.

I use the follwing code for my startform FM.

call function 'START_FORM'

exporting

archive_index = space

form = 'YUTAC_PO_V01'

language = sy-langu

startpage = space

program = sy-repid.

Can i know what is archive_ndex. i get the follwing error

"In the function "START_FORM" StRUCTURE the parameter "ARCHIVE_INDEX" is typed in such a way that actual parameters are not valid, unless they are compatible according to the Unicode fragment view".

Please send your suggestions.

Rajesh.

3 REPLIES 3
Read only

gopi_narendra
Active Contributor
0 Likes
409

you can not pass space to a structure.

archive_index is a structure like TOA_DARA for which u can not pass SPACE.

and more over the parameter is nt necessarily to be filled.

call function 'START_FORM'

exporting

FORM = 'ZGL_PCLABELS3'

LANGUAGE = SY-LANGU

STARTPAGE = 'PAGE1'

PROGRAM = SY-REPID

exceptions

FORM = 1

FORMAT = 2

UNENDED = 3

UNOPENED = 4

UNUSED = 5

SPOOL_ERROR = 6

CODEPAGE = 7

others = 8.

if SY-SUBRC <> 0.

message id SY-MSGID type SY-MSGTY number SY-MSGNO

with SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

endat.

Regards

- Gopi

Read only

Former Member
0 Likes
409

hi

good

try like this and dont pass any value for archive_index

CALL FUNCTION 'START_FORM'

EXPORTING

  • ARCHIVE_INDEX =

FORM = 'ZFORM1'

  • LANGUAGE = ' '

  • STARTPAGE = 'X'

PROGRAM = 'ZSCRIPT1'

  • MAIL_APPL_OBJECT =

  • IMPORTING

  • LANGUAGE =

  • EXCEPTIONS

  • FORM = 1

  • FORMAT = 2

  • UNENDED = 3

  • UNOPENED = 4

  • UNUSED = 5

  • SPOOL_ERROR = 6

  • CODEPAGE = 7

  • OTHERS = 8

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

thanks

mrutyun^

Read only

Former Member
0 Likes
409

Hi,

The PDF has been created without any data.

Thanks,

Rajesh.