cancel
Showing results for 
Search instead for 
Did you mean: 

Printing Problem in Script

Former Member
0 Kudos

Hi Friends

i have a problem in the script..

the code goes like this...........................

do 10 times.

w_cnt = w_cnt + 1.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'ELE_DTL'

FUNCTION = 'APPEND'

  • TYPE = 'BODY'

WINDOW = 'DETAIL'

  • IMPORTING

  • PENDING_LINES =

  • EXCEPTIONS

  • ELEMENT = 1

  • FUNCTION = 2

  • TYPE = 3

  • UNOPENED = 4

  • UNSTARTED = 5

  • WINDOW = 6

  • BAD_PAGEFORMAT_FOR_PRINT = 7

  • SPOOL_ERROR = 8

  • CODEPAGE = 9

  • OTHERS = 10

.

IF sy-subrc <> 0.

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

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

ENDIF.

enddo.

in that window in that element i have declared the field &w_cnt& the out put should be

1

2

3

4

5

6

7

8

9

10.

but for me its comming as

10

10

10

10

10

10

10

10

10

10.

i am unable to understand where the problem is

thanks and regards

kumar m

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

code should be like this:

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'ELE_DTL'

FUNCTION = 'SET'

....

bset regards,darek

Former Member
0 Kudos

Hi,

Activate debugger for your script and see what value is being passed to the script.

Hope that helps you to understand.

Regards,

Narendra.