How to use an M3 program that’s not yet bookmark enabled in a Mashup

Here is a solution for a Mashup to use an M3 program that doesn’t yet support bookmarks, for example MMS081. If the program doesn’t support bookmarks the options are limited. Normally only M3 programs that are bookmark enabled are supported in a Mashup.

But we can workaround the limitation by using the Program attribute instead of a Bookmark element.

<m3:ListPanel Name="MMS081B" Program="MMS081">
    <m3:ListPanel.Events>
       <mashup:Events>
          <mashup:Event SourceEventName="Startup" />
       </mashup:Events>
    </m3:ListPanel.Events>
</m3:ListPanel>

Note that starting programs using the Program property is a bit risky since we cannot guarantee the Sorting order nor the initial values on the panel as we can with Bookmarks.

In this case there is no standard way to set header fields when the program is started. But after the program has been started it can be set to blank using the M3 Mashup Apply event. We can use the Apply event to set values in the header and position fields, and when the values are set the ListPanel will automatically press the ENTER key to update the list.

As an example of the Apply event, we can set the Facility (FACI) to a certain value using the Apply event.

<Button Name="testButton" Content="Set Facility">
    <Button.CommandParameter>
       <mashup:Events>
          <mashup:Event TargetName="MMS081B" SourceEventName="Click" TargetEventName="Apply">
             <mashup:Parameter TargetKey="W1FACI" Value="A01" />
          </mashup:Event>
       </mashup:Events>
    </Button.CommandParameter>
</Button>

As another example of the Apply event, we can transfer a parameter from another ListPanel, for example the Item Number ITNO of MMS001/B:

<m3:ListPanel Name="MMS001B" Header="Items">
    <m3:ListPanel.Events>
       <mashup:Events>
          <mashup:Event SourceEventName="Startup">
             <mashup:Parameter TargetKey="MMCONO" />
             <mashup:Parameter TargetKey="MMITNO" />
          </mashup:Event>
          <mashup:Event SourceEventName="CurrentItemChanged" TargetName="MMS081B" TargetEventName="Apply">
             <mashup:Parameter SourceKey="ITNO" />
             <mashup:Parameter SourceKey="FACI" Value="A01" />
             <mashup:Parameter TargetKey="WHLO" Value="001" />
          </mashup:Event>
       </mashup:Events>
    </m3:ListPanel.Events>
    <m3:ListPanel.Bookmark>
       <m3:Bookmark Program="MMS001" Table="MITMAS" KeyNames="MMCONO,MMITNO" />
    </m3:ListPanel.Bookmark>
</m3:ListPanel>

Thanks to Peter K for all the help!

Published by

thibaudatwork

M3 Technical Consultant

8 thoughts on “How to use an M3 program that’s not yet bookmark enabled in a Mashup”

  1. Hi,

    exactly this problem i have at the moment.
    I want to create a mashup with PMS170 as master and MMS080 and RPS010/B1 as sub.
    MMS080 was not a problem but RPS010 is not bookmarked.
    RPS010 is a related option of PMS170 -> Check materials.

    I tried it also with you post but no success.
    Have you an idea to solve that?

    Like

    1. Hi Daniel. I don’t know. My example is where program X is bookmark enabled, and program Y is not, with an event X > Y. In your case the event is the other way around, Y > X. I don’t have an example of that myself, but yesterday I was discussing with a colleague whom said it worked for him. That’s all I have.

      Like

  2. I havw the same issue as Daniel, I’m trying to buld a mashup with PPS200 as a maste displaying PPS201 and APS370 as sub. PPS201 was no problem, but APS370 is not bookmarked.

    Like

  3. Hi Daniel, Johan, unfortunately non-bookmark enabled programs are unpredictable in a Mashup as said above, and all the documentation I have is in this post. If you need additional support contact me at work (see the About page for my contact page) make an official request, and we’ll find help for you.

    Like

  4. Hello everybody, I have the same problem as Daniel and Johan. I want to call OIS103 from Master program OIS300 in a Mashup. (OIS103 is a relative option from OIS300).
    I’m not able to pass the parameter order number precisely.
    Can you help me please?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s