cancel
Showing results for 
Search instead for 
Did you mean: 

How to transfer shopping cart attachment to PO in SRM5.0

Former Member
0 Kudos

We ahve a requirement to transfer all shopping cart attachments to the follow on Purchase order in R3. We have a classic inplementation and are using SRM 5.0 system.

Is there some configuration or BADIs in SRM-EBP that I can enable to transfer shopping cart attachments?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You have to do some configuration settings in SPRO

SPRO>Supplier Relationship Management>SRM Server>Cross-Application Basic Settings>Define Settings for Attachments.

Regards,

Sachin

Former Member
0 Kudos

What all are the parameters to be passed?

Former Member
0 Kudos

Hi,

First of all If you use SAP Exchange Infrastructure, you do not need to make the

settings for attachment transfer.

1- You must have installed the Web server(s) for storing attachments.

You can set up Web servers for exchanging documents. To do this you can

define the following types of publishing:

o Publishing Internally

This is the exchange of documents between systems that belong to

your own area of responsibility (intranet).

o Publishing externally

This is the exchange of documents with partners who should be given

external access (from the extranet) to their own data.

If the publishing settings for external and internal access are

identical, you can use a single Web server for exchanging data.

To allow internal or external access to attachments, enter the following

data for the Publish Internally or Publish Externally option:

o Internal/external host

Identifiable name of the Web server (for example, P123456.sap.com).

o Internal/external port

Port of the Web server (for example, 1080).

o Internal/external directory

Directory on the Web server that you want to use for publishing

attachments. Note that this entry is used for generating a URL, and

so you have to specify a relative path (for example, EBP).

o Read view (host, port, directory)

If necessary, enter different parameters if the published URL is

different than the normal URL for publishing documents.

o User and password

Depending on the security settings of the Web server for publishing

attachments, you can specify a user (and password) with write

access.

o Write proxy

Enter the name of the proxy server used for giving write access.

Example

Transferring Attachments

It makes sense to set up attachment transfer in the following cases:

o To transfer a product configuration from the Internet Sales cata

to a purchasing document (shopping cart, or purchase order) in

Enterprise Buyer.

o To allow vendors to access the attachments of purchase orders th

were transferred by XML. The purchase orders contain links (URLs

the attachments.

Further notes

Transferring Attachments

o In order to generate URLs, the system requires information about

internal access to the Web server (Publish Internally) and about

external access (that is, retrieving attachments).

o Your Web server administrator should ensure the following:

- That external access to the Web server is possible (if desir

- That relevant read and write authorizations have been define

the Web server directory for the SRM system

- That published documents on the Web servers are deleted when

they are no longer required

Take the help of your BASIS person.

Regards,

Sachin

Former Member
0 Kudos

In case XI is not used. then what would be the procedure?

Former Member
0 Kudos

Hi Paris,

We are also working for the same requirement. We have did following configuration / customization to achieve this.

- Activated BADI "BBP_CREATE_BE_RQ_NEW" in SRM and set the indicator as follow:

cs_ctrl_att-BE_DOC_TYPE = 'SRM'.

cs_ctrl_att-BE_storage_cat = 'DMS_C1_ST'.

cs_ctrl_att-TRANSFER_ACTIVE = 'X'.

- In ECC Side T.code DC10 and defined document type for SRM with following

Add a New Document Type SRM (if not already exists). Set 'Use KPro', 'Version Assign' and 'Change

Docs'. Set the Internal and External Number Range (02 and 01). Use MCDOKZNR as Number Exit.

Ver No. Incr = 1 and Set the File Size (Usually 10000000 bytes).

Once the Document Type is created, define Object links to PO Item and Pur Req Item. Use - Screen

Number 247 and Screen Number 248 with Valuation Object of EBAN and EKPO for Objects EBAN

(PReq) and EKPO (PO) for Doc Type SRM.

After doing this changes we were able to transfer attachements but we are still facing one issue as we were not able to open that particular document in ECC / R3.

Hope this helps... Also please do let me know if you get any solution on how to open documents in ECC.

Thanks

Ritesh

Former Member
0 Kudos

Even after implementing all the changes, Still i coudnt see any attachement in PR document in the backend. Please help me out.

Former Member
0 Kudos

Hi Ritesh,

Could you check if the BADI is getting called at all?

Please refer to the note 1057932. It has all details on how to transfer attachments to backend.

Regards,

Sapna

Former Member
0 Kudos

I cross checked all the settings mentioned in the notes...Even after making all these changes, attachment is not getting transferred to PR document

Former Member
0 Kudos

Hello,

1. Please check if the BADI is getting called ?

2.IF YES : Place the Break Point in FM 'Meta_attachment_create'

3. Check if there are any errors coming from FM 'Meta_attachment_create'.

4. If there are any errors coming over, then there is problem in some setting in backend system.

Do post the errors to determine the problem in Backend system

Best Regards,

Sapna

Former Member
0 Kudos

Hello,

I tried debugging FM "META_ATTACHMENT_CREATE" , where inturn its calling a FM "B46C_ATTACHMENT_CREATE" , which is returning back ev_error = 'X" and ev_attach_docnumber is not getting generated.

Can you please help me out to find out what could be the issue>???

Regards,

paris

Former Member
0 Kudos

Hi ,

B46C_ATTACHMENT_CREATE will call in turn

CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'

DESTINATION lv_destination

In the importing parameters you have the structure ls_return . Check this ls_return once you press F6 at the above Function call.

If there are no errors here debug a little further down where you will see the call to

CALL FUNCTION 'CVAPI_DOC_CHECKIN'

DESTINATION lv_destination

This returns ls_messages. Check what does this return

Either of these should return a error.

Note both these calls are inside the FM B46C_ATTACHMENT_CREATE . so do a step wise debugging in B46C_ATTACHMENT_CREATE .

Best Regards,

Sapna

Former Member
0 Kudos

Hello Sapna,

Thanks for inputs. When i tried to debug FM B46C_ATTACHMENT_CREATE , that inturn has RFC BAPI_DOCUMENT_CREATE2. Actually cursor is going till this RFC, and its coming out without execution. Actually when i tried to execute this RFC from SRM to R/3 its working fine ( i wrote a simple report ). Also user id exist in both R/3 and SRM. Even then in debuggin mode before PR is getting created RFC BAPI_DOCUMENT_CREATE2 is not getting called. Do you know what could be the issue for not getting called??

Regards,

Paris

Former Member
0 Kudos

Hi Paris,

No need to do a step wise debugging inside the FM BAPI_DOCUMENT_CREATE2. Just do a F6 when you reach the FM call BAPI_DOCUMENT_CREATE2. and check the ls_return structure.

Same applies to the 'CVAPI_DOC_CHECKIN' . Do a F6 and check ithe ls_messages return.

Regards,

Sapna

Former Member
0 Kudos

Hi Sapna,

BAPI_DOCUMENT_CREATE2 returns the below message in LS_RETURN

message: You are not authorized for with document type SRM.

After this FM, there is a SY-SUBRC check, there EXIT command is been called, so cursor goes there and exits out of the FM. I couldn't check 'CVAPI_DOC_CHECKIN' .

PS:

in FM b46c_attachment_create

Importing parameters:

IV_ATTACH_BE_DOC_TYPE = SRM

IV_ATTACH_BE_STORAGE_CAT = DMS_C1_ST

IV_ATTACH_USE_URL is blank

IS_ATTACH_BE - getting filled

We are using SRM5.0 system.

Regards,

Paris.

Former Member
0 Kudos

Hi Paris,

The user lacks C_DRAW_* authorization objects in the backend system.

The user who is trying to create attachmnets does not have some authorization objects of type

C_DRAW_* assigned in backend. Ask your basis team to assign the same.

Please have the user assigned the above. It will solve the problem.

Best Regards,

Sapna

Former Member
0 Kudos

Hello Sapna,

Thansk for your support. basis team has added all the C_DRAW_* authorization objects in the backend system. Even after that i debugged the FM, LS_RETURN is returning the same error message as previous.

Regards,

Paris

Former Member
0 Kudos

Hi,

Did you take care that the corresponding RFC user who is actually creating the attachment in backend has all the authorizations.

From my experience this is the reason for the error.

Best Regards,

Sapna

Former Member
0 Kudos

Hello Sapna,

Now the authorisation issue was solved. Now FM CVAPI_DOC_CHECKIN is returning error message "An error occured while creating the original attribute for DOC". Can you please let me know what could be the issue now???

PS:

Now after the authorisation issue, document attachment number is getting created and the same attachment number and type all those details are getting transported to PR. But couldnt view the attachment,

Please reply back if you have any inputs. thanks

Former Member
0 Kudos

Hi ,

Refer note 1173675. There should be some missing entry in the table SDOKPROP.

Configure the same refering the note 1173675.

That should help.

Regards,

Sapna

Former Member
0 Kudos

Hello Sapna,

Thanks a lot...It worked perfectly now!!! . Again tonnes of thanks for your prompt replies with right direction.

Regards,

Paris.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

See related threads for more pointers:

BR,

Deepti