Report using logical data base

Hello friends,
please give me a sample report program using logical database with explanation where logical databse used and how it works?

See the program given below, it uses logical database PNP.
DESCRIPTION : TO GENERATE SIMPLE REPORT USING HR ABAP
               LOGICAl DATABASE- PNP .
REPORT Zdemop_HR_prog_1
LINE-SIZE 200 .
*Database Table
TABLES: PERNR,           " Pernr structure for Logical database
       PA0001,           " Actions
       PA0002.           " Personnel Info
*Infotypes
INFOTYPES: 0001,         " Actions
           0002.         " personnel info
*Variable Declaration
DATA: FORM_NAM LIKE P0001-ENAME,
      V_AGE(5) TYPE C,       "variable for calculating age in days
      V_CTR1 TYPE I VALUE 0, "counter
      V_CTR2 TYPE I VALUE 0, "counter
      VAR(5) TYPE C ,        " variable to store btrtl
      VAR1(5) TYPE C  .      " variable to store werks
*Internal Table Decalartion
DATA: BEGIN OF I_TAB1 OCCURS 0,
       WERKS LIKE PA0001-WERKS,  "personnel area
       BTRTL LIKE PA0001-BTRTL,  "personnel sub area
       PERNR LIKE PA0001-PERNR,  "employee number
       ENAME LIKE PA0001-ENAME,  "employee name
       BEGDA LIKE PA0002-BEGDA,  "employee join date
       PERSG LIKE PA0001-PERSG,  "employee group
       PERSK LIKE PA0001-PERSK,  "employee sub-group
       PLANS LIKE PA0001-PLANS,  "position
       GBDAT LIKE P0002-GBDAT,   "date of birth
     END OF I_TAB1.
*START-OF-SELECTION
START-OF-SELECTION .
GET PERNR .                    
  RP-PROVIDE-FROM-LAST P0001 SPACE PN-BEGDA PN-ENDDA .   " Macro for IFT-0001
  RP-PROVIDE-FROM-LAST P0002 SPACE PN-BEGDA PN-ENDDA .   " Macro for IFT-0002
**--> Populate internal table
  MOVE P0001-WERKS TO I_TAB1-WERKS .
  MOVE P0001-BTRTL TO I_TAB1-BTRTL .
  MOVE P0001-PERNR TO I_TAB1-PERNR .
  MOVE P0001-ENAME TO I_TAB1-ENAME .
  MOVE P0002-BEGDA TO I_TAB1-BEGDA .
  MOVE P0001-PERSG TO I_TAB1-PERSG .
  MOVE P0001-PERSK TO I_TAB1-PERSK .
  MOVE P0001-PLANS TO I_TAB1-PLANS .
  MOVE P0002-GBDAT TO I_TAB1-GBDAT .
**--> Append data to internal table
  APPEND I_TAB1 .
  CLEAR I_TAB1 .                                       " Clear header I_TAB1
*END-OF-SELECTION
END-OF-SELECTION.
*****sorting the internal table on Personnel Area & Personnel Sub-Area
  SORT I_TAB1 BY WERKS BTRTL.
*TOP_OF_PAGE
  PERFORM TOP_OF_PAGE.
*Output Display
  LOOP AT I_TAB1.
*for calculating the age in days
    V_AGE = SY-DATUM - I_TAB1-GBDAT.
*control break on Personal Sub Area
    AT NEW BTRTL .
      IF SY-TABIX NE 1.
        FORMAT COLOR COL_NORMAL ON.
        WRITE:/5 'Total Number of Employees for personnel Sub-Area:',
        VAR  , 'is ',
        V_CTR1.
        CLEAR V_CTR1.
        FORMAT COLOR OFF.
      ENDIF.
    ENDAT .
**Control Break on personnel Area
    AT NEW WERKS.
      IF SY-TABIX NE 1.
        FORMAT COLOR COL_TOTAL ON.
        WRITE:/5 'Total Number of Employees for Personal Area: ',
         VAR1 ,'is    ', V_CTR2. "color col_total.
        CLEAR V_CTR2.
        SKIP 1.
        FORMAT COLOR OFF.
      ENDIF.
    ENDAT .
    WRITE:/5 I_TAB1-PERNR,   "personnel number
          16 I_TAB1-ENAME,   "emp name
          47 I_TAB1-BEGDA,   "join date
          60  V_AGE,         "age in days
          74  I_TAB1-WERKS,  "P area
          84  I_TAB1-BTRTL,  "P sub Area
          94  I_TAB1-PERSG,  "emp group
          104  I_TAB1-PERSK, "emp sub group
          114  I_TAB1-PLANS. "position
    V_CTR1 = V_CTR1 + 1.
    V_CTR2 = V_CTR2 + 1.
    VAR = I_TAB1-BTRTL .
    VAR1 = I_TAB1-WERKS .
  ENDLOOP.
*&      Form  top_of_page
      Header Output
FORM TOP_OF_PAGE.
  FORMAT COLOR COL_HEADING ON.
  WRITE:/5 'Employee',
        16 'Employee',
        47 'Join Date',
        62 'Age',
        74 'Personal',
        84 'Personal',
        94 'Employee',
        104 'Employee',
        114 'Position ',
      /5 'Number',
      16 'Name',
      60 '(In Days)',
      74 'Area',
      84 'Sub-Area',
      94 'Group',
      104 'Sub-Group'.
  FORMAT COLOR OFF.
  SKIP 1.
ENDFORM.                    " top_of_page
Regards,
Joy.

Similar Messages

  • ALV Refresh when using Logical Data Base

    My program will display the report in a ALV grid format (not in OO, no method or class used here, only FM are used), user can select rows and update the dates in the PM orders.  The REFRESH button comes with the GUI Status "STANDARD1" does not do anything, so I create a custom button "REF".  Normally I will read the updated records into the internal table and use FM "REUSE_ALV_GRID_DISPLAY" to refresh the screen; but this time I need to use a logical database to collect the data, "GET <DIAUFK>" is only allowed to use once in the program, so how can I retrieve my data again after the refresh?
    Does anybody know where the Basic Start and Finsh dates of the PM order are stored? They are the screen fields CAUFVD-GSTRP and CAVFVD-GLTRP on IW32 Header tab.

    Hi,
    You can get it from table AFKO.
    REWARD IF USEFUL

  • Logical Data Base - ADA

    Hi, people,
    I`m using Logical Data Base ADA in my program to generate some files, but when the program is executed in DEV System the files are generated normaly, but in the PRD system don´t work.
    Someone knows if exist same parameter or why  this problem occurs ?
    Tks for all.
    Flavio

    As ADA is a standard logical database, if you don't change this object, there should be no difference, except Authorizations that may differ between development and production systems , check via [SU53|http://www.sdn.sap.com/irj/scn/advancedsearch?query=su53+#sdn_content_category_value_wiki].
    (In AM "Asset Accounting" class, check authorization objects : A_A_VIEW, A_S_ANLKL, A_S_GSBER, A_S_WERK.)
    Regards,
    Raymond

  • Help with pnpce logic data base

    Hallow I doing a program that use logic data base pnpce(my first time) and in the program I use get peras to bring the employee num and in the loop the name of employee
    Something I doing wrong because its not working what?
    I just wont to bring to my table person_tab employee num and name.
    thankes
    Tables :pernr
    Nodes:persa
    Infotypes:0000 like t_oooo,
    00002 like t_0002.
    START-OF-SELECTION.
    GET peras.
    LOOP AT t_0000.
    MOVE t_0000-pernr TO person_tab-objid.
    APPEND person_tab.
    Endloop.
    Loop at t0002.
    MOVE t_0002-nachn TO person_tab-lastname.
    MOVE t_0002-vorna TO person_tab-firstname.
    APPEND person_tab.
    ENDLOOP.
    END-OF-SELECTION.

    Hi there. I'm not sure what version you are on, but in ERP 2005 this is an obsolete statement.  Here's an alternate way to get the information you're looking for:
    TABLES: PERNR.
    INFOTYPES: 0002.
    DATA: BEGIN OF person_tab OCCURS 0,
           objid LIKE PERNR-PERNR,
           lastname LIKE P0002-NACHN,
           firstname LIKE P0002-VORNA,
    END OF person_tab.
    START-OF-SELECTION.
    GET pernr.
    person_tab-objid = pernr-pernr.
    RP-PROVIDE-FROM-LAST P0002 space sy-datum sy-datum.
    person_tab-lastname = p0002-nachn.
    person_tab-firstname = p0002-vorna.
    APPEND person_tab.
    CLEAR person_tab.
    END-OF-SELECTION.
    Even if you don't end up using this code, you would need to change yours so that you aren't appending to your person_tab table until you have moved all of the data for the fields of your record. By appending twice like you currently are doing, you are creating two separate records (one with just the pernr and another with the first and last name).  I hope this helps.
    - April King

  • Hiding dynamic selections which is default if Logical Data Bases is  used

    Hi All,
       Am making use of PNP logical data base in my report .On the selection screen there is a default icon with text dynamic selections is visible besides the execute icon.Can please anyone tell me how to hide this,i have gone through the DBPNPSEL include but was not able to find the solution for the same.
       Pointers will be appriciated.
    Regards,
    Zareena.

    Create your own report catogory
    Goto --> Attributes --> Report Catogory
    with all the fields that you require
    That will solve your problem

  • Logical data base for license revenue report.

    Hi All,
    My requirement is to create "license revenue report through SAP Query with following fields:
    VBAK:
    Sales Document,Sales Doc type,net value of sales order in document,sales org,distribution channel,division,sales office,business area,customer purchase order number,customer purchase order date,sold to party.
    VBAP:
    Sales document item,target quantity in sales units,target quantity in UOM,usage indicator,billing block for item,business area,plant(own or external),
    origin of bill of material,net price,SD document currency,material pricing pgroup,account assignment group for this material,activity type,personnel number.
    VEDA:
    contracts start date,contract end date,date on which contract is assigned.,installation date,agreement acceptance date
    VBREVK:
    clearing account for accrued revenues,clearing accountkey(offsetting account),total accrued value,currency key,amount in document currency,posting year and posting period.
    VBREVE:
    revenue amount,currency key,accrual period,company code,country of destination,profit center,posting year and posting period,amount in document currency,gl account,account for deferred revenue,account for non billed receivable
    Is there any  standard logical data base which gives all the required fields mentioned above? since i am not SD consultant i am not sure whether i have to take only above tables exactly or not
    there are certain logical databases like SD_ORDER,SD_SALES_DOCUMENT which has tables VBAK,VBAP,VEDA but i am unable to join remaining tables  VBREVE and VBREVK with those logical data bases
    Please provide some valuable suggestions on this.
    Thanks&Regards

    Hi All,
    My requirement is to create "license revenue report through SAP Query with following fields:
    VBAK:
    Sales Document,Sales Doc type,net value of sales order in document,sales org,distribution channel,division,sales office,business area,customer purchase order number,customer purchase order date,sold to party.
    VBAP:
    Sales document item,target quantity in sales units,target quantity in UOM,usage indicator,billing block for item,business area,plant(own or external),
    origin of bill of material,net price,SD document currency,material pricing pgroup,account assignment group for this material,activity type,personnel number.
    VEDA:
    contracts start date,contract end date,date on which contract is assigned.,installation date,agreement acceptance date
    VBREVK:
    clearing account for accrued revenues,clearing accountkey(offsetting account),total accrued value,currency key,amount in document currency,posting year and posting period.
    VBREVE:
    revenue amount,currency key,accrual period,company code,country of destination,profit center,posting year and posting period,amount in document currency,gl account,account for deferred revenue,account for non billed receivable
    Is there any  standard logical data base which gives all the required fields mentioned above? since i am not SD consultant i am not sure whether i have to take only above tables exactly or not
    there are certain logical databases like SD_ORDER,SD_SALES_DOCUMENT which has tables VBAK,VBAP,VEDA but i am unable to join remaining tables  VBREVE and VBREVK with those logical data bases
    Please provide some valuable suggestions on this.
    Thanks&Regards

  • Logical Data Base to be used in the QUICKVIEWER

    hello Abappers,
    My client cannot select text fields using SQVI so he wants me to come up with a way for him to do so. I was thinking of creating a logical data base which can be selected in SQVI. I could build the FM READ_TEXT into the QV but what I need clarification on is outputting the text fields because the logical data base is really a set of table joins and since I am using the QV I do not have the flexibility that I would have if I was using a logical data base in a program.
    Please advise if anybody has any ideas on this approach and how I would structure the output.
    regards

    Hi Santhosh,
    Since you say you are a beginner, lets start this way, hopefully U know from what datasources in ECC or R/3 you are supposed to load data from. Once you are sure about it, then follow this steps.
    1) Go to RSA5 transaction in ECC or R/3 System ( source system ).
    2) Select the specific datasource from which data is to be extracted to BI and press Activate Datasources button on the top right.
    3) Then on check whether this datasource is available in RSA6 screen.
    4) Come to BI system, there go to the Source Systems screen, there select the specific Source System (ECC or R/3).
    Go to U'r specific Infoarea i.e., SCM in that select the datasource for which U are supposed to extract data, right click and select Replicate Metadata.
    5) Once replication is done now right click again on datasource and create and run the infopackage  , if its BI 7.0 data will be extracted till PSA.
    6) After this create Transformation by right clicking on the Datasource again. Since I guess U will be using standard datasource U will get automatic transformations between the source fields and the infoobjects. Activate Transformations.
    7) After this Create a DTP process by again right clicking on the Datasource. Here U specify the Data Target to which data is to be loaded.
    8) Activate the DTP, once that's done successfully, Execute the DTP by clicking the Execute Button in the DTP.
    9) Monitor U'r data loading thru Monitor screen.
    Hope this helps.
    Regards,
    Syed

  • Error while fetching data from Logical data base

    Hi All,
    I need to fetch the data from Logical data base DDF.First when i am trying demo code
    REPORT demo_program_read_tables_2.
    NODES: spfli, sflight.
    GET spfli FIELDS carrid connid cityfrom cityto.
      WRITE: / spfli-carrid,
               spfli-connid,
               spfli-cityfrom,
               spfli-cityto.
    GET sflight FIELDS fldate.
      WRITE: / sflight-fldate.
    I am getting error like ""spfli is not a node of the logical data base __S""
    Should i declare anything esle?
    Madhu

    REPORT demo_logical_database.
    DATA wa_spfli TYPE spfli.
    SELECT-OPTIONS s_carr FOR wa_spfli-carrid.
    DATA: callback TYPE TABLE OF ldbcb,
          callback_wa LIKE LINE OF callback.
    DATA: seltab TYPE TABLE OF rsparams,
          seltab_wa LIKE LINE OF seltab.
    callback_wa-ldbnode     = 'SPFLI'.
    callback_wa-get         = 'X'.
    callback_wa-get_late    = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SPFLI'.
    APPEND callback_wa TO callback.
    CLEAR callback_wa.
    callback_wa-ldbnode     = 'SFLIGHT'.
    callback_wa-get         = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SFLIGHT'.
    APPEND callback_wa TO callback.
    seltab_wa-kind = 'S'.
    seltab_wa-selname = 'CARRID'.
    LOOP AT s_carr.
      MOVE-CORRESPONDING s_carr TO seltab_wa.
      APPEND seltab_wa TO seltab.
    ENDLOOP.
    CALL FUNCTION 'LDB_PROCESS'
         EXPORTING
              ldbname                     = 'F1S'
              variant                     = ' '
         TABLES
              callback                    = callback
              selections                  = seltab
         EXCEPTIONS
              ldb_not_reentrant           = 1
              ldb_incorrect               = 2
              ldb_already_running         = 3
              ldb_error                   = 4
              ldb_selections_error        = 5
              ldb_selections_not_accepted = 6
              variant_not_existent        = 7
              variant_obsolete            = 8
              variant_error               = 9
              free_selections_error       = 10
              callback_no_event           = 11
              callback_node_duplicate     = 12
              OTHERS                      = 13.
    IF sy-subrc <> 0.
      WRITE: 'Exception with SY-SUBRC', sy-subrc.
    ENDIF.
    FORM callback_spfli USING name  TYPE ldbn-ldbnode
                              wa    TYPE spfli
                              evt   TYPE c
                              check TYPE c.
      CASE evt.
        WHEN 'G'.
          WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
          ULINE.
        WHEN 'L'.
          ULINE.
      ENDCASE.
    ENDFORM.
    FORM callback_sflight USING name  TYPE ldbn-ldbnode
                                wa    TYPE sflight
                                evt   TYPE c
                                check TYPE c.
      WRITE: / wa-fldate, wa-seatsocc, wa-seatsmax.
    ENDFORM.

  • Logical data base and work process

    I have some questions on the above topics.
    if some have an answer, let me know .
    1. How many logical data bases can we use in our
    report program
    2.  How to design our own selection screen when
    using
    logical database
    3. How mnay update workprocesses can u have.
    Thanks in advance.
    Regards,
    Roberts.K

    Welcome to the forum!
    In response to question 1:
    You can designate only 1 LDB on the Attribute screen of the program.  You can however, also invoke a LDB program using Function Module LDB_PROCESS.  There is some good documentation associated with it.
    In response to question 2:
    If you specify a LDB on your program attributes, the LDB will present a selection screen.  Any parameters/select options that you specify in your program are added to the selection screen that the LDB presents.  If you use the Function Module mentioned above, then you alone will control the selection screen and have to pass selection information to the function module.
    In response to question 3:
    I am not quite sure what you mean by this one, but if some of the other SDNers have answered your question, then no need to clarify for me.

  • How to create a report using XML data source from Crystal Report Designer

    Hi,
    Iu2019m having Crystal Report Designer XI R2 SP4. Iu2019m trying to create a report using XML data source stored on disk. This is a customer order report and the xml is structured in such a way that it has an order details header part (master) and then it has several order lines (detail). One order line can have several order line characteristics (detail-detail). So what I need to know is now I can design this layout from the designer. If this was done using views I can do it with sub-reports but using xml data this seems to be different. Can you help me to design this layout? I have included the xml and xsd as well.
    Thank you in advance.
    Regards,
    Chanaka
    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <CUSTOMER_ORDER_CONF_REP_REQUEST xmlns:xsi="http://www.w3.org/2001/XMLSchema" xmlns="urn:ifsworld-com:customer_order_conf_rep">
        <CUSTOMER_ORDER_CONF_REP>
            <ORDER_NO>D555809</ORDER_NO>
            <PRINTED_DATE>2009-03-26T08:52:54</PRINTED_DATE>
            <AUTHORIZE_NAME>Chanaka</AUTHORIZE_NAME>
            <CUSTOMER_NO>CU-1473-INV</CUSTOMER_NO>
            <CUST_NAME>Mr.Johan Matts</CUST_NAME>
            <SHIP_ADDR_1>93,Main Street</SHIP_ADDR_1>
            <SHIP_ADDR_2>Negambo Road</SHIP_ADDR_2>
            <SHIP_ADDR_3>Watthala</SHIP_ADDR_3>
            <SHIP_ADDR_4>SRI LANKA</SHIP_ADDR_4>
            <BILL_ADDR_1>93,Main Street</BILL_ADDR_1>
            <BILL_ADDR_2>Negambo Road</BILL_ADDR_2>
            <BILL_ADDR_3>Watthala</BILL_ADDR_3>
            <BILL_ADDR_4>SRI LANKA</BILL_ADDR_4>
            <CUSTOMER_PO_NO>112984638</CUSTOMER_PO_NO>
            <CUSTOMER_FAX>112984639</CUSTOMER_FAX>
            <CUSTOMER_EMAIL>abcbababab</CUSTOMER_EMAIL>
            <ORDER_LINES>
                <ORDER_LINE>
                    <LINE_NO>1</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP11</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>iPod</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1200</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1200</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID xsi:nil="1"/>
                            <CHARACTERISTIC_VALUE xsi:nil="1"/>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>2</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP24</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>XGA Projector</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>500</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1500</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>3</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free Instalation</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>3</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP02</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Sony DVD Player</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1000</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1000</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free 5 DVDs</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>4</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP99</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Flatscreen TV</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1500</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1350</PRICE_TOTAL>
                    <DISCOUNT>10</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free Delivery</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>2</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>1 year additional warranty</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>5</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP56</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Sony MP3 Player</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>200</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>400</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>2</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free carry belt</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>2</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free promotional 4GB memory bar</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>3</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>No warranty on memory bar</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
            </ORDER_LINES>
        </CUSTOMER_ORDER_CONF_REP>
    </CUSTOMER_ORDER_CONF_REP_REQUEST>
    XSD
    <?xml version="1.0" encoding="UTF-8"?>
    <?report  module="ORDER" package="CUSTOMER_ORDER_CONF_REP" ?>
    <xs:schema targetNamespace="urn:ifsworld-com:customer_order_conf_rep" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:ifsworld-com:customer_order_conf_rep" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="CUSTOMER_ORDER_CONF_REP_REQUEST">
    <xs:complexType>
    <xs:all minOccurs="1" maxOccurs="1">
    <xs:element name="CUSTOMER_ORDER_CONF_REP">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="50">
    <xs:element name="ORDER_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="PRINTED_DATE" type="xs:dateTime" nillable="true" minOccurs="0"/>
    <xs:element name="AUTHORIZE_NAME" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_PO_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUST_NAME" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_1" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_2" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_3" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_4" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_1" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_2" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_3" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_4" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_FAX" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_EMAIL" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="ORDER_LINES" nillable="true" minOccurs="0">
    <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="ORDER_LINE">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="39">
    <xs:element name="LINE_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SALE_UNIT_PRICE" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="PRICE_TOTAL" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="DISCOUNT" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="PRICE_QTY" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="CUSTOMER_PART_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="4000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_PART_DESC" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="4000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="ORDER_LINE_CHARACTERSTICS" nillable="true" minOccurs="0">
    <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="CHARACTERISTIC_ITEM">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="6">
    <xs:element name="CHARACTERISTIC_ID" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CHARACTERISTIC_VALUE" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:all>
    </xs:complexType>
    </xs:element>
    </xs:schema>

    Hi Sourashree,
    Thank you for the response and ideas you have given me so far. I can get the fetch the data from the data source without any problem. That is I do the following,
    1.     New Report
    2.     From Create New Connection-> XML
    3.     Provide the u201CLocal XML Fileu201D and have u201CSpecify Schema Fileu201D checked -> Next
    4.     Provide the u201CLocal Schema Fileu201D  -> Finish
    Then I can see the following under XML
    + CUSTOMER_ORDER_CONF_REP_REQUEST
            CUSTOMER_ORDER_CONF_REP_REQUEST
         CUSTOMER_ORDER_CONF_REP_REQUEST/CUSTOMER_ORDER_CONF_REP
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS/CHARACTERSTIC_ITEM
    And from here if I add the following three I can get all the fields I need to the report
         CUSTOMER_ORDER_CONF_REP_REQUEST/CUSTOMER_ORDER_CONF_REP
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS/CHARACTERSTIC_ITEM
    Then I come to the Linking section. Here I canu2019t link anything. There is a common field called u201CInternal_IDu201D but I canu2019t link using it. So I get a message when I click Next. From here I add all the fields.
    For this point onwards only I need help. How do I group, add fields and design the layout so I can get an report output as follows.
    Date
    Order number                                   Authorized code
    Customer No
    Name
    Phone
    Fax email
    Shipping address 1                              Billing Address 1
    Shipping address 2                              Billing Address 2
    Shipping address 3                              Billing Address 3
    Shipping address 4                              Billing Address 4
    Order Line 1 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026                      LINE_NO     CUSTOMER_PART_NO          CUSTOMER_PART_DESC     SALE_UNIT_PRICE     PRICE_QTY     DISCOUNT     PRICE_TOTAL
    Characteristic details belonging to Order line 1       CHARACTERISTIC_ID 1  CHARACTERISTIC_VALUE1
                                           CHARACTERISTIC_ID 2  CHARACTERISTIC_VALUE2
                                           CHARACTERISTIC_ID 3  CHARACTERISTIC_VALUE3
    Order Line 2 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 2
    Order Line 3 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 3
    Order Line 4 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 4
    Order Line 5 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 5
    How can I achieve this kind of a layout using the give xml and xsd? Should I use grouping if so how should I do the grouping?
    I have included the full xml and xsd in the first mail I posted but I canu2019t see it now. I can include that again if you want.
    Regards,
    Chanaka

  • SAP QUERY -logical data base ADA

    I have created a SAP Query with logical data base ADA,I have selected four tables in it.Do i need to link these tables if yes..where and how?The report is for fields in asset master data.
    .But i get below error when i try to genaret the output :
    Fields from parallel tables within a line
    Line: 01
    Field: Asset description
    (ANLT-TXT50, table ANLT)
    Field: License plate no. of vehichle
    (ANLZ-KFZKZ, table ANLZ)
    i get such similar five messages but they are warning..when i execute with warning however i get the fields with description but not with Value.Ex:i get asset description and not Asset number as required.

    You don't have to link them, they ar linked that is the power of a logical data base
    To get the text in your report you need the key fields
    Like
    (Lanque Key)
    company code
    asset number
    Asset sub number
    Go to info sets and look to the standard ones like /SAPQUERY/AM01

  • Logical Data base MSM vs Material master table MARA/MARC

    Hi Experts,
    What is the different between the logical data base (LDB) and the normal SAP table, for example MSM vs MARA/MARC/MBEW table.  ? I mean we usually refer data to the normal SAP table in download or ABAP, what is the use of logical data base (exp MSM Material master) can download data or refer to MSM in ABAP??  Please help.
    Best regards,
    Eric

    A logical database provides a particular view of database tables in the R/3 System. It is always worth using logical databases if the structure of the data that you want to read corresponds to a view available through a logical database.

  • T code for logical data base

    Hi
    could pls let me know the Tcode to look for the logical data base in sap r/3
    Thanks
    P

    Hello,
    SE36
    Regards
    Saket Sharma

  • What is logical data base and how it is differfrom DDIC AND DATABASE

    HI ,
    CAN ANY BODY HELP ME TO FIND THIS

    Hi
    A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
    LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.
    Less coding s required to retrieve data compared to normal internel tables.
    Tables used LDB are in hierarchial structure.
    Mainly we used LDBs in HR Abap Programming.
    Where all tables are highly inter related so LDBs can optimize the performance there.
    Check this Document. All abt LDB's
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc
    GO THROUGH LINKS -
    http://www.sap-basis-abap.com/saptab.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
    /people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
    Re: **LDB**
    www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
    www.sap-img.com/abap/abap-interview-question.htm
    www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
    Gothru the blog which provides info on LDB's:
    /people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Logical data base

    hi experts!!
    i am working on the LDb  report and i have created a LDB zaxxx in se36 and using the same LDB to code in se38 and in attributes i have mentioned the name of LDB.
    when i code follwoing:
    GET ZAXXXX  FIELDS INVOICE_NUM CUST_NAME CUST_PO_NUM INV_DATE.
    ITS GIVING ERROR THAT ZAXXX IS NOT SPECIFIED FOR FIELD SELECTION.
    when i use only
    GET ZAXXXX  . when i debug valuse are comming but when process the report its giving no valuse.
    plz suggest me on the same..
    mahesh

    hi this may be of some help.
    A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
    LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.
    Less coding s required to retrieve data compared to normal internel tables.
    Tables used LDB are in hierarchial structure.
    Mainly we used LDBs in HR Abap Programming.
    Where all tables are highly inter related so LDBs can optimize the performance there.
    Check this Document. All abt LDB's
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc
    GO THROUGH LINKS -
    http://www.sap-basis-abap.com/saptab.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
    /people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
    Re: **LDB**
    www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
    www.sap-img.com/abap/abap-interview-question.htm
    www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
    Gothru the blog which provides info on LDB's:
    /people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
    Sample code
    TABLES: SPFLI,
    SFLIGHT,
    SBOOK,
    SCARR.
    START-OF-SELECTION.
    GET SPFLI.
    WRITE:/ ’SPFLI: ’, SPFLI-CARRID, SPFLI-CONNID,
    SPFLI-AIRPFROM, SPFLI-AIRPTO.
    GET SFLIGHT.
    WRITE:/ ’ SFLIGHT: ’, SFLIGHT-CARRID, SFLIGHT-CONNID, SFLIGHT-FLDATE.
    GET SBOOK.
    WRITE:/ ’ SBOOK: ’, SBOOK-CARRID, SBOOK-CONNID,
    SBOOK-FLDATE, SBOOK-BOOKID.
    GET SFLIGHT LATE.
    WRITE:/ ’ GET SFLIGHT LATE: ’, SFLIGHT-FLDATE.
    with regards,
    Hema SUndara.
    pls reward if helpful.

Maybe you are looking for