cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding RFC Exception

Former Member
0 Kudos

Hi All,

Am developing a webdynpro Application in Java to display the stock details which is from R/3.To do this i have deveolped my BAPI Called (BAPI_CUR_STOCK_DETAILS).I bringing this by Using RFC.

While running this application it showing an Exception :

<b>com.sap.tc.webdynpro.services.exceptions.WDTypeNotFoundException: type extern:com.caritor.example.x.types.StockDetails:com.caritor.example.x.types.Zbapi_Mat_Stock_Level_Export could not be loaded: com.sap.dictionary.runtime.DdException: Type com.caritor.example.x.types.Zbapi_Mat_Stock_Level_Export does not exist

</b>

Please Help me Out.

Regards,

Ramganesh.

Accepted Solutions (1)

Accepted Solutions (1)

lajitha_menon
Contributor
0 Kudos

Hi there, you said your bapi name was BAPI_CUR_STOCK_DETAILS.

From the error, I can understand that the system is looking for type Zbapi_Mat_Stock_Level_Export.

So what is this Zbapi..?

Does that give you any clues?

LM

former_member189631
Active Contributor
0 Kudos

Ya I have noticed That,

Actually Zbapi_Mat_Stock_Level_Export is an Export Structure Which is used in my BAPI.

lajitha_menon
Contributor
0 Kudos

Hi,

In your project, under web dynpro, click on 'Models'. Click on your model name .

Can you see this export structure under Model Classes?

LM

PS:So have you modified a standard BAPI to export a z structure?

former_member189631
Active Contributor
0 Kudos

Yeah..I can see that Export structure In My Imported Model..

lajitha_menon
Contributor
0 Kudos

Hi,

I can only suggest re-importing model and restarting server again...

LM

Former Member
0 Kudos

Hi,

there is problem with export params.

Please to see any standard FNmodule create import and export and make it as ARFC .

Then only u can import into WD there u can crerte input and output nodes.

But in your WD u can utilize only input node.

If any chages happeand in model and reimport and restart J2ee engine and make modifications.

Thanks,

Lohi.

former_member189631
Active Contributor
0 Kudos

Hi Lohitha,

Thankyou for ur response.

Now i can Map Only import Node.In My BAPI ,thr r two return Tables which will give the result.But i cannt mapp these table nodes in Webdynpro(While running this giving Server Error)..So i can only map the Import Node.Hw do i get the result ?and .What is "ARFC ? hW TO do it ?

Regrards,

Ramganesh.

Former Member
0 Kudos

Hi,

Are you import the RFC in WD ?

If yes send me your nodestructure once.Otherwise u need to check your import and export params in your BAPI.

Otherewise do one thing take any standard BAPI import into WD check once and next try your BAPI.

it might helps u.

Thanks,

Lohi.

former_member189631
Active Contributor
0 Kudos

Yeah..Am importing a RFC BAPI in Webdynpro.

My Node Structure is:

-


> BAPI_GET_HIS_PERIOD_STOCK_INPUT (ModelNode)

|_________Return (Node) (Return Table)

|___________Matnr [Import atrribute]

|_____________werks [Import atrribute]

|_________________Lgort [Import atrribute]

|_______________________lfgja [Import atrribute]

and i cannot Map the export table called EXPORT data since its giving run time error.and am not getting return values in return Table..and also I tried a standard BAPI (BAPI_MATERIAL_SAVE_DATA) which is working fine.How to solve it ?..

Former Member
0 Kudos

Hi,

Generally if you import BAPI the structure would be created like this.

BAPI_GET_HIS_PERIOD_STOCK_INPUT

BAPI_GET_HIS_PERIOD_STOCK_OUTPUT

But we are utilizing the BAPI_GET_HIS_PERIOD_STOCK_INPUT this only.

This model class contain all your input and output values.

U can do simple like this.

In the custom/copmonent controller init method write like this .

BAPI_GET_HIS_PERIOD_STOCK_INPUT input = new BAPI_GET_HIS_PERIOD_STOCK_INPUT();

wdContext.nodeBAPI_GET_HIS_PERIOD_STOCK_INPUT.bind(input);

input.set<parmas>("value");

input.set<parmas1>("value2");

And write the Execute method

next create View bind the outnode to table .

Deploy and run it .

If you get any error post the stack trace.

Thanks,

Lohi.

Dheerendra
Participant
0 Kudos

hi Ramu,

i m very agree with Lohitha, u need to check u r imported bapi and restart the server and ARFC stands for "Adaptive Remote Function Call " .............

I think, u need to go thrgh the tutorial in sdn.sap.com again for how to import the Bapi.

Thanks

Dheerendra

former_member189631
Active Contributor
0 Kudos

Hi,

Thanks for ur response .now am facing a strange Pblm . I have 2 result tables in My imported Bapi,Thy r return(return messages) and exportdata.If i map Both tables in a Custom Context ,.iTS Showing Server error.But If i map Only the Return table does not showing any

error.But Result is not getting displayed in return table which is bound with a UI table...

So Now atleast i want to see some result in the table.

Answers (4)

Answers (4)

lajitha_menon
Contributor
0 Kudos

Hi there,

Is the project giving any build errors?

Try restarting server(you need to restart if you have done a re-import of model recently as well)..

regards,

LM

roberto_tagliento
Active Contributor
0 Kudos

Right.

If have you done some modification to the BAPI and reimported the model, must restart J2EE engine.

This is necessary when you have the same name object, but different type object after modification.

Can avoid when the modification create only new objects name and type.

former_member189631
Active Contributor
0 Kudos

Hai Lmanon,

I did that also Giving save Exception..I cant Guess that whr is the Pblm..

Sharadha1
Active Contributor
0 Kudos

Hi Ramganesh,

did you configure the JCo-destinations in the Content Administrator? Is the SLD supplier service configured in the SAP J2EE Engine?

Regards,

Sharadha

former_member189631
Active Contributor
0 Kudos

Hi,

Yeah,I have made JCO connection in Content Admin.

Got + ve Result from thr.

Former Member
0 Kudos

Hi Ramganesh,

Create JCo connections for your RFC Model.

Please go through the https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/f0b0e990-0201-0010-cc96-d7ecd2e51715

Regards, Anilkumar

roberto_tagliento
Active Contributor
0 Kudos

Check the RFC interface.

Maybe you need to ReImport the custom BAPI.