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

Smartform variable picking up random values

Former Member
0 Likes
740

Hi,

I have created a smart form where i have used a select statement to fetch data for a variable that i need to use in the where condition. For example:

select single * from table KNA1 into wa_kna1 where customer = gs_partner.

This gs_partner is of a type data element that is part of a structure. However at runtime this gs_partner is picking up some random value. Before the execution of my code its already filled with data. It is being used in the footer as well with the same select statement. So ultimately my smartform is it displaying the detailss of some random customer. I thought it could be a buffer memory issues so I logged out and logged in again. I also used the clear statemnt at the end of my code. Still I am getting the same value. How could this value be fetched randomly while designing the smartform? is there any way I can find out how and where this value is being filled

4 REPLIES 4
Read only

Former Member
0 Likes
705

So Neena, what you currently have is :

there is a variable gs_partner (is this a variable or a workarea??)

you are using this inside the smartform

---> where are you picking this gs_partner from?

---> are you picking it before the smartform call(in the driver program) or inside the smartform,

answer these then i think you can easily find the answer to your question

Read only

Former Member
0 Likes
705

Check the value of

gs_partner

+ before calling the smartforms,

+ before select statement

+ after select statement.

Did you put the select statement in the smartform? Why don't you transfer KNA1 to the smartform instead of selecting in the smartform?

Select statement in footer window, the variable gs_partner can be used somewhere before that, or changed before going to the footer window.

Read only

Former Member
0 Likes
705

Hi,

Thanks for the suggestions. I got the solution because of the suggestions. gs_partner is a variable that was fillled before the select statement. It was called inside the smartform itself.

Read only

Former Member
0 Likes
705

The suggestions helped a lot.

Edited by: NeenaJ on Dec 7, 2011 12:01 PM