cancel
Showing results for 
Search instead for 
Did you mean: 

its possible to create a grid like this?!?!?

Former Member
0 Kudos

hello to all, im new in Mii and i have a sql statement to populate the table but i want to know if it is possible to create a grid like the image in this link :

http://img17.imageshack.us/img17/3021/gridx.jpg

and then put the information that comes from the sql in the blank spaces

regards and thanks for the help in advance

Mário

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hello i alredy know how to put the Shift 1, Shift 2,Shift 3 and Total but now i only need help to put the data in the blank spces

regards

Mário

Former Member
0 Kudos

Mario,

here is one idea:

- build a BLT that creates a XML output with three columns (Label, Quantity produced, Scrap)

- fill the rows with your values

- define a xacute query which calls your BLT

- define an iGrid in your web page that calls the xacute query

- try to set the column name of the leftmost column heading to space

If you want to fill the spaces in an html table using JavaScript, you may also call the xacute without a display template (to make it unvisible) and pick up the values from the query using the applet functions like getCellValue().

See also [iGrid component methods|http://help.sap.com/saphelp_xmii120/helpdata/en/44/d1e7a599f3409fe10000000a11466f/content.htm]

Michael

Edited by: Michael Otto on Sep 15, 2009 8:46 PM

Former Member
0 Kudos

hello, first i want to thanks for the idea of Michael, then i want to clarify somethings of your idea...

BLT..it is a transaction..correct?

you say to create a XML output with 3 columns..label, quantity, scrap but what do you want to say with label???

so in the transaction:

i create a XML Document with three fields then with my SQL instruction i fill the fields...

correct?

regards and thanks one more time

Mário

Former Member
0 Kudos

Hi,

You to do the fallowing things in BLS trnsaction:

1) Create a Doc action block with three columns like: Shift,Quantity,Scrap

2) Add SQLQuery Action block and configure it with already created SQL Query.

3) Put a repeater action block below that and configre with XPATH.

4)Add a Row action block,configure with Doc.output and map the each column from the repeater.

5) Also add other row with the total and take the sum of the quantity and scrap.

6) Create a transaction property of type xml with Output checked.

7) Add a sequence below th Doc action block and use Assignment action block. Map the Doc.output to transaction property.

8)Call this trnsaction in Xacute query with output selected and save.

9) Use iGrid Display template and map the created Xacute query.

10) In html page create table with the table title Summary of the day and put the appalet over here.

-Suresh

Former Member
0 Kudos

thanks all for your answers but just a little thing: the shift gonna be a parameter but i want to calculate at the same time the max yield and max scrap of all the 3 shifts...what i have to put in the transaction for the shift number passes of 1 to 2 and then 2 to 3...i know that i have to increment in somewhere...

regards

Mario

Former Member
0 Kudos

Hi,

If the data is from the Tag query(i.e TAGS Data), you can easily calculate the MAX,AVG,MIN etc from Statatics mode available there. But for sql query this option is not avaialble. But i SQL query itself you can achive this by using the MAX function. For example SELECT MAX(salary) as "Highest salary" FROM employees.

You can use For repeater action block for the shift increament if you have mutiple row data by configuring from 1 to 3. And in row expression use like this: "Shift"&ForNextRepeater_0.CurrentItem. If you have three rows of data then use repeater: "Shift"&Repeater_0.CurrentItem. Otherwise use Assignment action block, create Local property Shift and increament this shift property after each shift completion like this: Local.shift+1.

-Suresh

Former Member
0 Kudos

thanks a lot for the help...this is a way but i already solved, i build an sql instruction that makes solve this problem...im gonna test the two ways and then decide

thanks to all one more time

Mário

Former Member
0 Kudos

hello..in this step...

5) Also add other row with the total and take the sum of the quantity and scrap.

i have to add to my document ...the total field...correct??

regards

Former Member
0 Kudos

Cemil,

Yes yo have to add to document action block. For shift column map as "Total".

-Suresh

Former Member
0 Kudos

hello, correct me if i say something wrong of yours steps:

1) Create a Doc action block with three columns like: Shift,Quantity,Scrap......

and then i put another field Total....correct?!?! or not?

2) Add SQLQuery Action block and configure it with already created SQL Query.

the result of my SQLQuery comes like this...

Yield Scrap

5000 1100

this is the result of this query:

select sum(max(yieldqty)), sum(max(scrapqty))

from z_event

where linenumber= '[Param.1]' and shiftnumber = '[Param.2]'

and (eventtimestamp >= to_date('[Param.3] 00:00:00', 'dd.mm.YYYY hh24:mi:ss'))

and (eventtimestamp <= to_date('[Param.4]', 'dd.mm.YYYY hh24:mi:ss'))

group by ordernumber

its better that the shiftnumber comes to???if yes the result comes like this:

Yield Scrap ShiftNumber

3720 35 1

30878 117 1

3) Put a repeater action block below that and configre with XPATH.

4)Add a Row action block,configure with Doc.output and map the each column from the repeater.

5) Also add other row with the total and take the sum of the quantity and scrap.

how to make the SUM?!?! There isnt SUM Function...

like this Total = Total + Repeater_0.Output{/Row/MAX_YIELDQTY_} ???

regards and sorry for all this questions

matinha

Former Member
0 Kudos

Hi,

Yes ,absoultely right you have got my points correctly. For getting the total quantity you have to do like this:

Create a local property with name Tot_Qty.Use a assignment block below the row action block, and assign this local property with the expression: Local.Tot_Qty+Repeater_0.Output{/Row/MAX_YIELDQTY_}. Map ths Local.Tot_Qty to the Total row's columns. And for Scrap is also same.

-Suresh

Former Member
0 Kudos

hello Suresh, one thing that i dont understand how this transaction gonna do is:

in my sql i get this result :

Shift Yield Scrap

1 3720 35

1 30878 117

this is for Shift 1 and i want to join this two lines and then calculate shift 2 and shift 3...and only then i calculate

the total_Yield = Shift1_Yield + Shift2_Yield + Shift3_Yield and the total_Scrap = Shift1_Scrap + Shift2_Scrap + Shift3_Scrap

could you explain me this

regards

Former Member
0 Kudos

Hi,

You can use Switch action blocks to get the data of the Shift1,2 and 3. You can configure with 2 inputs. Pass the Local.shift as input value.For MatchValue1 pass Shift1 and MatchValue2 pass shift2 and default will be Shift3.

Hope this helps you.

-Suresh

Former Member
0 Kudos

hello, thanks for your efort to explain me this things...now my transaction is working but only calculates for shift 1...the shift it is a parameter of SQL Query.

i have one question : you said to me to create a local variable(shift)..ok...and then use the Switch action block..but where i going to put his action block, i think that is before the repeater...is right??...

another question is how to calculate total of all the Shifts for Quantity Produced and Scrap..i dont understand of another times

my transaction is like this : http://img10.imageshack.us/img10/2029/celltrans.jpg

and my grid is like this : http://img29.imageshack.us/img29/772/gridk.jpg

regards and thanks a lot for your help

Mário

Former Member
0 Kudos

Hi,

Give me a sometime,I'll pass similar transaction to you.Please update your details in SAP SDN.

Former Member
0 Kudos

hello, what details you need to be updated?

regards

Mario

Former Member
0 Kudos

hello, Suresh..so when you have time post something about my questions please.. thanks one more time

Mário

Former Member
0 Kudos

Mario,

I'm not able to view your contact details in SDN.Please change the settings so that I can pass the similar trnsaction to you by Monday.

Happy weekend!!

-Suresh

Former Member
0 Kudos

ok, i already updated my details in SAP SDN.

thanks

Mario

Answers (0)