on 02-27-2007 12:41 PM
Hi All,
When I am trying create BAPI Wrappers using MEREP_SBUILDER getting the error of No Tables parameter referring to item structure exists in Create BAPI Wrapper.
My back end system connected with RFC.
Since standard BAPIs MDK_INVENTORY_CREATE, MDK_INVENTORY_MODIFY and MDK_INVENTORY_DELTE are not remote enabled so converted into ZMDK_INVENTORY_CREATE, ZMDK_INVENTORY_MODIFY and ZMDK_INVENTORY_DELTE.
I have taken following precautions.
1. Processing type of a function module must be remote-enabled module.
2. Parameter named RETURN where the type is BAPIRET2 structure needs to be defined as either Export or Tables parameter
3. Commit Work and Wait needs to be executed in the update BAPI wrappers (Create/Change/Delete
Is there any thing I am missing while converting standard BAPIs into BAPI wrappers?
Thanks for your help,
Ameer Baba.
Hi,
don't know if you have seen this already:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eba3a7-0601-0010-b982-92f1fca3258a">MDK</a>
Especially the chapter <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20infrastructure/mobile%20development%20kit%202.5/content/appdev/smartsync/introduction.html">Smart Sync Overview</a> might provide something for the BAPI wrappers.
Cheers, Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ameer,
If you refer to any structure in the tables parameter in your getDetail Bapi Wrapper
to populate item data, then you need to specify that in the tables parameter of create Bapi wrapper.This is what the error says.check the following links in the same page.
<a href="http://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20infrastructure/mobile%20development%20kit%202.5/content/appdev/smartsync/_102_merep_contact_create_abap.html">CONTACT_CREATE</a>
<a href="http://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20infrastructure/mobile%20development%20kit%202.5/content/appdev/smartsync/_100_merep_contact_getdetail_abap.html">CONTACT_GETDETAIL</a>
Hi Ameer Baba,
Let me be more clear to you.
You cannot directly create Bapiwrappers using MEREP_SBUILDER.
1) By using Bapi wrapper wizard (using MEREP_SBUILDER) we can create a skelten of Bapi wrappers(which has automatically: RFC enabled,have the table,import,export parameters--which will fulfill the MI requirements)
2) These Bapi wrappers exists only in Backend system.
So we need to develop these Bapi wrappers in Backend.
3) Once these Bapi wrappers are created using Wizard..we need to code for these wrappers(Getlist,Getdetail,Create,Modify,Delete)
4) Then..if we have a separate Middleware system..create a syncbo and put all these Bapi wrapper names and give the RFC destination of the Backend system.....thus syncbos are connected to Backend.
In your case..i guess:
You did not mention the header table name or the child table names properly while creating a bapi wrapper wizard.
So the error <b>No Tables parameter referring to item structure exists in Create BAPI Wrapper.
My back end system connected with RFC.</b>.
Hope this is helpful.Kindly revert back if you need more information on this.
Cheers,
Karthick
Hi Karthick,
That was very clear answer. Thanks a lor for that. I would like to give more details.
1. I have created all these BAPI's in backend only.(Getlist and Getdetail are standard BAPI's which are RFC enabled so I am using same standard ones.)
2.In the case Create/Modify/Delete are not RFC enables so I have modified these BAPI's into customized BAPI's.
3.When I am calling these BAPI's from middleware using MEREP_SBUILDER when creation of SyncBO getting the following error.
<b>'No Tables parameter referring to item structure exists in Create BAPI Wrapper</b>.
My quistion to you is, If I am using same BAPI's where My backend system and Middleware is on same system I am not getting any error. When my backend system and middleware connested using RFC I am getting the same error.
Still what has to be done when we modifying standard BAPI to customized BAPI.
Please let me know.
With best regards,
Ameer Baba.
Hi Ameer baba,
I personally felt that there are some mismatch with the table parameters as such.
1) In Import parameter we should have the header table and in table parameters we should mention our item tables as parameters.
Kindly check this?
2) Kindly check if the header & item tables exists in Backend system.
Can you paste your code, so that we can come to if at all any issues?
Cheers,
Karthick
Hi Karthick,
This is the source code of the BAPI's.
FUNCTION MDK_INVENTORY_GETLIST.
*"----
""Lokale Schnittstelle:
*" EXPORTING
*" VALUE(RETURN) TYPE BAPIRET2
*" TABLES
*" ET_INVENTORY STRUCTURE MDK_INVENTORY
*"----
- All texts only in English, no extra text table
DATA:
ls_return LIKE bapireturn1.
CLEAR return.
SELECT COUNT(*) FROM mdk_inventory.
IF sy-subrc <> 0.
- No data in table ZMDK_INVENTORY
call function 'BALW_BAPIRETURN_GET1'
exporting
type = 'I'
cl = 'MDK_EXAMPLES'
number = '001'
importing
bapireturn = ls_return.
MOVE-CORRESPONDING ls_return TO return.
EXIT.
ENDIF.
SELECT * FROM mdk_inventory INTO TABLE et_inventory.
ENDFUNCTION.
*************************************************
FUNCTION MDK_INVENTORY_GETDETAIL.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(IV_PRODUCTID) TYPE MDK_INVENTORY-PRODUCTID
*" EXPORTING
*" VALUE(ES_INVENTORY) TYPE MDK_INVENTORY
*" VALUE(RETURN) TYPE BAPIRET2
*"----
DATA: ls_return type bapireturn1.
CLEAR return.
SELECT SINGLE * FROM mdk_inventory
INTO es_inventory
WHERE productid = iv_productid.
IF sy-subrc <> 0.
- Productid not found (Productid = &)
ls_return-message_v1 = iv_productid.
call function 'BALW_BAPIRETURN_GET1'
EXPORTING
type = 'E'
cl = 'MDK_EXAMPLES'
number = '002'
par1 = ls_return-message_v1
IMPORTING
bapireturn = ls_return.
MOVE-CORRESPONDING ls_return TO return.
EXIT.
ENDIF.
ENDFUNCTION.
******************************************************
FUNCTION ZMDK_INVENTORY_CREATE.
*"----
""Local Interface:
*" IMPORTING
*" VALUE(IS_INVENTORY) TYPE MDK_INVENTORY
*" EXPORTING
*" VALUE(EV_PRODUCTID) TYPE MDK_INVENTORY-PRODUCTID
*" VALUE(RETURN) TYPE BAPIRET2
*"----
DATA: ls_return TYPE bapireturn1,
lv_msgvar type SYMSGV.
CLEAR return.
Assumption: productid not created yet
is_inventory-createdate = sy-datum.
is_inventory-createuser = sy-uname.
is_inventory-createtime = sy-uzeit.
is_inventory-changedate = sy-datum.
is_inventory-changeuser = sy-uname.
is_inventory-changetime = sy-uzeit.
INSERT mdk_inventory FROM is_inventory.
IF sy-subrc <> 0.
- DB Action failed (Error code = <sy-subrc>)
move sy-subrc to lv_msgvar.
CALL FUNCTION 'BALW_BAPIRETURN_GET1'
EXPORTING
type = 'E'
cl = 'MDK_EXAMPLES'
number = '002'
par1 = lv_msgvar
IMPORTING
bapireturn = ls_return.
MOVE-CORRESPONDING ls_return TO return.
EXIT.
ENDIF.
COMMIT WORK and wAIT.
- Product &1 created successfully
ls_return-message_v1 = is_inventory-productid.
ev_productid = is_inventory-productid.
CALL FUNCTION 'BALW_BAPIRETURN_GET1'
EXPORTING
type = 'S'
cl = 'MDK_EXAMPLES'
number = '003'
par1 = ls_return-message_v1
IMPORTING
bapireturn = ls_return.
MOVE-CORRESPONDING ls_return TO return.
ENDFUNCTION.
Best Regards,
Ameer Baba.
Hi Ameer baba,
From the code it seems that we dont have any item tables and the code seems to be fine with the import and export parameters.
Can you create a fresh BAPI wrappers(Getlist, Getdeatil, Create, Modify, Delete) in backend using Bapiwrapper Wizard and mention the same table names as you did and simply copy the code and paste in respective wrappers...using wizard will make sure that no interface issues as such?
It would take around 15 mins. Kindly try this and lets see.
It should work
Cheers,
Karthick
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.