cancel
Showing results for 
Search instead for 
Did you mean: 

Data object creation / standard BAPIs

Former Member
0 Kudos

Hi Experts,

I'd like to create a simple mobile app to display customer details on a phone. This is my first application and I'd like to know how I should create the CUSTOMER data object and the backend adapters (download only so getlist and getdetail). Should I define only a rootnode just like this :

Data Object : CUSTOMER

ROOTNODE : CUSTOMER

CUSTOMER_ID

CUSTOMER_NAME

CUSTOMER_CITY

CUSTOMER_POSTL_CODE

...

Or maybe something like this :

Data Object : CUSTOMER

ROOTNODE : CUSTOMER

CUSTOMER_ID

CHILDNODE : DETAILS

CUSTOMER_NAME

CUSTOMER_CITY

CUSTOMER_POSTL_CODE

...

And do I have to create custom BAPIs in the backend in order to have the exact same structure or is it possible to use standard BAPIs (BAPI_CUSTOMER_GETLIST and BAPI_CUSTOMER_GETDETAILS) and map the fields? It seems possible to change the mapping for BAPI_CUSTOMER_GETDETAILS but I don't know if I can do this for BAPI_CUSTOMER_GETLIST.

Regards,

Pierre

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Pierre,

There is no need for mapping GETLIST

If you only have valid BAPIs you can user the "IMPORT BAPI AS DATA OBJECT" wizard at swcv level.

follow the following steps:

1. go to SDOE_WB

2. create a new SWCV

3. right click on SWCV and select "import bapi wrapper as data object"

4. click on continue specify the data object and adapter name and the backend destination and continue

5. specify the BAPIs and continue.

after creating them you can activate them from the workbench.

regards,

rohit

Former Member
0 Kudos

Hi,

Rohit > great, I didn't know I could create the DO from the BAPIs! Thanks for the tip.

Liji > ok that's what I thought. However I don't know if the DOE is able to map the getlist in this particular example. I got an error when I try to activate my backend adapter. BAPI_CUSTOMER_GETLIST structure is a bit weird, it may be a problem.

Abhijit > thanks for the link but I've already watched this video.

Pierre

Edited by: Pierre DOMINIQUE on Jun 29, 2009 11:49 AM

Former Member
0 Kudos

Hi Pierre,

If you are still facing any error while activating the adapter , double click on adapter , click on view messages button. This should list the error message.

If the adapter is shown in red, then you can also do 'adaper consistency check' in the same screen and then view messages.

Regards,

Liji

Former Member
0 Kudos

Hi Liji,

I tried to create data objects from several standard BAPIs but it seems standard BAPIs are not suited for the DOE. I'll have to create my own BAPIs, I just have to wait for my dev key...

Regards,

Pierre

Former Member
0 Kudos

please go through this link.this give a fair idea on how to create your own bapi wrapper:

http://help.sap.com/saphelp_nwmobile71/helpdata/EN/a4/e28ce886854c5f89d2bcf533afa9e7/content.htm

Regards,

Lakshmi

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Pierre,

Please refer to following link

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/204fc387-6646-2a10-99b7-bba030bc3f68|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/204fc387-6646-2a10-99b7-bba030bc3f68]

Thanks & Regards,

Abhijit

Former Member
0 Kudos

Hi,

If your application requires multiple addresses / multiple detail records to be associated with a particular customer, then go ahead with customer header as root node and customer details as child node.

This way a customer will be represented as a single record , and the detaiils as multiple records.

Otherwise if you go with root node alone with all customer details , then a customer will be represented just with a single record.

You can reuse the bapis as long as you are able to map the structure used in those bapis to your Data object fields and the mapping to dataobject fields are done with the getdetail bapi's structures.

Regards,

Liji