cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro Help

former_member422932
Participant
0 Kudos

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?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member422932
Participant
0 Kudos

Opted not to use the BAPI

former_member182372
Active Contributor
0 Kudos

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> ?