<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Need help with cl_pptx_document in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814188#M42020</link>
    <description>&lt;P&gt;I have set the relationship manually and now it works. Thank you.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jan 2019 08:00:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2019-01-17T08:00:54Z</dc:date>
    <item>
      <title>Need help with cl_pptx_document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814184#M42016</link>
      <description>&lt;P&gt;Hello together,&lt;/P&gt;
  &lt;P&gt;I'm trying to use the class "cl_pptx_document" and "cl_pptx_presentationpart" to add slides to a pptx Template. &lt;/P&gt;
  &lt;P&gt;I have a template (P1) with all the slides I needed and a second template (P2) with just the welcome page. Now I want to insert different parts from P1 into P2.&lt;/P&gt;
  &lt;P&gt;As first I loaded the document, get the presentationpart and get all parts from p1:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;DATA(ppt)= cl_pptx_document=&amp;gt;load_document( iv_data ='xstring ppt').
DATA(presentationpart)= ppt-&amp;gt;get_presentationpart().
DATA(slide_parts)= presentationpart-&amp;gt;get_slideparts().&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;In the next step i tried to load different parts in my P2-object and try to download the modified P2.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;...
presentationpart-&amp;gt;add_part( ir_part ='Single Part from part_collection').
DATA(final_pptx)= ppt-&amp;gt;get_package_data()
...&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;But that dont work...&lt;/P&gt;
  &lt;P&gt;The second way I tried, was to feed the presentationpart with xml data of a slide. When I open the Powerpoint after that, there is no new Slide. Instead, an error message appear. But when I open the pptx with notepad, I see the new xml data of the slide. I think that there are some Relations are missing. &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;presentationpart = ppt-&amp;gt;get_presentationpart( ).
DATA(slide_part) = presentationpart-&amp;gt;add_slidepart( ).
slide_part-&amp;gt;feed_data( iv_data = ls_slide2-xdata ).&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;How can I set the relations? &lt;/P&gt;
  &lt;P&gt;It's possible to move parts from one Object to another? Or do I have to pay attention to something (Relationships, IDs) ?&lt;/P&gt;
  &lt;P&gt;Unfortunately, I couldn't find a any documentation or demos about that classes. So I hope somebody knows something and can help me...or give me a simple example how to add a slide.&lt;/P&gt;
  &lt;P&gt;Greetz Thimo&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 09:11:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814184#M42016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-01-15T09:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with cl_pptx_document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814185#M42017</link>
      <description>&lt;P&gt;you add slide2-data into slidepart, not slide2part-data then it will corrurpt, you have to get slidepart from the first one. I tried below code and i can copy slide.xml without error. Unfortunately, it still not display copied slide in new file. I checked and findout that all relationship are correctly set, but in file presentation.xml, copied slides didnt insert below slide list tag yet ( p:sldIdLst ), so i manually change this file and copied file shown in new file. i dont really famaliar with OOXML, so maybe you have to search on internet about it ( ABAP OOXML for powerpoint may not hard to find but in C#, VB...there are alot );in mean time, you could try add a missing tag to presentation.xml using transformation.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;      l_package = cl_pptx_document=&amp;gt;load_document( iv_data = l_infile )."P2 file
      l_present = l_package-&amp;gt;get_presentationpart( ).
      l_slide = l_present-&amp;gt;add_slidepart( ).

      l_slide-&amp;gt;feed_data( iv_data = cl_pptx_document=&amp;gt;load_document( iv_data = l_cpfile "P1 file
                                                                   )-&amp;gt;get_presentationpart(
                                                                   )-&amp;gt;get_slideparts(
                                                                   )-&amp;gt;get_part( iv_index = 0 )-&amp;gt;get_data( ) )."sample index

      l_present-&amp;gt;get_id_for_part( ir_part = l_slide ).
      final = l_package-&amp;gt;get_package_data( ).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 05:29:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814185#M42017</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2019-01-16T05:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with cl_pptx_document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814186#M42018</link>
      <description>&lt;P&gt;Thank you very much! That helps me a lot.&lt;/P&gt;&lt;P&gt;The Insertion of a slide from another Template works fine. I insert the slide and added the ID manually in the presentation.xml. But the new silde still doesn't appear. I unpacked the modified Powerpoint and checked the Relations. Finally I found out, that the Relation (ppt/slides/_rels) wasn't set.&lt;/P&gt;&lt;P&gt;Now I try to find a way to set it too.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 09:01:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814186#M42018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-01-16T09:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with cl_pptx_document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814187#M42019</link>
      <description>&lt;P&gt;That relationship nothing but between slide and theme. maybe you need to add theme too. You may see all the related file with those slides you want to copy using this program: ROPENXML_LISTER, may have some light there.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;SUP&gt;&lt;/SUP&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 00:21:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814187#M42019</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2019-01-17T00:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with cl_pptx_document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814188#M42020</link>
      <description>&lt;P&gt;I have set the relationship manually and now it works. Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 08:00:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814188#M42020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-01-17T08:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with cl_pptx_document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814189#M42021</link>
      <description>&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;I am also trying to add a new slide to ppt. But getting the same error. Could you please explain how you set the relationships manually.&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Lakshmi Sankergi&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 05:32:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-with-cl-pptx-document/m-p/814189#M42021</guid>
      <dc:creator>lakshmi_sankergi</dc:creator>
      <dc:date>2022-02-04T05:32:39Z</dc:date>
    </item>
  </channel>
</rss>

