cancel
Showing results for 
Search instead for 
Did you mean: 

select query in smartforms

shaik_zia
Explorer
0 Kudos

hi everyone,

iam new to smartforms and have a query regarding select st in smartforms,

i have created a table in the main window, in that i have 7 cols,in which the 5th and 6th cols are Quantity(VBRP-FKIMG) and Condition Value (KONV-KWERT) respectively.Now i want the product of these 5th and 6th cols and want the result to be displayed in 7th col. How can i do this and where i have to write the code?

if i want more than 1 row then how can i use the loop for this.

i have written the code to display the 1st 6 cols in the program lines of main window,,,but iam unable to write the code for the product of FKIMG and KWERT.

Plz help me if anyone knows the answer,,its urgent

<b>Points will be rewarded</b>,

u can also mail the answer to this id mohammed.zia@rediffmail.com

thnx in adv

Zia

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

u r correct,we can write coding in programlines,then coming to looping place the cursor on main window->create-> flowlogic ->loop,then u will have loop for that flow logic.

then" iam unable to write the code for..............",means???

shaik_zia
Explorer
0 Kudos

hi everyone,, i got the answer for the select query,, thanks 2 all of u who has helped me,,,

shaik_zia
Explorer
0 Kudos

hi srilatha,, iam unable write the code means,, i had written the code in the program lines,, but i was not getting the result, but now its comin,,

thanks 4 ur answer

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

you can calculate the your 7th column in the program lines.

After creating a table right click > create>program lines.

in this you need to pass the 5th , 6th and 7th column as input parameters and 7th column in the out put parameters.

make the calculation in the program lines as necessary.

Now in the Main area display the 7th coulmn value which is calculated in the program lines.

Another alternative is before the table . create a program lines.

modify the internal table accordingly and then call the table with the modified internal table.

For eg:

Program lines -- zprog

input paramers : itab and output parameters : itab.

loop at itab.

it_tab-colum 7 = it_tab-column 6 * it_tab - column 6.

modify it_tab.

endloop.

In the table under data table pass your modified internal table with workarea.

in the 7th column give &it_tab-column7&. that's it.

Br,

Laxmi