oreoconcepts.blogg.se

Material basic data table sap
Material basic data table sap







material basic data table sap

First of all, you just told us to check the roadmaps. 🙂įinally, "Please use the SAP Customer Influence Program". This reminds me when cable companies had a monopoly and they'd send a technician to you "sometime between 9 am and 8 pm on Tuesday". Next suggestion is "keep checking the roadmap, it's updated quarterly". But after accepting "terms and conditions" (I hope I didn't accidentally sign up to be a part of human centipede), I'm getting "403 You're not authorized". That's a valid point, so off we go to check the list.

material basic data table sap

First, it suggests to check the CDS view list by LOB to see if there is an alternative. The note honestly admits this is "missing functionality" but Resolution section is quite something.

material basic data table sap

From what I see, SAP has not made available any CDS view for long texts (hence this blog). The note title is a bit misleading since this seems to affect not only Cloud but also on-premise version. Quick Google search discovered SAP Note 2796654 "CDS View for Long Text not available in S4HANA Cloud". Since it's 2020 and S/4HANA, CDS views and all that have been around for years, surely SAP should've already come up with an alternative to READ_TEXT, no? Note : You cannot preview long text in CDS or consume this CDS view in ABAP reports as it is a virtual element but this approach is suitable for Fiori applications and you can view data in Gateway client.Īt first, I was puzzled by the blog subject. This approach would be a solution for this. There are many other approaches to get the long text but I observed performance issues when the CDS used in Fiori Application. THEN VALUE #( ( CONV string( 'CLUSTR' ) )Īs I am using CDS joins, for me this is faster than calling function modules in exit class. "CLUSTD and CLUSTR needed for LRAW to STRING conversionĮt_requested_orig_elements = COND #( WHEN iv_entity = 'ZMAT_LONGTEXT' METHOD if_sadl_exit_calc_element_read~get_calculation_info. LOOP AT ct_calculated_data ASSIGNING FIELD-SYMBOL().ĪSSIGN it_original_data TO FIELD-SYMBOL().ĪSSIGN COMPONENT 'CLUSTD' OF STRUCTURE TO FIELD-SYMBOL().ĪSSIGN COMPONENT 'CLUSTR' OF STRUCTURE TO FIELD-SYMBOL().ĭATA(lt_cluster) = VALUE ltt_cluster( ( clustd = ĭATA(lv_string) = REDUCE #( INIT text TYPE stringĪSSIGN COMPONENT 'MATERIALLONGTEXT' OF STRUCTURE TO FIELD-SYMBOL(). METHOD if_sadl_exit_calc_element_read~calculate.ĭATA lt_lines TYPE STANDARD TABLE OF tline. TYPES ltt_cluster TYPE STANDARD TABLE OF lty_cluster WITH DEFAULT KEY. INTERFACES if_sadl_exit_calc_element_read. _sxtl.clustdĬDS exit class CLASS zcl_ltext DEFINITION Key cast( LongText.tdname as matnr ) as materialNumber,ĭefine view zmat_interface as select from I_MaterialĪssociation to zmat_stxl as _LongText on $projection.Material = _LongText.materialNumberĪnd _LongText.language = $session.system_languageĪssociation to zmat_stxl as _sxtl on $projection.Material = ĭefine view zmat_stxl as select from stxl as LongTextĪssociation to zmat_longtext as _Material on $projection.materialNumber = _Material.Material IMPORT tline TO lt_lines FROM INTERNAL TABLE lt_cluster.

#Material basic data table sap code#

The below code in exit class does the magic to convert binary to char format Import data from cluster internal table and capture the character format data.Use CDS exit to convert the binary data to text format.Join CDS with STXL table and get binary data.You can find more details about virtual elements in the below link.ĭisplay material and its basic text data ( Material long text) in Fiori application.īasic data text or Long text details are stored in cluster tables STXH / STXL in a binary format but binary objects conversion to character format is not possible in CDS Views or Open SQL. Considering the performance of CDS view, I used a different approach. ( CDS view cannot be joined with function modules directly, but you can use virtual elements to fetch data from function modules). This Blog Post discusses the approach to get the long text of a material in a CDS view with virtual elements but without using the function module ‘READ_TEXT’.









Material basic data table sap