cancel
Showing results for 
Search instead for 
Did you mean: 

How to Insert data into R3??

former_member720137
Active Participant
0 Kudos

Hi

I am not able to insert data into SAP R3. I have 2 input and 2 dropdown boxes in the view.Once i click d save button the data should b added to R3, i have made an update BAPI method in the Custom Controller. But still data is not saved in d backend. Can anybody tell me step by step procedure for inserting data into R3. Its urgent. Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

give me the code you are using to execute BAPI

Regards

AM

Former Member
0 Kudos

Hi,

Add your BAPI to controllers and views and in customcontroller init method write the code like this.

thru context mapping u can pass the node structure controller to View.

Once it has done.

goto the Init mehtod of the View and menthion the following code.

FNModule_Input input = new FNModule_Input();

wdContext.nodeFNModule_Input().bind(input);

// pass the input

input.setZ_Kunnr("0000000001");

try {

wdContext.currentFNModule_InputElement().modelObject().execute();

wdContext.nodeOutput().invalidate();

} catch (WDDynamicRFCExecuteException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

Thanks,

Lohi.

former_member720137
Active Participant
0 Kudos

Thanks Lohita.. I have done this..

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

the code Lohitha gave is the correct code..

to check the code that you have done, please send the code across..

also make sure that you are setting values before executing BAPI

Regards

AM

Former Member
0 Kudos

Have you checked that your BAPI works correctly performing a single test in SE37 on R/3?

Gareth.

Former Member
0 Kudos

hii anoop

Can you explain this in detail..

evn i am facing the same problem..

I am not able to send data from custom controller to R/3

I have referred the same code..

Thanks

Former Member
0 Kudos

hi puneet,

check out this thread.

Regards,

Gopi

Former Member
0 Kudos

Check whether you are setting the import parameters b4 executiong the BAPI..

if setting it, check the values you set..

also check the below URLS

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

https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/5dcbe990-0201-0010-2c99-a2bc9e61acfc

Regards

AM

former_member720137
Active Participant
0 Kudos

Hey Anoop. My JCO are fine as i have imported BAPI successfully. But the problem is i am not able to set the values back into BAPI from Custom Controller.