cancel
Showing results for 
Search instead for 
Did you mean: 

How to transfer attachments from backend to srm

former_member186143
Active Contributor
0 Kudos

I am looking for a sollution that I can attach pdfs to a shoppincart which is created from the backend.

I found

but still I have no clue what or where I have to enter in the objectkey or other fields

some I recognize as dms fields but objectkey I don't recognize ?

the bapi BAPI_SCEC_CREATE can be called from the backend and attachment information can be passed.

but as usual with SAP BAPI's no documentation exists or examples .

When going inside the bapi I found BBP_ATTACH_CONTENT_WEBGET

so the complete story is that I have a programm in the backend where a user enters some information necessary to create a shoppingcart and also has the possibility to add an attachment which will also be transfererd to the shoppingcart.

whether or not the file first has to be registered somewhere in dms or in business documents with OAWD I don't care as long as there is a possibility for a user to upload files directly.

(so I don't create a PR in sap system, I directly create the shoppingcart through the bapi)

I have the whole construction working and shoppingcarts get created and when I enter an url to a pdf file on a website. it's nicely downloaded and added to the shoppingcart. but now I want it to work with dms or business documents ?

anybody got a clue

Accepted Solutions (0)

Answers (1)

Answers (1)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Where is original attachment saved? Is it accessible via Web?

I guess you would like to create a SC from legacy system automatically. Is it correct?

Regards,

Masa

former_member186143
Active Contributor
0 Kudos

the options for the location of saving original attachments depends on where SAP expects them to find with this function.

and that is what I can't figure out whether it is normal dms or as the descriptions of the fields indicate that it can also be business documents.

I have build a z programm in the backend which can create a shoppingcart in srm (I can't use PR for this since then the shoppingcart is already approved in srm and we want to use the approval flow of the SC which is much better and already developed than approval flow of PR)

so in this Z programm users must also be able to select a file as attachment. this file for instance I have to saver first in dms or business documents or wherever to be able to sent through with the bapi BAPI_SCEC_CREATE

so now I found this structure for passing attachments but I can't find any example on how to use the BDS fields like OBJKEY and DOC_ID ?

PARENT_GUID BAPI_PARENT_GUID CHAR 32 0 GUID bovenliggende record (kop of positie)

LOGICAL_SYSTEM BDS_LOGSYS CHAR 10 0 Business Document Service: ID van logisch systeem

CLASSNAME BDS_CLSNAM CHAR 30 0 Business Document Service: klassennaam

CLASSTYPE BDS_CLSTYP CHAR 2 0 Business Document Service: klassentype

OBJKEY BDS_TYPEID CHAR 70 0 Business Document Service: objectkey

DOC_ID BDS_DOCID CHAR 42 0 Business Document Service: document-ID

DOC_VER_NO BDS_DVERNO NUMC 8 0 Business Document Service: documentversienummer

DOC_VAR_ID BDS_DVARID NUMC 8 0 Business Document Service: documentvariant-ID

DESCRIPTION BDS_PROPVA CHAR 64 0 Business Document Service: attribuutwaarde

URL BBP_ATT_URL CHAR 255 0 Uniform Resource Locator voor bijlagen verwervingsdocument

TYPE BBP_ATT_TYPE CHAR 1 0 Type bijlage bij een verwervingsdocument

INTERNAL_IND BBP_ATT_INTERNAL CHAR 1 0 Teken of een bijlage alleen intern wordt gebruikt

CATEG BBP_ATT_CATEG CHAR 1 0 Categorie bijlage

kind regards

arthur

former_member186143
Active Contributor
0 Kudos

As i look inside BBP_ATTACH_CONTENT_WEBGET more I can only conclude that I can use weburls for attachments ?

is it possible to upload files directly from sap to a http:// address

or are files uploaded to the unix also accesible by http:// ?

Arthur

Edited by: A. de Smidt on Dec 7, 2010 2:21 PM

former_member186143
Active Contributor
0 Kudos

logic found in

LBBP_PDH_TEXTF14 WHEN 'TEXT_ATT_ADD'.

LBBP_PDH_TEXTF20

kind regards

arthur

Former Member
0 Kudos

Hi smidth

can you pls share your solution

how did you solved the attachment problem.

Regards

Chandra