Skip to Content
0
Oct 28, 2005 at 10:55 PM

How does SAPscript 'WRITE_FORM' works ?

147 Views

Hi

I have a Z program working fine, it is a SAPM07DR copy and i aggregated some fields to WASCHEIN form.

But i see when the program (standard or copy) calls the write form, the field values in program have other values (just the previous values) than the values wich appears in the printed form.

For example:

WASCHEIN KOPF Window has the WERKS value:

Plant: &*T001W-WERKS&

But when the write form is called

CALL FUNCTION 'WRITE_FORM'

EXPORTING ELEMENT = 'KOPF'

WINDOW = 'KOPF'.

In the program the *T001W-WERKS field has a different value that the value wich appears in the spool, debugging i see that the field has the prevoius value in the program:

Program

*T001W-WERKS

(when Write Form).............Spool

-


.................----


' '...................................Plant: 0900

'0900'.............................Plant: 0901

I had to do the same logic in my new aggregated fields, but i realy don't know why does the program works in this way.

Why the print program and sapscript function works in this way ?

How does WRITE-FORM works, that is where the function take from the values to print ?

Thanks

Frank