‎2013 Jun 24 10:29 PM
Hello,
I have a problem when I run my sapscrip, this repeating the values from the text elemets, pleas see image below.
Do u know why?
Thanks
‎2013 Jun 25 4:06 AM
Hi Luis,
Please activate the debugger in SE71 and debug to see why it is repeating. Maybe you would have called WRITE_FORM twice or something. Please see and revert.
BR.
‎2013 Jun 25 4:06 AM
Hi Luis,
Please activate the debugger in SE71 and debug to see why it is repeating. Maybe you would have called WRITE_FORM twice or something. Please see and revert.
BR.
‎2013 Jun 25 5:00 AM
Hi,
Maintain Text Element in main window
/E TE
call function 'WRITE_FORM'
exporting
ELEMENT = ' TE'
* FUNCTION = 'SET'
* TYPE = 'BODY'
window = 'MAIN'
* 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.
or
clear work area.
‎2013 Jun 25 5:30 AM
Hi,
May be not clearing the variables that are passed to these text elements after they are written into the script.
Cheers,
Arindam
‎2013 Jun 25 5:55 AM
Hi,
Please check the item internal program values from where it is filling in driver program if it is correct please check WRITE_FORM is called for 2 times,In script please check printing values variables used for two times? These all are the possible reasons.
Regards,
Ravi Shankar L
‎2013 Jun 25 6:17 AM
‎2013 Jun 25 6:18 AM
As per Ravi check are you written write_Form two time.
call function 'WRITE_FORM'
exporting
ELEMENT = ' TE'
* FUNCTION = 'SET'
* TYPE = 'BODY'
window = 'MAIN'
* 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.
call function 'WRITE_FORM'
exporting
ELEMENT = ' TE'
* FUNCTION = 'SET'
* TYPE = 'BODY'
window = 'MAIN'
* 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.
‎2013 Jun 25 10:39 AM
Hi,
Check your Loop internal table.. it may contain duplicate records..
Regards
Tejas