Ldb enhancement

Hi experts,
I have a few doubts about ldb in hr abap.can anyone explain me....
1. how can we do enhancement for an ldb.
2. how can we make ldb selection screen field as mandatary.
Thanks in advance
Sudha
Edited by: sudharaniG on Aug 23, 2011 9:49 AM

Hi Andy,
Thanks for the response....
my requierement here is to change the selection screen of the ldb.
by default we have all the filelds with no intervals option. can we change for any field as with intervals?
Thanks
Sudha

Similar Messages

  • How to Add a new fields in the selection screen of LDB.

    Hi All,
    I want to add a new fields in the selection screen of LDB & then i need to select the data for that fields.
    So could you please tell me for that where i need to add the code for selecting the data.
    Thanks
    Roli

    Hi
    welcome to SDN forum
    If you are designing your own LDB with your own tables you can define tree structure and then the selection screen for the tables
    if you wants to modify the std LDB of SAp means take the access key and to modify that code
    if you add the extra field you have to modify the where conditions in the code also
    see the doc
    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.
    Regards
    anji

  • Want to have own selection screen  in HR-ABAP report using LDB

    Hi experts,
            I am working on HR-ABAP report using LDB pnp and infotypes..But, here we get the built in selection criterion..but I want my own selection screen to be displayed..whats the solution for this??? Is it possible to create my own selection screen instead of default one..and how???
    Please help me..its very urgent..

    Hi,
    chk this out:
    Create Report Categories                                                                               
    In this step, you define the report categories and determine the layout
       of the standard selection screen for these report categories. You can 
       create report categories for programs or queries that are based on the
       PNP or PNPCE logical databases.                                                                               
    The definition of report categories is divided into two sections:                                                                               
    o   In the Change Report Category view, you define general attributes 
           such as sort order, input fields for date, and so on.                                                                               
    o   In the Change Selection Criteria view, you define which selection 
           fields of the logical database should be avaliable on the selection
           screen.                                                                               
    Example                                                                               
    You want to set up your system so that your employees can only start  
       evaluation reports for Payroll if they use a payroll area. Within a   
       payroll area, you should be able to select according to personnel     
       number. Additional selection criteria should not be possible and you  
       should not be allowed to enter a sort sequence.                       
    Standard settings                                                                               
    The standard system already contains report categories. You can find the 
    attributes of the report categories in the table.                                                                               
    Note the following five report categories in particular:                                                                               
    o   Report category ' ' is the SAP default report category for     
        programs that are based on the PNP logical database.                                                                               
    o   Report category PNPCE is the SAP default category for programs that  
        are based on the PNPCE logical database.                                                                               
    o   Report category '00000000' is the customer-specific default category 
        for programs that are based on the PNP logical database.                                                                               
    o   Report category '0PNPCE' is the customer-specific default category   
        for programs that are based on the PNPCE logical database.                                                                               
    o   Report category __X2001 is the default category for Queries  that    
        are based on an InfoSet of the PNP LDB.                                                                               
    o   Report category QUEPNPCE is the default category for queries that    
        are based on an InfoSet of the PNPCE LDB.                                                                               
    The default report categories are used when a report is called if    
        the report has not been assigned a report category.                  
    Parameters and Options for Report Categories of the LDB PNP and PNPCE  
    Parameters and Options in Screen Area General Data                     
       If you activate this parameter, you can only enter data on the data
       selection period if you use reports that have been assigned. The   
       same date entries are then used for the person selection as for the
       date selection.                                                                               
    o   Matchcode allowed                                                  
       If you activate this parameter, you have use of a Matchcode        
       pushbutton (search help) if you use reports that have been assigned.
       This pushbutton enables you to perform the person selection.                                                                               
    o   Sort allowed                                                       
       If you activate this parameter, you have use of a Sort pushbutton if
       you use report that have been assigned. This pushbutton enables you
       to define a sort order before you execute the report.                                                                               
    o   Organizational structure allowed                                   
       If you activate this parameter, you have use of an Org.Structure   
       pushbutton if you use reports that have been assigned. This        
       pushbutton enables you to perform the person selection.            
       Note:                                                              
       For more information about these options, see the online           
       documentation under this path:                                     
       SAP Library -> Human Resources -> Reporting in Human Resources     
       Management -> Standard HR Reports -> Report Selection Screen in    
       Human Resources Management.                                                                               
    Parameters and Options in Screen Areas Data Selection Period/Person    
    Selection Period/Payroll Area/Period/Year                                                                               
    o   Options for data selection period and person selection period (key 
        date and so on)                                                    
        Here you define which options for date and person selection are    
        available for reports that have been assigned.                                                                               
    o   Options for payroll area/period/year                               
        Here you define which options for selection using payroll          
        area/period/year are available for reports that have been assigned.                                                                               
    Parameters and Options in Screen Area Selection View                                                                               
    o   Type/Name                                                          
        This parameter enables you to use selection views to define report 
        categories. You use the selection view selected here to determine  
        which fields are available in the Dynamic Selectionsy.                                                                               
    Note:                                                              
        You create selection views for the PNP and PNPCE logical databases 
        in the Object Navigator (SE80):                                    
        1. Start the Object Navigator (SE80)                               
        2. Choose Workbench -> Edit Object.                                
        3. Choose the More... tab page and the Selection view on this tab  
        page.                                                              
        4. Choose Create.                                                  
        5. In the Create Selection View dialog box, choose the For any     
        tables option.                                                     
        6. In the Name of view field, enter a name for your selection view.
        7. In the Tables dialog box, enter the name of the table from which
        you want to use fields.                                            
        Note:                                                              
        When you enter the table name, observe the naming convention in    
        Personnel Administration:                                          
        Infotype number: nnnn -> table name: PAnnnn                        
        8. Choose Continue.                                                
        9. In the Functional groups area, define functional groups by      
        assigning a name and a number.                                     
        10. Assign fields from the selected tables to the functional groups
        by entering the number of the desired functional group in front of 
        each field.                                                        
        11. Save your entries.                                                                               
    For more information about adjusting the dynamic selections using 
    your own selection views, see the online documentation under the  
    following menu path:                                              
    SAP Library -> Human Resources -> Reporting in Human Resources    
    Management -> HR Standard Reports -> Report Selection Screen in   
    Human Resources Management -> Enhancing the Selection Screen -    
    Dynamic Selections.                                                                               
    If you do not want to offer dynamic selections, make the following
    settings:                                                                               
    -   LDB PNP: In the Selection view field, enter PNP_NO_FREE_SEL.  
    -   LDB PNPCE: Leave the Selection view field empty.                                                                               
    Parameters and Options in Screen Area Data Selection Period/Person   
    Selection Period/Payroll Area/Period/Year                                                                               
    o   Available input parameters, date or period entry (today, key date,
       all, and so on), and standard value.                             
       Using the Standard value option, you define which of the selected
       options is shown.                                                                               
    Parameters and Options in Screen Area CE Selection Fields                                                                               
    o   CE selection fields (external person ID, grouping reason, grouping
       value)                                                           
       Using the options in this area, you define whether the external  
       person Id, grouping reason, or grouping value are available on the
       selection screen.                                                
       Note:                                                            
       These parameters are only relevant for you if you implement      
       Concurrent Employment (see also note 517071).                                                                               
    Parameters and Options in Screen Area Selection view                                                                               
    o   Dynamic selections as dialog box                                  
        If this switch is set, you can call the dynamic selections as a   
        dialog box.                                                                               
    o   Dynamic selections active                                         
        If this switch is set, the dynamic selections of the logical      
        database are active at the start of the report.                                                                               
    Note that the following combinations are possible for the last two
        options mentioned:                                                                               
    Dyn.Sel. as dialog box/Dyn.Sel. active: inactive/inactive         
        Dyn.Sel. as dialog box/Dyn.Sel. active: inactive/active           
        Dyn.Sel. as dialog box/Dyn.Sel. active: active/inactive                                                                               
    Activities                                                                               
    1.  Choose Edit -> New entries.                                                                               
    2.  Enter an abbreviation and a long text for the report category.         
        The customer name range for report categories is 0-9.                                                                               
    3.  Select the For the PNPCE logical database checkbox, if you want to     
        create a report category for a program or for queries of the PNPCE     
        logical database.                                                                               
    4.  In the General Data screen area, choose the desired options.           
        If you want to use selection IDs, you must have first created and      
        grouped selection Ids. The IMG path to do this is given in the         
        parameter description section.                                                                               
    5.  In the Data selection period/person selection period or Selection      
        period screen area, choose the desired options.                                                                               
    6.  In the Selection view screen area, choose the desired options.                                                                               
    7.  In the CE selection fields screen area, choose the desired (only       
        possible for report categories of the LDB PNPCE).                                                                               
    8.  Save your entries.                                                                               
    9.  Choose the subactivity Permitted selection criteria.                                                                               
    10. Choose Edit -> New entries.                                                                               
    11. In the Select option field, use the input help to select each field    
        that should be available on the selection screen.                                                                               
    12. Select the checkbox in the 1.page column, if you want this selection   
        field to be available directly when you call the selection screen.                                                                               
    Further notes                                                                               
    13. If you want to copy entries, you still have to enter the selection     
        parameters again in the subsequent screen.                                                                               
    o   If you create the report category '000000000', a selection screen is   
        generated according to report category '00000000'for all reports for   
        which a report category has not explicitly been assigned.                                                                               
    Assign Report Categories                                                                               
    In this step, you assign a report category to your reports.                                                                               
    Example                                                                               
    You have created your own report, for example ZPCTEST1, and would like
        it to have the selection screen that corresponds to that of the       
        evaluation report for Payroll, which is assigned to report category   
        '__M00001'.                                                           
        Assign report category '__M00001' to the report.                                                                               
    Requirements                                                                               
    You must have defined the Report Categories.                                                                               
    Standard settings                                                                               
    SAP Standard Reports:                                                                               
    In the standard system, reports are assigned a report category. If you
        want to override these assignments, perform the activities described  
        here. If you want to assign report categories to standard reports using
        SE38, this represents a modification.                                                                               
    Customer-Specific Reports:                                                                               
    For reports you have developed yourself, you can either assign report 
        categories by performing the activities described here or directly in SE38.
    Recommendation                                                                               
    Only assign a report category if you have created your own reports or if  
    the selection screens in the standard system do not meet your             
    requirements.                                                                               
    Activities                                                                               
    1.  Choose Edit -> New entries.                                                                               
    2.  Perform the required assignment using the Program name and Report     
       category fields.                                                                               
    3.  Save your entries.                   
    reward if helpful
    regards,
    madhumitha

  • Doubt s in ABAP HR -Enhancements

    Hi Experts,
            I am working in enhancements, I have  some doughtes in that ,so plz do help to me,
    ””””My enhancement is,
    Whenever we enter data such as Emp Firstname, emp.lastname,empdate of birth, in ‘pb10’  this data should check in PAP database tables and if he is previous employer of the that company it should give his ‘Emp.id’.
    And also it should check ‘how many months back he worked in this company ‘ if that period is less than r equal to 3monthes’
    We have to send the message that he is not eligible for attending interview. if that is greater than 3 months he is eligible for attending interview.
    For this I am trying in ‘cmod’ transaction code in EXIT of ‘pbs0001’.
    CLASS CL_HR_PNNNN_TYPE_CAST DEFINITION LOAD.
    CASE INNNN-INFTY.
    WHEN '4000'.
    data : p0002 like p0002.
    data : p4000 like p4000.
    call method CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
    EXPORTING
    PRELP = INNNN
    IMPORTING
    INNNN = p0002.
    if ( IPSYST-IOPER = 'INS' OR IPSYST-IOPER = 'MOD' )
    **and sy-ucomm = 'UPD' .
    CLEAR SY-UCOMM.
    ENDIF.
    BUT WHENEVER I SEE IN DEDUGGING MODE ,I am not getting any  data in that mode ,
    Where I am doing mistake I am not getting so plz do help on this.
    Thank you very much,
    Krishna.

    Hi,
    I am not sure of the exact solution, but think that the problem may be because of the LDB's. Applicant database uses PAP LDB whereas employee database uses PNP LDB. May be after picking up the data from applicant database you can do a select on PA0002 table on the fields first name, last name and date of birth to check whether the employee worked in the company earlier or not. Just check if this helps.
    Regards,
    Jaisish

  • SAP HR Reporting  - LDB

    Hi all,
    I just wanted to check what is the best practise(based on personal expereince) of what to use when ti comes to HR reporting?
    1) Do we use logicial database
    2) USe regular ABAP to perform HR reproting
    I think logical database retrieves all the data of an employee when processing (READ PERNR) and hence decreases of the performance. Any ideas and thoughts here?
    regards

    LDB
    1.easy-to-use selection screens.
    2.we can modify the pre-generated selection screen to our needs using reportning category .
    3. Have  check functions to check whether user input is complete and correct
    4. Reasonable data selections.
    5. 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.
    Where all tables are highly inter related so LDBs can optimize the performance there.
    I think LDB is fine to use  but  mainly it depends on your requirement!!!

  • Adding new table dynamic selection screen of transaction FBL5N (LDB DDF).

    Hi,
    I have a requirement to add SEGMENT (CEPC-SEGMENT) field on the dynamic selection screen of transaction FBL5N (LDB DDF).
    Please let me know how can I meet this requirement
    Thanks

    I did not find any screen exits for this Tcode, may be you need to use enhancement spots.

  • Setting LDB selection screen

    Hi,
    I use report RFDOPR10 which i copied into ZRFDOPR10 . This report uses
    a LDB DDF. In the new report i need to set some values in the selection-screen such as DD_UMSKZ but can't catch up the screen field name.
    Is there a way to solve it?
    Thanks

    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.

  • LDB..

    Hii All,
    Any one pls send me some interview ques on LDBs??
    Regards,
    Kavitha

    Hi Kavitha,
    pls find here some general ques for interview,
    1.     Preparation of the data records by the L.D.B and reading of the data records in the actual report are accomplished with the command pair Put and Get.
    2.     The three main elements of LDB are Structure, Selections, and Database Program.
    3.     In LDB what determines hierarchy of the tables?
    Structure.
    4.     In general what are the two ways in which one can retrieve data from tables?
    Using Select statements, Database Program.
    5.     With LDB one can modify the pre-generated selection screen to their needs (T/F).
    Yes.
    6.     Logical databases are programs that read data from Database tables (Dictionary Structures).
    7.     The event Get<table name> LATE process all tables that are hierarchically superior to the <table name>. (True/False)
    False.  It processes all tables that are hierarchically inferior to the <table name>.
    8. The Database Program of LDB is a collection of SUBROUTINES, which selects data and passes it to the report.
    9.     The layout of the Database program is determined by both Structure and Selections.
    10.      The order in which data is made available to the report depends on Structure of the LDB.
    11.     Apart from the structure and selections of the LDB the GET statements in the report determines the behavior of the database at runtime.
    12.     Node at the highest level in the structure is known as Root.
    13.     There can be more than one node at the highest level in the structure. (T/F)
    False.  One can define only one node at the highest level in the structure on LDB.
    14.     All nodes in the structure of LDB need not be defined in the ABAP/4 Dictionary (T/F).
    False.  One has to define all nodes in the Dictionary or one has to select all nodes that are defined in the Dictionary.
    15.     It is not possible to use ABAP/4 Dictionary Structures without an underlying database using LDB. (T/F)
    True.  One can use additionally related tables, along with the tables defined in the structure of LDB.
    16.     Dynamic selections allow the user to define further selections for database access in addition to the selection criteria already defined in the LDB selections.
    17.     Check statement can be used along with the event GET in the report for checking the selections, which are not table-specific values.
    18.     In sense of Database Management System (DBMS) LOGICAL DATABASE is a database Structure. (T/F).
    False.
    19.     It is not necessary to maintain the Parent-Child relationship between the tables in Logical Database Structure. (T/F)
    False.  One has to maintain the Parent-Child relationship.
    20.     Is it possible to extract data from tables without using the event ‘GET’ in the report with an appropriate LDB. (T/F).
    False.  One can extract data from tables using Select statements in a report, though the report is having a LDB attribute.
    21.     What sorts of tables one can se in designing the hierarchy of a LDB?
    Tables, which are having Foreign Key relations.
    22.     A report program, which uses only SELECT statements, is called SQL Report.
    23.     One cannot use SELECT statements in a report program linked to a Logical Database (T/F).  False.
    24.     Is it true that the Logical Database reads the data from the database tables using Select Statements (T/F).
    Yes. We are coding that in Database part of LDB.
    25.     In a report with an LDB attribute, you do not have to define how the information should be retrieved from the database tables, but only how the data should be represented on the screen. (T/F).
    True.
    26.     One can use the event GET in a report without LDB attribute. (T/F).
    False.
    27.     The last character of the LDB name denotes Application.
    28.     The structure of Logical Databases reflects the Foreign Key dependencies of hierarchical tables in the SAP system.
    29.     It is mandatory that for each table in the LDB hierarchy there should exist one GET statement in the report. (T/F).
    False.  It is not necessary.
    30.     What happens if a report does not contain a GET statement for a particular node of a Logical Database.
    Process will transfer to the next event.
    31.     In a Logical Database, one can define input fields on the selection screen with Select-Options and Parameters statements.
    32.     Suppose a logical database program contains the following lines:
    SELECT-OPTIONS CONNID FOR SPFLI-CONNID.
    PARAMETERS CARRID LIKE SFLIGHT-CARRID FOR TABLE SFLIGHT.
    What will be the output, for the above two statements?
    Only select-options connid for spfli-carrid will be displayed on the screen.
    33.     Consider a report with F1S attribute, what will be the output for the following code.  Whether you will get the data from spfli and sflight or not, with corresponding tables statement,
         GET SPFLI.
         GET SFLIGHT.
         Write:/ spfli-carrid, spfli-connid, sflight-fldate, sbook-bookid.
         Yes, you will get the data from spfli and sflight.
    34.     Consider a report with F1S attribute, what will be the output of the following code.  Whether you will get the data from sbook or not, with corresponding tables statement.
    GET SPFLI.
    GET SFLIGHT.
    Write:/ spfli-carrid, spfli-connid, sflight-fldate, sbook-bookid.
    You cannot extract data from sbook.
    35.     Identify any errors in the following code and correct the same, and what will be the output.  If there exists corresponding tables statement, for spfli, sflight, sbook.
    GET SPFLI.
    GET SBOOK.
    Write:/ spfli-carrid, spfli-connid, sflight-fldate, sbook-bookid, sbook-class.
    No syntax errors.  You will get data from all the three tables.
    36.     Does the following two statements do the same task?  If so which one takes less time and which one is recommended.
         Select * from spfli where spfli-carrid = ‘LH’ and spfli-connid = ‘400’.
         Endselect.
         Select * from spfli. Check: spfli-carrid = ‘LH’ and spflid-connid = ‘400’.
         Endselect.
        -Yes they will do the same task.  Second Select statement takes less time and is recommended.
    37.     If you want to improve the response time (time to access data) Logical Databases permits you to achieve this using VIEWS.
    38.     Is there any upper limit (max) to the possible number of nodes in a logical database structure? If so what is the limit?
    Yes, there is an upper limit for defining number of nodes in a Logical Database Structure.
    Maximum nodes = 1200 / length where length = max. Length of name in the structure.
    39.     In the structure of Logical Database nodes at different levels are displayed in the same columns. (T/F) If false what types of nodes are displayed in the same columns. If true what type of nodes are not displayed in the same columns.
    False.  Nodes at same levels are displayed in the same columns.
    40.     What are the advantages of Logical Databases?
    It 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.
    41.     Though all the ABAP/4 Dictionary Structures that exists in the structure of the LDB, being defined in Database Program, we are defining the Dictionary Structures in the Report.  What is the reason for such declaration?
    By declaring so we are providing work areas for data passing between Logical Database and Report.  In addition, the logical database configures the selection screen depending on the selection of database tables.
    42.     Is it mandatory to declare all the tables in Report by the key word tables for all the tables that exist in the structure of LDB, and are being defined in the Database part of LDB.
    No, It is not mandatory to declare all tables in report.
    <b>
    Rewards points if useful</b>
    rgrds
    shazia

  • SLOW LDB Problem

    The program Ive been given to 'enhance' uses a logical database. I tried to argue that a 40 min response time was reasonable but they are not buying it. (we have to try right?)
    Nearly 98% of the time used by this program is in database access.
    I followed the generated code though using debug and there are areas that can be improved. But this is all SAP generated code of course.
    Does anyone have any pointers on how I can 'copy and change' or even rebuild an LDB?

    why would you rebuild the LDB? There are other things you can do first.
    Since you debugged the program already you know what tables are
    accessed...
    and possible keys (structure). Now I would investigate whether there are
    any issues
    with the table in the DB (e.g. ORACLE statistics out-of-date/wrong). Any
    issues with
    related buffers...
    Then, knowing the keys and their structure check whether it is necessary
    to create indexes
    on the table(s) to allow faster access....
    Then there are "hints" that could be set to allow ORACLE access tables
    in a specific way...
    I would look deeper into those possibilities than trying to rebuild a
    LDB....
    regards,
    satish.

  • Search help for Asset Class in LDB ADA

    Hi,
    I have a requirement to restrict values in certain search help.
    It is Z transaction for Z SAP Query which has logical database ADA under itself.
    The field which search help I should restrict is Asset Class.
    As I found in LDB ADA, it is select option SO_ANLKL with type ANLAV-ANLKL. It leads me to search help SH_ANLKA which is defined for domain ANLKL.
    But actually, another search help is called. It looks like SH_ANKA, but I don't know if it is right one.
    I have two problems:
    1. How to identify what search help is called?
    2. How to restrict values in search help or maybe how to attach Z search help in this case (should I attach in query or is there a way to enhance LDB)?
    As I am new both to SAP Query and LDB's I am not sure where to start.
    Tnx in advance,
    Natasa

    Solved.
    For those who face the same problem, here is the solution.
    LDB ADA creates basic search help for select options Asset Class by reading ANKA-ANLKL and ANKT-TXK20.
    Output list can be restricted by adding an enhancement at the end of FM DD_SHLP_GET_HELPVALUES and changing the internal table OUTPUT_VALUES.
    If necessary, it can be conditioned by TCODE and for this purpose parameter can be set in the enhancement of FM DD_SHLP_CALL_FROM_DYNP by reading content of the field HELP_INFOS-TCODE.
    Regards,
    Natasa

  • Enhancement on transaction IW32, minimising the standard functionality

    Hello Guys,
    I have a requirement in which I need to go to IW32 with a Order number, then we need to press enter and then click on button "WC Application". Here one pop up comes which says "List contains no data", then we click on button create. There Program (subscreen) SAPLWCFA, screen number 8300 will open, then click on "Operational WCD's", here again the pop up comes which says "List contains no data. Again click on Create button , now Program (subscreen) SAPLWCFY, screen number 8300 will open.
    Here I have a requirement, say we went to IW32 with the order and clicked on "WC Application", enhancement will check if there is no data in the list then it needs to go directly the last screen i.e. Program (subscreen) SAPLWCFY, screen number 8300, where user will enter data manually.
    I tried to find the exits/Badi's but didn't found anything interesting which will work with this requirement.
    I would appreciate if you please try it if its working, and if yes then with which exit/Badi.
    Thanks,
    Harjeet

    Hi ,
    there is a way to do it:
    Go to SE11 and watch the structure  <QALS_D01>. You can add fields to this structure, which are in the Inspedction Lot Table <QALS> (which you have to enhance as well, Append <CI_QALS> ) . Now go back to QA32, start a selection and go to "Change Layout..." . Here you will find the new field.
    For Sure, this field must be filled and has to be in the table <QALS> .
    To fill fields you can use the Exit  <QPL10004>
    If you need a new field for Selection screen, you have to modify the LDB <PGQ> .
    Greez Hanno

  • What is the main diff b/n ldb pnp and pnpce?

    hi ,
    what is the main diff b/n ldb pnp and pnpce?
    thanks.

    Hi Arun,
      PNP/PNPCE  - Both are Logical Databases for PA Module
    In PNPCE - CE stands for Concurrent Employment.
    The differnces are:
    The PNPCE logical database supports the evaluation of HR master data. It includes the functions of the PNP logical database and offers additional evaluation options. Therefore, you should use the PNPCE logical database instead of the PNP logical database for all new developments.
    The enhanced functionality of PNPCE in comparison to PNP essentially concerns the evaluation of Concurrent Employment, that is the possibility to group evaluate several assignments/personnel numbers of a person. The new events 'GET PERSON' and 'GET GROUP' as well as an enhanced syntax for the INFOTYPES statement (addition AS PERSON TABLE) for the procurement of infotype data enable you to use the new functionality. The use of these new functions is optional. You can run a PNPCE report that does not use the new events and the addition for the INFOTYPES statement in a PNP-compatible session. Since the PNPCE also has an improved selection screen, each report benefits from this even if the report does not use the functions for evaluating Concurrent Employment.
    Hope this helps you.
    Regards,
    Chandra Sekhar

  • Change of LDB from PNP to PNPCE

    HI All,
       I have a HR program where LDB PNP is used. Now I need to change the LDB from PNP to PNPCE. Can any one please tell me what are the mandatory change I need to do in the program after changing the LDB.
    Thanks & Regards,
    Arnab

    Hi,
    Purpose
    The PNPCE logical database supports the evaluation of HR master data. It includes the functions of the PNP logical database and offers additional evaluation options. Therefore, you should use the PNPCE logical database instead of the PNP logical database for all new developments.
    The enhanced functionality of PNPCE in comparison to PNP essentially concerns the evaluation of Concurrent Employment, that is the possibility to group evaluate several assignments/personnel numbers of a person. The new events 'GET PERSON' and 'GET GROUP' as well as an enhanced syntax for the INFOTYPES statement (addition AS PERSON TABLE) for the procurement of infotype data enable you to use the new functionality. The use of these new functions is optional. You can run a PNPCE report that does not use the new events and the addition for the INFOTYPES statement in a PNP-compatible session. Since the PNPCE also has an improved selection screen, each report benefits from this even if the report does not use the functions for evaluating Concurrent Employment.
    Prerequisites
    A report that wants to use the PNPCE must enter this in its report attributes under Logical database.
    In addition, the PERNR structure must be declared in the report using the 'TABLES PERNR' statement. You can only use the PERNR structure again in certain circumstances. The use of the 'GET PERNR' event is therefore forbidden. Instead, use the 'GET PERAS' event. Except for the PERNR-PERNR component, all other components of the PERNR structure are no longer filled and have initial values. This kind of programming (with the exception of PERNR-PERNR) therefore not permitted.
    In addition to the 'GET PERAS' event, you can also use the GET PERSON' and 'GET GROUP' events. To be able to use these events, you must declare them using the NODES statement (NODES PERSON', 'NODES GROUP', or. NODES PERAS').
    Explanation of Terms
    If the 'GET PERSON' and 'GET GROUP events and the 'AS PERSON TABLE' addition for the INFOTYPES statement are not used, the report indicates that it does not require the functionality for evaluating Concurrent Employment. In this case, the report runs in a PNP-compatible session. This is referred to as PNP mode in the following documentation. On the other hand, if the report uses the functionality for evaluating Concurrent Employment we refer to CE mode.
    Features
    Process of an Evaluation
    The PNPCE selection screen offers you as standard a range of functions that you can use to restrict the personnel number and person selection. These are discussed in more detail in the following sections. The process is initially as follows regardless of whether the report runs in CE or PNP mode. All available functions and selection conditions leads to the selection of personnel numbers. If you use the sorting function, this set of personnel numbers is then sorted according to the sort criteria you selected. In PNP mode, the GET PERAS event is triggered as a result for each personnel number.
    In CE mode, the persons belonging to the personnel numbers are determined first for all personnel numbers selected. The GET PERSON event is then triggered for each person. The person ID is specified in the OBJID component of the PERSON structure. PERNR_NUM contains the total number of personnel assignments (= personnel numbers) that this person has and the ALL_PERNRS table, which contains a list of these personnel numbers regardless of whether they were actually selected or not. The SELECTED flag is set to X for the personnel numbers selected. The flag is initial for all personnel numbers that are not selected. The PROCESS flag specifies whether the personnel number should be processed in the rest of the process. This flag is set to X by default for the personnel numbers selected. However, the report can set or delete this flag at the GET PERSON event for all personnel numbers. In this way, report and logical database communicate with each other which enables the report to control the rest of the process.
    In the next step, the logical database groups all personnel numbers of a person that are to be processed (that is, all personnel numbers that have the PROCESS flag set). The report can control the type of grouping using the PNPCE_GROUPING_FROM_PAYROLL flag (normal or payroll grouping) and using the PNPGPRSN (grouping reason) and PNPGPVAL (grouping value) parameters of the selection screen. The GET GROUP event is triggered for each group of personnel numbers determined. The GROUPING_REASON and GROUPING_VALUE components contain the grouping reason and grouping value of this group. The number of personnel numbers that belong to this group and that are processed subsequently is in PERNR_NUM. The included ALL_PERNR table contains a list of these personnel numbers with additional information. The SELECTED flag specifies whether the current personnel number was originally selected (flag is set) or was marked by the report as to be processed. GROUPING_BEGDA and GROUPING_ENDDA contain the validity period that the personnel number has for this grouping. The NO_AUTHORITY flag is set if there is insufficient authorization for a personnel number. This personnel number is not processed further. The SORT component defines a standard sort order for the personnel numbers of a group. The report can change this by overwriting the values. In this way, report and logical database communicate with each other, which controls the further processing sequence of the personnel numbers.
    The GET PERAS event is then triggered for all personnel numbers of the group (with the exception of the personnel numbers for which no authorization exists) in the sequence defined by the SORT component (see above). The SELECTED, GROUPING_BEGDA, and GROUPING_ENDDA components have the same meaning here as with the GET GROUP event. The PROCESSED_BEFORE flag specifies whether the personnel number has already been processed once before (it is possible that the personnel number belongs to several groupings and has been therefore been processed several times).
    Thanks and Regards
    Ravi

  • Can any one plz send me a screenshots of LDB

    Can any one plz send me a screenshots of LDB

    Hi
    Goto SE36 Tcode and press f4 and see the related LDB and its components like Selections, Structures, Database program etc
    see the doc
    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

  • LDB REPORT

    HI FRIENDS
    I NEED A HELP REGARDING LDB THAT I WANT TO USE IN MY REPORT FOR PERFORMANCE ENHANCEMENT . CAN YOU PLEASE SEND ME A REPORT THAT HAVE USED LDB .ACTUALLY I HAVE NEVER USED LDB .
    THANKS IN ADVANCE

    Hai manish,
    Here is an LDB program....
    TABLES SPFLI.
    SELECT-OPTIONS S_CARR FOR SPFLI-CARRID.
    TYPE-POOLS: RSDS, RSFS.
    DATA: CALLBACK TYPE TABLE OF LDBCB,
          CALLBACK_WA LIKE LINE OF CALLBACK.
    DATA: SELTAB TYPE TABLE OF RSPARAMS,
          SELTAB_WA LIKE LINE OF SELTAB.
    DATA: TEXPR TYPE RSDS_TEXPR,
          FSEL  TYPE RSFS_FIELDS.
    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                     = ' '
              EXPRESSIONS                 = TEXPR
              FIELD_SELECTION             = FSEL
         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.
    The program is written to read data using the logical database F1S. The structure of F1S is:
    A program-specific selection screen is defined at the beginning of the program. This requires the TABLES statement. Next, the required variables are defined for the interface.
    The internal table CALLBACK is filled so that various callback routines are called in the program for the two nodes SPFLI and SFLIGHT. For SPFLI, the routine is to be called for GET and GET_LATE, for SFLIGHT, only at the GET event.
    The internal table SELTAB is filled with values for the node SPFLI from the selection table S_CARR from the program-specific selection screen.
    The program then calls the function module LDB_PROCESS with these parameters.
    The subroutines CALLBACK_SPFLI and CALLBACK_SFLIGHT serve as callback routines. The interface parameter WA is fully typed, so you can address the individual components of the work areas. The events GET and GET LATE are handled differently in CALLBACK_SPFLI.
    This link may help you...........
    http://help.sap.com/saphelp_nw04/helpdata/en/64/237f8cd43711d1950b0000e8353423/frameset.htm
    Regards,
    Srikanth.
    Reward points if at all it is useful.

Maybe you are looking for

  • Issue in the report after bookmarking it

    Hi Experts, We have WAD reports built on 3.X Query Designer. The issue here is: The filter values are getting deleted after bookmarking in a report. For Ex: There are 10 employees displaying in a report and I have filtered 2 employees (using employee

  • List of material by material type

    hi experts, i need to take a report in excel for the materials based on there material type for a plant. In mm60 i tried it not coming excl. is there any table regards arun

  • How to set default .PDF file extension for Form Downloads

    I am trying to find a way of setting the PDF file extension when I download forms. I author the forms under a Plus subscription and am then downloading the forms under a basic subscription Collaborator account (diffrent person) If I don't include .pd

  • Doc. type/item cat.not picking from Purchase Requisition

    Hi, While making purchase order from link with Purchase Requisition, system provides the error message :-      Doc. type/item cat. ZSUP/ (requisition) <-> ZSUP/ (purch. order)      Message no. 06054      Diagnosis      Purchase requisitions of docume

  • Problem in Transporting ZTABLE and SCRIPT

    Hi Experts, <b>  I am an ABAP Developer. We have developed a Custom Script ZSCRIPT which fetches data from a ZTABLE. The problem here is when I am trying to transport the Objects from Development Server to Quality the ZTABLE and ZSCRIPT are not getti