Skip to Content

S/4HANA - get ATP-quantity from CDS?

So in S/4HANA lots of stuff is based on CDS, and many things are calculated on the fly, so I'm wondering:

Can I get ATP-quantity out of a (SAP-provided) CDS-view?

I'd wish to have something like this:

Same as copy- and searchable code:

define view ZZ_JRE_MAT_LIST_atp 
with parameters werks_par : werks_d
as select from v_marc_md    
left outer join makt 
    on v_marc_md.matnr = makt.matnr
    and makt.spras = $session.system_language 

left outer join [atp_table] 
    on  v_marc_md.matnr = [atp_table].matnr
    and [atp_table].werks = v_marc_md.werks
    and [atp_table].check_rule = 'A'   
 
     {
    v_marc_md.matnr as matnr,
    werks,
    makt.maktx as maktx_syst,
    dismm, 
    minbe,
    AV_QTY_PLT   
}

where werks = $parameters.werks_par

(I have a S/4HANA 1709 at hand, in case that matters)

Thanks

Joachim

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 18, 2017 at 08:57 PM

    Don't think there is a view available which includes the atp because of the various types of strategies you can maintain.

    So in my opinion it need to be some "calculations" left which are made by functional programming.


    ~Florian

    Ps: could also tell you by a cup of coffee, but just read the tweet from Jelena ��

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Florian,

      yeah, der are some complex calculations associated with ATP, but I was (and still am!) hoping that this could be handled by CDS.

      best

      Joachim

      PS: I do enjoy having coffee with you, but I also like that (after > 1 month of silence) someone cares for this question here, so thanks for that!:

      (So you're saying that after I mentioned my question in Coffee-Corner, Jelena posted something about it on twitter, and that's how you found it? What a nice chain! :-) )

  • Dec 19, 2017 at 11:31 AM

    Hello Joachim, Yes it should be possible to get AV_QTY_PLT. Please use the alias.[atp_table]. Hopefully, it should resolve your query.

    Thanks

    Rohit

    Add comment
    10|10000 characters needed characters exceeded