Skip to Content
1

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

Nov 16, 2017 at 12:32 PM

272

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Florian Henninger
Dec 18, 2017 at 08:57 PM
0

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 ��

Show 1 Share
10 |10000 characters needed characters left 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! :-) )

0
Rohit Khan
Dec 19, 2017 at 11:31 AM
0

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Rohit,

not sure if I understood your answer correctly - so are you saying there is a (SAP-provided) CDS-view, that offers the ATP-Quantity for a given Material? If yes, how is that view called?

On 2nd read I suspect you got my question wrong - in my Code above, [atp_table] is the placeholder for the CDS-view I am looking for here!

Best

Joachim

0

Hello Joachim,

Could you please confirm on which S/4 version you are working on? This would help me to answer you better.

Regards

Rohit

0

Hi Rohit,

as mentioned, I have a S/4HANA 1709 (on premise) available!

thanks!

Joachim

0