API abap mdm - field isnt long enought
Hi all,
I´m using MDM Abap API to read some data from MDM catalogues in an abap program.
I have to define structures in se11 with fields that need to have the same name as mdm fields.
In MDM there is a field name that has more than 30 positions. Do you know a way to overpass this issue?
Thanks in advance.
Dear Poster
Your thread has had no response since it's creation over
2 weeks ago, therefore, I recommend that you either:
- Rephrase the question.
- Provide additional Information to prompt a response.
- Close the thread if the answer is already known.
Thank you for your compliance in this regard.
Jason Boggans
SAP SRM SDN Moderator
Similar Messages
-
Abap MDM API query with OR operation
Hi experts,
not sure this is the proper section for the thread, anyway; dealing with ABAP MDM API, is there a way to build up a query which involves several clause in OR conjunction?
This is the scenario: I've got to extract several items on the basis of exact product codes. Tipically, I've got huge vectors of hundreds of product codes; actually, I could easily retrieve data by looping over them and, for each code, perform a query on MDM via QUERY method building the clause as follows:
ls_query-parameter_code = 'MDMSRM_PART_NO'. "Field code
ls_query-operator = 'EQ'. "Contains
ls_query-dimension_type = mdmif_search_dim_field. "Fieldsearch
ls_query-constraint_type = mdmif_search_constr_text. "Text search
lv_text = wa_codes-product_code.
GET REFERENCE OF lv_text INTO ls_query-value_low.
APPEND ls_query TO lt_query.
This will however result in hundreds of query in the LOOP itself.
Is there any way to build a query with OR operators ?
Thanks,
M.Hi,
I see you are not clearing your local structure "ls_query". This could be reason of problem, try this and let us know the result:
DATA lt_query TYPE mdm_query_table.
DATA ls_query TYPE mdm_query.
DATA lv_search_text TYPE string.
DATA lt_result_set TYPE mdm_search_result_table.
DATA ls_result_set LIKE LINE OF lt_result_set.
Fill query structure with FIRST parameter
ls_query-parameter_code = 'Name'.
ls_query-operator = 'CS'.
ls_query-dimension_type = mdmif_search_dim_field.
ls_query-constraint_type = mdmif_search_constr_text.
lv_search_text = 'BMW'.
GET REFERENCE OF lv_search_text INTO ls_query-value_low.
APPEND ls_query TO lt_query.
CLEAR ls_query.
Fill query structure with SECOND parameter
ls_query-parameter_code = 'Model'.
ls_query-operator = 'CS'.
ls_query-dimension_type = mdmif_search_dim_field.
ls_query-constraint_type = mdmif_search_constr_text.
lv_search_text = '2009'.
GET REFERENCE OF lv_search_text INTO ls_query-value_low.
APPEND ls_query TO lt_query.
CLEAR ls_query.
Query on records (search for value 'BMW' model '2009' in table Products)
CALL METHOD lr_api->mo_core_service->query
EXPORTING
iv_object_type_code = 'Products'
it_query = lt_query
IMPORTING
et_result_set = lt_result_set. -
Hi SDN,
I need some information related to ABAP API for MDM workflow. I did search in SDN and I found one solution in a thered posted on Jul-2008.
ABAP API - MDM Workflow execute
My dought is: Do we have any ABAP API for call MDM work flow. Please provide me the solution ASAP. Apprciate for your immediate response.
Regards,
Kumar.Hi LAKSHMAN ,
To answer your question specifically
Using ABAP api you cannot call MDM workflows as of mdm 5.5 there are no functions specific to calling MDM workflows in ABAP.If you want to implement workflows on ABAP side you need to go for SAP ECC workflows which is a different topic than MDM>
To call MDM workflows over the Java stack ie WAS (SAP portal),You have 2 ways
- UWL
- Guided Procedures.
- UWL is a way of calling MDM workflows on EP.Wherein the workflow design will be done in MDM and it will only be called in portal using appropiate connections and configurations.
You can refer the below links to know more on them:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/771f1a61-0e01-0010-daa9-93a52905da09 (uwl)
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a3461636-0301-0010-3787-978f5ac8bd45 (UWL config)
- GP is a way where by you need to design the entire workflow on SAP portal the logic can be pertaining to MDM but the design is completely on portal using webdynpros and api.
You can refer the below links to know more on them:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/92811997-0d01-0010-9584-f7d535177831 (Guided procedures)
Enterprise Master Data Management (EP Guided)
To know more on ABAP api and its provider classes you can refer the below:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/601ddb01-e5c8-2910-d981-b190b51fca44 (abap api webinar)
Re: Abap api error (Abap api provider classes Forum)
Hope It Helped
Thanks & Regards
Simona Pinto -
ABAP APIs for MDM Workflow Modification
Hello All
I require a help from all of you. Currently I have a particular business case where I need to configure the MDM workflow & do changes & modifications in it via ABAP APIs. Currently we are having Java APIs in plcae.
Can you please tell me whether we have some ABAP APIS for this MDM Workflows, if yes what are their EXact names & functionalitites.
Also can we download them from Service Marketplace.
Please reply ASAP.
Regards
Madhurim BasuHi Madhurim Basu
ABAP API(SAP MDM 5.5.-7.1) are'nt support workflow management
SAP MDM(5.5-7.1) JAVA API are support workflow
More about JAVA API you can read from:
http://help.sap.com/javadocs/MDM/current/
Regards
Kanstantsin -
Hi,
I'm trying to write a report that extracts information from MDM. Everytime it's called, it has to establish a new connection to MDM where the hand-shake takes about 20-30 secs.
I was wondering if ABAP MDM Connection Pooling exist.
In Java MDM, you can configure J2EE with connection pool, so that you can reuse a connection rather than re-establishing a new connection on every call.
I've read Thomas Jung's WIKI on "How do you implement a MDM Connection Help Class?", however I cannot reuse this class. The static attribute in the class is not persisted.
Did I do something wrong?
I tried turning it into a shared memory root class, however it complains about an object reference still exist and would not allow me to do "dettach_commit( )".
Don't know any other ways to store the connection handle in memory.
Export/Import, SPA/GPA are not OO friendly.
Cheers
MichaelHi Andreas,
Thanks for your reply, it is good to confirm my understanding of the ABAP API connection.
For your interest, I have changed part of the connection code to increase the speed of the connection significantly.
Firstly to clarify, the connection from the ABAP stack to MDM is actually quite fast.
Upon the first call, the method CL_MDM_PROVIDER_SP04_PL03->_LOAD_FIELD_INFORMATION is called which reads the META-DATA from MDM for every table and every field. This could normally take 1 minute in our system landscape. I've changed to code to buffer the meta-data.
In a production/stable environment, it is unlikely for the META-DATA to change rapidly. Hence reading this on every connection is a waste of time.
This could be useful only if we are in implementation phase where this changes all the time.
1) In transaction MDMAPIC, I've added the ABAP implementation for MDM Version Support as my own MDM provider class ZSP04_PL03 with provider type ZCL_MDM_PROVIDER_SP04_PL03.
ZCL_MDM_PROVIDER_SP04_PL03 is a copy of CL_MDM_PROVIDER_SP04_PL03.
2) In ZCL_MDM_PROVIDER_SP04_PL03, the method LOADFIELD_INFORMATION is changed to read from buffer first before calling MDM. If the buffer is empty, it will read from MDM and store result into buffer etc.
I'm storing the information in a transparent table at the moment.
I buffer the three class attributes:
- mt_field_meta_data,
- mt_mdm_field_meta_data,
- mt_field_code2id_map.
As MT_FIELD_META_DATA is a complex structure (i.e. tables within table), I had to split it up into many different tables.
I can provide the code if you are interested.
Cheers,
Michael. -
ABAP Function to read long texts in HR Infotypes
Is there any standard ABAP function to read long texts in HR infotypes like ABAP function to read comments entered in infotype 19
HI ,
try this code
tables pcl1.
include rpc1tx00. " This include is explained on web page above
start-of-selection.
perform fill_key. perform get_data.end-of-selection.
form fill_key.
tx-key-pernr = p_pernr.
tx-key-infty = p_infty.
tx-key-subty = p_subty.
tx-key-objps = p_objps.
tx-key-sprps = p_sprps.
tx-key-endda = p_endda.
tx-key-begda = p_begda.
tx-key-seqnr = p_seqnr.
"OR
SELECT * INTO CORRESPONDING FIELDS OF wa_p0219
FROM pa0219
WHERE pernr = p_pernr
AND subty = p_subtyp
AND endda = '99991231'.
ENDSELECT.
MOVE-CORRESPONDING gs_p0219 TO tx-key.
MOVE '0219' TO tx-key-infty.
IF wa_p0219-itxex = 'X'.
MOVE-CORRESPONDING wa_p0219 TO tx-key.
endif.
endif
endform. " fill_key
form get_data.
import ptext from database pcl1(tx) id tx-key.
loop at ptext. "ptext is defined in above include
write: / ptext-line.
endloop.
endform. " get_data
Prabhudas -
Runtime error:ABAP program lines are longer than the internal table
Hi all,
Below is the code I have written,when Iam running it Iam getting
'ABAP program lines are longer than the internal table' runtime error.How can I resolve it.
REPORT ZTEST1 NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES:MARC,CDHDR,CDPOS.
TYPE-POOLS:SLIS.
DATA:HEADER TYPE SLIS_T_FIELDCAT_ALV,
WA TYPE SLIS_FIELDCAT_ALV,
LAYOUT TYPE SLIS_LAYOUT_ALV.
TYPES:BEGIN OF MARC_TY,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
EKGRP LIKE MARC-EKGRP,
MINBE LIKE MARC-MINBE,
EISBE LIKE MARC-EISBE,
MABST LIKE MARC-MABST,
END OF MARC_TY.
TYPES:BEGIN OF MATNR1_TY,
MATNR1 LIKE CDHDR-OBJECTID,
END OF MATNR1_TY.
TYPES:BEGIN OF CDHDR_TY,
OBJECTCLAS LIKE CDHDR-OBJECTCLAS,
OBJECTID LIKE CDHDR-OBJECTID,
CHANGENR LIKE CDHDR-CHANGENR,
USERNAME LIKE CDHDR-USERNAME,
UDATE LIKE CDHDR-UDATE,
END OF CDHDR_TY.
TYPES:BEGIN OF CDPOS_TY,
OBJECTCLAS LIKE CDPOS-OBJECTCLAS,
OBJECTID LIKE CDPOS-OBJECTID,
CHANGENR LIKE CDPOS-CHANGENR,
TABNAME LIKE CDPOS-TABNAME,
FNAME LIKE CDPOS-FNAME,
CHNGIND LIKE CDPOS-CHNGIND,
VALUE_NEW LIKE CDPOS-VALUE_NEW,
VALUE_OLD LIKE CDPOS-VALUE_OLD,
END OF CDPOS_TY.
**************TABLE TYPES********************************************
TYPES: MARC_TAB TYPE TABLE OF MARC_TY,
MATNR1_TAB TYPE TABLE OF MATNR1_TY,
CDHDR_TAB TYPE TABLE OF CDHDR_TY,
CDPOS_TAB TYPE TABLE OF CDPOS_TY.
*******************INTERNAL TABLES************************************
DATA:MARC_ITAB TYPE MARC_TAB,
MATNR1_ITAB TYPE MATNR1_TAB,
CDHDR_ITAB TYPE CDHDR_TAB,
CDPOS_ITAB TYPE CDPOS_TAB.
****************WORK AREAS********************************************
DATA:MARC_WA TYPE MARC_TY,
MATNR1_WA TYPE MATNR1_TY,
CDHDR_WA TYPE CDHDR_TY,
CDPOS_WA TYPE CDPOS_TY.
*******************SELECTION-SCREEN***********************************
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
PARAMETERS:PLANT LIKE MARC-WERKS.
SELECT-OPTIONS:MATERIAL FOR MARC-MATNR.
SELECT-OPTIONS:DATE FOR CDHDR-UDATE.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
SELECT MATNR
WERKS
EKGRP
MINBE
EISBE
MABST
FROM MARC INTO TABLE MARC_ITAB
WHERE MATNR IN MATERIAL
AND WERKS = PLANT.
CHECK MARC_ITAB[] IS NOT INITIAL.
LOOP AT MARC_ITAB INTO MARC_WA.
MATNR1_WA-MATNR1 = MARC_WA-MATNR.
APPEND MATNR1_WA TO MATNR1_ITAB.
CLEAR MATNR1_WA.
ENDLOOP.
CHECK MATNR1_ITAB[] IS NOT INITIAL.
SELECT OBJECTCLAS
OBJECTID
CHANGENR
USERNAME
UDATE
FROM CDHDR INTO TABLE CDHDR_ITAB
FOR ALL ENTRIES IN MATNR1_ITAB
WHERE OBJECTCLAS = 'MATERIAL'
AND OBJECTID = MATNR1_ITAB-MATNR1
AND UDATE IN DATE.
CHECK CDHDR_ITAB[] IS NOT INITIAL.
SORT CDHDR_ITAB[] DESCENDING BY OBJECTID CHANGENR.
DELETE ADJACENT DUPLICATES FROM CDHDR_ITAB[] COMPARING OBJECTID.
SELECT OBJECTCLAS
OBJECTID
CHANGENR
TABNAME
FNAME
CHNGIND
VALUE_NEW
VALUE_OLD
FROM CDPOS INTO CORRESPONDING FIELDS OF TABLE CDPOS_ITAB
FOR ALL ENTRIES IN CDHDR_ITAB
WHERE OBJECTCLAS = CDHDR_ITAB-OBJECTCLAS
AND OBJECTID = CDHDR_ITAB-OBJECTID
AND CHANGENR = CDHDR_ITAB-CHANGENR
AND TABNAME = 'MARC'
AND FNAME IN ('MINBE','EISBE','MABST','LVORM')
AND CHNGIND = 'U'.
CHECK CDPOS_ITAB[] IS NOT INITIAL.
*LOOP AT CDPOS_ITAB INTO CDPOS_WA.
WRITE: / CDPOS_WA-OBJECTCLAS,
CDPOS_WA-OBJECTID,
CDPOS_WA-CHANGENR,
CDPOS_WA-TABNAME,
CDPOS_WA-FNAME,
CDPOS_WA-CHNGIND,
CDPOS_WA-VALUE_NEW,
CDPOS_WA-VALUE_OLD.
*ENDLOOP.
WA-SELTEXT_L = 'OBJECTCLAS'.
WA-COL_POS = '1'.
WA-FIELDNAME = 'OBJECTCLAS'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '15'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'OBJECTID'.
WA-COL_POS = '2'.
WA-FIELDNAME = 'OBJECTID'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '20'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'CHANGENR'.
WA-COL_POS = '3'.
WA-FIELDNAME = 'CHANGENR'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '8'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'TABNAME'.
WA-COL_POS = '4'.
WA-FIELDNAME = 'TABNAME'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '5'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'FNAME'.
WA-COL_POS = '5'.
WA-FIELDNAME = 'FNAME'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '7'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'CHANGING'.
WA-COL_POS = '6'.
WA-FIELDNAME = 'CHANGING'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '1'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'VALUE_NEW'.
WA-COL_POS = '7'.
WA-FIELDNAME = 'VALUE_NEW'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '5'.
APPEND WA TO HEADER.
CLEAR WA.
WA-SELTEXT_L = 'VALUE_OLD'.
WA-COL_POS = '8'.
WA-FIELDNAME = 'VALUE_OLD'.
WA-TABNAME = 'CDPOS_ITAB'.
WA-OUTPUTLEN = '5'.
APPEND WA TO HEADER.
CLEAR WA.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'CDPOS_ITAB'
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = HEADER[]
EXCEPTIONS
IF SY-SUBRC <> 0.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = HEADER[]
TABLES
T_OUTTAB = CDPOS_ITAB[]
IF SY-SUBRC <> 0.
ENDIF.Your select querry on MARC is not matching with MARC_TY.
The field in the MARC table and MARC_TY should be same.
and also, when you are making select querry on CDPOS table
with all entries.
When ever you are using all entries select statement, you should check whether the internal table is having value.
you should check
if CDPOS_IT[] is not initial.
SELECT OBJECTCLAS
OBJECTID
CHANGENR
TABNAME
FNAME
CHNGIND
VALUE_NEW
VALUE_OLD
FROM CDPOS INTO CORRESPONDING FIELDS OF TABLE CDPOS_ITAB
FOR ALL ENTRIES IN CDHDR_ITAB
WHERE OBJECTCLAS = CDHDR_ITAB-OBJECTCLAS
AND OBJECTID = CDHDR_ITAB-OBJECTID
AND CHANGENR = CDHDR_ITAB-CHANGENR
AND TABNAME = 'MARC'
AND FNAME IN ('MINBE','EISBE','MABST','LVORM')
AND CHNGIND = 'U'.
endif.
Regards
Madhan D -
Hi all ,
How we can work with JAVA APIs and MDM .
Please tell step by step ways.
thanks in advance.
Thnks
nmHi Man,
You have to specify the correct JAR files in the classpath of the Java Virtual Machine (JVM). The API consists of five JAR files:
1. mdm-admin.jar
2. mdm-common.jar
3. mdm-core.jar
4. mdm-data.jar
5. mdm-protocol.jar
These files in one single archive file with the name MDMJavaAPI_Ver<buildnumber>.zip. you can download this file from the service market place by using mentioned below link:
http://service.sap.com/swdc
then goto Download>Support Packages and Patches> Entry by application group -->SAP NetWeaver -->SAP MDM -->SAPMDM5.5 -->Java API
for the Java API documentation, you can download it from the link below:
http://help.sap.com/javadocs/MDM/current
But remember one thing that this JAVA API Version file must be compitable with your MDM Server version.you can verify this as per the build version.
Hope this will help you.
TNR,
Saurabh...
Edited by: Saurabh Kumar Sahu on Feb 1, 2008 8:09 AM
Edited by: Saurabh Kumar Sahu on Feb 4, 2008 7:49 AM -
Hi All,
I am looking for latest R/3 and MDM field mapping for Customer, Vendor, material and Product. I already have IDoc to MDM mapping included in SAP business content. But i am looking for R/3 and MDM field mapping. it would be of great help for me if anyone can send me this on my id [email protected]
Thanks,
SHiv.
Points will be rewarded for helpful answers.Hi shiv,
When u unzip the business content for Customer,material,vendor then in the repository u have remote systems which have a list of standard remote systems namely R/'3,Data warehousing..etc.
Now in the Import Manager select type as <given data format> and the remote system as R/3 since u r importing the data from R/3.
After doing this you can import the maps and then u will get a list of all maps in a sequencail order .selecting this map will help you to map the R/3 fields to MDM for customer/material/vendor.
note the mapping has to be done in the given sequence in the list.
Please award points if u find these blog helpful.
Thanks and Regards
Deepankar Pandit -
LSMW - The source field is longer than the target field in MEK2
Hi,
I tried to create a simple LSMW script to end date condition records using MEK2 transaction.
I provide Condition type, Plant, Material, Start Date and default Valid from and Valid to dates.
When the program is generated, it defines just 1 character for Start date and when I try to map the date field from source, it gives following error message.
Attention: The source field is longer than the target field.
Message no. /SAPDMC/LSMW_OBJ_040013.
Not sure why it is happening. I am on 46C.
Please let me know if anybody come across such situation. I have checked all aspects, tried recreating in different systems but ended up with the same problem.
You help in this regard will be highly appreciated.
Regards
KasiIt is a standard error, and I have not found any OSS note to fix it. In order to solve it, you can use this workaround:
- Export the recording into a txt file
- Edit the file, and modify the information correspondent to domain, data element and lengths (internal and external) fields, and save it
- Import the recording
For example, I had problems in a recording with the field SEL_DATE of the transaction VB02. Then, I changed these values:
Values before changes:
/SAPDMC/LSGBDC ZTEST ZVB02_ZA01 0018 0000 SEL_DATE DATE_ON Valid on CHAR1 CHAR1 SEL_DATE 0000000000 000001000001000001CHARC
Values after changes:
/SAPDMC/LSGBDC ZTEST ZVB02_ZA01 0018 0000 SEL_DATE DATE_ON Valid on DATUM DATAM SEL_DATE 0000000000 000010000010000010CHARC
(values 01 has been replaced by values 10)
The values changed correspond to fields:
/SAPDMC/LSGBDC-PARDOMAIN
/SAPDMC/LSGBDC-PARDATAELEMENT
/SAPDMC/LSGBDC-LENG
/SAPDMC/LSGBDC-INTLEN
/SAPDMC/LSGBDC-OUTPUTLEN
The information that you have changed should be updated in table /SAPDMC/LSGBDC, where all the information of the recordings is stored. Check this information has been updated after recording import.
I hope this solution be useful for anyone...
Regards. -
Abap MDM API - get table fields and types
Hi gurus,
dealing with a simple task for my development... I need to retrieve, for a given MDM table name, a list of field's names with their data types in Value_pair format.
Basically, this is what RETRIEVE method does; but:
- I don't need any value; I just need to know which fields build up the table (in order to create entries for that)... Let's say that I'm interested in the CODE and the TYPE fields of an MDM_NAME_VALUE_PAIR structure describing each field of my MDM table.
- I can't workaround extracting a certain index (say, the first) from the table using a RETRIEVE, as the target table could also be empty.
How to do that?
Thanks in advanceHello Binori,
Thanks a lot for the immediate reply!
I have connected MS SQL server mgmt studio to MAP tool, as you have already mentioned!
How do I get access to MAP's db, since I need data from MAP's db in our application db, and our application is purely java based.
For ex: I need data of all Operating Systems, Performance metrics, Server name, Hardware Configurations etc.
Thanks in advance,
Sheetal -
Server return code 0x80020004 : Error reading fileu201D from ABAP MDM API
Hello,
I am trying use ABAP APIs to create records in a qulifier table in SRM MDM catalog . The tabel i am trying to update is Contract price. it has 4 non qualifier fields and 5 qualifier fields. I am using below code to create it.
CALL METHOD lr_api->mo_core_service->create_simple
EXPORTING
iv_object_type_code = 'MDMSRM_CONTRACT_PRICE'
is_ddic_structure = ls_retrive
IMPORTING
ev_new_internal_id = lv_key.
But it retuns an exception cx_mdm_server_rc_code : Server return code 0x80020004 : Error reading file . My ID has admin auth in MDM data manger and able to create recrds direclty in data manager. But API retuns an error.
Requst you to help me ith this . Please advice if i have posted it in wrong section.
Thanks,
DIvya.done. This API is working from MDM7 version, not available in MDM5
-
ABAP MDM Connection Pool concept? Slow Performance in call
Hi,
I'm playing around with the MDM ABAP API, and I found the performance a bit disappointing.
I followed the guide "How To identify master data records using SAP MDM 5.5 ABAP API's" and wrote a test program.
The program makes a connection, triggers an MDM query, and disconnects.
CREATE OBJECT api
EXPORTING
iv_log_object_name = logical_object_name.
api->mo_accessor->connect( language ).
* Query parameters
ls_query-parameter_code = 'Material_Number'.
ls_query-operator = 'CS'.
ls_query-dimension_type = 1.
ls_query-constraint_type = 8.
ls_value = '70'.
GET REFERENCE OF ls_value INTO ls_query-value_low.
APPEND ls_query TO lt_query.
CLEAR ls_query.
* Search
CALL METHOD api->mo_core_service->query
EXPORTING
iv_object_type_code = 'Products'
it_query = lt_query
iv_hits_max = 10
IMPORTING
et_result_set = lt_result_set.
Connection is really fast (a split second)
First time triggered 'query' method took about 30-50 seconds.
Second time triggering 'query' method took a split second.
Further to my investigation, I found out the most expensive code lies in
CL_MDM_PROVIDER_SP04_PL03->IF_MDM_CORE_SERVICES~QUERY
*--- load field meta data ---*
IF mt_mdm_field_meta_data IS INITIAL
OR mt_field_meta_data IS INITIAL.
CALL METHOD me->_load_field_information.
ENDIF.
Within this method loadfield_information, it rips all the table and structure information
from MDM, and ALL language texts and so on.
It has many loops, and within the loops querying MDM for more information.
Is there anyway to speed this up?
Why aren't these data cached? (They don't change so often in a production environment)
I also found a shared memory class CL_MDM_METADATA_ACCESS but it is not used anywhere.
No shared memory area relevant is delivered by SAP as well.
Any ideas?
Cheers,
Michael.Hi Michael,
you're welcome.
I'm not sure how the Connection Pooling to MDM is really done by the ABAP APIs as I'm unfortunately not an API developer but just use the API for my programms.
What I learned during this process is that the repository meta data (meaning table descriptions, and so on) have to be loaded at least once for each connection. This makes sense because a repository can always be changed manually by any user. And I don't think that it would be faster to hold the meta data persistent in the ABAP layer because then you would need to compare the ABAP available meta information with the current meta information of the repository. This could take even longer.
I've solved this "issue" in a way that I really rely on the connection because a single connection is very stable. So I call the "CONNECT" only once in the very beginning, run through my coding and the very last step is the "DISCONNECT". As long as a connection is available, the meta data is cached in the API layer (at least this is the case for SP05).
BR Michael -
SAP MDM field status and SAP ERP field status
Just wanted to understand what are the implications of a field status mismatch between SAP MDM and SAP ECC for Vendor Masters. Further, what happens in a scenario where the vendor master data is changed directly in SAP ECC. I am presuming that both systems will not be in sync as the MDM system talks one way and updates the SAP ECC system. Or is there a feasibility whereby any change carried out in SAP ECC is also routed back to SAP MDM.
Hi,
Basically MDM is implemented in order to maintain Master Data at single location, such that control can be incorporate in flow of Master Data.
Thus it is recommended that master data should be changed or created in MDM itself and than syndicated to other systems.
But in case Master Data need to be changed in ECC, MDM ABAP API's can be used to update data in MDM Repositories directly from ECC so that Master Data remains in Sync.
(Using MDM ABAP APIs, code can e developed in ECC to update fields in MDM.)
Regards, -
Find driving distance between two points without using API by use of Lat & Long?
Using Google geocode API : http://maps.googleapis.com/maps/api/geocode/xml?address=thane&sensor=true
We performed get distance between search criteria entered by user and all related clubs by lat & long stored at db.
2. Two different points such as
(origin: Lat1 & Long1) and (destination: Lat2 & Long2)
We tried for to get distance between these two points,
(Lat2 & Long2) to (Lat1 & Long1)
But distance which we get by calculation is simple straight line distance
Origin Destination
(Lat1 & Long1) (Lat2 & Long2)
3. This is not driving distance as google shows in exact Km
4. For that Google provide another API (distancematrix API)
http://maps.googleapis.com/maps/api/distancematrix/xml?origins=Thane&sensor=true&destinations=khopat&mode=driving&language=en%20-%20EN
5. But there is limit for DistanceMatrix-Service without ClientID and client key
100 elements per query.
100 elements per 10 seconds.
2 500 elements per 24 hour period.
But as element request exceeds it shows : OVER_QUERY_LIMIT error
6. In case of Client ID and Client key
In Distance Matrix 100 000 elements per 24 hour period,a maximum of 625 elements per query and a maximum of 1 000 elements per 10 seconds.
As per this one there is option to get purchase these API but basic question is remain same for us if we are requesting single origin and multiple destination then how element calculation done by google?
But in document google says :
Elements
The information about each origin-destination pairing is returned in an element entry. An element contains the following fields:
Status: See Status Codes for a list of possible status codes.
Duration: The duration of this route, expressed in seconds (the value field) and as text. The textual representation is localized according to
the query's language parameter.
Distance: The total distance of this route, expressed in meters (value) and as text. The textual value uses the unit system specified with the
unit parameter of the original request, or the origin's region.Any information that you see in a google map webpage can be retrieved using the API. The best way of finding the tags on the webpage is to manually perform the query using an IE webpage. Then capture the source and save to a file so you
can use a text editor to look at results. I often on a webpage use the menu : View - Source and then copy the source to a text file.
jdweng
Maybe you are looking for
-
Can no longer do "pinch open and close" on MacBook Pro trackpad
Macs have a trackpad function where you can enlarge or reduce the size of the image in a window by using two fingers sweeping apart or together. (pinch open-close) With the installation of Firefox 4, I lost this functionality. I want it back.
-
Where do I find elements 11 to download to my mac pro book
Where do I found elements 11 to download. I have my serial number anyonne can help Please and Thank you Karen Warfel
-
Has anyone else lost their Sucure Notes in Keychain since upgrading to Mavericks?
Since upgrading to Mavericks i have lost all my Secure Notes in Keychain. I had backed up OS10.8.5 on my Time capsule before upgrading but can not access the backups in time capsule- they appear as a black screen in the Time Capsule window. Is anyon
-
Pen drive issue of mac and windows????
I've a SonyClick 8GB pendrive and i formatted the pendrive in my MacBook using FAT partition but when i connect it to the Windows 7 PC, it is not able to open the partition it directly says to format it.... And on Windows 7's disk management it shows
-
Does anyone know a report that shows where an ecommerce customer came from. Like a referral report?