cancel
Showing results for 
Search instead for 
Did you mean: 

Attachments Function Modules in SAP Netweaver Mobile 7.1

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

0 Kudos

Hi,

Please read this message link:

I have explained how to create the attachment function module.

Regards,

Narayani