on 01-14-2009 7:23 PM
Google Traslator
Hi Experts,
I am currently developing an application on the SAP technology
Netweaver Mobile 7.1
I am in the process of setting BACKEND ADAPTER, model
data fields are used data type STRING and XSTRING. According to the
documentation, when using such data types, must be implemented
additional attachment function modules, diferent to Bapi wrappers. They function
modules are responsible for uploading and downloading of the fields in the
DOE.
In SAP Help, forums or on the same system, I can not find this type of function module and I would be very useful that they could send me an example.
Best Regards,
JM
Hi,
You need to have a separate table to store attachments in the backend.
In the DOE define the attribute as STRING(tick the text memo) This you have already done .
In the backend you will need another table where you will be storing the attachments.
Lets assume you have a notification table : In this define the field for headertext with the data type as CHAR and length 1
Create another table where you want to store the attachments:
You can have the fields as NOTIFICATION and HEADERTEXT. This headertext should have a datatype STRING. You can also have a field called attachment type to store whether it is HeaderText or Binary Memo.
Create a BAPI wrapper for getting the HEADERTEXT with importing parameter as NOTIFICATION and exporting HeaderText and a return parameter:
Here the source code:
SELECT SINGLE b~headertext INTO e_headertext
FROM <notification table> AS a
INNER JOIN <attachment table> AS b ON
borderid = aorderid
WHERE a~orderid = orderid AND
a~headertext = 'X' and
b~ATTCHTYP = 'HEDTXT'.
Now in the DOE : give this function module name in the attachment Function module. SAVE (very important)
After doing the mapping go to the attachment tab and do the mapping with the attachment function module.
save and activate the backend adapter.
execute SDOE_LOAD.
Go to SE11: there should be a table starting <cds table name>ending with _TM.
Create an application in the similar way. No extra code required.
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.