cancel
Showing results for 
Search instead for 
Did you mean: 

Text Element skipped! Please help

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks for your help so far, I debugged it further....I need one info.in the text element there is a line with paragrah format as PX, but when I see the list by using f4 PX is not in the list, could this be a problem?

Regards

Veena

Former Member
0 Kudos

Hi Veena

Did you get solution for this problem. Infact I am facing the same situation. In my main window for check printing sapscript text element 525 is not getting triggered. Could you please tell me how you figured out this problem.

Appreciate your help.

Thanks

Alok

Former Member
0 Kudos

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

Former Member
0 Kudos

Veena

I checked my script there are no if.. endif statements. I couldn't figure out why this particular text element is getting skipped.

Former Member
0 Kudos

Alok,

I am facing the similar problem in check printing. I am calling another element in another window after check line item is printed and it is skipped. did you solve your problem? it may help me.

Thanks,

Rutul

Former Member
0 Kudos

Hi Experts,

I am also facing same problem. when i printing some invoices ,some line items were skiping the text element.(it comes to that text element,but not execute statements related that text element) in debug mode)).

Could you please help on it. this very urgent.

Thanks

Jaya

Former Member
0 Kudos

Hi,

Please post the code of calling the WRITE_FORM FM.

Thanks,

Naren

Former Member
0 Kudos

<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!

Former Member
0 Kudos

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

Former Member
0 Kudos

It still does not work...it comes to the comment line write below /E 560

and then it skips it...for those invoices for which it executes, it executes the test line as well...for those for which it does not , it entirely skips...

Former Member
0 Kudos

I also tried defining another text element called 'TEST' and also called write_form for this, this does not get printed either, please help....

Regards

Veena

Former Member
0 Kudos

Hi,

is the text element given in a main window..

THanks,

Naren

Former Member
0 Kudos

Yes it is in the main window.