cancel
Showing results for 
Search instead for 
Did you mean: 

Table Selection Parameter

former_member188973
Participant
0 Kudos

Dear all,

i am a bit confused and need help. While trying to create a Widget with the Widget Foundation Tools I have this effect:

SAP Funktion: BAPI_MATERIAL_GETLIST

Selection Parameter inside SAP (i.e):

Table: MATNRSELECTION

Fields: SIGN, OPTION, MATNR_LOW, MATNR_HIGH

Value: 'I', 'CP', '*' , ' '

Using SE37 and Testframe I do get results using this.

Now in Eclipse I can add the BAPI, map the Parameters and now the Problem, There is no field "SIGN" and "OPTION" in the Table description of the Bapi-View (RFC-View). All the other fields from Table "MATNRSELECTION" are shown

This is the controller Code to pass the import table:

Controller.refresh = function(){
    Controller.showMain_View({"MATNRSELECTION":
	{	
		"SIGN": "I",
		"OPTION": "CP",
		"MATNR_LOW": "*"
	},
		"MAXROWS": "50"
	});
}

So I do not get any result. Maybe this is caused by the not existing "SIGN" and "OPTION" fields in the RFC-View?!

Any idea?

Kind regards

Roman

Accepted Solutions (0)

Answers (5)

Answers (5)

marcus_schiffer
Active Participant
0 Kudos

Hi,

got the same problem: seems that the following does not work (rfc function is: BAPI_CUSTOMER_GETLIST):

Controller.showMain_View(

{ "IDRANGE": [ {

"SIGN":"I",

"OPTION":"BT",

"LOW":"12345",

"HIGH":"999999"}] );

How did you solve the issue ?

Thanks a lot

Marcus

Edited by: Marcus Schiffer on Feb 21, 2008 4:29 PM

former_member188973
Participant
0 Kudos

Hi,

I did it this way

Model:

table = bapi.addTable("MATNRSELECTION");

if(utils.isDefined(importParams.MATNRSELECTION)){

table.addRow({

"SIGN" : importParams.MATNRSELECTION.SIGN,

"OPTION" : importParams.MATNRSELECTION.OPTION,

"MATNR_HIGH" : importParams.MATNRSELECTION.MATNR_HIGH,

"MATNR_HIGH_VERSION" : importParams.MATNRSELECTION.MATNR_HIGH_VERSION,

"MATNR_LOW_VERSION" : importParams.MATNRSELECTION.MATNR_LOW_VERSION,

"MATNR_LOW_EXTERNAL" : importParams.MATNRSELECTION.MATNR_LOW_EXTERNAL,

"MATNR_LOW" : importParams.MATNRSELECTION.MATNR_LOW,

"MATNR_HIGH_EXTERNAL" : importParams.MATNRSELECTION.MATNR_HIGH_EXTERNAL,

"MATNR_LOW_GUID" : importParams.MATNRSELECTION.MATNR_LOW_GUID,

"MATNR_HIGH_GUID" : importParams.MATNRSELECTION.MATNR_HIGH_GUID });

}

Controller:

Controller.refresh = function(){

Controller.showMain_View({"MATNRSELECTION":

{

"SIGN": "I",

"OPTION": "CP",

"MATNR_LOW": "*"

},

"MAXROWS": "50"

});

}

Hope to help. For me this works.

Best regards

Roman

former_member188973
Participant
0 Kudos

Dear all, there is an error in wigdet foundation. Sometimes not all parameters are generated.

Kind Regards

Roman

Former Member
0 Kudos

Hello,

Which RFC do you call and what parameters you think are not generated?

Regards,

Eriks

Former Member
0 Kudos

Hello,

You are missing brackets [ around table rows. Your code should read:

Controller.refresh = function(){

Controller.showMain_View({"MATNRSELECTION": [

{

"SIGN": "I",

"OPTION": "CP",

"MATNR_LOW": "*"

} ],

"MAXROWS": "50"

});

}

Samples of all types of parameter passing are available in SAP [Widget Development Guide page 46-48|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c032ae0a-7d6b-2a10-14a1-cc6efb066dfc]

It was a bug in R0.9 version of SAP Widget Development Tools that SIGN and OPTIONS was not displayed in RFC View, but this does not affect RFC calling from widget. It is corrected in R10 that will be available on SDN in nearest time.

Eriks

Former Member
0 Kudos

Hi Roman,

I've faced a similar problem trying to pass tables to a function module.

If you go to http://localhost:7531/SapMiddleTier/REST/ewcs/service/rfct/form

you can test SAP functions without the Eclipse / Javascript etc.

I think the SAP Widget Foundation doesn't support it.

Former Member
0 Kudos

Hi,

When testing function with http://localhost:7531/SapMiddleTier/REST/ewcs/service/rfct/form, table rows should be included in <item> tags. Here is sample:

RFC Name: RFC_READ_TABLE

RFC Parameters:

<QUERY_TABLE>TCATX_TASKTYPES</QUERY_TABLE>,

<OPTIONS>

<item>

<TEXT>TASKTYPE = 'PUBI'</TEXT>

</item>

</OPTIONS>,

<FIELDS>

<item>

<FIELDNAME>MANDT</FIELDNAME>

</item>

<item>

<FIELDNAME>DATAB</FIELDNAME>

</item>

</FIELDS>

Eriks

Former Member
0 Kudos

Hi Roman,

I've faced a similar problem trying to pass tables to a function module.

If you go to http://localhost:7531/SapMiddleTier/REST/ewcs/service/rfct/form

you can test SAP functions without the Eclipse / Javascript etc.

I think the SAP Widget Foundation doesn't support it.