cancel
Showing results for 
Search instead for 
Did you mean: 

Table as input of a RFC

Former Member
0 Kudos

Hi again,

I've always used RFC with only single input fields, but this time I have to populate a table as input of a RFC.

I've been going through the following threads but I don't understand exactly what I should do:

http://help.sap.com/saphelp_nw04s/helpdata/en/5d/3c96e4c1c3934cbd9c19fb9df49944/frameset.htm

My input structure is:


(RFC)Zhr_Bapi_Set_App_Values_InputElement
|
|---(Input field) E_PlanVersion
|---(Input field) E_Pernr
|---(Input field) E_Appraisal_Id
|---(Input Table) Appraisal_Data
    |----(Parameter one) Counter
    |----(Parameter two) Element_Id
    |----(Parameter three) Element_Type

Should I create the structure of Appraisal_Data table in wdp to populate it?


wdContext.currentZhr_Bapi_Set_App_Values_InputElement().setE_Plan_Version("01");
wdContext.currentZhr_Bapi_Set_App_Values_InputElement().setE_Pernr("01008355");
wdContext.currentZhr_Bapi_Set_App_Values_InputElement().setE_Appraisal_Id("50085566");
IPrivateDetalleView.IAppraisal_DataElement myData = ???;
wdContext.nodeZhr_Bapi_Set_App_Values_Input().nodeAppraisal_Data().bind(myData);
wdThis.wdGetBapiController().executeZhr_Bapi_Set_App_Values_Input();

Accepted Solutions (1)

Accepted Solutions (1)

PradeepBondla
Active Contributor
0 Kudos

Hi,

for an idea go through this once

/people/perumal.kanthan/blog/2005/03/09/handling-structuretable-transactions-using-bapis-in-web-dynpro-part-ii

;?

and also

;?

regards,

Pradeep

Former Member
0 Kudos

Finally I use this code, now I should oly recover my data correctly (not hardcoded) and it will be solved.


Zhr_Bapi_Set_App_Values_Input input = 
new Zhr_Bapi_Set_App_Values_Input();
//static input fields
input.setE_Appraisal_Id("01");
input.setE_Pernr("01008355");
input.setE_Appraisal_Id("50085555");

//insert values in the table
Bapiappdata obj = new Bapiappdata();
BigDecimal num = new BigDecimal(3.000);
obj.setCounter("0001");
obj.setRating(num);		
input.addAppraisal_Data(obj);
num = new BigDecimal(2.000);
obj.setCounter("0002");
obj.setRating(num);		
input.addAppraisal_Data(obj);

//bind my created object to the input table
wdContext.nodeZhr_Bapi_Set_App_Values_Input().bind(input);
	
//execute RFC
wdThis.wdGetBapiEvaluacionesCust0Controller().executeZhr_Bapi_Set_App_Values_Input();

Thanks Pradeep!

Answers (0)