cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch Data from BI system and populate a Table

Former Member
0 Kudos

Hi,

I have to fetch the data from BI system into a model and populate the Table.

The data resides in BI system. I am creating model from adaptive RFC and the function module is RRW3_GET_QUERY_VIEW_DATA. This is the max information i have got to execute the query

Infoprovider ZM_SC_GR

Query T_SUPGR003

Variable: Vendor Number

VAR_NAME_1 SPRPVEN

VAR_OPERATOR_1 EQ

VAR_VALUE_LOW_EXT_1 Value

VAR_VALUE_HIGH_EXT_1

VAR_SIGN_2 I

Variable: Purchasing Group

VAR_NAME_2 CSMPGRP

VAR_OPERATOR_2 EQ

VAR_VALUE_LOW_EXT_2 Value

VAR_VALUE_HIGH_EXT_2

VAR_SIGN_2 I

Variable: Calendar Day Range

VAR_NAME_3 SPGRDT01

VAR_OPERATOR_3 BT

VAR_VALUE_LOW_EXT_3 Value1

VAR_VALUE_HIGH_EXT_3 Value2

VAR_SIGN_3 I

I am not able to understand which parameters of the model I should map for context mapping to map cotroller with model.

Thanks and Regards,

Pankaj

Edited by: pankaj pathak on Sep 9, 2010 12:25 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member214651
Active Contributor
0 Kudos

Hi,

Check the RFC in transaction SE37 and check the Parameters under Import and Export tabs. Also check the Tables tab. u will be all parameters under Import tab are to be sent to RFC and those under Export tab are received from RFC.

Also, execute the RFC in SE37 to know the exact behavior. An ABAP programmer can help u in identifying the parameters.

Regards,

Poojith MV

Former Member
0 Kudos

Hi Poojith,

When I look at the structure of RRW3_GET_QUERY_VIEW_DATA(FM) after importing the model it seems that I have not to use this function module because this just returns the information of BI data after executing the query which is in Axis and cell format. I think we cannot use this directly in webdynpro program. I think we have to transform this FM at the backend only and have to create a new fm which gives us the values we need in our webdynpro program. Correct me if I am wrong. Do you have any idea about this function module.

Thanks and Regards,

Pankaj

Former Member
0 Kudos

Hi Pankaj,

Yes you can have a new function module to provide the exact data you want.

Or you can manipulate the output returned by the existing function to fit your requirements.

Kind regards,

Saravanan K

Former Member
0 Kudos

HI Saravanan,

Thanks for your reply. Could you please forward any document or reference material.

The problem is that I have to pass following parameters and after importing the model I am getting infoprovide, query, name and valueas input parameters . I dont know where I should pass VAR parameters.

Infoprovider ZM_SC_GR

Query T_SUPGR002

Variable: Vendor Number

VAR_NAME_1 SPRPVEN

VAR_OPERATOR_1 EQ

VAR_VALUE_LOW_EXT_1 Value

VAR_VALUE_HIGH_EXT_1

VAR_SIGN_2 I

Variable: Purchasing Group

VAR_NAME_2 CSMPGRP

VAR_OPERATOR_2 EQ

VAR_VALUE_LOW_EXT_2 Value

VAR_VALUE_HIGH_EXT_2

VAR_SIGN_2 I

Variable: Calendar Day Range

VAR_NAME_3 SPGRDT01

VAR_OPERATOR_3 BT

VAR_VALUE_LOW_EXT_3 Value1

VAR_VALUE_HIGH_EXT_3 Value2

VAR_SIGN_3 I

Your quick response is highly appreciated.

Thanks and Regards,

Pankaj

0 Kudos

after you imported Rrw3_Get_Query_View_Data function as adaptive rfc model in your component and mapped its node controller context Rrw3_Get_Query_View_Data_Input model to your controller context do the following:

i.e.

Rrw3_Get_Query_View_Data_Input model = new Rrw3_Get_Query_View_Data_Input();
model.setI_Infoprovider("0FIA_MDS2");
model.setI_Query("FIA_MDS2_Q0005MP");
wdContext.nodeGetQueryView().bind(model);

W3Query paramElement1 = new W3Query();
paramElement1.setName("VAR_NAME_1");
paramElement1.setValue("0P_CSDAT");

W3Query paramElement2 = new W3Query();
paramElement2.setName("VAR_OPERATOR_1");
paramElement2.setValue("LE");

W3Query paramElement3 = new W3Query();
paramElement3.setName("VAR_VALUE_EXT_1");
paramElement3.setValue(cdate);

W3Query paramElement5 = new W3Query();
paramElement5.setName("VAR_NAME_2");
paramElement5.setValue("0S_CCTR");

W3Query paramElement6 = new W3Query();
paramElement6.setName("VAR_OPERATOR_2");
paramElement6.setValue("EQ");

W3Query paramElement7 = new W3Query();
paramElement7.setName("VAR_VALUE_LOW_EXT_2");
paramElement7.setValue(mvz);

W3Query paramElement8 = new W3Query();
paramElement8.setName("VAR_VALUE_HIGH_EXT_2");
paramElement8.setValue(mvz);
					
W3Query paramElement9 = new W3Query();
paramElement9.setName("VAR_SIGN_2");
paramElement9.setValue("1");

model.addI_T_Parameter(paramElement1);
model.addI_T_Parameter(paramElement2);
model.addI_T_Parameter(paramElement3);
model.addI_T_Parameter(paramElement5);
model.addI_T_Parameter(paramElement6);
model.addI_T_Parameter(paramElement7);
model.addI_T_Parameter(paramElement8);
model.addI_T_Parameter(paramElement9);

then execute

wdContext.currentGetQueryViewElement().modelObject().execute();

and invalidate output node

and then you get the data from r3 system.

then you should correctly parse output node and read the data from E_Axis_Data node E_Cell_Data node.

Former Member
0 Kudos

Dear Zakhar,

This was very helpful answer. I already tried this but I am not able to understand how should I read the data and populate the table. the structure of the table will be like this- purachse order no, order date, delivery date, delivery note, qty etc. The structure of the model is very complex and I cant understand what I should fetch from where. It would be a great help if you can send me the sample code which shows how to parse the data from E_Axis_Data node E_Cell_Data and populate the table according to my requirement.

Thanks and Regards,

Pankaj

Former Member
0 Kudos

Dear Zakhar,

I am waiting for your reply.

Regards,

Pankaj

Answers (0)