on 03-20-2007 7:57 PM
Hi all,
I have a problem with SAP script.. For one particular type of invoice, after write_form with the text element is called, I can see in debugging mode that the cursor comes to the text element and then totally skips the text element and goes to the next one...But the sy-subrc of write_form is zero. Could you please help? For other invoices it works fine. there is no condition or anything in the element.
Any Idea what the problem could be? Please help!!
Thanks & Regards
Veena
Hi,
Not sure..Why it is getting skipped..
Make sure the CLOSE_FORM or END_FORM FM is not called before your call...
Thanks,
Naren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alok,
The problem in my case was that, the programmer had put one if statement in the previous text element and its corresponding endif statement in the text element 560 which was not getting triggered when ever the previous text element was not called.
Please check if you have any if and endif statements in two seperate text elements.
Regards
Veena
Hi,
Please post the code of calling the WRITE_FORM FM.
Thanks,
Naren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<b> clear rf140-element.
rf140-element = '560'.
data: total_ve like RF140-GSALDF.
totaltax = totaltax * -1.
total = subtotal + totaltax.
total_ve = subtotal_ve + totaltax_ve.
total_ve = subtotal_ve + bseg-dmbtr.
call function 'WRITE_FORM'
exporting
window = 'MAIN'
element = '560'
exceptions
window = 1
element = 2.
if sy-subrc = 1.
window = 'MAIN'.
perform message_window.
endif.
if sy-subrc = 2.
window = 'MAIN'.
ereignis = '560'.
perform message_element.
endif.
*This is my change...the new text element.
*Start of change joshv002
call function 'WRITE_FORM'
exporting
window = 'MAIN'
element = 'TEST'
exceptions
window = 1
element = 2.
*End of change joshv002.</b>
The text element 560 is gettign skipped, but only for some invoices...However write_form gets called...Thanks so much for trying to help me out!
Hi,
Did you check in the sap script debugging..Whether the text element is getting executed..?
Also Give a dummy text in that text element...And then print it again..
Thanks,
Naren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
is the text element given in a main window..
THanks,
Naren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.