on 05-17-2007 8:19 PM
I have an RFC that this called and some of the output of that RFC will be input to a BAPI. The input to the BAPI is two structures. Here is what I have so far in my wdDoInit of my controller:
Bapi_Rm_Datgen inputData = new Bapi_Rm_Datgen();
Bapi_Rm_Flg inputFlags = new Bapi_Rm_Flg();
Bapi_Repmanconf1_Create_Mts_Input bapiInput = new Bapi_Repmanconf1_Create_Mts_Input();
bapiInput.setBflushdatagen(inputData);
bapiInput.setBflushflags(inputFlags);
wdContext.nodeBapi_Repmanconf1_Create_Mts_Input().bind(bapiInput);
Then in my executeBapi_Repmanconf1_Create_Mts_Input( ) of the controller I have the following:
try{
inputFlags.setActivities_Type("1");
inputFlags.setBckfltype("01");
inputFlags.setComponents_Type("1");
inputData.setMaterialnr(wdContext.currentOutputElement().getMatnr());
inputData.setProdversion(wdContext.currentOutputElement().getPrdversion());
inputData.setStorageloc(wdContext.currentOutputElement().getStorageloc());
wdContext.currentBapi_Repmanconf1_Create_Mts_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch (Exception e{
e.printStacktrace(e);
}
Can someone tell me if I coded this correctly to populate the structure of my BAPI, or am I missing other logic?
Opted not to use the BAPI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks good! Does it work? The only point:
inputData.setMaterialnr(wdContext.currentOutputElement().getMatnr());
inputData.setProdversion(wdContext.currentOutputElement().getPrdversion());
inputData.setStorageloc(wdContext.currentOutputElement().getStorageloc());
you have 3 attributes on Root node level. Why don`t just bind UI elements properties directly to Bapi_Repmanconf1_Create_Mts_Input -> Bapi_Rm_Flg -> <attrs> ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.