Skip to Content
avatar image
Former Member

Trigger output type only when PO is created and don't trigger output type when PO is changed.

Hello Everyone,

I have created condition record with medium 5 for set of combination of purchase org/document type/vendor/plant for output type ZEU. I want to trigger emails to these combination only when new PO is created.If PO is changed,then mails should not be triggered.If combination does not match,then existing print functionality should work.

I have created routine for controlling the output type triggering.But,how can i identify whether new PO will be created or existing PO is changed.

If user manually triggers output type using messages section in PO.Then,emails should trigger if the combination matches.

Please let me know if any inputs are needed.

Thanks!!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 04, 2017 at 06:12 AM

    We could make use of variable TRTYP to identify whether PO is getting created/changed.

    ASSIGN ('(SAPLMEPO)TRTYP') TO <fs_po_mode>.

    <fs_po_mode> will be 'H' while creating PO

    <fs_po_mode> will be 'V' while changing PO.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 31, 2017 at 09:00 PM

    Hi

    You can control this via the output type config or alternatively code in your routine. You get the indicator for creation and change. But you might also need to think of new item addition later after the PO creation

    Br

    Vijay V

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 31, 2017 at 09:05 PM

    I'm very much confused what does Purchase Order have to do with Sales Org here...

    Either way, output functionality is the same across the applications that use it. Just uncheck "multiple issuing" box for the output type in NACE and it will only be triggered once, when the document is created.

    Not sure though if there is more to this story that could add some complexity...

    Add comment
    10|10000 characters needed characters exceeded

    • This can't be managed using condition records.

      Sorry but changing the question after it's been answered actually made it more confusing (and made the previous replies look rather odd). There are only a few ways to prevent output in general: configuration I mentioned; a requirement routine (which I guess Vjay was referring to), and not entering a condition record. You can't create a condition record and then expect output not to be triggered for it. This is not how it works.