SAP / abap-file-formats

File formats that define and specify the file representation for ABAP development objects
MIT License
58 stars 55 forks source link

Could you please define format for DTEL (Data Element)? #556

Open buca92 opened 1 year ago

buca92 commented 1 year ago

Hello colleagues,

I would like to ask you for having better format for DTELs.

I can see that tables and structures already have nice plain/text format. But in case of DTEL, ugly XML provided instead

READ

HTTP method: GET URI: /sap/bc/adt/ddic/dataelements/zlb_test_dtel Headers: Accept: application/vnd.sap.adt.dataelements.v1+xml, application/vnd.sap.adt.dataelements.v2+xml Body:

<?xml version="1.0" encoding="UTF-8"?>
<blue:wbobj xmlns:blue="http://www.sap.com/wbobj/dictionary/dtel" xmlns:adtcore="http://www.sap.com/adt/core" adtcore:responsible="DEVELOPER" adtcore:masterLanguage="EN" adtcore:masterSystem="C50" adtcore:abapLanguageVersion="standard" adtcore:name="ZLB_TEST_DTEL" adtcore:type="DTEL/DE" adtcore:changedAt="2023-09-12T03:51:03Z" adtcore:version="active" adtcore:createdAt="2023-09-12T00:00:00Z" adtcore:changedBy="DEVELOPER" adtcore:createdBy="DEVELOPER" adtcore:description="Test data element" adtcore:language="EN">
   <atom:link xmlns:atom="http://www.w3.org/2005/Atom" href="versions" rel="http://www.sap.com/adt/relations/versions" title="Historic versions" />
   <atom:link xmlns:atom="http://www.w3.org/2005/Atom" href="/sap/bc/adt/repository/informationsystem/abaplanguageversions?uri=%2Fsap%2Fbc%2Fadt%2Fddic%2Fdataelements%2Fzlb_test_dtel" rel="http://www.sap.com/adt/relations/informationsystem/abaplanguageversions" type="application/vnd.sap.adt.nameditems.v1+xml" title="Allowed ABAP language versions" />
   <atom:link xmlns:atom="http://www.w3.org/2005/Atom" href="/sap/bc/adt/vit/wb/object_type/dtelde/object_name/ZLB_TEST_DTEL" rel="self" type="application/vnd.sap.sapgui" title="Representation in SAP Gui" />
   <atom:link xmlns:atom="http://www.w3.org/2005/Atom" href="/sap/bc/adt/vit/docu/object_type/de/object_name/zlb_test_dtel?masterLanguage=E&amp;mode=edit" rel="http://www.sap.com/adt/relations/documentation" type="application/vnd.sap.sapgui" title="Documentation" />
   <atom:link xmlns:atom="http://www.w3.org/2005/Atom" href="/sap/bc/adt/ddic/logs/db/ACTDTELZLB_TEST_DTEL" rel="http://www.sap.com/adt/relations/ddic/activationlog" type="application/vnd.sap.adt.logs+xml" title="Activation Log" />
   <adtcore:packageRef adtcore:uri="/sap/bc/adt/packages/%24zlb_hex_playground" adtcore:type="DEVC/K" adtcore:name="$ZLB_HEX_PLAYGROUND" adtcore:description="HEX comparator playground" />
   <dtel:dataElement xmlns:dtel="http://www.sap.com/adt/dictionary/dataelements">
      <dtel:typeKind>predefinedAbapType</dtel:typeKind>
      <dtel:typeName />
      <dtel:dataType>STRING</dtel:dataType>
      <dtel:dataTypeLength>000000</dtel:dataTypeLength>
      <dtel:dataTypeDecimals>000000</dtel:dataTypeDecimals>
      <dtel:shortFieldLabel />
      <dtel:shortFieldLength>10</dtel:shortFieldLength>
      <dtel:shortFieldMaxLength>10</dtel:shortFieldMaxLength>
      <dtel:mediumFieldLabel />
      <dtel:mediumFieldLength>20</dtel:mediumFieldLength>
      <dtel:mediumFieldMaxLength>20</dtel:mediumFieldMaxLength>
      <dtel:longFieldLabel />
      <dtel:longFieldLength>40</dtel:longFieldLength>
      <dtel:longFieldMaxLength>40</dtel:longFieldMaxLength>
      <dtel:headingFieldLabel />
      <dtel:headingFieldLength>55</dtel:headingFieldLength>
      <dtel:headingFieldMaxLength>55</dtel:headingFieldMaxLength>
      <dtel:searchHelp />
      <dtel:searchHelpParameter />
      <dtel:setGetParameter />
      <dtel:defaultComponentName />
      <dtel:deactivateInputHistory>false</dtel:deactivateInputHistory>
      <dtel:changeDocument>false</dtel:changeDocument>
      <dtel:leftToRightDirection>false</dtel:leftToRightDirection>
      <dtel:deactivateBIDIFiltering>false</dtel:deactivateBIDIFiltering>
   </dtel:dataElement>
</blue:wbobj>

Write

HTTP method: PUT URI: /sap/bc/adt/ddic/dataelements/%2Fiwfnd%2Fmet_request_add?lockHandle=AF6B410522A4215D7792D460CCA49CB9379FA47A&corrNr=C50K000749 Headers: Content-Type: application/vnd.sap.adt.dataelements.v2+xml; charset=utf-8 Accept: application/vnd.sap.adt.dataelements.v1+xml, application/vnd.sap.adt.dataelements.v2+xml Body:

<?xml version="1.0" encoding="UTF-8"?>
<blue:wbobj
    xmlns:adtcore="http://www.sap.com/adt/core"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:blue="http://www.sap.com/wbobj/dictionary/dtel"
    xmlns:dtel="http://www.sap.com/adt/dictionary/dataelements" adtcore:changedAt="2023-09-11T05:22:51Z" adtcore:changedBy="DEVELOPER" adtcore:createdAt="2015-01-13T00:00:00Z" adtcore:createdBy="DEVELOPER" adtcore:description="Request Address" adtcore:language="EN" adtcore:name="/IWFND/MET_REQUEST_ADD" adtcore:type="DTEL/DE" adtcore:version="inactive" adtcore:abapLanguageVersion="standard" adtcore:masterLanguage="EN" adtcore:masterSystem="C50" adtcore:responsible="DEVELOPER">
    <atom:link href="./%2Fiwfnd%2Fmet_request_add?version=active" rel="http://www.sap.com/adt/relations/objectstates" title="Complementary active/inactive version"/>
    <atom:link href="versions" rel="http://www.sap.com/adt/relations/versions" title="Historic versions"/>
    <atom:link href="/sap/bc/adt/repository/informationsystem/abaplanguageversions?uri=%2Fsap%2Fbc%2Fadt%2Fddic%2Fdataelements%2F%252fiwfnd%252fmet_request_add" rel="http://www.sap.com/adt/relations/informationsystem/abaplanguageversions" title="Allowed ABAP language versions" type="application/vnd.sap.adt.nameditems.v1+xml"/>
    <atom:link href="/sap/bc/adt/vit/wb/object_type/dtelde/object_name/%2fIWFND%2fMET_REQUEST_ADD" rel="self" title="Representation in SAP Gui" type="application/vnd.sap.sapgui"/>
    <atom:link href="/sap/bc/adt/vit/docu/object_type/de/object_name/%2fiwfnd%2fmet_request_add?masterLanguage=E&amp;mode=edit" rel="http://www.sap.com/adt/relations/documentation" title="Documentation" type="application/vnd.sap.sapgui"/>
    <atom:link href="/sap/bc/adt/ddic/logs/db/ACTDTEL-IWFND-MET_REQUEST_ADD" rel="http://www.sap.com/adt/relations/ddic/activationlog" title="Activation Log" type="application/vnd.sap.adt.logs+xml"/>
    <adtcore:packageRef adtcore:description="SAP GW Framework - Metering" adtcore:name="/IWFND/COS_MET" adtcore:type="DEVC/K" adtcore:uri="/sap/bc/adt/packages/%2fiwfnd%2fcos_met"/>
    <dtel:dataElement>
        <dtel:typeKind>predefinedAbapType</dtel:typeKind>
        <dtel:typeName></dtel:typeName>
        <dtel:dataType>STRING</dtel:dataType>
        <dtel:dataTypeLength>6</dtel:dataTypeLength>
        <dtel:dataTypeDecimals>0</dtel:dataTypeDecimals>
        <dtel:shortFieldLabel>Req. Add.</dtel:shortFieldLabel>
        <dtel:shortFieldLength>10</dtel:shortFieldLength>
        <dtel:shortFieldMaxLength>10</dtel:shortFieldMaxLength>
        <dtel:mediumFieldLabel>Request Address</dtel:mediumFieldLabel>
        <dtel:mediumFieldLength>15</dtel:mediumFieldLength>
        <dtel:mediumFieldMaxLength>20</dtel:mediumFieldMaxLength>
        <dtel:longFieldLabel>Request Address</dtel:longFieldLabel>
        <dtel:longFieldLength>20</dtel:longFieldLength>
        <dtel:longFieldMaxLength>40</dtel:longFieldMaxLength>
        <dtel:headingFieldLabel>Request Address</dtel:headingFieldLabel>
        <dtel:headingFieldLength>55</dtel:headingFieldLength>
        <dtel:headingFieldMaxLength>55</dtel:headingFieldMaxLength>
        <dtel:searchHelp></dtel:searchHelp>
        <dtel:searchHelpParameter></dtel:searchHelpParameter>
        <dtel:setGetParameter></dtel:setGetParameter>
        <dtel:defaultComponentName></dtel:defaultComponentName>
        <dtel:deactivateInputHistory>false</dtel:deactivateInputHistory>
        <dtel:changeDocument>false</dtel:changeDocument>
        <dtel:leftToRightDirection>false</dtel:leftToRightDirection>
        <dtel:deactivateBIDIFiltering>false</dtel:deactivateBIDIFiltering>
    </dtel:dataElement>
</blue:wbobj>

Many thanks.

schneidermic0 commented 1 year ago

Hi Libor,

Thank you for reaching out to us. In general, for sure, I agree it make sense to have an ABAP file format for data elements. :)

Can you add some words in which use case you want to use the file format? You are referring to the content type of ADT requests/responses. Currently, there are no short-term plans to change the content type of request/response representation of data elements in ADT to ABAP file formats.

Thanks.

buca92 commented 1 year ago

Hello Michael,

we use the DDCI system for internal development and testing purposes. And there are many situations, when we do need to create a DTEL for table, structure or piece of code, that is created afterwards. Now, we also have a usecase when we need to adapt existing DTEL used in a table and code (need to apply STRING type instead of CHAR 255) to lavarage the existing functionality in full scope.

Best regards, Libor

schneidermic0 commented 1 year ago

Thanks, Libor for your update. To use the file formats (for data elements) in DDCI, this will require also an implementation.

Therefore, I informed corresponding SAP development team about your request. Due to capacity reasons, I don't expect a fast solution.

buca92 commented 1 year ago

Hello Michael,

thank you very much. It is much better than nothing :). We will just wait.

Best regards, Libor