cancel
Showing results for 
Search instead for 
Did you mean: 

printing a sapscript formular from a function module

Former Member
0 Kudos

Hello all,

i have a problem with printing a sapscript-formular from a function module.

I created a sapscript-formular and i want to print it one time from a z-program und one time from a z-function module.

The print from the z-program works fine. But when i start my function module and the print comes out, all the fields in the formular are empty. I don't know what i'm making wrong. It is the same formular with the same input and i can see when i debug, that the fields in my function module are filled.

Has anybody a solution for me?

Thanks a lot.

with kind regards

Nicole Lorke

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello,

i found the solution of my problem.

when i want to print a sapscript formular from a function module i have to set in the options the programname.

options-tdprogram = 'SAPLZCH...'

it is not necessary when i want to print from my z-program.

now all works fine...

kind regards

Nicole Lorke

Edited by: Nicole Lorke on Nov 18, 2011 8:20 AM

Former Member
0 Kudos

Hello,

i tested to print my formular from my program.

I used

PERFORM print_my_form IN PROGRAM z_test

but it didn't work.

the fields in my formular are still empty.

How can i look if the fields in the formular are filled or empty when printing? When i start the debugger in sapscript i don't know where i can see my variables.

kind regards

Nicole Lorke

Former Member
0 Kudos

what about if you submit your driver program in your function module?

A sap-script form knows the GLOBALLY declared variables of the driver program, and nothing else.

If your form actually sees your variables but they are just empty, what i dont believe, i would set a watchpoint to see where info gets lost.

Former Member
0 Kudos

Hello Srilakshmi,

thanks a lot for your answer.

The declaration of my variables is in an top-include of my function group.

When i go to TA SE71, open my formular, i can see my printing programs. The variables are known in the sapscript formular from both printing progrgams (because of the global declaration).

I think the informations in my variables get lost when printing... but i don't know why...

i hope you (or perhaps someone else) have another idea for me.

with kind regards

Nicole Lorke