on 07-15-2006 8:54 AM
Hi all,
I want to insert a new record in to the r3 table.
I used JCO for fetching and retrieving.
The problem is when i insert the data in to parameters it accepts the values, but when i try to insert it in to table it shows the following error:
"try to access a table which does not have any rows yet".
But the table alredy contains 4 records.
Through the following way only i tried to contact FM.
Is there any fault in this let me know Please.
bapiDocument = repository.getFunctionTemplate("functon module name").getFunction();
table = bapiDocument.getTableParameterList().getTable("table name");
table.setValue(wdContext.currentContextElement().get<contextvariable>,"table field name");
It's very urgent,Plz if you know let me know.
Thanks
Hi
use table.appendRows(int n) instead.This will allow you to append multiple rows(n) to the table by improving performance.As such there are no settings to be done.
Check this out.
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Use table.appendRow() before setting the values for table fields.
e.g.your code should be like this.
bapiDocument = repository.getFunctionTemplate("functon module name").getFunction();
table = bapiDocument.getTableParameterList().getTable("table name");
table.appendRow();
table.setValue(wdContext.currentContextElement().get<contextvariable>,"table field name");
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
set all the required values for the tabel parameters and excute the RFC.
check wether the row is updated in SAP R/3.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krishnaveni,
I think you are doing the wrong way, that is using the incorrect BAPI to create the record.
I am not sure about you are using the Correct BAPI for creating the record in R/3. Please Check the functional model.
Kind Regords,
Mukesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.