Logical Database Access in FM???

Hi All,
I'm trying to use LDB PNP in function module with out any selection screen.
I do use 'pernr' screen to use pnp ldb. Now i've to write a fm to download employee information using rfc with same parameters that i provide to pernr sellection screen.
Please help me, how can i do this... I've seen many threads very similar to this. but wasn't helpful.

Oh God, this is again not usefull... If i run this FM in se37, it returns a long string of available data for all infoty (I checked only 0001 and 0002).
and the way you told returns the following.
                                                                                MAN PERNR    SUBT OB S ENDDA      BEGDA      SEQ AEDTM      UNAME        H I R O IT PR F F F F RE RE GRPV BUKR WERK P PE VDSK1          GSBE                                                                               
200 00143000 1         23.91. 999 90.80.1200 100 10.81.0200 7AMEER                                         THA L200 0 10 42100           210
is there any option to attachment excel file. I'm not able to paiste the output...
anyways the data is split or mixed up among fields. I saw that the last letter of each column is concatenate with the next column.
please find it.. I need many information to download on reqular(incremental) basis from production server...

Similar Messages

  • Logical database access in abap HR

    Dear all,
                 i am working on HR Master Report. is there any way to access logical database PNP without standard input screen.
    means due to requirement my input screen is totally different so i don't want to use standard input screen. but i want to access
    pernr table by get pernr or other functioality of PNP logical database.
    any valuable suggesstion will be much apprecaited.
    Thanks and Regards
    vijay dwivedi

    Yes, there is, by means of FM [LDB_PROCESS|http://help.sap.com/saphelp_47x200/helpdata/en/64/237f8cd43711d1950b0000e8353423/frameset.htm]
    Regards
    Marcin

  • Logical database vs direct access of database table

    Hi
    I have created a FI report.    I am trying to get data from large FI tables like BSAK, BSEG, BKPF, RSEG.  eventhough there are 10 records as per my criteria, system is taking morethan an hour time even in background processing.  This may be becaz of lot of conditions that I am applying to filter the data.  But still trying to improve the performance
    For fetching data which is the better way for getting optimum performance of the report.
    a) directly fetching data from database tables
    b) using logical database collecting data into an itab
    regards,
    mallik

    Hi,
    If you are accessing the database tables more than once with different criteria then definetly it will take more time. In such case write only one Select statement on the table and get all the required data into an internal table and then process this internal table as per your logic.
    Use of LDBs is definetly faster but filter conditions might not match with your filter conditions. In such case direct access of database table is preferable but as i said in above paragraph.
    thanks,
    sksingh

  • MRP Area tables for MD06 information access like SQ01, DBM logical database

    We currently use SQ01 DBM logical database to access MD06 information (tables MDKP and MDTB).  The MRP results from the MRP Area are not showing in this query. This implies that the MRP area, MRP results are stored in other tables.
    I have reviewed tables (MDLV, MDMA, MDLG, DVER, MDIP) from a similiar thread.  However, they do not contain the MRP data (planned orders, stock, production orders ect) like in the DBM logical database.   This data access is very powerfull for exporting planning data for more robust analysis.
    Any help is much appreciated.
    Thank you

    Hi,
           Please try FM: 'AUFBAUEN_MDPSX_ANZEIGEN'.
        MD06 dame come many table.
    Example:
    (Plant level)
      icm61w-fabkl  =  wk_fabkl.                  :Factory calender
      imt61d-matnr  =  p_matnr.                    : Materials
      imt61d-werks  =  it_tbl-werks.            : Plant
    AUFBAUEN_MDPSX_ANZEIGEN 呼出
      CALL FUNCTION 'AUFBAUEN_MDPSX_ANZEIGEN'
        EXPORTING
          ecm61w      =  icm61w
          ecm61x      =  icm61x
          emt61d      =  imt61d
          et399d      =  it399d
          ECM61B      =
          ESFILT      =
        IMPORTING
          icm61m      =  wa_e_cm61m
          imdkp       =  wa_e_mdkp
          imdsta      =  wa_e_mdsta
        TABLES
          mdpsx       =  it_mdps
    regards,
       Gaito

  • Access data on multi-logical database with ad hoc query

    Dear all,
    I would like to know if it is possible to access data in multi-logical database with ad hoc query.
    I recall that I read some document stated that you can access data in multi-logical database with PNP as base.
    But I find no document about how to set it up, any comment?
    Regards
    Bill

    Hi Bill...
    PNP can be accessible..............
    PNP  0000-0999, 2000 to 2999 HR Master Data & Time 
    PCH.... I don't think so....
    Experts please do reply on this please...................
    Vijay
    Edited by: Vijay Shankar on Sep 13, 2011 11:32 AM

  • Logical  Database CRMLDB_ACT_MON access

    Can somebody please tell me How do i find out the underlying table name of the REPORT_LIST Node of the  logical  database  CRMLDB_ACT_MON
    Please reply

    someone please reply

  • Logical Database in Abap Objects

    Hi to All
    I want do it a program report using a Logical Database.
    Is this possible ??? But when I make a GET <node>, occurs the following error:
             "" Statement "ENDMETHOD" missing.  ""
    I'm doing the following:
    CLASS MONFIN IMPLEMENTATION.
           METHOD TRAER_DATOS.
                   GET VBRK.
           ENDMETHOD.
    ENDCLASS.
    Please, somebody tell me how I use the logical database in Abap Objects.
    Thank you very much
    Regards
    Dario R.

    Hi there
    Logical databases whilst of "some use" are not really part of OO.
    If you want to use a logical database in an abap OO program I would create a special class which just does the get data from your DB and pass this either at record or table level.
    Techniques such as GET XXXX LATE aren't really part of any OO type of application since at Object Instantiation time you should be able to access ALL the attributes of that object.
    As far as OO is concerned Logical databases are a throwback to "Dinosaur Technology".
    Since however modules such as SD and FI are still heavily reliant on relational structures (i.e linked tables etc)  then there is still some limited life in this stuff but for OO try and solve it by another method.
    If you really must use this stuff in OO then do it via a FMOD call and save the data in a table which your method will pass back to your application program.
    You can't issue a GET command directly in a method.
    Cheers
    Jimbo

  • LOGICAL DATABASE IN HR ABAP PRPGRAMMING

    Hi Friends,
    what is use of LOGICAL DATABASE IN HR ABAP PROGRAMMING
    AND END-OF-SELECTION EVENT IN HR PROGRAMMING PROGRAMMING???
    regards,
    vijay.

    hi
    HR Logical Databases
    In Human Resources (HR), the following logical databases can be used as a data source for HR InfoSets:
    PNP (PNPCE)
    PAP
    PCH
    By selecting a logical database, you determine the HR data that can be reported on using an InfoSet.
    Logical Database PCH
    This logical database generally enables you to report on all HR infotypes. However, you are advised not to use this logical database unless you want to report on Personnel Planning data.
    Logical Database PNP (or PNPCE)
    Use logical database PNP to report on HR master data. It is possible to use logical database PCH to access this data, but PNP meets such reporting requirements more quickly because it is best suited to the task of selecting persons.
    Logical database PNP enables you to access HR master data and infotypes from Personnel Planning. For example, you have the following options:
    Reporting on the costs, number of attendees booked, and instructor for a business event on which an employee is booked
    Reporting on working time and planned compensation for a position that an employee occupies
    Reporting on the validity and proficiency of a qualification that an employee fulfils
    From a technical perspective, this means you can use PNP to report on all of the infotypes that exist for objects (infotype 1000) that have a direct relationship (infotype 1001) with the Person object.
    The ability to access infotypes from Personnel Planning using logical database PNP is a special feature that you can only use in the context of SAP Query and Ad Hoc Query. You cannot use this functionality for ABAP reports you programmed yourself.
    You can also use logical database PNP to report on data from Personnel Time Management (infotypes 2000 to 2999) and Payroll (special payroll infotypes for the USA and customer infotypes; for more information, access Customizing for the Human Resources Information System and see Payroll Results).
    Logical Database PAP
    Logical database PAP enables you to access data from Recruitment.
    regards
    navjot
    reward if helpfull

  • Logical Database and Logical Thing

    Hi,
    i want to access KONV which is cluster table and the field is KWERT.
    The thing is that i want to access it by taking customers from KNVV and giving it to VBRK (SALES Table). Now in VBRK i want to have a selection on FKDAT to get a list of Customers stored in the field called KUNAG.
    on VBRK-KUNAG basis i want to access the table KONV-KWERT.
    If i am doing queries then the System stops responding cuz it has got alot of overhead. So i tried to use Logical Database called VFV.
    If this is the best solution means using LDB then how to use it, can anyone help me with this. I tried it by Function module but it is showing all data without considering selection criteria.
    If anyone can help me then plz do answer or refer me to any web site so that i can figure this thing out. If anyione has got a good book on that then plz feel free to mail me.
    Thanks,
    Muhammad Usman Malik
    ABAP Consultant
    Siemens
    [email protected]
    +92-333-2700972

    Thanks Shibba that was very helpful, i applied that but the system overhead was so much.
    can u help me with Dynamic selection code.
    I used FREE_SELECTION_INIT, FREE_SELECTION_DIALOG and then FREE_SELECTIONS_RANGE_2_WHERE to get ther Selections in one table.
    if u want me to send u the code then i can do that cuz i am getting so much mad that this work is not done yet.
    The Scenario here is that we want to take BILLED Customers and VKORG as Industrial Billing Customer and then taking VBRK and giving all these Customers and then taking selection on FKDAT range.
    Now after that the data should be collected from KONV-KWERT and i want to perform some calculation over it. I am using VFV (Logical Database) to perform this thing because i know that it would be very fast then applying my own queries.
    If you can mail me any book on Logical Database and Dynamic selection then it will be very Helpful.
    Thanks once again for being such helpful.
    Muhammad Usman Malik
    SAP Consultant
    [email protected]
    +92-333-2700972

  • Logical Database Plz Urgent

    Hi,
    i want to access KONV which is cluster table and the field is KWERT.
    The thing is that i want to access it by taking customers from KNVV and giving it to VBRK (SALES Table). Now in VBRK i want to have a selection on FKDAT to get a list of Customers stored in the field called KUNAG.
    on VBRK-KUNAG basis i want to access the table KONV-KWERT.
    If i am doing queries then the System stops responding cuz it has got alot of overhead. So i tried to use Logical Database called VFV.
    If this is the best solution means using LDB then how to use it, can anyone help me with this. I tried it by Function module but it is showing all data without considering selection criteria.
    If anyone can help me then plz do answer or refer me to any web site so that i can figure this thing out. If anyione has got a good book on that then plz feel free to mail me.
    Thanks,
    Muhammad Usman Malik
    ABAP Consultant
    Siemens
    [email protected]
    +92-333-2700972

    Write the entire logic between
    GET event and END-OF-SELECTION.
    and call your smartform in the event END-OF-SELECTION.
    START-OF-SELECTION.
    GET PERNR ..
    *your logic ..
    END-OF-SELECTION.
    call function'yoursmartform'

  • ABAP Logical Database ADA

    Hi All, I am quite familiar with Logical Databases but I need to understand the following.
    1) I am using LDB ADA, but I want to use my own Selection Screen and not the default one that the LDB provides. I know I must put something in AT SELECTION-SCREEN but am unsure what.
    2) Once I get the data, I want to store the data in an internal table - how do I go about doing this? If you can provide a code example that would be great.
    Points for any relevant help.

    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.
    Logical database structures
    There are three defining entities in an SAP logical database. You must be clear on all three in order to create and use one.
    Table structure: Your logical database includes data from specified tables in SAP. There is a hierarchy among these tables defined by their foreign keys (all known to SAP), and you are going to define a customized relationship between select tables. This structure is unique and must be defined and saved.
    Data selection: You may not want or need every item in the referenced tables that contributes to your customized database. There is a selection screen that permits you to pick and choose.
    Database access programming: Once you’ve defined your logical database, SAP will generate the access subroutines needed to pull the data in the way you want it pulled.
    Creating your own logical database
    Here’s a step-by-step guide:
    1) Call up transaction SLDB (or transaction SE36). The path you want is Tools | ABAP Workbench | Development | Programming Environment | Logical Databases. This screen is called Logical Database Builder.
    2) Enter an appropriate name in the logical database name field. You have three options on this screen: Create, Display, and Change. Choose Create.
    3) You’ll be prompted for a short text description of your new logical database. Enter one. You’ll then be prompted to specify a development class.
    4) Specify a root node, or a parent table, as the basis of your logical database structure. You can now place subsequent tables under the root table as needed to assemble the data object you want. You can access this tree from this point forward, to add additional tables, by selecting that root node and following the path Edit | Node | Create. Once you’ve saved the structure you define in this step, the system will generate the programming necessary to access your logical database. The best part is you don’t have to write a single line of code.
    Noted point is we cant add any selection criteria thru our se38 program if you are attaching any LDB to program.Ist of no use.
    If you want to change selection criteria to the existing LDB, you have to goto SE36 tcode and provide LDB name and choose "Change" mode by selecting "Selections" Radio button.
    declaration of params is different compared to normal se38 program in some aspects.
    PARAMETERS :p_curr LIKE bkpf-waers FOR TABLE bkpf OBLIGATORY.
    this BKPF table should be one of the node in the "Structure" Radio button.
    Thanks
    Sivaparvathi
    Please reward points if helpful.

  • ABAP logical database

    Hi,
    What is Logical Database? advantages and disadvantages?
    thanks in advance?

    Hi,
    Advantages of Using Logical Databases
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db99b435c111d1829f0000e829fbfe/content.htm
    Logical databases save you having to define a selection screen and read data from the database in every program. The program does not have to specify how to retrieve the data, but instead only has to process it and display it on the screen.
    An executable program can only work with one logical database, but each logical database can be used by several programs. This offers considerable advantages over integrating the database accesses with SELECT statements into each executable program. It means that you only have to code identical access paths once. The same applies to coding authorization checks.
    When you use logical databases, most executable programs benefit from having
    · an easy-to-use and standard user interface
    · check functions, which check that user input is complete, correct, and plausible
    · meaningful data selection
    · central authorization checks for database accesses
    · good read access performance (for example, with views) while retaining the hierarchical data view determined by the application logic.
    Even though you are using central logical databases, the program itself remains flexible because:
    · You can still create your own selection screens for each program
    · You can code your own functions in any event block in the program. For example, you may want to write user dialogs for further authorization or plausibility checks on the selection screen.
    +++++
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    Thanks,
    Aby

  • HR ABAP PNP Logical Database Doubt

    Hi,
    I have included a logical database pnp and used nodes statement.
    Nodes pernr
    i want to know what infotypes i can use with that declartion.
    i know there are infotypes from 0000 to 9999. could you tell me which infotypes i can access with this PNP.
    Kindly help me.
    Thanks in Advance,
    Bala.

    Hi BSP
    if u want to acess infotype ,u have to declare the infptypes as
    INFOTYPES: 0000 , "Action
               0001 ,
               0002 , "Personal Data
               0006, "Address
               0008,
               1001,
               0105, "Communication
               0041. "Date Specification
    then START-OF-SELECTION .
    GET pernr.
    and in attributes u have to give Logical database PNP..
    with this i think u can acess all the infotype which u have declared...
    thnx
    Rohit

  • Steps to create LOGICAL DATABASE in sap

    hi guys,
    i have gone through many documents about LDB. But, i didnt get the steps to create a LDB.
    plz provide me with the steps to be followed to create a LDB.
    thnx,
    shivaa.

    Hi Shiva,
    This might help you!
    Logical database structures
    There are three defining entities in an SAP logical database. You must be clear on all three in order to create and use one.
    Table structure: Your logical database includes data from specified tables in SAP. There is a hierarchy among these tables defined by their foreign keys (all known to SAP), and you are going to define a customized relationship between select tables. This structure is unique and must be defined and saved.
    Data selection: You may not want or need every item in the referenced tables that contributes to your customized database. There is a selection screen that permits you to pick and choose.
    Database access programming: Once youu2019ve defined your logical database, SAP will generate the access subroutines needed to pull the data in the way you want it pulled.
    Creating your own logical database
    ABAP/4 (Advanced Business Application Programming language, version 4) is the language created by SAP for implementation and customization of its R/3 system. ABAP/4 comes loaded with many predefined logical databases that can construct and table just about any conventional business objects you might need in any canned SAP application. However, you can also create your own logical databases to construct any custom objects you care to define, as your application requires in ABAP/4. Hereu2019s a step-by-step guide:
    1. Call up transaction SLDB (or transaction SE36). The path you want is Tools | ABAP Workbench | Development | Programming Environment | Logical Databases. This screen is called Logical Database Builder.
    2. Enter an appropriate name in the logical database name field. You have three options on this screen: Create, Display, and Change. Choose Create.
    3. Youu2019ll be prompted for a short text description of your new logical database. Enter one. Youu2019ll then be prompted to specify a development class.
    4. Now comes the fun part! You must specify a root node, or a parent table, as the basis of your logical database structure. You can now place subsequent tables under the root table as needed to assemble the data object you want. You can access this tree from this point forward, to add additional tables, by selecting that root node and following the path Edit | Node | Create. Once youu2019ve saved the structure you define in this step, the system will generate the programming necessary to access your logical database. The best part is you donu2019t have to write a single line of code.
    Watch out!
    The use of very large tables will degrade the performance of a logical database, so be aware of that trade-off. Remember that some tables in SAP are very complex, so they will be problematic in any user-defined logical database.
    Declaring a logical database
    Hereu2019s another surprising feature of logical databases: You do not assign them in your ABAP/4 Code. Instead, the system requires that you specify logical databases as attributes. So when you are creating a report, have your logical database identifier (the name you gave it) on hand when you are defining its attributes on the Program Attributes screen. The Attributes section of the screen (the lower half) will include a Logical database field, where you can declare your logical database.
    Logical databases for increasing efficiency
    Why else would you want to create a logical database? Consider that the logical databases already available to you begin with a root node and proceed downward from there. If the data object you wish to construct consists of items that are all below the root node, you can use an existing logical database program to extract the data, then trim away what you donu2019t want using SELECT statementsu2014or you can increase the speed of the logical database program considerably by redefining the logical database for your object and starting with a table down in the chain. Either way, youu2019ll eliminate a great deal of overhead.
    Reward if useful.
    Thankyou,
    Regards.

  • ABAP Objects and table processing (with logical databases)

    I have a report that is written right now using procedural abap and a logical database.  The report is structured follows (high level):
    start-of-selection.
    get pernr.
      perform get_it0001 using wtab.
      perform get_it0002 using wtab.
      perform get_it0003 using wtab.
      append wtab to itab.
    end-of-selection.
      call function 'reuse_alv_grid_display'
        exporting
          i_structure_name       = 'itabstructure'
        tables
          t_outtab               = itab.
    So basically I'm going through a bunch of personnel numbers, getting a few infotypes and outputting to ALV.  I don't see where ABAP Objects is going to help me for this particular program. 
    Can somebody show me where OO ABAP would make this easier?  Does it even make sense to use OO when you're processing with a logical database?  (Not just PNP, but any logical database in general).
    Thanks in advance.

    Hello Lee
    I assume that the routines GET_ITnnnn are written by yourself. For reading infotypes ABAP Objects provides us with same very helpful classes as shown below:
    * define data
      DATA:
        gif_employee      type ref to if_pt_employee,
        go_employee       type ref to cl_pt_employee,
        gt_infotypes      TYPE tim_tmw_itlist_tab,
        go_control        TYPE REF TO if_pt_td_control,
        go_data           TYPE REF TO if_pt_td_base,
        go_pnnnn          TYPE REF TO if_pt_td_itnnnn,
        gt_p0001          TYPE TIM_P0001_TAB,
        gt_p0002          TYPE TIM_P0002_TAB,
        gt_p0003          TYPE TIM_P0003_TAB.
    start-of-selection.
    GET pernr.
    <b>* Create employee instance</b>
      gif_employee = cl_pt_employee=>get_employee( pernr ).
      go_employee ?= gif_employee.
    <b>* Get master infotypes (0001, 0002)</b>
      CALL METHOD go_employee->get_master_data
        EXPORTING
          im_begda = id_fromdate
          im_endda = id_todate
        IMPORTING
    *      EX_I0000 =
          EX_I0001 = gt_p0001
          EX_I0002 = gt_p0002
    *      EX_I0007 =
    *      EX_I0008 =
    <b>* Append all other required infotypes to itab</b>
      APPEND '0003' TO gt_infotypes.
      CALL METHOD go_employee->get_infotypes
        EXPORTING
          i_itlist      = gt_infotypes
          i_fromdate    = id_fromdate  " start date
          i_todate      = id_todate    " end date
    *      I_FILTER      =
          i_noauthcheck = 'X'
        IMPORTING
          e_result      = gt_infty_request
          e_retcd       = gd_retcd.
    * Please see documentation of parameter e_retcd...
      LOOP AT gt_infty_request INTO go_control.
        go_data = go_control->data.  <b>" get data object</b>
    *   Casting
        TRY.
            go_pnnnn ?= go_data.
          CATCH cx_sy_move_cast_error.
            CONTINUE.
        ENDTRY.
    <b>*   Convert infotype (semi-transparent -> transparent)</b>
        CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
          EXPORTING
            prelp = lo_pnnnn->prelp
          IMPORTING
            pnnnn = gs_p0003.
        APPEND gs_p0027 TO gt_p0003.
      ENDLOOP.
    The class CL_PT_EMPLOYEE provides us already with very easy access to so-called master infotypes (000, 0001, 0002, 0007 and 0008). All other infotypes can be read using method GET_INFOTYPES.
    Using these classes we have a very convenient and standardized way of accessing all kinds of infotypes.
    Regards
      Uwe

Maybe you are looking for

  • Import Process without BCD value

    Dear All, Normally in an Import scenario,7 duties will be there(CVD,ECessCVD,Hig EcessCVD,BCD,EcessBCD,Hig EcessBCD,Spl Addl duty). We fill the 7 values while doing Customs MIRO and the MIRO number will be given while doing MIGO which adopt the value

  • Why doesn't the Map module work with Lightroom 5.6 on OSX Yosemite?

    Since upgrading to OSX Yosemite the Map module won't display the roads or satellite images with Lightroom 5.6.  Sometimes it will download a small portion of the imagery but then it just displays the message "No imagery available".  If I try and zoom

  • Missing Audio / Sound in imovie with .AVI files when imported from iphoto

    fortunately i don't need this answered, eventually figured it out my self, just thought it would be helpful to share the solution to this problem as I'm sure others have experienced it. The problem makes more sense when explained chronologically. My

  • Oracle Payables 11i Certification

    Hi Guys I have just passed the following exams:- Oracle E-Business Essentials 1Z0-200 Oracle 11i General Ledger 1Z0-211 Oracle 11i Payabales Fundatmenatals 1Z0-212 Now to gain my Payables certification i need to attend a course at oracle.... is this

  • I just downloaded ios7 and it has ruined my new ipad.

    I just downloaded ios7 and it has ruined my new ipad (which worked perfectly with ios6) 1.spotlight search isn't doing anything. Literally not searching anything. Just a plain search bar 2. my music won't play. - just silence 3. iTunes just crashes w