Skip to Content
avatar image
Former Member

Save Attachement to Delivery

Hello Experts,

is there a possibility to save a Attachment to Document, for example to a Delivery?


I have found the object 221 / Attachement 2 but my attempt failed:


<AdmInfo>
            <!--multiple such elements are allowed-->
            <Object>221</Object>
            <Version>2</Version>
        </AdmInfo>
        <Attachments2_Lines>
            <!--multiple such elements are allowed-->
            <row>
                <!--multiple such elements are allowed-->
                <SourcePath>C:\temp\Out\test.pdf</SourcePath>
                <FileName>test.pdf</FileName>
                <FileExtension>pdf</FileExtension>
                <!--<Override>tNo</Override>-->
            </row>
        </Attachments2_Lines>
    

the Errormessage is not helpful:

<Payload status="success" id="atom3" Role="C" DImsg=" 
Exception : DI error: Invoke of: GetBusinessObjectFromXML Source: SAPbobsCOM.Company.90.0 Description: ...." 
DIresult="failure" keyvalue="" keyname="" payload="atom4" objectid="221" method="Synchronous Insert" 
b1login="Technical User" system="0010000113"/>

has anybody solved this problem?

Thanks and best Regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 27, 2015 at 08:56 PM

    Hello Ronny,

    Use the sbo-service-atom instead of the sbo-api-atom.

    Then create an entry in the attachment object (if not exists) including an line with an attachement.

    Use the result for updating the documentattachment.

    Check the di-api help for more info.

    Kind Regards Teun

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member T A

      Hello Teun,

      i have insert a new line to a existing AbsEntry  😀:

      <xsl:template name="transform">
              <Attachments2_Lines xmlns="">
                    <!--at First all existing Lines-->
                  <row>
                      <SourcePath>C:\temp\Out</SourcePath>
                      <FileName>Parcellabel_300001_20151109105852</FileName>
                      <FileExtension>pdf</FileExtension>
                  </row>
                <!--Now the new Attachment-->
                  <row>
                      <SourcePath>C:\temp\Out</SourcePath>
                      <FileName>Parcellabel_300002_20151109105852</FileName>
                      <FileExtension>pdf</FileExtension>
                  </row>
              </Attachments2_Lines>
          </xsl:template>
      
      

      Thanks for your help

      Best Regars

      Ronny

      pastedImage_6.png (15.9 kB)