Structure Definition

Hi,
I want to define a structure, where in I want to pass additional information or metadata apart from the actual pay load.
Additional information is Message Id and File Name. My structure should look like this
<?xml version="1.0"?>
<message id=u201DmessageIDu201D>
        <header>
               <filename>D:\\inputfile.txt</filename>
        </header>
        <body>
               FileContent(here goes the payload)
        </body>
</message>
Any Inputs would be appreciated.
Regards,
Varun

1. Use this UDF to retrieve the file name
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return  ourSourceFileName;
Map this to the target field.
2. Use this to get the Messages ID.
map = container.getTransformationParameters();
String Mid  = (String) map.get(MessageId);
return  Mid;
Thanks
SaNv...
Edited by: Sãnthosh Kûmãr  V on Aug 13, 2008 10:52 AM

Similar Messages

  • Export Dictionary structure definitions to WSDL or XSD

    Hi all,
    I need to export some structure definitions from CRM 2007 to a XI instance. I have been told by the XI responsible that the ideal mechanism is that I provide him some WSDL or XSD files so he can import them.
    The point is: how do I export my ABAP Dictionary definitions to a WSDL?.
    I have tryed to do it already in an indirect way creating an ABAP Proxy, but I always get plenty of errors there and I am sure that has to be a faster and more elegant way to do it.
    Thanks in advance, lot of points for the one who solve it ;-).
    Best Regards,
    Luis V. de P.

    Hi Gonzalo,
    I dont think even if you convert into xsd it will go. The best would be to use XMLAnonymizerBean in your sender communication channel. Please see stefans blog for this:
    /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
    Regards,
    ---Satish

  • ABAP DDIC  table name for structure definition

    Hello,
      Can anybody tell me what is the name of DDIC table used for storing ABAP structure definition and also its related tables.
    Thanks&Regards,
    Prajesh

    Hi again,
    1. There is one more field
        in DD03L table.
    2. DEPTH
    3. Normally this field will be blank.
    4. In your case,
       u have 2 common fields.
      eg. F2
    5. Then
       it will be like this in table
       F2  - space
       F2  - 1
    6. The second entry is for DEPTH.
    regards,
    amit m.

  • Need structure definition for IP M_PROTO

    Dear People
    I have written a STREAMS module.
    Within this module I need to send
    IP packets to another machine.
    To do this, I need to instantiate
    an M_PROTO message with an M_DATA
    message tagged behind. In the
    M_PROTO message, I need to set the
    destination IP address and port
    number, and presumably some other
    information.
    Where can I get a structure definition
    of the fields in the M_PROTO message?
    Which header files do I need?
    Which manual should I consult?
    Cheers
    Tsay Mien

    You can only make an exception for a domain and a sub domain (mysite.com www.mysite.com) and not for subdirectories on a domain (www.mysite.com/help -> www.mysite.com)

  • Solar01/solar02 in solution manager: landscape structure definition- urgent

    Hi Forum Members,
    I need to understand whether this is possible and if it is then how do i do it; any step by step manual from SAP is available. We have solman 7.1 and project with type 'implementation' created. When i go to solar01/02 i can maintain business scenario for ERP with relevant business processes however our landscape is like ERP, CRM, Enterprise Portal , DMS (Document Management System), TREX. I wish to adjust solar 01 business process structure in a way that it reflects the entire landscape. So, regarding i have few questions as below. Please let me know your views ASAP as i am runnig very short of time to asetup
    1. Is it possible to adust all these applications in the single business process structure e.g. one implementation project has business scenarios to ERP, CRM, EP and so on.
    Business process structure we get is general with nodes after project creation in project administrtion is :
    A.Organizational unit
    B. Master Data
    C. Business scenarios.
    2. If not then do i have to create individual projects for each aplication like one for ERP and Other for CRM and so on.
    For reference please see the below prototype i am expecting to achive by doing this (solar01) :
    <Implementation Project>
    A.Organizational unit
    B. Master Data
    C. Business scenarios
    <Business scenario for ERP>
    <Business scenario for CRM>
    <Business scenario for EP>
    <Business scenario for DMS>
    <Business scenario for TREX>
    D.Interfaces
    <Applicable interfaces>
    Regards
    Rupesh Modi

    Hi Prakhar,
    Thank you for the quick reponse and feel really nice to see you on this queries posted by me. I saw plenty of your threads earlier clarifying so many things on SCN.
    I wish to admit that i am new to solution manager. So from the understanding prospective would you confirm that in core you are saying that technically it cant be realized (individual business scenarios for each applicaton type) as you have explained that one scenario runs on different systems. I mean to say SAP doesnt support this that is what you wish to say? This confirmtaion is needed to rule out the option of adjusting business process structure as i am expecting to be.
    Also, I have to select business scenario in 'business scenario' and adjust it to run on different systems in under GRAPHIC tab in solar01 provided logical components are mentioned appropriately. I am refering to below link for designing the business process structure
    https://websmp203.sap-ag.de/~form/sapnet?_SCENARIO=01100035870000000202&_SHORTKEY=00200797470000089860&_OBJECT=011000358700000910652011E
    Would appreciate your quick response
    Regards,
    Rupesh

  • Recursive structure definition

    Dear Experts,
    I would like to know how can I create a TYPE with recursive structure. The main objective is to construct an internal table for my organization structure and then export it to XML using simple transformation. Currently, I can only export this XML by construct the XML document like a string composition which is harder to read and modify.
    Regards,
    Alex

    You want something like in java (from wikipedia article)
    class List<E> {
        E value;
        List<E> next;
    That's only possible in ABAP using data references.
    TYPES: BEGIN OF list,
             e  TYPE i,
             pn TYPE REF TO data,
           END OF list.
    DATA: lp_data TYPE REF TO data.
    FIELD-SYMBOLS: <ls_list> TYPE list.
    CREATE DATA lp_data TYPE list.
    ASSIGN lp_data->* TO <ls_list>.
    * Add elements
    DO 10 TIMES.
      <ls_list>-e = sy-index.
      CREATE DATA <ls_list>-pn TYPE list.
      ASSIGN <ls_list>-pn->* TO <ls_list>.
    ENDDO.
    <ls_list>-e = 11.
    * Display elements
    ASSIGN lp_data->* TO <ls_list>.
    WRITE: / <ls_list>-e.
    DO.
      IF <ls_list>-pn IS INITIAL.
        EXIT.
      ENDIF.
      ASSIGN <ls_list>-pn->* TO <ls_list>.
      WRITE: / <ls_list>-e.
    ENDDO.
    Don't know if that helps with your XML question.
    matt

  • Load table structure definition from Sql server and mirroring

    Hi, we have to replicate some tables from sql server
    into SAP dictionary.
    Is there a tool/transaction for import the table structure
    from a DBRMS like sql/oracle ?
    Adn is there some third part solution for replicate data
    from/to sql server and Sap ?
    Thanks in advance.
    Riccardo Galli.

    Hi,
    Dont know if there are any tools for this but onething is sure you will need to create the table thru SE11.
    I had done something similar, created a BDC to create table and it works.
    Provide the BDC with list of fields, datatype, len, key fields and the BDC will create the table.
    You will need to activate the table once its created, for some reason sap put the table in "partial active" status after creation .
    Good luck.
    Ravi

  • Regarding include in structure definition

    Is there any performance wise difference in using
    Begin of <struct>,
    include ztab ,
    End of <struct>.
    and
    Begin of <struct>,
    field1 type ztab-field1,
    field2 type ztab-field2,
    End of <struct>.
    when ztab contains field1 and field2.

    Hi sinu,
    1. Absolutely no - there is no performance difference.
    2. After declaraing in these two different ways,
       the object/variable essentially is the SAME - no difference.
    regards,
    amit m.

  • Ensure field sequence is correct for data for mutiple source structure

    Hi,
    I'm using LSMW with IDOC message type 'FIDCC2' Basic type 'FIDCCP02'.
    I'm getting error that packed fields are not permitted.
    I'm getting Ensure field sequence is correct for data for mutiple source structures.
    Source Structures
           HEADER_STRUCT            G/L  Account Document Header
               LINE_STRUCT              G/L Account Document Line
    Source Fields
           HEADER_STRUCT             G/L  Account Document Header
               BKTXT                          C(025)    Document  Header Text
               BLART                          C(002)    Document Type
               BLDAT                          DYMD(008) Document Date
               BUDAT                          DYMD(008) Posting Date
               KURSF                          C(009)    Exchange rate
               WAERS                          C(005)    Currency
               WWERT                          DYMD(008) Translation Date
               XBLNR                          C(016)    Reference
               LINE_STRUCT               G/L Account Document Line
                   AUFNR                          C(012)    Order
                   HKONT                          C(010)    G/L Account
                   KOSTL                          C(010)    Cost Center
                   MEINS                          C(003)    Base Unit of Measure
                   MENGE                          C(013)    Quantity
                   PRCTR                          C(010)    Profit Center
                   SGTXT                          C(050)    Text
                   SHKZG                          C(001)    Debit/Credit Ind.
                   WRBTR                          AMT3(013) Amount
    I have changed PAC3 field for caracters fields of same length to avoid erreur message of no packed fields allowed.
    Structure Relations
           E1FIKPF FI Document Header (BKPF)         <<<< HEADER_STRUCT G/L  Account Document Header
                   Select Target Structure E1FIKPF .
               E1FISEG FI Document Item (BSEG)          <<<< LINE_STRUCT   G/L Account Document Line
                   E1FISE2 FI Document Item, Second Part of E1FISEG   (BSEG)
                   E1FINBU FI Subsidiary Ledger (FI-AP-AR) (BSEG)
               E1FISEC CPD Customer/Vendor  (BSEC)
               E1FISET FI Tax Data (BSET)
               E1FIXWT Extended Withholding Tax (WITH_ITEM)
    Files
           Legacy Data          On the PC (Frontend)
               File to read GL Account info   c:\GL_Account.txt
                                              Data for Multiple Source Structures (Sequential Files)
                                              Separator Tabulator
                                              Field Names at Start of File
                                              Field Order Matches Source Structure Definition
                                              With Record End Indicator (Text File)
                                              Code Page ASCII
           Legacy Data          On the R/3 server (application server)
           Imported Data        File for Imported Data (Application Server)
               Imported Data                  c:\SYNERGO_CREATE_LCNA_FI_GLDOC_CREATE.lsmw.read
           Converted Data       File for Converted Data (Application Server)
               Converted Data                 c:\SYNERGO_LCNA_FI_GLDOC_CREATE.lsmw.conv
           Wildcard Value       Value for Wildcard '*' in File Name
    Source Structures and Files
           HEADER_STRUCT G/L  Account Document Header
                         File to read GL Account info c:\GL_Account.txt
               LINE_STRUCT G/L Account Document Line
                           File to read GL Account info c:\GL_Account.txt
    File content:
    Document  Header Text     Document Type     Document Date     Posting Date     Exchange rate     Currency     Translation Date     Reference     
    G/L Account document     SA     20080401     20080409     1.05     CAD     20080409     Reference     
    Order     G/L Account     Cost Center     Base Unit of Measure     Quantity     Profit Center     Text     Debit/Credit Ind.     Amount
         44000022                    1040     Line item text 1     H     250
         60105M01     13431     TO     10          Line item text 2     S     150
    800000     60105M01                         Line item text 3     S     100
         60110P01     6617     H     40          Line item text 4     S     600
         44000022                    ACIBRAM     Line item text 5     H     600
    The file structure is as follow
    Header titles
    Header info
    Line titles
    Line1 info
    Line2 info
    Line3 info
    Line4 info
    Line5 info
    Could someone direct me in the wright direction?
    Thank you in advance!
    Curtis

    Hi,
    Thank you so much for yout reply.
    For example
    i have VBAK(Heder structure)
              VBAP( Item Structure)
    My file should be like this i think
    Identification content         Fieldnames
         H                               VBELN      ERDAT     ERNAM        
                                          Fieldvalues for header
          H                              1000          20080703   swapna
    Identification content         Fieldnames
        I                                   VBELP     AUART 
                                          Fieldvalues for item
        I                                  001             OR
                                           002             OR
    Is this format is correct.
    Let me know whether i am correct or not

  • Hi how to check sales office maintained in structure S860E

    Hi,
    Requirement:-To know from where particular sales office is coming in S860E.
    Thanks,
    Dharmesh

    Hi,
    Saless office definition and assignment is a customization activity:
    SPRO ->Enterprise Structure->Definition->Sales & Distribution->Maintain Sales Office.
    Below this, you find....Definition-> Assignment
    I hope this is what you were looking for.
    Regards
    Murali

  • DT and MT definition to be used for File Content Conversion

    Hi FCC gurus
    would just like to ask, my scenario is Flat File (fixed length) to IDoc
    the flat file structure is below:
    HHeader.......(Fixed Field until 427characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    -------No Space, for illustration only PO2--------
    HHeader........ (Fixed Field until 427characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    -------No Space, for illustration only PO3--------
    HHeader........ (Fixed Field until 427characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    where:
    HHeader = Header
    HText = Header Text
    DFile = Order Detail File (Line Item)
    DText = Order Detail File Text (Line Item Text)
    As shown above, 1 flat file can contain 3 purchase orders in it structured exactly like the structure definition above.
    I need to map this to 1 IDoc for each purchase order
    so my target structure should be:
    - ORDERS05
       - IDoc (PO1)
       - IDoc (PO2)
       - IDoc (PO3)
    Of course I need to use FCC for this, I'm just a little confused on how I will define the Data Type and Message Type for this.
    For the Data Type should i define it like this:
    DT_ORDERS
       HHeader-Field1 (Element)
       HHeader-Field2 (Element)
       HHeader-Field3 (Element)
       HText-Field1 (Element)
       HText-Field2 (Element)
       HText-Field3 (Element)
       DFile-Field1 (Element)
       DFile-Field2 (Element)
       DFile-Field3 (Element)
       DText-Field1 (Element)
       DText-Field2 (Elemen
    t)
    OR
    should i define the Data Type like this:
    DT_ORDERS
        HHeader (Element)
           HHeader-Field1 (Sub Element)
           HHeader-Field2 (Sub Element)
           HHeader-Field3 (Sub Element)
        HText (Element)
           HText-Field1 (Sub Element)
           HText-Field2 (Sub Element)
           HText-Field3 (Sub Element)
        DFile (Element)
           DFile-Field1 (Sub Element)
           DFile-Field2 (Sub Element)
           DFile-Field3 (Sub Element)
        DText (Element)
           DText-Field1 (Sub Element)
           DText-Field2 (Sub Element)
    Kindly advise which one is the correct definition   (Or if I am missing something out  e.g. Recordset element betweend DT_ORDERS and HHeader)
    Thanks in advance
    Edited by: HJ Dlec on Aug 13, 2010 4:13 AM
    Edited by: Prateek Raj Srivastava on Aug 13, 2010 2:29 PM

    >Kindly advise which one is the correct definition  
    Second approach is fine..
    >(Or if I am missing something out  e.g. Recordset element betweend DT_ORDERS and HHeader)
    Yes do this as well

  • Dynamic Structure and Components Issue

    Hi,
    I have a requirement of creating an inbound idoc program and populating dynamic structures. The program for the dynamic structure creation is as follows: ( I have been referencing Heilmans Blog ): The part for the inbound idoc creation works fine. The data will come in a flat file with Table name and 15 characterstcis. The table name is known at runtime. I need to create the dynamic table, find out the components and then populate the custom table with the dynamically created structures.
    Custom table: 4 components
    Internal table from file: 15 components with value.
    There could be more than one table in the flat file and not all components or char in the flat file is mapped to the table.
    I have been able to code the part where the components in the structure and the file components are in the same order. The problem is if the components in the structure and the file components are not in the same order. I would appreciate some inputs in this issue.
    The part that has to be worked out is:
    IF NOT L_TABNAME IS INITIAL.
        perform get_structure.
        perform create_dynamic_itab.
        perform get_data.
      ENDIF.
    *& Report  /FACTGLB/GTDMI_VARTAB_IDOCS02                               *
    PROGRAM DESCRIPTION: Variant Table and Content Upload Interface.
              DEVELOPER: Aveek Ghose
          CREATION DATE: 2008-07-02
             RDD NUMBER: DCDD027
    TRANSPORT NUMBER(S): RD2K902769
    *-- REVISION HISTORY -
              DEVELOPER:
           DATE APPLIED: YYYY-MM-DD
             SCR NUMBER: <Scope Change Request ID>
             RDD NUMBER: <Toolset Object ID>
    TRANSPORT NUMBER(S):
            DESCRIPTION:
    REPORT  ZGTDMI_VARTAB_IDOCS_DYNAMIC
            NO STANDARD PAGE HEADING
            LINE-SIZE   150
            LINE-COUNT  55
            MESSAGE-ID  zfactglb.
    **Include for Global Data Declaration
    *INCLUDE /FACTGLB/GTDMI_VARTAB_TOP02.
    **Include for Selection Screen
    *INCLUDE /FACTGLB/GTDMI_VARTAB_SEL02.
    **Include for Sub Routines
    *INCLUDE /FACTGLB/GTDMI_VARTAB_FORMS02.
    *&  Include           /FACTGLB/GTDMI_VARTAB_TOP02                      *
    *&  Include           /FACTGLB/GTDMI_VARTAB_TOP02                      *
    *&  Include           /FACTGLB/GTDMI_VARTAB_TOP
    *&  Include           /FACTGLB/GTDMI_VARTAB_TOP
    PROGRAM DESCRIPTION: Variant Table and Content Upload Interface.
              DEVELOPER: Aveek Ghose
          CREATION DATE: 2008-07-02
             RDD NUMBER: DCDD027
    TRANSPORT NUMBER(S): RD2K902769
    *-- REVISION HISTORY -
              DEVELOPER:
           DATE APPLIED: YYYY-MM-DD
             SCR NUMBER: <Scope Change Request ID>
             RDD NUMBER: <Toolset Object ID>
    TRANSPORT NUMBER(S):
            DESCRIPTION:
    TYPE POOLS
    *Type declaration for ALV display
    TYPE-POOLS : slis.
    Include .
    type-pools: col,                                            "#EC *
                icon,                                           "#EC *
                sym,                                            "#EC *
                abap.                                           "#EC *
    Target structure definitions
    tables:
      E1CUVTM,                                                  "#EC *
      E1DATEM,                                                  "#EC *
      E1CUV1M,                                                  "#EC *
      edp21,                                                    "#EC *
      edi_dc40,                                                 "#EC *
      edi_dd40,                                                 "#EC *
      edi_ds40.                                                 "#EC *
    GLOBAL TYPES
    TYPES : BEGIN OF ty_vartab.
            include structure E1CUVTM.
    TYPES:  END OF ty_vartab.
    TYPES : BEGIN OF ty_vartabdate.
            INCLUDE STRUCTURE E1DATEM.
    TYPES : END OF ty_vartabdate.
    *Structure for data retreived
    TYPES : BEGIN OF ty_vardetails.
            INCLUDE STRUCTURE E1CUV1M.
    TYPES : END OF ty_vardetails.
    *Structure for data retreived from table tabinput.
    TYPES : BEGIN OF ty_tabinput,
              lines type string,
            END OF ty_tabinput.
    *Structure for data retreived from Table dsn_input.
    TYPES : BEGIN OF ty_dsninput,                               "#EC *
              LINE(101) type c,
            END OF ty_dsninput.
    *Structure for data retreived from Table dsn_input.
    TYPES : BEGIN OF ty_newinput,                               "#EC *
              LINE(101) type c,
              flag(1) type c,
            END OF ty_newinput.
    *Structure for keeping the values of all the custom tables
    TYPES : BEGIN OF ty_custom_tabs,
              matnr   TYPE matnr,    "Material Number
              werks   TYPE werks_d,  "Plant
              lgort   TYPE lgort_d,  "Storage Location
              qunty   TYPE P DECIMALS 2, "Standard Order Quantity
              det_loc TYPE CHAR6, "Detail Location
              class   TYPE CHAR2,   "Class
              rate    TYPE P DECIMALS 2,    "Rate
            END OF ty_custom_tabs.
    *Type declared for the internal table and work area which will store
    *fields for error log
    TYPES : BEGIN OF ty_error_log,
              matnr TYPE matnr,       "Material Number
              mtart TYPE mtart,       "Material Type
              sel_data TYPE char10,   "No of selectyed data
            END OF ty_error_log.
    *Structure for keeping the output data
    TYPES : BEGIN OF ty_final,
              VTNAM(018) type C,
              CHAR1(030) type C,
              CHAR2(030) type C,
              CHAR3(030) type C,
              CHAR4(030) type C,
              CHAR5(030) type C,
              CHAR6(030) type C,
              CHAR7(030) type C,
              CHAR8(030) type C,
              CHAR9(030) type C,
              CHAR10(030) type C,
              CHAR11(030) type C,
              CHAR12(030) type C,
              CHAR13(030) type C,
              CHAR14(030) type C,
              CHAR15(030) type C,
              FLAG(001) type C,
            END OF ty_final.
    TYPES: begin of TY_CONTENTHD,
              VTNAM(018) type C,
              FLAG(001) type C,
      end of TY_CONTENTHD.
    TYPES: begin of TY_CONTENT,
              VTNAM(018) type C,
              CHAR1(030) type C,
              CHAR2(030) type C,
              CHAR3(030) type C,
              CHAR4(030) type C,
              CHAR5(030) type C,
              CHAR6(030) type C,
              CHAR7(030) type C,
              CHAR8(030) type C,
              CHAR9(030) type C,
              CHAR10(030) type C,
              CHAR11(030) type C,
              CHAR12(030) type C,
              CHAR13(030) type C,
              CHAR14(030) type C,
              CHAR15(030) type C,
              FLAG(001) type C,
              Z_VARCOND TYPE VARCOND.
    TYPES: end of TY_CONTENT.
    TYPES: begin of TY_CONTENTTAB,
              VTNAM(018) type C,
              COMP1(30) TYPE C,
              CHAR1(030) type C,
              COMP2(30) TYPE C,
              CHAR2(030) type C,
              COMP3(30) TYPE C,
              CHAR3(030) type C,
              COMP4(30) TYPE C,
              CHAR4(030) type C,
              COMP5(30) TYPE C,
              CHAR5(030) type C,
              COMP6(30) TYPE C,
              CHAR6(030) type C,
              COMP7(30) TYPE C,
              CHAR7(030) type C,
              COMP8(30) TYPE C,
              CHAR8(030) type C,
              COMP9(30) TYPE C,
              CHAR9(030) type C,
              COMP10(30) TYPE C,
              CHAR10(030) type C,
              COMP11(30) TYPE C,
              CHAR11(030) type C,
              COMP12(30) TYPE C,
              CHAR12(030) type C,
              COMP13(30) TYPE C,
              CHAR13(030) type C,
              COMP14(30) TYPE C,
              CHAR14(030) type C,
              COMP15(30) TYPE C,
              CHAR15(030) type C,
              FLAG(001) type C.
    TYPES: end of TY_CONTENTTAB.
    TYPES: BEGIN OF TY_E1CUVTM,
              MSGFN       TYPE MSGFN,
              VAR_TAB       TYPE APITABL,
              STATUS       TYPE RCUTBST,
              VTGROUP       TYPE RCUTBGR,
              AUTHSTRUC       TYPE RCUTBBE,
              AUTHENTRY       TYPE RCUFNBI,
              FLDELETE       TYPE FLLKENZ,
              DBTABNAME       TYPE TABNAME16,
              DBCONACTIVE TYPE DBCON_ACTI,
              PRESDEC       TYPE VTDCT,
           END OF TY_E1CUVTM.
    TYPES: BEGIN OF TY_E1CUV1M,
              MSGFN     TYPE MSGFN,
              VTLINENO     TYPE VTLINENO,
              VTCHARACT     TYPE ATNAM,
              ATWRT     TYPE ATWRT,
              ATFLV     TYPE ATFLV,
              ATAWE     TYPE MSEHI,
              ATFLB     TYPE ATFLB,
              ATAW1     TYPE MSEHI,
              ATCOD     TYPE ATCOD,
              ATTLV     TYPE ATTLV,
              ATTLB     TYPE ATTLB,
              ATPRZ     TYPE ATPRZ,
              ATINC     TYPE ATINC,
              VTLINENO5     TYPE VTLINENO5,
           END OF TY_E1CUV1M.
    TYPES: BEGIN OF TY_E1DATEM,
              MSGFN       TYPE MSGFN,
              KEY_DATE       TYPE SYDATUM,
              AENNR       TYPE AENNR,
              EFFECTIVITY TYPE      CC_MTEFF,
           END OF TY_E1DATEM.
    TYPES: BEGIN OF ty_vtnam,
             vtint TYPE vtint,  " Internal number of variant table
             vtnam TYPE vtnam,  " Name of variant table
             dbtab_name type tabname16, "Custom table Name
             error  TYPE char1,  " Indicates error in data format
             reas   TYPE char50, " Reason for failure
           END OF ty_vtnam.
    Get data type for characteristic
    TYPES: BEGIN OF ty_cabn,
            atinn  TYPE atinn,       "Internal characteristic
            atnam  TYPE atnam,       "Characteristic Name
            atfor  TYPE atfor,       "Data type of characteristic
            atson  TYPE atson,       "Indicator: Additional Values
            atprt  TYPE atprt,       "Check table
            atprr  TYPE atprr,       "Name of Check Report Program
            atprf  TYPE atprf,       "Function Module for Checking Values
            anzdz  TYPE anzdz,       "Number of Decimal Places
            check  TYPE char1,       "Indicates check required or not
           END OF ty_cabn.
    Get field names of variant table
    TYPES: BEGIN OF ty_cuvtab_fld,
             vtint TYPE vtint,   " Internal number of variant table
             atinn TYPE atinn,   " Internal characteristic
             vtpos TYPE vtpos,   " Item number of characteristic in variant
    *mod-012
            DBFLD type NAME_FELD,
    *mod-012
             exist TYPE char1,   " X Indictaes characteristic is part of fil
           END OF ty_cuvtab_fld.
    Store all data in internal table
    TYPES: BEGIN OF ty_file,
              vtnam TYPE vtnam,
              char1 TYPE atwrt,
              char2 TYPE atwrt,
              char3 TYPE atwrt,
              char4 TYPE atwrt,
              char5 TYPE atwrt,
              char6 TYPE atwrt,
              char7 TYPE atwrt,
              char8 TYPE atwrt,
              char9 TYPE atwrt,
              char10 TYPE atwrt,
              char11 TYPE atwrt,
              char12 TYPE atwrt,
              char13 TYPE atwrt,
              char14 TYPE atwrt,
              char15 TYPE atwrt,
              flag   TYPE char1,
              error  TYPE char50,
           END OF ty_file.
    To check for duplicates
    TYPES: BEGIN OF ty_dupl,
              vtnam TYPE vtnam,
              char1 TYPE atwrt,
              char2 TYPE atwrt,
              char3 TYPE atwrt,
              char4 TYPE atwrt,
              char5 TYPE atwrt,
              char6 TYPE atwrt,
              char7 TYPE atwrt,
              char8 TYPE atwrt,
              char9 TYPE atwrt,
              char10 TYPE atwrt,
              char11 TYPE atwrt,
              char12 TYPE atwrt,
              char13 TYPE atwrt,
              char14 TYPE atwrt,
              char15 TYPE atwrt,
              slnid  TYPE  slnid,
            END OF ty_dupl.
    Get previously loaded characteristic values for internal table (CHAR)
    TYPES: BEGIN OF ty_cuvtab_valc,
            vtint  TYPE  vtint,   " Internal number of variant table
            slnid  TYPE  slnid,   " Key for value combination in variant tab
            atinn  TYPE  atinn,   " Internal characteristic
            valc   TYPE  atwrt,   " Characteristic Value
          END OF ty_cuvtab_valc.
    Get previously loaded characteristic values for internal table (NUM)
    TYPES: BEGIN OF ty_cuvtab_valn,
            vtint  TYPE  vtint,      " Internal number of variant table
            slnid  TYPE  slnid,      " Key for value combination in variant tab
            atinn  TYPE  atinn,      " Internal characteristic
            val_from  TYPE  atflv,   " Internal floating point from
           END OF ty_cuvtab_valn.
    Store column positions of characteristics
    TYPES: BEGIN OF ty_col_pos,
             vtint  TYPE vtint,   " Internal number of variant table
             vtnam  TYPE vtnam,   " Variant table name
             atinn  TYPE atinn,   "Internal characteristic
             atnam  TYPE atnam,   "Characteristic Name
             field  TYPE fieldname,   "Field name
             req    TYPE char1,       " Required or not
             vtpos  TYPE vtpos,       " Item number of characteristics
             DBFLD type NAME_FELD,    " Field Name of Custom table.
           END OF ty_col_pos.
    Store valid values for characteristics
    TYPES: BEGIN OF ty_cawn,
              atinn TYPE atinn,   " Internal characteristic
              atzhl TYPE atzhl,   " Int counter
              atwrt TYPE atwrt,   " Characteristic Value
              atflv TYPE atflv,   " Internal floating point from
              lkenz TYPE lkenz,   " Deletion indicator
          END OF ty_cawn.
    Store error messages for individual lines
    TYPES: BEGIN OF ty_error,
             vtnam  TYPE vtnam,       " Variant table name
             fname  TYPE fieldname,   " Fieldname
             atnam  TYPE atnam,       " Characteristic name
             atwrt  TYPE atwrt,       " Characteristic value
             row    TYPE char5,       " Row id
          END OF ty_error.
    Begin TPR# 4618
    To store unique number for variant
    TYPES: BEGIN OF ty_vnt_ma,
            vtnam     TYPE vtnam,
            unique_no TYPE ZGTDM_UNQN,
            no_chr    TYPE ZGTDM_NO_CHR,
          END OF ty_vnt_ma.
    TYPES: BEGIN OF ty_dbtab,
            vtint     TYPE vtint,
            vtnam     TYPE vtnam,
            DBTAB_NAME TYPE TABNAME16,
          END OF ty_dbtab.
    To find out concatenated number for
    TYPES: BEGIN OF ty_split,
            f1 TYPE char6,
          END OF ty_split.
    TYPES: BEGIN OF ty_charval,
            char TYPE char30,
          END OF ty_charval.
    TYPES: BEGIN OF TY_DATA,
           name TYPE string,
           value(15) type c,
          END OF TY_DATA.
    DATA: I_DATATAB TYPE STANDARD TABLE OF TY_DATA.
    TYPES:
      TUMLS_MESSTYPE type /SAPDMC/LS_MESSTYPE,
      TUMLS_MESSTYPETXT type EDI_TEXT60,
      TUMLS_MESSCODE type EDIPMESCOD.
    TYPES:
      TUMLS_TABNAME TYPE TABNAME,                               "#EC *
      TUMLS_SEGMENT TYPE TABNAME.                               "#EC *
    TYPES:
      TUMLS_PATHFILE TYPE /SAPDMC/LS_FILENAME,
      TUMLS_FILENAME TYPE /SAPDMC/LS_FILENAME,
      TUMLS_FILETEXT TYPE /SAPDMC/LS_FILETEXT.
    TYPES:
      BEGIN OF type_errorline,
         msgty type SYMSGTY,
         id type SYMSGID,
         msgno type symsgno,
         par1 type symsgv,
         par2 type symsgv,
         par3 type symsgv,
         par4 type symsgv,
      END OF type_errorline.
    TYPES:
      type_errortab TYPE SORTED TABLE
                    OF type_errorline
                    WITH NON-UNIQUE KEY id msgno par1 par2 par3 par4.
    DATA:
        LV_INDEX TYPE SY-INDEX,
        LV_INDEX2 TYPE SYINDEX,
        LV_TABLE1 TYPE REF TO DATA,
        LV_TABLE2 TYPE REF TO DATA,
        LV_TABLE3 TYPE REF TO DATA,
        LV_TABLE4 TYPE REF TO DATA,
        LV_LINE1  TYPE REF TO DATA,
        LV_LINE2  TYPE REF TO DATA,
        LV_LINE3  TYPE REF TO DATA,
        LV_LINE4  TYPE REF TO DATA,
        LV_OFFSET1 TYPE SYTABIX,
        ST_IS_LAYOUT_ALV TYPE SLIS_LAYOUT_ALV,
        L_IT_FCATLOG_ALV TYPE SLIS_T_FIELDCAT_ALV,
        L_IT_FLDCAT TYPE LVC_T_FCAT.
    GLOBAL INTERNAL TABLES
    DATA : i_newinput TYPE STANDARD TABLE OF ty_newinput INITIAL SIZE 0."#EC *
    DATA : i_contentheader1 TYPE STANDARD TABLE OF ty_contenthd INITIAL SIZE 0."#EC *
    DATA : i_contenttab1 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
    DATA : i_contenttab2 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
    DATA : i_contenttab3 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
    DATA : i_contenttab4 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
    DATA : i_contenttab5 TYPE STANDARD TABLE OF ty_contenttab INITIAL SIZE 0."#EC *
    DATA : i_E1CUV1M TYPE STANDARD TABLE OF E1CUV1M INITIAL SIZE 0."#EC *
    DATA : i_errortab TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
    GLOBAL WORK AREAS
    **Internal Table for the structure TY_T001L
    DATA : wa_vartab TYPE ty_vartab.                            "#EC *
    DATA : wa_vartabdate TYPE ty_vartabdate.                    "#EC *
    DATA : wa_vardetails TYPE ty_vardetails.                    "#EC *
    DATA : wa_tabinput TYPE ty_tabinput.                        "#EC *
    DATA : wa_dsninput TYPE ty_dsninput.                        "#EC *
    DATA : wa_newinput TYPE ty_newinput.                        "#EC *
    DATA : wa_gnewinput TYPE ty_newinput.                       "#EC *
    DATA : wa_ginput_data TYPE ty_newinput.                     "#EC *
    DATA : wa_final TYPE ty_final.                              "#EC *
    DATA : wa_content TYPE ty_content.                          "#EC *
    DATA : wa_contenthd TYPE ty_contenthd.                      "#EC *
    DATA : wa_contentheader type ty_contenthd.                  "#EC *
    DATA : wa_contenttab TYPE ty_content.                       "#EC *
    DATA : wa_content1 TYPE ty_content.                         "#EC *
    DATA : wa_contenthd1 TYPE ty_contenthd.                     "#EC *
    DATA : wa_contentheader1 type ty_contenthd.                 "#EC *
    DATA : wa_contenttab1 TYPE ty_content.                      "#EC *
    DATA : wa_contenttab2 TYPE ty_content.                      "#EC *'
    DATA : wa_contenttab3 TYPE ty_content.                      "#EC *
    DATA : wa_contenttab4 TYPE ty_content.                      "#EC *
    DATA : wa_contenttab5 TYPE ty_contentTAB.                   "#EC *
    DATA : wa_E1CUVTM TYPE E1CUVTM.                             "#EC *
    DATA : wa_E1CUV1M TYPE E1CUV1M.                             "#EC *
    DATA : wa_E1DATEM TYPE E1DATEM.                             "#EC *
    DATA : wa_error_tab TYPE solisti1.                          "#EC *
    INTERNAL TABLES AND WORK AREAS FOR BDC
    *Internal Table to store the data to display the error message
    DATA : i_errormsg TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
    *Internal Table to store the data to display the error message
    DATA : i_error TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
    DATA : itab_error TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
    **Work area to store the data to display the error message
    DATA : wa_errormsg TYPE solisti1.                           "#EC *
    **Internal table which will store data for the error log
    DATA:i_error_log TYPE STANDARD TABLE OF ty_error_log INITIAL SIZE 0."#EC *
    GLOBAL VARIABLES
    DATA:  G_FILE TYPE string.                                  "#EC *
    DATA : g_ctr_input_recs(5) type c.                          "#EC *
    DATA:  g_ctr_output_recs(5) type p.                         "#EC *
    data : g_msg(100) type c.                                   "#EC *
    data:  g_struct_file TYPE string.                           "#EC *
    data:  g_login type FILEINTERN.                             "#EC *
    data:  g_phyin type string.                                 "#EC *
    DATA:  g_lprnt type RSPOPSHORT.                             "#EC *
    DATA:  g_FNAME1 TYPE STRING.                                "#EC *
    DATA : g_repid TYPE repid,                                  "#EC *
           g_exit(1) TYPE C,                                    "#EC *
           gx_variant  type disvariant.                         "#EC *
    DATA : g_lines    TYPE i .                                  "#EC *
    data : g_save(1) type c.                                    "#EC *
    DATA : g_splid     TYPE rspoid .                            "#EC *
    data:  p_login type FILEINTERN.                             "#EC *
    data:  p_phyin type string.                                 "#EC *
    DATA:
      go_table         TYPE REF TO cl_salv_table,
      go_sdescr        TYPE REF TO cl_abap_structdescr,
      go_tdescr        TYPE REF TO cl_abap_tabledescr,
      gdo_data         TYPE REF TO data,
      gdo_handle       TYPE REF TO data,
      gs_comp          TYPE abap_componentdescr,
      gt_components    TYPE abap_component_tab.
    FIELD-SYMBOLS:
           TYPE table.
    GLOBAL CONSTANTS
    CONSTANTS c_msgar   TYPE rslgarea   VALUE 'F8'.             "#EC *
    CONSTANTS c_msgid   TYPE rslgsubid  VALUE 'E'.              "#EC *
    CONSTANTS c_urgnc   TYPE char04     VALUE 'HIGH'.           "#EC *
    CONSTANTS C_X(1)       TYPE C          VALUE 'X'.           "#EC *
    CONSTANTS C_Y(1)       TYPE C          VALUE 'Y'.           "#EC *
    CONSTANTS C_Z(1)       TYPE C          VALUE 'Z'.           "#EC *
    CONSTANTS C_E(1)       TYPE C          VALUE 'E'.           "#EC *
    CONSTANTS C_SAP(3)     TYPE C          VALUE 'SAP'.         "#EC *
    CONSTANTS C_MOD(3)     TYPE C          VALUE 'MOD'.         "#EC *
    CONSTANTS C_MD1(3)     TYPE C          VALUE 'MD1'.         "#EC *
    CONSTANTS C_MD2(3)     TYPE C          VALUE 'MD2'.         "#EC *
    CONSTANTS C_MD3(3)     TYPE C          VALUE 'MD3'.         "#EC *
    CONSTANTS C_MD4(3)     TYPE C          VALUE 'MD4'.         "#EC *
    CONSTANTS C_MD5(3)     TYPE C          VALUE 'MD5'.         "#EC *
    constants:   c_000001(6)  type c value '000001',            "#EC *
                 c_e1cuv1m(7) type c value 'E1CUV1M',           "#EC *
                 c_02(2)  type c value '02',                    "#EC *
                 c_009(3)   type c value '009',                 "#EC *
                 c_0001(4) type c value '0001'.                 "#EC *
    constants:  c_e1datem(7) type c value 'E1DATEM'.            "#EC *
    constants:  c_e1cuvtm(7) type c value 'E1CUVTM'.            "#EC *
    GLOBAL INTERNAL TABLES FOR ALV DISPLAY
    *Internal tables for ALV Field cat
    DATA :
    i_fieldcat_ov  TYPE STANDARD TABLE OF slis_fieldcat_alv INITIAL SIZE 0,"#EC *
    i_fieldcat_dtl TYPE STANDARD TABLE OF slis_fieldcat_alv INITIAL SIZE 0,"#EC *
    i_fieldcat_ov1 TYPE lvc_t_fcat,                             "#EC *
    i_events       TYPE slis_t_event.                           "#EC *
    GLOBAL WORK AREAS FOR ALV DISPLAY
    *Work area for ALV Field layout
    DATA : wa_layout TYPE slis_layout_alv.                      "#EC *
    *Work area for Field Cat. Table
    DATA : wa_fieldcat TYPE slis_fieldcat_alv.                  "#EC *
    GLOBAL VARIABLES FOR ALV DISPLAY
    DATA : g_event  TYPE slis_t_event.                          "#EC *
    DATA : g_top_of_page TYPE slis_t_listheader.                "#EC *
    DATA : g_ok_code     TYPE char4.                            "#EC *
    DATA : g_variant     type disvariant.                       "#EC *
    GLOBAL CONSTANTS FOR ALV DISPLAY
    BAL handling
    data: iv_log_handle type BALLOGHNDL.                        "#EC *
    data: is_log_header type bal_s_log.                         "#EC *
    data: iv_object     type bal_s_log-object    value 'CAPI'.  "#EC *
    data: iv_subobject  type bal_s_log-subobject value 'CAPI_LOG'."#EC *
    data: iv_tcode      type bal_s_log-altcode   value 'SE38'.  "#EC *
    *MOD-005
    RANGES:
        R_MESTYP FOR EDIDC-MESTYP,                              "#EC *
        R_CREDAT FOR EDIDC-CREDAT,                                  "#EC *
        R_CRETIM FOR EDIDC-CRETIM,                              "#EC *
        R_SNDPRT FOR EDIDC-SNDPRT,                              "#EC *
        R_SNDPRN FOR EDIDC-SNDPRN.                              "#EC *
    DATA:
        L_MESSTYPE TYPE TUMLS_MESSTYPE.                         "#EC *
    *MOD-005
    data:        p_sndprn TYPE EDI_SNDPRN,                      "#EC *
                 p_sndprt TYPE EDI_SNDPRT,                      "#EC *
                 p_sndpor TYPE EDI_SNDPOR.                      "#EC *
    data:        p_rcvprn TYPE EDI_RCVPRN,                      "#EC *
                 p_rcvprt TYPE EDI_RCVPRT,                      "#EC *
                 p_rcvpor TYPE EDI_RCVPOR.                      "#EC *
    data:
      init_E1CUVTM type E1CUVTM,                                "#EC *
      prev_E1CUVTM type E1CUVTM,                                "#EC *
      init_E1DATEM type E1DATEM,                                "#EC *
      prev_E1DATEM type E1DATEM,                                "#EC *
      init_E1CUV1M type E1CUV1M,                                "#EC *
      prev_E1CUV1M type E1CUV1M.                                "#EC *
    Source structure definitions
    data:
      begin of LSMW_TAB_CONTENT,                                "#EC *
        VTNAM(018) type C,
        CHAR1(030) type C,
        CHAR2(030) type C,
        CHAR3(030) type C,
        CHAR4(030) type C,
        CHAR5(030) type C,
        CHAR6(030) type C,
        CHAR7(030) type C,
        CHAR8(030) type C,
        CHAR9(030) type C,
        CHAR10(030) type C,
        CHAR11(030) type C,
        CHAR12(030) type C,
        CHAR13(030) type C,
        CHAR14(030) type C,
        CHAR15(030) type C,
        FLAG(001) type C,
      end of LSMW_TAB_CONTENT.
    Counters
    data:
      g_cnt_VAR_TAB  type i,                                    "#EC *
      g_cnt_TAB_CONTENT  type i.                                "#EC *
    Counter ct_xxxxxxxxxx: number of transferred records
    data:
      ct_edi_dc40 type i,                                       "#EC *
      cs_edi_dc40 type i,                                       "#EC *
      ct_E1CUVTM  type i,                                       "#EC *
      cs_E1CUVTM  type i,                                       "#EC *
      ct_E1DATEM  type i,                                       "#EC *
      cs_E1DATEM  type i,                                       "#EC *
      ct_E1CUV1M  type i,                                       "#EC *
      cs_E1CUV1M  type i.                                       "#EC *
    Global data definitions and data declarations
    DATA: wa_cabn TYPE ty_cabn,
          wa_cawn TYPE ty_cawn,
          wa_file TYPE ty_file,
          wa_vtnam TYPE ty_vtnam,
          wa_cuvtab_fld TYPE ty_cuvtab_fld,
          wa_cuvtab_valn TYPE ty_cuvtab_valn,
          wa_cuvtab_valc TYPE ty_cuvtab_valc,
          wa_col_pos     TYPE ty_col_pos,
          wa_error       TYPE ty_error,
          wa_dupl        TYPE ty_dupl,
          wa_dupl_file   TYPE ty_dupl.
    DATA: wa_vnt_ma TYPE ty_vnt_ma,
          wa_split  TYPE ty_split.
    DATA: wa_charval TYPE ty_charval.                           "#EC *
    Internal table
    DATA: i_cabn        TYPE STANDARD TABLE OF ty_cabn,         "#EC *
          i_cabn_temp   TYPE STANDARD TABLE OF ty_cabn,         "#EC *
          i_cabn_atinn  TYPE STANDARD TABLE OF ty_cabn,         "#EC *
          i_file        TYPE STANDARD TABLE OF ty_file,         "#EC *
          i_file_tmp    TYPE STANDARD TABLE OF ty_file,         "#EC *
          i_vtnam       TYPE STANDARD TABLE OF ty_vtnam,        "#EC *
          i_cuvtab      TYPE STANDARD TABLE OF ty_vtnam,        "#EC *
          i_cuvtab_fld  TYPE STANDARD TABLE OF ty_cuvtab_fld,   "#EC *
          i_cuvtab_valn TYPE STANDARD TABLE OF ty_cuvtab_valn,  "#EC *
          i_cuvtab_valc TYPE STANDARD TABLE OF ty_cuvtab_valc,  "#EC *
          i_col_pos     TYPE STANDARD TABLE OF ty_col_pos,      "#EC *
          i_cawn        TYPE STANDARD TABLE OF ty_cawn,         "#EC *
          i_cawn_n      TYPE STANDARD TABLE OF ty_cawn,         "#EC *
          i_cawn_c      TYPE STANDARD TABLE OF ty_cawn,         "#EC *
          i_cawn_i      TYPE STANDARD TABLE OF ty_cawn,         "#EC *
          i_cuv_error   TYPE STANDARD TABLE OF ty_vtnam,        "#EC *
          i_dupl        TYPE STANDARD TABLE OF ty_dupl,         "#EC *
          i_dbtab       TYPE STANDARD TABLE OF ty_dbtab.        "#EC *
    DATA: i_vnt_ma TYPE STANDARD TABLE OF ty_vnt_ma,            "#EC *
          i_split  TYPE STANDARD TABLE OF ty_split.             "#EC *
    DATA: i_dupl_file TYPE STANDARD TABLE OF ty_dupl.           "#EC *
    DATA: i_charval TYPE STANDARD TABLE OF ty_charval.          "#EC *
    Constants
    CONSTANTS: c_char TYPE atfor VALUE 'CHAR',                  "#EC *
               c_date TYPE atfor VALUE 'DATE',                  "#EC *
               c_time TYPE atfor VALUE 'TIME',                  "#EC *
               c_varcond TYPE atnam VALUE 'Z_VARCOND'.          "#EC *
    Field Symbols
    FIELD-SYMBOLS:  TYPE ANY.
    Variables
    DATA: g_raw(500)  TYPE c,                                   "#EC *
          g_invalid   TYPE char1,                               "#EC *
          g_error     TYPE char1,                               "#EC *
          g_message   TYPE char50,                              "#EC *
          g_slnid_c    TYPE slnid,                              "#EC *
          g_slnid_n    TYPE slnid,                              "#EC *
          g_row        TYPE char5.                              "#EC *
    DATA: g_varcond TYPE varcond, "Variant condition "#EC NEEDED
          g_split_var TYPE i.                                   "#EC *
    Types: begin of ty_charname,
             name type atnam,
           end of ty_charname.
    data: wa_charname type ty_charname,                         "#EC *
          i_charname type standard table of ty_charname.        "#EC *
    data: cnt_i type i,                                         "#EC *
          g_tabix type char10.                                  "#EC *
    Types: begin of ty_itab_zedidc40.
            include structure edi_dc40.
    TYPES:       end of ty_itab_zedidc40.
    Types: begin of ty_itab_zedidd40.
            include structure edi_dd40.
    TYPES: end of ty_itab_zedidd40.
    DATA: itab_zedidc40 type standard table of
                      ty_itab_zedidc40 initial size 0.          "#EC *
    DATA: itab_zedidd40 type standard table of
                      ty_itab_zedidd40 initial size 0.          "#EC *
    DATA: wa_itab_zedidc40 type ty_itab_zedidc40.
    DATA: wa_itab_zedidd40 type ty_itab_zedidd40.
    *MOD-009
    data: itab_ze1cuvtm type e1cuvtm,                           "#EC *
          itab_ze1datem type e1datem,                           "#EC *
          itab_ze1cuv1m type e1cuv1m.                           "#EC *
    data: wdocnum(16) type n value 0.                           "#EC *
    data: wsegnum(6)  type n value 0.                           "#EC *
    data: witemno(10) type n value 0.                           "#EC *
    data: witemno_new(10)  type n value 0.                      "#EC *
    data: witemno_gst(10)  type n value 0.                      "#EC *
    data: witemno_qst(10)  type n value 0.                      "#EC *
    TYPES: BEGIN OF ty_input_data1,                             "#EC *
              line(560) type c,
              flag(1) type c,
           END OF ty_input_data1.
    DATA: i_input_data type standard table of
                      ty_input_data1 initial size 0. "with header line.
    DATA: i_input_data1 type standard table of
                      ty_input_data1 initial size 0. "with header line.
    DATA: wa_input_data type ty_input_data1.                    "#EC *
    DATA: g_cnt_input_recs type i.                              "#EC *
    DATA: g_flg_error type c.                                   "#EC *
    DATA: l_lines type i.                                       "#EC *
    DATA: l_lines_varcond type i.                               "#EC *
    DATA: l_lines1 type i.                                      "#EC *
    DATA: l_tabix type i.                                       "#EC *
    DATA: wa_input_data1 type ty_input_data1.                   "#EC *
    DATA: FILE TYPE STRING.
    Fields that are made available to the user:
    DATA:
      g_cnt_records_read TYPE i,                                "#EC *
      g_cnt_records_transferred TYPE i,                         "#EC *
      g_cnt_transactions_read TYPE i,                           "#EC *
      g_cnt_transactions_transferred TYPE i,                    "#EC *
      g_cnt_idocs_package TYPE i.                               "#EC *
    data: v_log_handle type balloghndl.                         "#EC *
    DATA: gt_curr_edi_dc40 TYPE STANDARD TABLE OF edi_dc40 initial size 0."#EC *
    DATA: gt_curr_edi_dd40 TYPE STANDARD TABLE OF edi_dd40 initial size 0."#EC *
    DATA: wa_curr_edi_dc40 TYPE edi_dc40.                       "#EC *
    DATA: wa_curr_edi_dd40 TYPE edi_dd40.                       "#EC *
    internal table for error messages during conversion
    DATA: g_error_tab TYPE type_errortab,                       "#EC *
          wa_errortab TYPE type_errorline.                      "#EC *
    DATA:  g_edidd_segnam type EDI4SEGNAM,                      "#EC *
           g_edidd_hlevel type EDI4HLEVEC.                      "#EC *
    DATA: g_segnum(6) TYPE n.
    DATA: g_objecttype(2) type C.
    DATA: P_FNAME(128) TYPE C VALUE '/usr/sap/trans/vartabheader'. " MODIF ID MD1 OBLIGATORY.
    DATA: P_FNAME1(128) TYPE C VALUE '/usr/sap/trans/vartabcontent'. " MODIF ID MD1 OBLIGATORY.
    DATA: alv_fldcat TYPE slis_t_fieldcat_alv,
          it_fldcat TYPE lvc_t_fcat.
    field-symbols: .
    data: dy_table type ref to data,
          dy_line  type ref to data,
          xfc type lvc_s_fcat,
          ifc type lvc_t_fcat.
    data: l_wa_data TYPE TY_CONTENT,
          l_tabname TYPE tabname,
          itab_data TYPE standard table of TY_CONTENT.
    DATA:   l_len_slnid TYPE i,                                 "#EC NEEDED
            l_len_varcond TYPE i,                               "#EC NEEDED
            l_temp_slnid TYPE i,                                "#EC NEEDED
            l_temp_slnc TYPE char5,                             "#EC NEEDED
            l_temp_varcond TYPE varcond,                        "#EC NEEDED
            l_sub_var      TYPE i,                              "#EC NEEDED
            l_val_split TYPE char10.                            "#EC NEEDED
    DATA: l_invalid.                                          "#EC NEEDED
    DECLARATION FOR SELECTION SCREEN
    *selection-screen skip 1.
    *For all the input field entries
    SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
    *Parameter for Input File Name:
    PARAMETERS:   p_inpt   TYPE RLGRAP-FILENAME MODIF ID MOD . " Presentation server File Variant table
    PARAMETERS:   p_inpt1  TYPE RLGRAP-FILENAME MODIF ID MOD . " Presentation server File variant Content
    SELECTION-SCREEN END OF BLOCK bl1.
    IDoc creation
    selection-screen begin of block idocpars
                     with frame title text-006.
    parameters:
       p_trfcpt as checkbox default C_X MODIF ID MD3,
       p_packge(5) type n default 1 MODIF ID MD3.
    selection-screen end of block idocpars.
    SELECTION-SCREEN BEGIN OF BLOCK bl5 WITH FRAME TITLE text-038.
    Radio Buttons :
    parameters:
      rb_idocp RADIOBUTTON GROUP RB3 DEFAULT 'X' USER-COMMAND UCOM MODIF ID MD6,
      rb_custt RADIOBUTTON GROUP RB3 MODIF ID MD6.
    SELECTION-SCREEN END OF BLOCK bl5.
    SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE text-032.
    Radio Buttons :
    parameters:
      rb_apsrv RADIOBUTTON GROUP RB1 DEFAULT 'X' USER-COMMAND UCOM MODIF ID MD4,
      rb_convt RADIOBUTTON GROUP RB1 MODIF ID MD4,
      rb_idoc RADIOBUTTON  GROUP RB1 MODIF ID MD4,
      rb_proc RADIOBUTTON  GROUP RB1 MODIF ID MD4.
    SELECTION-SCREEN END OF BLOCK bl3.
    SELECTION-SCREEN BEGIN OF BLOCK bl4 WITH FRAME TITLE text-037.
    Radio Buttons :
    parameters:
      rb_appct RADIOBUTTON GROUP RB2 DEFAULT 'X' USER-COMMAND UCOM MODIF ID MD5,
      rb_conct RADIOBUTTON GROUP RB2 MODIF ID MD5,
      rb_cust RADIOBUTTON  GROUP RB2 MODIF ID MD5.
    SELECTION-SCREEN END OF BLOCK bl4.
    INITIALIZATION
    INITIALIZATION.
    Check selection-screen entries *
    *AT SELECTION-SCREEN.
    PERFORM sub_get_physical_file USING p_fpath p_fname.
    PERFORM sub_get_physical_file1 USING p_fpath1 p_fname1.
    AT SELECTION SCREEN
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
    PERFORM sub_get_file. " CHANGING p_fname.         "#EC *
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname1.
    PERFORM sub_get_file1. " CHANGING p_fname1.       "#EC *
    AT SELECTI

    Hi,
      I now have a requirement for the following:
    Duplicate VARCOND if I  Use small letters and capital letters. Sequential number also duplicated.
    Here is the code and would appreciate if someone could shed some light on the issue.
    *& Report  ZVARTABDYNFINAL
    PROGRAM DESCRIPTION: Variant Table and Content Upload Interface.
              DEVELOPER: Aveek Ghose
          CREATION DATE: 2008-08-25
             RDD NUMBER: DCDD027
    TRANSPORT NUMBER(S): RD2K902769
    *-- REVISION HISTORY -
              DEVELOPER:
           DATE APPLIED: YYYY-MM-DD
             SCR NUMBER: <Scope Change Request ID>
             RDD NUMBER: <Toolset Object ID>
    TRANSPORT NUMBER(S):
            DESCRIPTION:
    REPORT  ZVARTABDYNFINAL NO STANDARD PAGE HEADING
            LINE-SIZE   150
            LINE-COUNT  55
            MESSAGE-ID  /factglb/gta_custdev.
    *&  Include           /FACTGLB/GTDMI_VARTAB_TOP02                      *
    *&  Include           /FACTGLB/GTDMI_VARTAB_TOP
    *&  Include           /FACTGLB/GTDMI_VARTAB_TOP
    PROGRAM DESCRIPTION: Variant Table and Content Upload Interface.
              DEVELOPER: Aveek Ghose
          CREATION DATE: 2008-08-25
             RDD NUMBER: DCDD027
    TRANSPORT NUMBER(S): RD2K902769
    *-- REVISION HISTORY -
              DEVELOPER:
           DATE APPLIED: YYYY-MM-DD
             SCR NUMBER: <Scope Change Request ID>
             RDD NUMBER: <Toolset Object ID>
    TRANSPORT NUMBER(S):
            DESCRIPTION:
    TYPE POOLS
    TYPE POOLS
    TYPE POOLS
    *Type declaration for ALV display
    TYPE-POOLS : slis.
    Include <icon>.
    type-pools: col,                                            "#EC *
                icon,                                           "#EC *
                sym,                                            "#EC *
                abap.                                           "#EC *
    Target structure definitions
    tables:
      E1CUVTM,                                                  "#EC *
      E1DATEM,                                                  "#EC *
      E1CUV1M,                                                  "#EC *
      edp21,                                                    "#EC *
      edi_dc40,                                                 "#EC *
      edi_dd40,                                                 "#EC *
      edi_ds40.                                                 "#EC *
    GLOBAL TYPES
    TYPES : BEGIN OF ty_vartab.
            include structure E1CUVTM.
    TYPES:  END OF ty_vartab.
    TYPES : BEGIN OF ty_vartabdate.
            INCLUDE STRUCTURE E1DATEM.
    TYPES : END OF ty_vartabdate.
    *Structure for data retreived
    TYPES : BEGIN OF ty_vardetails.
            INCLUDE STRUCTURE E1CUV1M.
    TYPES : END OF ty_vardetails.
    *Structure for data retreived from table tabinput.
    TYPES : BEGIN OF ty_tabinput,
              lines type string,
            END OF ty_tabinput.
    *Structure for data retreived from Table dsn_input.
    TYPES : BEGIN OF ty_dsninput,                               "#EC *
              LINE(101) type c,
            END OF ty_dsninput.
    *Structure for data retreived from Table dsn_input.
    TYPES : BEGIN OF ty_newinput,                               "#EC *
              LINE(101) type c,
              flag(1) type c,
            END OF ty_newinput.
    *Structure for keeping the values of all the custom tables
    TYPES : BEGIN OF ty_custom_tabs,
              matnr   TYPE matnr,    "Material Number
              werks   TYPE werks_d,  "Plant
              lgort   TYPE lgort_d,  "Storage Location
              qunty   TYPE P DECIMALS 2, "Standard Order Quantity
              det_loc TYPE CHAR6, "Detail Location
              class   TYPE CHAR2,   "Class
              rate    TYPE P DECIMALS 2,    "Rate
            END OF ty_custom_tabs.
    *Type declared for the internal table and work area which will store
    *fields for error log
    TYPES : BEGIN OF ty_error_log,
              matnr TYPE matnr,       "Material Number
              mtart TYPE mtart,       "Material Type
              sel_data TYPE char10,   "No of selectyed data
            END OF ty_error_log.
    *Structure for keeping the output data
    TYPES : BEGIN OF ty_final,
              VTNAM(018) type C,
              CHAR1(030) type C,
              CHAR2(030) type C,
              CHAR3(030) type C,
              CHAR4(030) type C,
              CHAR5(030) type C,
              CHAR6(030) type C,
              CHAR7(030) type C,
              CHAR8(030) type C,
              CHAR9(030) type C,
              CHAR10(030) type C,
              CHAR11(030) type C,
              CHAR12(030) type C,
              CHAR13(030) type C,
              CHAR14(030) type C,
              CHAR15(030) type C,
              FLAG(001) type C,
            END OF ty_final.
    TYPES: begin of TY_CONTENTHD,
              VTNAM(018) type C,
              FLAG(001) type C,
      end of TY_CONTENTHD.
    TYPES: begin of TY_CONTENT,
              VTNAM(018) type C,
              CHAR1(030) type C,
              CHAR2(030) type C,
              CHAR3(030) type C,
              CHAR4(030) type C,
              CHAR5(030) type C,
              CHAR6(030) type C,
              CHAR7(030) type C,
              CHAR8(030) type C,
              CHAR9(030) type C,
              CHAR10(030) type C,
              CHAR11(030) type C,
              CHAR12(030) type C,
              CHAR13(030) type C,
              CHAR14(030) type C,
              CHAR15(030) type C,
              FLAG(001) type C,
              Z_VARCOND type VARCOND.
    TYPES: end of TY_CONTENT.
    TYPES: begin of TY_CONTENTTAB,
              VTNAM(018) type C,
              COMP1(30) TYPE C,
              CHAR1(030) type C,
              COMP2(30) TYPE C,
              CHAR2(030) type C,
              COMP3(30) TYPE C,
              CHAR3(030) type C,
              COMP4(30) TYPE C,
              CHAR4(030) type C,
              COMP5(30) TYPE C,
              CHAR5(030) type C,
              COMP6(30) TYPE C,
              CHAR6(030) type C,
              COMP7(30) TYPE C,
              CHAR7(030) type C,
              COMP8(30) TYPE C,
              CHAR8(030) type C,
              COMP9(30) TYPE C,
              CHAR9(030) type C,
              COMP10(30) TYPE C,
              CHAR10(030) type C,
              COMP11(30) TYPE C,
              CHAR11(030) type C,
              COMP12(30) TYPE C,
              CHAR12(030) type C,
              COMP13(30) TYPE C,
              CHAR13(030) type C,
              COMP14(30) TYPE C,
              CHAR14(030) type C,
              COMP15(30) TYPE C,
              CHAR15(030) type C,
              FLAG(001) type C.
    TYPES: end of TY_CONTENTTAB.
    TYPES: BEGIN OF TY_E1CUVTM,
              MSGFN       TYPE MSGFN,
              VAR_TAB       TYPE APITABL,
              STATUS       TYPE RCUTBST,
              VTGROUP       TYPE RCUTBGR,
              AUTHSTRUC       TYPE RCUTBBE,
              AUTHENTRY       TYPE RCUFNBI,
              FLDELETE       TYPE FLLKENZ,
              DBTABNAME       TYPE TABNAME16,
              DBCONACTIVE TYPE DBCON_ACTI,
              PRESDEC       TYPE VTDCT,
           END OF TY_E1CUVTM.
    TYPES: BEGIN OF TY_E1CUV1M,
              MSGFN     TYPE MSGFN,
              VTLINENO     TYPE VTLINENO,
              VTCHARACT     TYPE ATNAM,
              ATWRT     TYPE ATWRT,
              ATFLV     TYPE ATFLV,
              ATAWE     TYPE MSEHI,
              ATFLB     TYPE ATFLB,
              ATAW1     TYPE MSEHI,
              ATCOD     TYPE ATCOD,
              ATTLV     TYPE ATTLV,
              ATTLB     TYPE ATTLB,
              ATPRZ     TYPE ATPRZ,
              ATINC     TYPE ATINC,
              VTLINENO5     TYPE VTLINENO5,
           END OF TY_E1CUV1M.
    TYPES: BEGIN OF TY_E1DATEM,
              MSGFN       TYPE MSGFN,
              KEY_DATE       TYPE SYDATUM,
              AENNR       TYPE AENNR,
              EFFECTIVITY TYPE      CC_MTEFF,
           END OF TY_E1DATEM.
    TYPES: BEGIN OF ty_vtnam,
             vtint TYPE vtint,  " Internal number of variant table
             vtnam TYPE vtnam,  " Name of variant table
             dbtab_name type tabname16, "Custom table Name
             error  TYPE char1,  " Indicates error in data format
             reas   TYPE char50, " Reason for failure
           END OF ty_vtnam.
    Get data type for characteristic
    TYPES: BEGIN OF ty_cabn,
            atinn  TYPE atinn,       "Internal characteristic
            atnam  TYPE atnam,       "Characteristic Name
            atfor  TYPE atfor,       "Data type of characteristic
            atson  TYPE atson,       "Indicator: Additional Values
            atprt  TYPE atprt,       "Check table
            atprr  TYPE atprr,       "Name of Check Report Program
            atprf  TYPE atprf,       "Function Module for Checking Values
            anzdz  TYPE anzdz,       "Number of Decimal Places
            check  TYPE char1,       "Indicates check required or not
           END OF ty_cabn.
    Get field names of variant table
    TYPES: BEGIN OF ty_cuvtab_fld,
             vtint TYPE vtint,   " Internal number of variant table
             atinn TYPE atinn,   " Internal characteristic
             vtpos TYPE vtpos,   " Item number of characteristic in variant
    *mod-012
             DBFLD type NAME_FELD,
    *mod-012
             exist TYPE char1,   " X Indictaes characteristic is part of fil
           END OF ty_cuvtab_fld.
    Store all data in internal table
    TYPES: BEGIN OF ty_file,
              vtnam TYPE vtnam,
              char1 TYPE atwrt,
              char2 TYPE atwrt,
              char3 TYPE atwrt,
              char4 TYPE atwrt,
              char5 TYPE atwrt,
              char6 TYPE atwrt,
              char7 TYPE atwrt,
              char8 TYPE atwrt,
              char9 TYPE atwrt,
              char10 TYPE atwrt,
              char11 TYPE atwrt,
              char12 TYPE atwrt,
              char13 TYPE atwrt,
              char14 TYPE atwrt,
              char15 TYPE atwrt,
              flag   TYPE char1,
              error  TYPE char50,
           END OF ty_file.
    To check for duplicates
    TYPES: BEGIN OF ty_dupl,
              vtnam TYPE vtnam,
              char1 TYPE atwrt,
              char2 TYPE atwrt,
              char3 TYPE atwrt,
              char4 TYPE atwrt,
              char5 TYPE atwrt,
              char6 TYPE atwrt,
              char7 TYPE atwrt,
              char8 TYPE atwrt,
              char9 TYPE atwrt,
              char10 TYPE atwrt,
              char11 TYPE atwrt,
              char12 TYPE atwrt,
              char13 TYPE atwrt,
              char14 TYPE atwrt,
              char15 TYPE atwrt,
              slnid  TYPE  slnid,
            END OF ty_dupl.
    Get previously loaded characteristic values for internal table (CHAR)
    TYPES: BEGIN OF ty_cuvtab_valc,
            vtint  TYPE  vtint,   " Internal number of variant table
            slnid  TYPE  slnid,   " Key for value combination in variant tab
            atinn  TYPE  atinn,   " Internal characteristic
            valc   TYPE  atwrt,   " Characteristic Value
          END OF ty_cuvtab_valc.
    Get previously loaded characteristic values for internal table (NUM)
    TYPES: BEGIN OF ty_cuvtab_valn,
            vtint  TYPE  vtint,      " Internal number of variant table
            slnid  TYPE  slnid,      " Key for value combination in variant tab
            atinn  TYPE  atinn,      " Internal characteristic
            val_from  TYPE  atflv,   " Internal floating point from
           END OF ty_cuvtab_valn.
    Store column positions of characteristics
    TYPES: BEGIN OF ty_col_pos,
             vtint  TYPE vtint,   " Internal number of variant table
             vtnam  TYPE vtnam,   " Variant table name
             atinn  TYPE atinn,   "Internal characteristic
             atnam  TYPE atnam,   "Characteristic Name
             field  TYPE fieldname,   "Field name
             req    TYPE char1,       " Required or not
             vtpos  TYPE vtpos,       " Item number of characteristics
           END OF ty_col_pos.
    Store valid values for characteristics
    TYPES: BEGIN OF ty_cawn,
              atinn TYPE atinn,   " Internal characteristic
              atzhl TYPE atzhl,   " Int counter
              atwrt TYPE atwrt,   " Characteristic Value
              atflv TYPE atflv,   " Internal floating point from
              lkenz TYPE lkenz,   " Deletion indicator
          END OF ty_cawn.
    Store error messages for individual lines
    TYPES: BEGIN OF ty_error,
             vtnam  TYPE vtnam,       " Variant table name
             fname  TYPE fieldname,   " Fieldname
             atnam  TYPE atnam,       " Characteristic name
             atwrt  TYPE atwrt,       " Characteristic value
             row    TYPE char5,       " Row id
          END OF ty_error.
    Begin TPR# 4618
    To store unique number for variant
    TYPES: BEGIN OF ty_vnt_ma,
            vtnam     TYPE vtnam,
            unique_no TYPE ZGTDM_UNQN,
            no_chr    TYPE ZGTDM_NO_CHR,
          END OF ty_vnt_ma.
    TYPES: BEGIN OF ty_dbtab,
            vtint     TYPE vtint,
            vtnam     TYPE vtnam,
            DBTAB_NAME TYPE TABNAME16,
          END OF ty_dbtab.
    To find out concatenated number for
    TYPES: BEGIN OF ty_split,
            f1 TYPE char6,
          END OF ty_split.
    TYPES: BEGIN OF ty_charval,
            char TYPE char30,
          END OF ty_charval.
    TYPES: BEGIN OF TY_DATA,
           name TYPE string,
           value(15) type c,
          END OF TY_DATA.
    DATA: I_DATATAB TYPE STANDARD TABLE OF TY_DATA. "#EC NEEDED
    TYPES:
      TUMLS_MESSTYPE type /SAPDMC/LS_MESSTYPE,
      TUMLS_MESSTYPETXT type EDI_TEXT60,
      TUMLS_MESSCODE type EDIPMESCOD.
    TYPES:
      TUMLS_TABNAME TYPE TABNAME,                               "#EC *
      TUMLS_SEGMENT TYPE TABNAME.                               "#EC *
    TYPES:
      TUMLS_PATHFILE TYPE /SAPDMC/LS_FILENAME,
      TUMLS_FILENAME TYPE /SAPDMC/LS_FILENAME,
      TUMLS_FILETEXT TYPE /SAPDMC/LS_FILETEXT.
    TYPES:
      BEGIN OF type_errorline,
         msgty type SYMSGTY,
         id type SYMSGID,
         msgno type symsgno,
         par1 type symsgv,
         par2 type symsgv,
         par3 type symsgv,
         par4 type symsgv,
      END OF type_errorline.
    TYPES:
      type_errortab TYPE SORTED TABLE
                    OF type_errorline
                    WITH NON-UNIQUE KEY id msgno par1 par2 par3 par4.
    DATA:
         LV_LINE2  TYPE REF TO DATA.
    GLOBAL INTERNAL TABLES
    DATA : i_newinput TYPE STANDARD TABLE OF ty_newinput INITIAL SIZE 0."#EC *
    DATA : i_contentheader1 TYPE STANDARD TABLE OF ty_contenthd INITIAL SIZE 0."#EC *
    DATA : i_contenttab1 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
    DATA : i_contenttab2 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
    DATA : i_contenttab3 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
    DATA : i_contenttab4 TYPE STANDARD TABLE OF ty_content INITIAL SIZE 0."#EC *
    DATA : i_contenttab5 TYPE STANDARD TABLE OF ty_contenttab INITIAL SIZE 0."#EC *
    DATA : i_E1CUV1M TYPE STANDARD TABLE OF E1CUV1M INITIAL SIZE 0."#EC *
    DATA : i_errortab TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
    GLOBAL WORK AREAS
    **Internal Table for the structure TY_T001L
    DATA : wa_vartab TYPE ty_vartab.                            "#EC *
    DATA : wa_vartabdate TYPE ty_vartabdate.                    "#EC *
    DATA : wa_vardetails TYPE ty_vardetails.                    "#EC *
    DATA : wa_tabinput TYPE ty_tabinput.                        "#EC *
    DATA : wa_dsninput TYPE ty_dsninput.                        "#EC *
    DATA : wa_newinput TYPE ty_newinput.                        "#EC *
    DATA : wa_gnewinput TYPE ty_newinput.                       "#EC *
    DATA : wa_ginput_data TYPE ty_newinput.                     "#EC *
    DATA : wa_final TYPE ty_final.                              "#EC *
    DATA : wa_content TYPE ty_content.                          "#EC *
    DATA : wa_contenthd TYPE ty_contenthd.                      "#EC *
    DATA : wa_contentheader type ty_contenthd.                  "#EC *
    DATA : wa_contenttab TYPE ty_content.                       "#EC *
    DATA : wa_content1 TYPE ty_content.                         "#EC *
    DATA : wa_contenthd1 TYPE ty_contenthd.                     "#EC *
    DATA : wa_contentheader1 type ty_contenthd.                 "#EC *
    DATA : wa_contenttab1 TYPE ty_content.                      "#EC *
    DATA : wa_contenttab2 TYPE ty_content.                      "#EC *
    DATA : wa_contenttab3 TYPE ty_content.                      "#EC *
    DATA : wa_contenttab4 TYPE ty_content.                      "#EC *
    DATA : wa_contenttab5 TYPE ty_contentTAB.                   "#EC *
    DATA : wa_E1CUVTM TYPE E1CUVTM.                             "#EC *
    DATA : wa_E1CUV1M TYPE E1CUV1M.                             "#EC *
    DATA : wa_E1DATEM TYPE E1DATEM.                             "#EC *
    DATA : wa_error_tab TYPE solisti1.                          "#EC *
    INTERNAL TABLES AND WORK AREAS FOR BDC
    *Internal Table to store the data to display the error message
    DATA : i_errormsg TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
    *Internal Table to store the data to display the error message
    DATA : i_error TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
    DATA : itab_error TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0."#EC *
    **Work area to store the data to display the error message
    DATA : wa_errormsg TYPE solisti1.                           "#EC *
    **Internal table which will store data for the error log
    DATA:i_error_log TYPE STANDARD TABLE OF ty_error_log INITIAL SIZE 0."#EC *
    GLOBAL VARIABLES
    DATA:  G_FILE TYPE string.                                  "#EC *
    DATA : g_ctr_input_recs(5) type c.                          "#EC *
    DATA:  g_ctr_output_recs(5) type p.                         "#EC *
    data : g_msg(100) type c.                                   "#EC *
    data:  g_struct_file TYPE string.                           "#EC *
    data:  g_login type FILEINTERN.                             "#EC *
    data:  g_phyin type string.                                 "#EC *
    DATA:  g_lprnt type RSPOPSHORT.                             "#EC *
    DATA:  g_FNAME1 TYPE STRING.                                "#EC *
    DATA : g_repid TYPE repid,                                  "#EC *
           g_exit(1) TYPE C,                                    "#EC *
           gx_variant  type disvariant.                         "#EC *
    DATA : g_lines    TYPE i .                                  "#EC *
    data : g_save(1) type c.                                    "#EC *
    DATA : g_splid     TYPE rspoid .                            "#EC *
    data:  p_login type FILEINTERN.                             "#EC *
    data:  p_phyin type string.                                 "#EC *
    GLOBAL CONSTANTS
    CONSTANTS c_msgar   TYPE rslgarea   VALUE 'F8'.             "#EC *
    CONSTANTS c_msgid   TYPE rslgsubid  VALUE 'E'.              "#EC *
    CONSTANTS c_urgnc   TYPE char04     VALUE 'HIGH'.           "#EC *
    CONSTANTS C_X(1)       TYPE C          VALUE 'X'.           "#EC *
    CONSTANTS C_Y(1)       TYPE C          VALUE 'Y'.           "#EC *
    CONSTANTS C_Z(1)       TYPE C          VALUE 'Z'.           "#EC *
    CONSTANTS C_E(1)       TYPE C          VALUE 'E'.           "#EC *
    CONSTANTS C_SAP(3)     TYPE C          VALUE 'SAP'.         "#EC *
    CONSTANTS C_MOD(3)     TYPE C          VALUE 'MOD'.         "#EC *
    CONSTANTS C_MD1(3)     TYPE C          VALUE 'MD1'.         "#EC *
    CONSTANTS C_MD2(3)     TYPE C          VALUE 'MD2'.         "#EC *
    CONSTANTS C_MD3(3)     TYPE C          VALUE 'MD3'.         "#EC *
    CONSTANTS C_MD4(3)     TYPE C          VALUE 'MD4'.         "#EC *
    CONSTANTS C_MD5(3)     TYPE C          VALUE 'MD5'.         "#EC *
    constants:   c_000001(6)  type c value '000001',            "#EC *
                 c_e1cuv1m(7) type c value 'E1CUV1M',           "#EC *
                 c_02(2)  type c value '02',                    "#EC *
                 c_009(3)   type c value '009',                 "#EC *
                 c_0001(4) type c value '0001'.                 "#EC *
    constants:  c_e1datem(7) type c value 'E1DATEM'.            "#EC *
    constants:  c_e1cuvtm(7) type c value 'E1CUVTM'.            "#EC *
    GLOBAL INTERNAL TABLES FOR ALV DISPLAY
    *Internal tables for ALV Field cat
    DATA :
    i_fieldcat_ov  TYPE STANDARD TABLE OF slis_fieldcat_alv INITIAL SIZE 0,"#EC *
    i_fieldcat_dtl TYPE STANDARD TABLE OF slis_fieldcat_alv INITIAL SIZE 0,"#EC *
    i_fieldcat_ov1 TYPE lvc_t_fcat,                             "#EC *
    i_events       TYPE slis_t_event.                           "#EC *
    GLOBAL WORK AREAS FOR ALV DISPLAY
    *Work area for ALV Field layout
    DATA : wa_layout TYPE slis_layout_alv.                      "#EC *
    *Work area for Field Cat. Table
    DATA : wa_fieldcat TYPE slis_fieldcat_alv.                  "#EC *
    GLOBAL VARIABLES FOR ALV DISPLAY
    DATA : g_event  TYPE slis_t_event.                          "#EC *
    DATA : g_top_of_page TYPE slis_t_listheader.                "#EC *
    DATA : g_ok_code     TYPE char4.                            "#EC *
    DATA : g_variant     type disvariant.                       "#EC *
    GLOBAL CONSTANTS FOR ALV DISPLAY
    BAL handling
    data: iv_log_handle type BALLOGHNDL.                        "#EC *
    data: is_log_header type bal_s_log.                         "#EC *
    data: iv_object     type bal_s_log-object    value 'CAPI'.  "#EC *
    data: iv_subobject  type bal_s_log-subobject value 'CAPI_LOG'."#EC *
    data: iv_tcode      type bal_s_log-altcode   value 'SE38'.  "#EC *
    *MOD-005
    RANGES:
        R_MESTYP FOR EDIDC-MESTYP,                              "#EC *
        R_CREDAT FOR EDIDC-CREDAT,                                  "#EC *
        R_CRETIM FOR EDIDC-CRETIM,                              "#EC *
        R_SNDPRT FOR EDIDC-SNDPRT,                              "#EC *
        R_SNDPRN FOR EDIDC-SNDPRN.                              "#EC *
    DATA:
        L_MESSTYPE TYPE TUMLS_MESSTYPE.                         "#EC *
    *MOD-005
    data:        p_sndprn TYPE EDI_SNDPRN,                      "#EC *
                 p_sndprt TYPE EDI_SNDPRT,                      "#EC *
                 p_sndpor TYPE EDI_SNDPOR.                      "#EC *
    data:        p_rcvprn TYPE EDI_RCVPRN,                      "#EC *
                 p_rcvprt TYPE EDI_RCVPRT,                      "#EC *
                 p_rcvpor TYPE EDI_RCVPOR.                      "#EC *
    data:
      init_E1CUVTM type E1CUVTM,                                "#EC *
      prev_E1CUVTM type E1CUVTM,                                "#EC *
      init_E1DATEM type E1DATEM,                                "#EC *
      prev_E1DATEM type E1DATEM,                                "#EC *
      init_E1CUV1M type E1CUV1M,                                "#EC *
      prev_E1CUV1M type E1CUV1M.                                "#EC *
    Source structure definitions
    data:
      begin of LSMW_TAB_CONTENT,                                "#EC *
        VTNAM(018) type C,
        CHAR1(030) type C,
        CHAR2(030) type C,
        CHAR3(030) type C,
        CHAR4(030) type C,
        CHAR5(030) type C,
        CHAR6(030) type C,
        CHAR7(030) type C,
        CHAR8(030) type C,
        CHAR9(030) type C,
        CHAR10(030) type C,
        CHAR11(030) type C,
        CHAR12(030) type C,
        CHAR13(030) type C,
        CHAR14(030) type C,
        CHAR15(030) type C,
        FLAG(001) type C,
      end of LSMW_TAB_CONTENT.
    Counters
    data:
      g_cnt_VAR_TAB  type i,                                    "#EC *
      g_cnt_TAB_CONTENT  type i.                                "#EC *
    Counter ct_xxxxxxxxxx: number of transferred records
    data:
      ct_edi_dc40 type i,                                       "#EC *
      cs_edi_dc40 type i,                                       "#EC *
      ct_E1CUVTM  type i,                                       "#EC *
      cs_E1CUVTM  type i,                                       "#EC *
      ct_E1DATEM  type i,                                       "#EC *
      cs_E1DATEM  type i,                                       "#EC *
      ct_E1CUV1M  type i,                                       "#EC *
      cs_E1CUV1M  type i.                                       "#EC *
    Global data definitions and data declarations
    DATA: wa_cabn TYPE ty_cabn,
          wa_cawn TYPE ty_cawn,
          wa_file TYPE ty_file,
          wa_vtnam TYPE ty_vtnam,
          wa_cuvtab_fld TYPE ty_cuvtab_fld,
          wa_cuvtab_valn TYPE ty_cuvtab_valn,
          wa_cuvtab_valc TYPE ty_cuvtab_valc,
          wa_col_pos     TYPE ty_col_pos,
          wa_error       TYPE ty_error,
          wa_dupl        TYPE ty_dupl,
          wa_dupl_file   TYPE ty_dupl.
    DATA: wa_vnt_ma TYPE ty_vnt_ma,
          wa_split  TYPE ty_split.
    DATA: wa_charval TYPE ty_charval.                           "#EC *
    Internal table
    DATA: i_cabn        TYPE STANDARD TABLE OF ty_cabn,         "#EC *
          i_cabn_temp   TYPE STANDARD TABLE OF ty_cabn,         "#EC *
          i_cabn_atinn  TYPE STANDARD TABLE OF ty_cabn,         "#EC *
          i_file        TYPE STANDARD TABLE OF ty_file,         "#EC *
          i_file_tmp    TYPE STANDARD TABLE OF ty_file,         "#EC *
          i_vtnam       TYPE STANDARD TABLE OF ty_vtnam,        "#EC *
          i_cuvtab      TYPE STANDARD TABLE OF ty_vtnam,        "#EC *
          i_cuvtab_fld  TYPE STANDARD TABLE OF ty_cuvtab_fld,   "#EC *
          i_cuvtab_valn TYPE STANDARD TABLE OF ty_cuvtab_valn,  "#EC *
          i_cuvtab_valc TYPE STANDARD TABLE OF ty_cuvtab_valc,  "#EC *
          i_col_pos     TYPE STANDARD TABLE OF ty_col_pos,      "#EC *
          i_cawn        TYPE STANDARD TABLE OF ty_cawn,         "#EC *
          i_cawn_n      TYPE STANDARD TABLE OF ty_cawn,         "#EC *
          i_cawn_c      TYPE STANDARD TABLE OF ty_cawn,         "#EC *
          i_cawn_i      TYPE STANDARD TABLE OF ty_cawn,         "#EC *
          i_cuv_error   TYPE STANDARD TABLE OF ty_vtnam,        "#EC *
          i_dupl        TYPE STANDARD TABLE OF ty_dupl,         "#EC *
          i_dbtab       TYPE STANDARD TABLE OF ty_dbtab.        "#EC *
    DATA: i_vnt_ma TYPE STANDARD TABLE OF ty_vnt_ma,            "#EC *
          i_split  TYPE STANDARD TABLE OF ty_split.             "#EC *
    DATA: i_dupl_file TYPE STANDARD TABLE OF ty_dupl.           "#EC *
    DATA: i_charval TYPE STANDARD TABLE OF ty_charval.          "#EC *
    Constants
    CONSTANTS: c_char TYPE atfor VALUE 'CHAR',                  "#EC *
               c_date TYPE atfor VALUE 'DATE',                  "#EC *
               c_time TYPE atfor VALUE 'TIME',                  "#EC *
               c_varcond TYPE atnam VALUE 'Z_VARCOND'.          "#EC *
    Field Symbols
    FIELD-SYMBOLS: <fs_vtnam>      TYPE ty_vtnam,               "#EC *
                   <fs_cabn>       TYPE ty_cabn,                "#EC *
                   <fs_cuvtab_fld> TYPE ty_cuvtab_fld,          "#EC *
                   <fs_dupl>       TYPE ty_dupl.                "#EC *
    FIELD-SYMBOLS: <FS_DYN_WA> TYPE ANY.
    Variables
    DATA: g_raw(500)  TYPE c,                                   "#EC *
          g_invalid   TYPE char1,                               "#EC *
          g_error     TYPE char1,                               "#EC *
          g_message   TYPE char50,                              "#EC *
          g_slnid_c    TYPE slnid,                              "#EC *
          g_slnid_n    TYPE slnid,                              "#EC *
          g_row        TYPE char5.                              "#EC *
    DATA: g_varcond TYPE varcond, "Variant condition "#EC NEEDED
          g_split_var TYPE i,                                  "#EC *
          g_split_var1 type i.                                 "#EC *
    Types: begin of ty_charname,
             name type atnam,
           end of ty_charname.
    data: wa_charname type ty_charname,                         "#EC *
          i_charname type standard table of ty_charname.        "#EC *
    data: cnt_i type i,                                         "#EC *
          g_tabix type char10.                                  "#EC *
    Types: begin of ty_itab_zedidc40.
            include structure edi_dc40.
    TYPES:       end of ty_itab_zedidc40.
    Types: begin of ty_itab_zedidd40.
            include structure edi_dd40.
    TYPES: end of ty_itab_zedidd40.
    DATA: itab_zedidc40 type standard table of
                      ty_itab_zedidc40 initial size 0.          "#EC *
    DATA: itab_zedidd40 type standard table of
                      ty_itab_zedidd40 initial size 0.          "#EC *
    DATA: wa_itab_zedidc40 type ty_itab_zedidc40.               "#EC NEEDED
    DATA: wa_itab_zedidd40 type ty_itab_zedidd40.
    *MOD-009
    data: itab_ze1cuvtm type e1cuvtm,                           "#EC *
          itab_ze1datem type e1datem,                           "#EC *
          itab_ze1cuv1m type e1cuv1m.                           "#EC *
    data: wdocnum(16) type n value 0.                           "#EC *
    data: wsegnum(6)  type n value 0.                           "#EC *
    data: witemno(10) type n value 0.                           "#EC *
    data: witemno_new(10)  type n value 0.                      "#EC *
    data: witemno_gst(10)  type n value 0.                      "#EC *
    data: witemno_qst(10)  type n value 0.                      "#EC *
    TYPES: BEGIN OF ty_input_data1,                             "#EC *
              line(560) type c,
              flag(1) type c,
           END OF ty_input_data1.
    DATA: i_input_data type standard table of
                      ty_input_data1 initial size 0. "with header line.
    DATA: i_input_data1 type standard table of
                      ty_input_data1 initial size 0. "with header line.
    DATA: wa_input_data type ty_input_data1.                    "#EC *
    DATA: g_cnt_input_recs type i.                              "#EC *
    DATA: g_flg_error type c.                                   "#EC *
    DATA: l_lines type i.                                       "#EC *
    DATA: l_lines1 type i.                                      "#EC *
    DATA: l_tabix type i.                                       "#EC *
    DATA: wa_input_data1 type ty_input_data1.                   "#EC *
    DATA: FILE TYPE STRING.
    Fields that are made available to the user:
    DATA:
      g_cnt_records_read TYPE i,                                "#EC *
      g_cnt_records_transferred TYPE i,                         "#EC *
      g_cnt_transactions_read TYPE i,                           "#EC *
      g_cnt_transactions_transferred TYPE i,                    "#EC *
      g_cnt_idocs_package TYPE i.                               "#EC *
    data: v_log_handle type balloghndl.                         "#EC *
    DATA: gt_curr_edi_dc40 TYPE STANDARD TABLE OF edi_dc40 initial size 0."#EC *
    DATA: gt_curr_edi_dd40 TYPE STANDARD TABLE OF edi_dd40 initial size 0."#EC *
    DATA: wa_curr_edi_dc40 TYPE edi_dc40.                       "#EC *
    DATA: wa_curr_edi_dd40 TYPE edi_dd40.                       "#EC *
    internal table for error messages during conversion
    DATA: g_error_tab TYPE type_errortab,                       "#EC *
          wa_errortab TYPE type_errorline.                      "#EC *
    DATA:  g_edidd_segnam type EDI4SEGNAM,                      "#EC *
           g_edidd_hlevel type EDI4HLEVEC.                      "#EC *
    DATA: g_segnum(6) TYPE n.
    DATA: g_objecttype(2) type C.
    DATA: P_FNAME(128) TYPE C VALUE '/usr/sap/trans/vartabheader'. " MODIF ID MD1 OBLIGATORY.
    DATA: P_FNAME1(128) TYPE C VALUE '/usr/sap/trans/vartabcontent'. " MODIF ID MD1 OBLIGATORY.
    field-symbols: <dyn_table> type standard table,
                   <dyn_table1> type standard table,
                   <dyn_wa>,
                   <dyn_wa1> TYPE ANY.
    data: dy_table type ref to data,
          dy_line  type ref to data,
          xfc type lvc_s_fcat,
          ifc type lvc_t_fcat.
    data: l_tabname TYPE tabname.
    DATA: l_len_slnid TYPE i,                                 "#EC NEEDED
            l_len_varcond TYPE i,                               "#EC NEEDED
            l_temp_slnid TYPE i,                                "#EC NEEDED
            l_temp_slnc TYPE char5,                             "#EC NEEDED
            l_temp_varcond TYPE varcond,                        "#EC NEEDED
            l_sub_var      TYPE i,                              "#EC NEEDED
            l_val_split TYPE char10.                            "#EC NEEDED
    DATA: l_invalid.                                          "#EC NEEDED
    *Include for Global Data Declaration
    *INCLUDE ZGTDMI_VARTAB_TOPDYN.
    *INCLUDE /FACTGLB/GTDMI_VARTAB_TOP02.
    *Include for Selection Screen
    *INCLUDE ZGTDMI_VARTAB_SELDYN.
    *INCLUDE /FACTGLB/GTDMI_VARTAB_SEL02.
    *Include for Sub Routines
    *INCLUDE ZGTDMI_VARTAB_FORMSDYN.
    *INCLUDE /FACTGLB/GTDMI_VARTAB_FORMS02.
    *&  Include           /FACTGLB/GTDMI_VARTAB_SEL02                      *
    *&  Include           /FACTGLB/GTDMI_VARTAB_SEL
    *&  Include           /FACTGLB/GTDMI_VARTAB_SEL
    PROGRAM DESCRIPTION: Variant Table and Content Upload Interface.
              DEVELOPER: Aveek Ghose
          CREATION DATE: 2008-08-25
             RDD NUMBER: DCDD027
    TRANSPORT NUMBER(S): RD2K902769
    *-- REVISION HISTORY -
              DEVELOPER:
           DATE APPLIED: YYYY-MM-DD
             SCR NUMBER: <Scope Change Request ID>
             RDD NUMBER: <Toolset Object ID>
    TRANSPORT NUMBER(S):
            DESCRIPTION:
    DECLARATION FOR SELECTION SCREEN
    *selection-screen skip 1.
    *For all the input field entries
    SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
    *Parameter for Input File Name:
    PARAMETERS:   p_inpt   TYPE RLGRAP-FILENAME MODIF ID MOD . " Presentation server File Variant table
    PARAMETERS:   p_inpt1  TYPE RLGRAP-FILENAME MODIF ID MOD . " Presentation server File variant Content
    SELECTION-SCREEN END OF BLOCK bl1.
    IDoc creation
    selection-screen begin of block idocpars
                     with frame title text-006.
    parameters:
       p_trfcpt as checkbox default C_X MODIF ID MD3,
       p_packge(5) type n default 1 MODIF ID MD3.
    selection-screen end of block idocpars.
    SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE text-032.
    Radio Buttons :
    parameters:
      rb_apsrv RADIOBUTTON GROUP RB1 DEFAULT 'X' USER-COMMAND UCOM,
      rb_convt RADIOBUTTON GROUP RB1,
      rb_idoc RADIOBUTTON GROUP RB1.
    rb_proc RADIOBUTTON GROUP RB1.
    SELECTION-SCREEN END OF BLOCK bl3.
    INITIALIZATION
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INPT.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          STATIC        = C_X
        CHANGING
          FILE_NAME     = P_INPT
        EXCEPTIONS
          MASK_TOO_LONG = 1
          OTHERS        = 2.
      IF SY-SUBRC <> 0.
        MESSAGE e241.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INPT1.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          STATIC        = C_X
        CHANGING
          FILE_NAME     = P_INPT1
        EXCEPTIONS
          MASK_TOO_LONG = 1
          OTHERS        = 2.
     

  • Differrences between structure and table in data dictionary in ABAP?

    What is the differrences between structure and table in data dictionary in ABAP?
    are they same?

    Tables :
    1. The place where the data is stored so that you can retrieve at any time.
    2. There can be more than one record stored
    Structures :
    1. The data / info stays only during the runtime of the application and will not get stored at all during the run time ....
    2. Only one record can be stored at the runtime .....
    A structure forms the skeleton of the table.
    A structure comprises components i.e., fields. Types are defined for the components A component can refer to an elementary type (via a data element or by directly specifying the data type and length in the structure definition), another structure or a table type. A structure can therefore be nested to any depth
    Tables can be defined independently of the database in the ABAP Dictionary. The fields of the table are defined with their (database-independent) data types and lengths.
    When the table is activated, a physical table definition is created in the database for the table definition stored in the ABAP Dictionary. The table definition is translated from the ABAP Dictionary to a definition of the particular database.

  • How do I get to know the structures stored in a cluster table

    Dear fellow developers,
    this question is about Cluster Tables of the INDX-type which need to be read with
    IMPORT/EXPORT FROM/TO ...
    I need some advice concerning the question of how to find
    out the definition of a structured field in such a cluster.
    To be more precise:
    By using the command
    IMPORT DIRECTORY ...
    I know that in the table/cluster
    VARI
    section
    VB
    there are two structured
    fields the content of which I'm interested in for reading and writing purposes:
    %_VARI40C
    and
    %_VARIVDAT
    I already know the structure of the first one, but only because I found a Standard FM that reads it with an appropriately defined WA-structure, but I cannot find something similar to find out the structure definition for the other one (%_VARIVDAT). It can't be possible that this is so difficult to find out. There must be some better and easier way to find this out that I don't know yet...
    Thanks in advance for your appreciated help
    Andreas

    Hi Andreas,
    I think you have nothing into SAP to find the structure of a cluster table.
    The way I use, is to find a standard program that use this cluster, and I look in the ABAP code the structure used by SAP.
    You just have to use the ST05, and use the option to see the code where the cluster has been readed.
    Rgd
    Frédéric

  • TYPES statement in abap class to include structure

    hi ,
    i have declared following in a abap class...
    TYPES:
          zts_alv_line TYPE zmat_pr_costest_alv.
         TYPES:BEGIN OF ts_alv_line,
                include type zts_alv_line,
                matkl type mara-matkl,
                t023t type t023t-wgbez,
                lvorm type mara-lvorm,
                end of ts_alv_line.
         TYPES: tt_alv_data TYPE STANDARD TABLE OF ts_alv_line WITH DEFAULT KEY.
         DATA:
          alv_data TYPE tt_alv_data.
    now while refering to alv_data-matnr the sap is giving error that this component does not have matnr.
    please help.
    Edited by: Suhas Saha on Feb 3, 2012 1:11 PM

    TYPES: zts_alv_line TYPE zmat_pr_costest_alv.
    TYPES:BEGIN OF ts_alv_line,
                include type zts_alv_line,
                matkl type mara-matkl,
                t023t type t023t-wgbez,
                lvorm type mara-lvorm,
                end of ts_alv_line.
    Actually by defining this you've defined include as field of ts_alv_line. Actually ts_alv_line is a nested structure.
    I think you need to re-define the structure definition as:
    TYPES:BEGIN OF ts_alv_line.
          INCLUDE TYPE zts_alv_line.
    TYPES: matkl TYPE mara-matkl,
           t023t TYPE t023t-wgbez,
           lvorm TYPE mara-lvorm.
    TYPES: END OF ts_alv_line.
    BR,
    Suhas

Maybe you are looking for

  • Program error when opening layer properties

    Hi! I have a really difficult problem in Photoshop. Whenever I try to open the layer properties I get the error message "Could not complete your request because of a program error." I tried to fix it but I really don't know what to do. I am working o

  • Mid 2009 13" Macbook pro upgrade

    Hi! I have been using a 13" Macbook pro mid 2009 model since September 2009. It has been upgraded over the years - the HDD from 160 to 500 to 1000gb, the ram from 2 to 8gb (max-ed out). The thing is, the computer has become drastically slow - startup

  • Cannot use clamshell ( closed lid ) mode

    I have a very annoying problem with my MBP in clamshell mode. I used to use my computer in clamshell mode with my external monitor while plugged into the ac adapter. Once in a while when I want to use it in clamshell mode I try waking it up with my b

  • AnyConnect 3.0 with ASA5510 no Internal Access

    We have gotten our anyconnect clients to connect to the VPN with no issues and verifying credentials with RADIUS. Remote users however cannot access internal resources through the VPN. I know I need to setup an NAT Exempt statement for my VPN Pool to

  • Pull large amounts of data using odata, client API and so takes a long time in project server 2013

    We are trying to pull large amounts of data in project server 2013 using both client API and odata calls, but it seem to take a long time. How is this done In project server 2010 we did this creating SQL views in both the reporting database and for l