cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to send PDF attachment to accounts

former_member188831
Contributor
0 Kudos

I am trying for test with SOAP UI imported WSDL file for mange accounts.

i could able to connect and crate account add url and sample image file as per sap hlep link.

but i am trying to pass pdf data into binary object not working.

i did some pdf conversion using abap function got  binary data and loaded pdf icon getting displayed but no data in c4c when i see the attachment.

below is my code in soap ui. any suggestions ?

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:a1r="http://sap.com/xi/AP/CustomerExtension/BYD/A1R04" xmlns:glob1="http://sap.com/xi/AP/Globalization">

   <soapenv:Header/>

   <soapenv:Body>

      <glob:CustomerBundleMaintainRequest_sync_V1>

         <BasicMessageHeader>

            <!--Optional:-->

            <ID schemeID="ID1" schemeAgencyID="ID2" schemeAgencySchemeAgencyID="1">TEST1101</ID>

         </BasicMessageHeader>

         <!--1 or more repetitions:-->

         <Customer actionCode="02" addressInformationListCompleteTransmissionIndicator="true" communicationArrangementListCompleteTransmissionIndicator="true" directResponsibilityListCompleteTransmissionIndicator="true" relationshipListCompleteTransmissionIndicator="true" salesArrangementListCompleteTransmissionIndicator="true" contactPersonListCompleteTransmissionIndicator="true" paymentDataListCompleteTransmissionIndicator="true" textListCompleteTransmissionIndicator="true">

            <!--handle for log items-->

            <ObjectNodeSenderTechnicalID>001</ObjectNodeSenderTechnicalID>

            <!--Provide InternalID to identify the account-->

            <InternalID>34565</InternalID>

            <!--Category code 2 means "corporate account"-->

            <CategoryCode>2</CategoryCode>

            <!--The account is a customer, not a prospect-->

            <ProspectIndicator>false</ProspectIndicator>

            <CustomerIndicator>true</CustomerIndicator>

            <!--The account shall be "active" (status code = '2')-->

            <LifeCycleStatusCode>2</LifeCycleStatusCode>

            <!--Maintain customer attachments like documents, images, links...-->

            <AttachmentFolder DocumentListCompleteTransmissionIndicator="true" ActionCode="01">

               <!--Link attachment-->

               <Document ActionCode="01">

                  <VisibleIndicator>true</VisibleIndicator>

                  <CategoryCode>3</CategoryCode>

                  <TypeCode>10001</TypeCode>

                  <Name>SAP AG_T111</Name>

                  <AlternativeName>SAP AG HomepageTT</AlternativeName>

                  <Description languageCode="EN">Hyperlink to SAP AGTTTT</Description>

                  <ExternalLinkWebURI>http://www.sap.com/aaaa</ExternalLinkWebURI>

               </Document>

               <!--File attachment-->

               <Document ActionCode="01">

                  <VisibleIndicator>true</VisibleIndicator>

                  <CategoryCode>2</CategoryCode>

                  <TypeCode>10001</TypeCode>

<!--                  <MIMECode>image/jpg</MIMECode> -->

    <MIMECode>application/pdf</MIMECode>

                  <Name>Testing_PDF11</Name>

                  <AlternativeName>Testing_PDF11</AlternativeName>

                  <Description languageCode="EN">Test</Description>

                  <FileContent ActionCode="01">

<!--                  <BinaryObject mimeCode="image/png" characterSetCode="" format="" fileName="" uri="">AQIDBAUGBwgJAA==</BinaryObject> -->

                     <BinaryObject mimeCode="application/pdf" characterSetCode="" format="" fileName="" uri="">

                     JVBERi0xLjMNCiXi48/TDQolUlNUWFBERjMgUGFyYW1ldGVyczogRFJTWGgNCjIgMCBvYmoNCi9X aW5BbnNpRW5jb2RpbmcNCmVuZG9iag0KMyAwIG9iag0KPDwNCiVEZXZ0eXBlIFBPU1QyICAgIEZv bnQgQ09VUklFUiAgbm9ybWFsIExhbmcgRU4NCi9UeXBlIC9Gb250DQovU3VidHlwZSAvVHlwZTEN Ci9CYXNlRm9udCAvQ291cmllcg0KL05hbWUgL0YwMDENCi9FbmNvZGluZyAyIDAgUg0KPj4NCmVu ZG9iag0KNCAwIG9iag0KPDwNCi9MZW5ndGgg

                     NjVfODAgRU4pDQovUHJvZHVjZXIgKFNBUCBOZXRXZWF2ZXIgNzQwICkNCiVTQVBpbmZvU3RhcnQg VE9BX0RBUkENCiVGVU5DVElPTj0oICAgICkNCiVNQU5EQU5UPSggICApDQolREVMX0RBVEU9KDAw MDAwMDAwKQ0KJVNBUF9PQkpFQ1Q9KCAgICAgICAgICApDQolQVJfT0JKRUNUPSggICAgICAgICAg KQ0KJU9CSkVDVF9JRD0oICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICApDQolRk9STV9JRD0oICAgICAg

                     ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkNCiVGT1JNQVJDSElWPSggICkNCiVS RVNFUlZFPSggICAgICAgICAgICAgICAgICAgICAgICAgICApDQolTk9USVo9KCAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApDQol LSggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKQ0KJS0oICAgICAgICAgICAg

                     ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkNCiUt KCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICApDQolU0FQaW5mb0VuZCBUT0FfREFSQQ0KPj4NCmVuZG9iag0KMSAwIG9iag0KPDwN Ci9UeXBlIC9QYWdlcw0KL0tpZHMNClsgNiAwIFINCl0NCi9Db3VudCAxDQo+Pg0KZW5kb2JqDQo4 IDAgb2JqDQo8PA0KL1R5cGUgL0NhdGFsb2cN

                     Ci9QYWdlcyAxIDAgUg0KL1BhZ2VNb2RlIC9Vc2VOb25lDQo+Pg0KZW5kb2JqDQp4cmVmDQowIDkN CjAwMDAwMDAwMDAgNjU1MzUgZg0KMDAwMDAwMTY4OSAwMDAwMCBuDQowMDAwMDAwMDQ2IDAwMDAw IG4NCjAwMDAwMDAwODEgMDAwMDAgbg0KMDAwMDAwMDIzNCAwMDAwMCBuDQowMDAwMDAwNzI5IDAw MDAwIG4NCjAwMDAwMDA3NTEgMDAwMDAgbg0KMDAwMDAwMDkzNyAwMDAwMCBuDQowMDAwMDAxNzU3 IDAwMDAwIG4NCnRyYWlsZXINCjw8DQovU2l6

                     ZSA5DQovUm9vdCA4IDAgUg0KL0luZm8gNyAwIFINCj4+DQpzdGFydHhyZWYNCjE4MzINCiUlRU9G DQo=

                     </BinaryObject>

                  </FileContent>

               </Document>

            </AttachmentFolder>

         </Customer>

      </glob:CustomerBundleMaintainRequest_sync_V1>

   </soapenv:Body>

</soapenv:Envelope>

Thanks,

Mahesh

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

WE can only attach actual documents in webdav and we only keep 1 version.

former_member188831
Contributor
0 Kudos

Ginger,

this is not related to webdav.

I am trying to attach documents to Account via webservice.

Initially it creates the attachment with File1, File2 , File3.

when i try to load File4 it over writes all and keeps only File4 as latest.

these are all different files i am trying to upload.

Thanks,

Mahesh

0 Kudos

Hello Mahesh

I'm not sure who the developer of that web service is - please create an incident and paste the number that starts with a 3 back here -I'll try to help figure out who can answer this.

-ginger

former_member188831
Contributor
0 Kudos

Yes i did created incident # 3100840924.

former_member188831
Contributor
0 Kudos

it looks working from soap ui when i set

AttachmentFolder DocumentListCompleteTransmissionIndicator = "false" Actioncode = 04

but when i am trying from C#  with .net calling web service it fails with below error message.

"Only list complete transmission (LCTI) allowed for CUSTOMER-ATTACHMENT_FOLDER-DOCUMENT - LIST_CTI001"

looks like it is forcing to set the status to true. not accepting false.

any help appreciated.

Thanks,

Mahesh

former_member188831
Contributor
0 Kudos

I could able to upload PDF attachment from web service i am good with this.

But i got a different issue like when i upload second attachment it over rides the first.

how do i add as new attachment ?

Thanks,

Mahesh

0 Kudos

Hi Mahesh

So, you want versions of attachments?  So, attached PDF1 then PDF2?   Are both versions on webdav? 

Thanks

Ginger

former_member188831
Contributor
0 Kudos

they are like different files.

day 1 - i will do pdf1

day 2 - i will do pdf2

these are not in webdav.

attachments to account and products i am talking.

Thanks,

Mahesh