cancel
Showing results for 
Search instead for 
Did you mean: 

Need help to display data in Grid?

Former Member
0 Kudos

Hi all,

I created one transaction i which i will send tree input and i will get Shipment header and Delivery details.

I created one Xecute Query and i Created two IGrids to display the data.

First Grid will display only Shipment delivery details and 2nd one will display only Devlivery details.

Iam writing one .irpt webpage to diplay this two grids.

But client requirement is when the User click on first gird .....it has to check the shipment number and according to that shipment number ........delivery details need to be displayed.

Please can any one help me how to write the logic.

Thanks and regards,

Phani

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Please go through the below link, you can find help on grid methods,events,displyaing etc.

http://help.sap.com/saphelp_xmii120/helpdata/en/44/351273ba154cc5e10000000a11466f/frameset.htm

-Suresh

Former Member
0 Kudos

Phani,

Just add to your first grid HTML code this line:

<param name="SelectionEvent" value="showDelivery" />

Then you create a javascript function with the same name:

function showDelivery() {

var Shipment = document.ShipmentGrid.getGridObject().getSelectedCellValueByName("Shipment_Number");

document.DeliveryGrid.getQueryObject().setParam(1, Shipment);

document.DeliveryGrid.updateGrid(true);

}

Hope this help.

Former Member
0 Kudos

Hi,

Thank you for your reply.

i written the code like this.

function getShipmentNumber()

{

var selectedrow = document.Shipment_Grid.getGridObject().getSelectedRow();;

var passvalue = document.Shipment_Grid.getGridObject().getCellValue(selectedrow,1);

var secondapp = document.Shipment_Delivery.getQueryObject();

secondapp.setParam(1,passvalue);

document.Shipment_Delivery.refresh();

}

in first gird HTML iam calling like this

<PARAM NAME="SelectionEvent" value="getShipmentNumber" />

and in 2nd Html iam calling like this

<PARAM NAME="Param.1" VALUE=""/>

Now when i hardcode the shipment number iam geting data in 2nd grid, if iam passing through above code iam not getting data.

i done some R&D and i got the error........iam passing shipment number as 1234 .......were system need it as 0000001234...........so how can i check the incoming numbr and append the zeros to it.

Please help me out.

Thanks and regards,

Phani

Former Member
0 Kudos

Phani,

In 2nd HTML you can do like this:

<PARAM NAME="Param.1" VALUE="{passvalue}"/>

If you know the how many no of zeros, you can do by concanating the strings as below:

passvalue="000000"+passvalue;

-Suresh

Edited by: Suresh Hiremath on Jun 23, 2009 11:31 AM

Former Member
0 Kudos

Hi,

Thanks for the reply.

i tried but iam not getting the out put.

when i give the value in the 2nd applet.

<PARAM NAME="Param.1" VALUE="0000001234"/>

i can see the output in the 2nd grid.when i tried as u told iam not getting value.

Thanks and regards,

Phani

Former Member
0 Kudos

Hi,

I hope second grid query template is a xacute query.

You are passing the value to BAPI. Tou should have created the transaction property value to get the input value.

When you are assigning the values to the BAPI, use format( Transaction.Input, "0000000000").

Hope this helps you.

Suresh suggestion should work. Try to check it again.

Remove the <PARAM NAME="Param.1" Value = ""/>. That is not really required.

Regards,

Kishore

Former Member
0 Kudos

Hi,

Have you concanated the zeroes to the variable in your code.

Before passing to 2nd applet query you need to concanate.

-Suresh

Edited by: Suresh Hiremath on Jun 23, 2009 12:02 PM