Application Development and Automation 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: 
Read only

SAPSCRIPT issue

Former Member
0 Likes
377

Hi experts,

I have a std driver program for Workorders which is getting triggered from Iw32

i have copied the script PM_COMMON to a Z ,still using the same std driver

i hv to show the object list in the script.I hv added a zsubroutine and i am filling details inside the form into a text object

The problem is , when i delete some objects in the object list (say 1 out of 5) , in SO10 it will show 4 lines

but in script it will show all 5 lines.

In debug mode i can see only 4 lines.SO10 also 4 lines.

on debuggging script 5 lines are thr.

After saving the tcode its coming correct.

Any solutiuon?

2 REPLIES 2
Read only

Former Member
0 Likes
351

are you producing the script outputs back to back within a single transaction execution?  If so, realize that the global declarations in the SAPScript driver program are not being refreshed....  SAP executes the global declarations only once for each first start of the SAPScript program.  So, if you want to execute back-to-back as the data changes within your transaction, your ENTRY (first) subroutine needs to clear all appropriate global tables and structures and rebuild them every time the subroutine is entered!  If you do not, you will continue to report "stale" data and/or "double up" on the contents of your global tables, etc., if a routine in the program appends to global internal tables.

Read only

0 Likes
351

Thanks..

Since i am not touching the std part and i am dealing with my custom text object ..i have full control on that.

I tried COMMIT_TEXT inside the subroutine .still its not getting updated in the SAPSCRIPT.

How can i clear the global memory which hold the Text object details.

Actually on every execution my subroutine deletes the Text object and creates a new one(but with the same object name).