cancel
Showing results for 
Search instead for 
Did you mean: 

How to Upload LRAW from mobile to DOE

Former Member
0 Kudos

Hi DOE experts,

Please go through my scenario and then please suggest me some solution.

I have a customer table and for each customer there is a child table called notes.

This Notes table has a field Note_text of type LRAW.

In my Create BAPI i have made this NOtes table as a child of Customer, and then i created Data Object by importing this BAPI.

So in DOE i have Parent Node -- Customer

Child Node -- NOTE

But since this note is having LRAW so it is not getting activated.Please suggest how to achieve this??

Please let me know in case you require more inputs.

Regards,

Abhishek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Abishek,

The data type LRAW requires that it has a preceeding int2 field. This is the definition for LRAW data type,

"Any uninterpreted string of bytes at least 256 places in length. Fields of this type must be at the end for transparent tables and have a preceding length field of type INT2. For an INSERT or UPDATE in ABAP programs, this length field must be filled with the length actually required. Fields of this type cannot be used in the WHERE condition of a SELECT statement."

I'm sure that in the backend where this table is, will have a supporting int2 field. When you imported the BAPI wrapper to Data Object, is the INT2 field also created in the child node? Can you check this and let me know?

Best regards,

Vinodh

Former Member
0 Kudos

Thanks for your reply,

In backend i have created these fields with int2 and then this Lchr but when i imported this to doe as BAPI wrapper then after these fields theer are more fields created by DOE so these defined fields are not at the bottom of the cds table so ts giving error.

Actually my requirement is to send long text from Mobile to backend, can i store it using string in table.I checked few links on saving long text but with no success.

Could you please help me in this in a step by step manner.

Regards,

Abhishek

Former Member
0 Kudos

Hi Abhishek,

I was checking the code and unfortunately, LRAW data type is currently not supported in SAP NetWeaver Mobile 7.10(DOE). Thats the reason activation of Data Object is failing. I strongly recommend you to contact SAP via an OSS customer message and request their assistance with this issue. Any data type supported by backend should also be supported by DOE, so SAP should be able to help you in this regard.

Alternately, you can redesign your backend (if possible) and make the LRAW to STRING or RAWSTRING which will solve your problem.

Regards,

Vinodh.

Former Member
0 Kudos

Thanks Vinodh ,

Here is my scenario where i need to implement longtext , can you throw some light on the issue.

In backend i have a Table customer , and another Table called Note for Customer , in Note table i have to store multiple longtext Notes for a single customer , so in this table Customer Id is foreighn key.

Hence while modelling Data object Note is child of Customer but in Bapi i cannot use string as a part of structure. For solving this problem i want to use Attachment Function module which will take note and noteId as a long text.

But i am little bit of confused that how to model it and at what time this Attachment function module will be called , means i want to know the sequence in which GetList , GetDetail and attachment FM will be called.

Also i wanted to know about the benefits of defining Node Associations among data objects.

Thanks & Best Regards,

Abhishek

Former Member
0 Kudos

You need to define two attachment FMs. One to 'GET' it from backend (for download scenario) and one to 'SET' it (for handling attachments uploaded from client).

During download, the GET attachment FM will be called AFTER the GETDETAIL BAPI Wrapper.

During upload, the SET attachment FM is called AFTER the upload of data, and it is immediately followed by a call to GET (so that we get the latest image of the attachment in the backend)

How you need to do this:

1. Enter the names of your SET and GET FMs in the 'Adapter Details' tab of the adapter (in SDOE_WB transaction).

2. Switch to the 'Attachments' tab and map the FMs to their data as per the direction.

The GET should take the key and return the raw data along with BAPIRET.

The SET should import both key and raw data, and return only a BAPIRET.

0 Kudos

Hi,

Check these blogs on how to create attachments :

http://wiki.sdn.sap.com/wiki/display/mobile/CreateapplicationsusingBinaryMemoandTextMemoinNetweaverMobile+7.1

http://wiki.sdn.sap.com/wiki/display/mobile/UploadingAttachments-NetweaverMobile7.1

Thanks and Regards,

Narayani

Answers (1)

Answers (1)

Former Member
0 Kudos

LRAW fields must be preceded by a field of type INT4 (which contain the length of the LRAW content). This is why you are not allowed to activate it.

The way forward: Add a field of this length just before the LRAW field in your BAPI Wrapper as well as the DO.

This should let you activate it.

Also, I am not sure about this but I think: You will have to populate this field correctly from the backend and send it with the length of the LRAW data.

EDIT: You will also have to map the field in the existing adapter.

Edited by: Arjun Shankar on Oct 9, 2009 12:36 PM