cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Adaptive model in web dynpro application gives mandatory parameter erro

Former Member
0 Kudos

Hi,

I need to check when we create model to call bapi from backend, are there any checks for the input data which are done by the model before the bapi is called ?

I am passing some input parameters and I get the following error on the screen. and the return structure is empty.

Mandatory parameter BFLUSHDATAGEN of method BAPI_REPMANCONF_CREATE_MTS missing

But if I pass the very same paramters directly in se37 transaction to the bapi, then this error is not seen. it gives some other error in return structure.

There fore I have a doubt is there any check which doesnt call the bapi at all if it doesnt find the parameters it is looking for. I know the paremeters are not correct but I expect to see the same error what is seen in se37 in the return structure of my modal context element.

thanks in advance for help.

r

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I am not sure if that is possible. You need to precheck with your own code only if the input parameters are filled (b4 executing the model). Once executed, whatever error is returned by BAPI to Webdynpro container is displayed on the screen. It would be mostly the same error that comes in backend.

Regards,

Harini S

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Can you post both errors ?

Is it some thing to do with the language?

Regards

Ayyapparaj

bhakti2
Active Participant
0 Kudos

Hello,

I have posted the whole error. it is not a stack.

It is just like the error message seen when we leave a mandatory parameter empty.

This would mean that I am not populating the modal node elements properly

But in the code, just before the bapi is called ie before the statement

wdContext.currentBapi_Repmanconf_Create_Mts_InputElement().modelObject().execute();

I have put a message statement to display the contents of the modal node ie structure BFLUSHDATAGEN. and I can see data there.

But still it behaves as if I have left that empty.

kindly help

thanks

Former Member
0 Kudos

Hi Rita,

Does it work if you set some value to this parameter - BFLUSHDATAGEN by your own?

Regards,

Anagha

bhakti2
Active Participant
0 Kudos

hi,

yes I did

wdContext.currentBflushdatagenElement().setMaterialnr("100-400");

even then it says the same error

Former Member
0 Kudos

Is there any other parameter inside 'Bflushdatagen' apart from 'Materialnr' which you might be missing to set?

Former Member
0 Kudos

HI,

Pass parameter for both BFLUSHFLAGS and BFLUSHDATAGEN.

Regards

Ayyapparaj

bhakti2
Active Participant
0 Kudos

in se37 the structure is mandatory

but i assumed that doesnt mean that i have to pass each and every field of that structure

so passing one field should be enough for a mandatory structure to give value

Former Member
0 Kudos

Hi,

but i assumed that doesnt mean that i have to pass each and every field of that structure

so passing one field should be enough for a mandatory structure to give value

I dont agree with that. If you look in to the source of this bapi you will see calls based on other parameters from BFLUSHDATAGEN-MATERIALNR_VERSION

BFLUSHDATAGEN-MATERIALNR_GUID

Try to consult with some one who knows abap to suggest you related with the mandatory params.

Regards

Ayyapparaj

bhakti2
Active Participant
0 Kudos

I know abap so ill check the bapi code

but we did the transaction MFBF succesfully and whatever was given in mfbf for the posting , all the required data is being passed to the bapi.

still the same error

could you please check the thrd

its abt the same issue.....but for a different bapi

bhakti2
Active Participant
0 Kudos

hi, I have corrected my code and written the below code inthe controllers init method.

Bapi_Repmanconf_Create_Mts_Input parent = new Bapi_Repmanconf_Create_Mts_Input();

wdContext.nodeBapi_Repmanconf_Create_Mts_Input().bind(parent);

Bapi_Rm_Datgen input1 = new Bapi_Rm_Datgen();

wdContext.nodeBflushdatagen().bind(input1);

input1.setMaterialnr("100-400");

input1.setPdc_Number("100066");

parent.setBflushdatagen(input1);

Even this I getmandatory paramter missing eror

kindly help

Edited by: rita c on Nov 6, 2008 6:29 PM

bhakti2
Active Participant
0 Kudos

finally it worked, wid the above code.

thanks very much for help

Former Member
0 Kudos

Hi,

Even i am getting this error.

When i set the import parameters, i am getting Type conflict error.

Type conflict when calling a function module., error key: RFC_ERROR_SYSTEM_FAILURE

Please let me know, what can be donw.

Thanks in advance.

Regards,

Palani