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: 

Clear Static Variable of a standard program in a custom program

0 Kudos

Hello,

I am using 2 standard function modules - UWS_BW_EX_WS_QUEST_TEXT and UWS_BW_EX_WS_ANSWER_TEXT in my custom program one after the other.

Both these function modules access the Function Module - UWS_BW_GET_SURVEYS. Here the static variable 'SD_NO_MORE_DATA' is flagged once the Function Module UWS_BW_EX_WS_QUEST_TEXT is executed. So i fetch the data and then call the Function Module UWS_BW_EX_WS_ANSWER_TEXT. At this time the variable 'SD_NO_MORE_DATA' is already flagged and hence it exits and does not provide me the desired result.

The only way is to clear the flag of the static variable in my custom program. How do I do this? I tried FREE MEMORY (seems obsolete), it did not work. Can anybody guide me here please.

Thanks.

2 REPLIES 2

Former Member
0 Kudos

Try using field symbols to clear the static variable, I am not sure if it will really do, but you can give it a try once.

like

field-symbols  : <fs_clear> .

data: arbi type char20.

arbi = '(MAINPROGRAM)STATICVAR'. "main program in your case functiongroup

assign  (arbi) to <fs_clear>.

0 Kudos

Hi Pranav,

Thankyou for responding. This method does not seem to work.

Due to timeline constraints, I am trying to create a copy of the standard function module UWS_BW_GET_SURVEYS and make the changes that suit my requirement.

Thanks.