Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Sap Script - Skipping of text element - Did anyone come across

Former Member
0 Kudos

Hi all,

1. I have two line items in purchase order. I run my print layout in debugging mode.

2. For first line item, the write_form is called in loop.

i. the sapscript is called and the text element

item_line_1 is reached by debugger. It goes into

the text element and prints the details are

required

3. The program loops into the second loop pass (in print program), calls the write_form again

i. the sapscript is called and the text element

item_line_1 is reached by the debugger. <b>Now the

program skips this text element compeltely</b> (so

without printing any details for the second loop

pass)

<b>DID ANYONE COME ACROSS SUCH SCENARIO where the code text element is completely skipped inspite of cursor reaching the text element.</b>

Advanced Thanks

Message was edited by: Vishal Prabhakar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi vishal,

1. for testing what we can do is :

a) rename the original text element for line item

b) create a new text elemetn (with same name)

and write some hard coded value eg.

'HELLO XYZ'.

c) run ur program and test, whether

this is getting printed or not !

d) Another option is, try with SOME OTHER NAME

of TEXT ELEMENT.

regards,

amit m.

4 REPLIES 4

Former Member
0 Kudos

Hi vishal,

1. After your whole program runs,

does line item number 1 appear or not ?

2. In your driver program,

just check sy-subrc

after WRITE_FORM (for text element)

regards,

amit m.

0 Kudos

Hi Amit,

1. line item number 1 does appear.

2. In driver program sy-subrc is zero after WRITE_FORM is executed.

regards,

vishal.

Former Member
0 Kudos

Hi vishal,

1. for testing what we can do is :

a) rename the original text element for line item

b) create a new text elemetn (with same name)

and write some hard coded value eg.

'HELLO XYZ'.

c) run ur program and test, whether

this is getting printed or not !

d) Another option is, try with SOME OTHER NAME

of TEXT ELEMENT.

regards,

amit m.

0 Kudos

hi amit...

tht sounds good...

will revert back to u....

regards..

vishal