on 06-27-2008 12:32 PM
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();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.