LDB in HR

hi friends,
          I am having a doubt, why LDB (HR PNP...) is used in HR, and why not Open sql statements for Reports.
          what is the difference between LDB and open sql statement, in what way it is benificial ?
          if possible any one send me documents  how to use LDB in HR ? to this mail id [email protected]
thank u HR consultants

LDB - is a SET of programs which provide u its own selection screen and commands to deal with HR data.
Hence for HR u can prefer LDB instead of SQL..
u can acheive the same thing via SQL but LDB is more easier as u need not write much code.
u have to specify in the attributes of the program ,LDb name..
like PNP,PCH etc..
here is a sample program using LDB  -
REPORT  ZPPL_PREVEMPLOYERS   message-id rp
                             line-size 250
                             line-count 65.
*Program logic :- This Report is used to Download all the Previous
Employer (IT0023) records of the employees
*eject
*& Tables and Infotypes                                                *
tables: pernr.
infotypes: 0000,
           0001,
           0002,
           0023.
*eject
*& Constants                                                           *
constants: c_1(1)       type c               value '1'   ,
           c_3(1)       type c               value '3'   ,
           c_i(1)       type c               value 'I'   ,
           c_x(1)       type c               value 'X'   ,
           c_eq(2)      type c               value 'EQ'  ,
           c_pl03       like p0001-werks     value 'PL03'.
*eject
*& Selection-Screen                                                    *
parameters: p_file  like rlgrap-filename default 'C:\Temp\ABC.xls',
            p_test  as checkbox default c_x               .
*eject
*& Internal tables                                                     *
Internal Table for Output
data: begin of t_output occurs 0    ,
       pernr like pernr-pernr       ,
       nachn like p0002-nachn       ,
       vorna like p0002-vorna       ,
       orgeh_stext like p1000-stext ,
       plans_stext like p1000-stext ,
       begda like p0023-begda       ,
       endda like p0023-endda       ,
       land1 like p0023-land1       ,
       arbgb like p0023-arbgb       ,
       ort01 like p0023-ort01   .
data: end of t_output           .
*eject
*& Variables                                                           *
data: o_stext like p1000-stext,
      p_stext like p1000-stext.
*eject
*& Initialization                                                      *
Initialization.
Initialize Selection-Screen values
  perform init_selction_screen.
*eject
*& AT Selection-screen                                                 *
at selection-screen .
Check if Test run selected, download file name should be entered
  if p_test is initial.  "
    if p_file is initial.
      message e016 with 'Please enter file name'
                        'specifying complete path'.
    endif.
  endif.
*eject
*& Start-of Selection                                                  *
Start-of-selection.
get pernr.
  clear t_output.
Read Infotype 0
  rp-provide-from-last p0000 space pn-begda pn-endda.
  check pnp-sw-found eq c_1.
Check if employee is active
  check p0000-stat2 in pnpstat2.      "pernr Active
Read Infotype 1
  rp-provide-from-last p0001 space pn-begda pn-endda.
  check pnp-sw-found eq c_1.
check if employee belongs to PL03
  check p0001-werks in pnpwerks.  "belongs to PL03
Check if emp belongs to Active Group
  check p0001-persg in pnppersg.
Read Infotype 2
  rp-provide-from-last p0002 space pn-begda pn-endda.
  check pnp-sw-found eq c_1.
Read Org Unit Text.
CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
     EXPORTING
          OTYPE                   = 'O'
          objid                   = p0001-orgeh
          begda                   = p0001-begda
          endda                   = p0001-endda
          reference_date          = p0001-begda
     IMPORTING
          object_text             = o_stext
      EXCEPTIONS
          nothing_found           = 1
          wrong_objecttype        = 2
          missing_costcenter_data = 3
          missing_object_id       = 4
          OTHERS                  = 5.
*Read Position Text.
CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
     EXPORTING
          OTYPE                   = 'S'
          objid                   = p0001-plans
          begda                   = p0001-begda
          endda                   = p0001-endda
          reference_date          = p0001-begda
     IMPORTING
          object_text             = p_stext
     EXCEPTIONS
          nothing_found           = 1
          wrong_objecttype        = 2
          missing_costcenter_data = 3
          missing_object_id       = 4
          OTHERS                  = 5.
Gather all the required information related to the emp
  move: pernr-pernr to t_output-pernr,
        o_stext to t_output-orgeh_stext,
        p_stext to t_output-plans_stext,
        p0002-nachn to t_output-nachn,
        p0002-vorna to t_output-vorna.
Gather previous Employee details
  loop at p0023.
    move-corresponding p0023 to t_output.
    append t_output.
  endloop.
*eject
*& End-of Selection                                                    *
end-of-selection.
  perform print_report.
Downlaod the file
  if not t_output[] is initial.
    if p_test eq space.
      perform download_file.
    endif.
  else.
    write: 'No records selected' color col_negative.
  endif.
*eject
*& Top-of-page                                                         *
Top-of-page.
Print Header
  perform print_header.
*eject
*&      Form  download_file
Description :
FORM download_file .
  DATA: full_file_name    TYPE string,
        z_akt_filesize    TYPE i     .
  full_file_name = p_file.
download table into file on presentation server
  CALL METHOD cl_gui_frontend_services=>gui_download
    EXPORTING
      filename                = full_file_name
      filetype                = 'DAT'
      NO_AUTH_CHECK           = c_x
      codepage                = '1160'
    IMPORTING
      FILELENGTH              = z_akt_filesize
    CHANGING
      data_tab                = t_output[]
    EXCEPTIONS
      file_write_error        = 1
      no_batch                = 2
      gui_refuse_filetransfer = 3
      invalid_type            = 4
      no_authority            = 5
      unknown_error           = 6
      header_not_allowed      = 7
      separator_not_allowed   = 8
      filesize_not_allowed    = 9
      header_too_long         = 10
      dp_error_create         = 11
      dp_error_send           = 12
      dp_error_write          = 13
      unknown_dp_error        = 14
      access_denied           = 15
      dp_out_of_memory        = 16
      disk_full               = 17
      dp_timeout              = 18
      file_not_found          = 19
      dataprovider_exception  = 20
      control_flush_error     = 21
      not_supported_by_gui    = 22
      error_no_gui            = 23
      OTHERS                  = 24.
  IF  sy-subrc               NE        0.
    MESSAGE e016 WITH 'Download-Error; RC:' sy-subrc.
  ENDIF.
ENDFORM.                    " download_file
*eject
*&      Form  print_report
*Description:
FORM print_report .
  data: i       type i,
        w_count type i.
  sort t_output.
Print the report
  loop at t_output.
    i = sy-tabix mod 2.
    if i eq 0.
      format color col_normal intensified on.
    else.
      format color col_normal intensified off.
    endif.
    write:/1     t_output-pernr          ,
           10     t_output-vorna(25)     ,
           35    t_output-nachn(25)      ,
           61   t_output-orgeh_stext     ,
           102  t_output-plans_stext     ,
           143  t_output-begda           ,
           154   t_output-endda          ,
           168   t_output-land1          ,
           178   t_output-arbgb(40)      ,
           219   t_output-ort01          ,
           249   space              .
  endloop.
  uline.
  Describe table t_output lines w_count.
  Skip 2.
  Write:/ 'Total No of Records Downloaded: ' color col_total,
          w_count.
ENDFORM.                    " print_report
*eject
*&      Form  print_header
*Description:
FORM print_header .
  skip 1.
  Uline.
  format Intensified on color col_heading.
  write:/1   'Pers. #'        ,
         10   'Last Name'     ,
         35   'First Name'    ,
         61   'Org Unit'      ,
         102  'Position'      ,
         143  'Beg Date'      ,
        154   'End Date'      ,
        168   'Cntry Key'     ,
        178   'Prev Employer' ,
        219  'City'           ,
        249   space          .
  format intensified off color off.
  uline.
ENDFORM.                    " print_header
*eject
*&      Form  init_selction_screen
*Description:
FORM init_selction_screen .
  refresh: pnpwerks,
           pnppersg,
           pnpstat2.
  clear:   pnpwerks,
           pnppersg,
           pnpstat2.
  pnpwerks-sign   = c_i.
  pnpwerks-option = c_EQ.
  pnpwerks-low    = c_pl03.
  append pnpwerks.
  pnppersg-sign   = c_i.
  pnppersg-option = c_EQ.
  pnppersg-low    = c_1.
  append pnppersg.
  pnpstat2-sign   = c_i.
  pnpstat2-option = c_EQ.
  pnpstat2-low    = c_3.
  append pnpstat2.
ENDFORM.                    " init_selction_screen

Similar Messages

  • How to use LDB PNP with ABAP objects in a program

    Hello,
    I am wondering if anybody has used the HR logical database(LDB) PNP with user defined ABAP objects in a program? I am using the FM- <b>LDB_PROCESS</b> but its not working. Also assigning PNP in the attributes section of the program -- so that I can use predefined fields from the LDB and then invoking the FM doesn't work -- throwing 'Logical database already active' error.
    I suppose even with the ABAP objects and the new FM -- I should still be able to utilize the pre-defined fields of the PNP database -- and also the built in authorizations. I cannot use GET PERNR and REJECT as they give errors. I understand that the use of HR-macros (RP-PROVIDE-FROM-LAST and et al.) are not allowed as they use the table work area -- which is not allowed in ABAP-OOPS.
    I would really appreciate if anyone could show me some insight regarding this. Thank you.
    Kshitij R. Devre

    Hi Kshitij
    It would be really good if we could use both together. But as I know, it is not possible. "GET pernr." is an event-like loop statement and so cannot be used in OO context. And I guess, the same restriction holds for the "LDB_PROCESS" since it uses LDB-specific processing.
    What I suggest you is to use standard and BAPI functions.
    Sorry for giving bad news...
    *--Serdar

  • Capturing elements value in the selection screen for LDB during run time

    Hi,
    I have a program where LDB is used.
    Could anyone please suggest how to capture the values of the elements present in the LDB's default selection screen.
    Specially, the company code and the period values.
    Please reply . Its too urgent.
    Regards,
    Binay.

    I got it

  • Access DB (& .ldb file) does not close after crystal reports

    Post Author: mgold
    CA Forum: Crystal Reports
    Access DB (& .ldb file) does not close after crystal reports
    Hi! We have a VB application using Crystal Reports 6 that has worked successfully on hundreds of systems for over 10 years. Now, on one network, the application and access database does not close. It seems to hang on the &#91;.Close&#93; command.
    When we open the application an peruse the screens without opening up a report (using crystal reports), the application and access db closes fine. But as soon as we run a report and then close the report and try to close the application, the access db does not close. Many of the screens open the db and grab data from the access db, but it's only after running crystal reports that we have this problem. (Please see more information below.)
    Setup: Application and data (access 97 db) reside on a server in the same folder, but application shortcut is kicked off on client PC. Kicking off the shortcut on the client PC means that the image/process runs on the client PC (not on the server). In this problem case, the application shortcut is on a Windows XP Pro Version 2002 SP2 PC with the app & data on a Windows 2003 server. Users are local Admins on their PCs with "Full Control"over the directory and files on the server where the data (access 97 db) resides. This type of setup is typical and has worked without any problems for clients.
    The application is written in Visual Basic, using Crystal Reports 6 (using DAO). We close the recordset, set it to zero and then it hangs on closing the db (.Close command).
    A few key pieces of information:
    - The application closes fine if the app & data (access 97 db) are on a local PC. This includes closing fine if the application is run directly on the Windows 2003 server where the data is stored.
    - It worked on this client's network until sometime in the last few weeks.
    - One thing that changed is that the company is using VMWare on its servers. Not sure if they started using VMWare at the same time as it started failing. This may be unrelated. Possibly other things changed, but can't get any more information ... yet.
    - It works fine running the application from a Windows Vista PC with a user who is a domain admin.
    - The access db and application hang for about 10-20 minutes and then eventually closes. It appears that somehow
    Crystal Reports is keeping the db open, but I'm not sure why.The application doesn't quit and the database doesn't close even if I try to end the task with the Task Manager.
    - The Crystl32.ocx version being used is 8.0.0.4 (if that matters).
    - I copied 6 month old program files and database files to a test folder on the Windows 2003 server. It fails using these files that worked fine 6 months ago.
    Any ideas or help would be greatly appreciated! If you know of another good place to post this, please let me know.
    Thanks!
    - Mark

    Crystal doesn't support tables in HTML interpretation. 
    You can probably work your way around this by doing Replace() calls on the relevant tags.
    See:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313337333033383334%7D.do
    The supported HTML tags are:
    " html
    " body
    " div (causes a paragraph break)
    " tr (causes only a paragraph break; does not
    preserve column structure of a table)
    " span
    " font
    " p (causes a paragraph break)
    " br (causes a paragraph break)
    " h1 (causes a paragraph break, makes the font bold
    & twice default size)
    " h2 (causes a paragraph break, makes the font bold
    & 1.5 times default size)
    " h3 (causes a paragraph break, makes the font bold
    & 9/8 default size)
    " h4 (causes a paragraph break, makes the font bold)
    " h5 (causes a paragraph break, makes the font bold
    & 5/6 default size)
    " h6 (causes a paragraph break, makes the font bold
    & 5/8 default size)
    " center
    " big (increases font size by 2 points)
    " small (decreases font size by 2 points if it's 8
    points or larger)
    " b
    " i
    " s
    " strike
    " u
    The supported HTML attributes are:
    " align
    " face
    " size
    " color
    " style
    " font-family
    " font-size
    " font-style
    " font-weight

  • How to Improve performance issue when we are using BRM LDB

    HI All,
    I am facing a performanc eissue when i am retriving the data from BKPF and respective BSEG table....I see that for fiscal period there are around 60lakhs records. and to populate the data value from the table to final internal table its taking so much of time.
    when i tried to make use of the BRM LDB with the SAP Query/Quickviewer, its the same issue.
    Please suggest me how to improve the performance issue.
    Thanks in advance
    Chakradhar

    Moderator message - Please see Please Read before Posting in the Performance and Tuning Forum before posting - post locked
    Rob

  • 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

  • Facing Problem while Debugging a custom report using LDB

    Hi Gurus,
    I have requirement to modify a custom report program related to FI. This program used Logical database ZDF ( Copied original DDF) for data fetching.
    when i am trying to see the data in debugging mode, its not allowing to check in start-of-selection event. only in the initialization & end-of-selection i could able to debug.
    when i put breakpoint in initialization, it is allowing to see the flow till a Get Event occurs in the code, once a Get event occur the debugger is coming out and displaying the report.
    If anybody faced this kind of problem when debugging a report using LDB, please share how you resolved it. If there are any other ways to debug a program of this kind please help me.
    Thanks,
    Nanda

    Hi Amith,
    I checked that way also, i put break point in database program of the copied LDB, but its not allowing to check the flow in that program also.
    Please suggest any other ways.
    Thanks,
    Nanda

  • LDB IN HR-ABAP

    LIST LDB'S CONCERNED TO THE DIFFERNENT PARTS OF HR MODULE LIKE PP,PA,OM ,PLEASE

    Hi Raghunandan,
    SAP HR Transaction Codes
    Master Data 
    PA10 - Personnel file
    PA20 - Display HR Master Data
    PA30 - Maintain HR Master Data
    PA40 - Personnel Events
    PA41 - Change Hiring Data
    PA42 - Fast Data Entry for Events
    PRMD - Maintain HR Master Data
    PRMF - Travel Expenses : Feature TRVFD
    PRML - Set Country Grouping via Popup
    PRMM - Personnel Events
    PRMO - Travel Expenses : Feature TRVCO
    PRMP - Travel Expenses : Feature TRVPA
    PRMS - Display HR Master Data
    PRMT - Update Match code
    PS03 - Info type Overview
    PS04 - Individual Maintenance of Info types
    Time Management 
    PA51 - Display Time Data
    PA53 - Display Time Data
    PA61 - Maintain Time Data
    PA62 - List Entry of Additional Data
    PA63 - Maintain Time Data
    PA64 - Calendar Entry
    PA70 - Fast Data Entry
    PA71 - Fast Entry of Time Data
    PBAB - Maintain Vacancy  assignments
    PT01 - Create Work Schedule
    PT02 - Change Work Schedule
    PT03 - Display Work Schedule
    Payroll
    PC00 - Run Payroll
    PC10 - Payroll menu USA
    PE00 - Starts Transactions PE01 PE02 PE03
    PE01 - Schemas
    PE02 - Calculation Rules
    PE03 - Features
    PE04 - Create functions and Operations
    PE51 - HR form editor
    PRCA - Payroll Calendar
    PRCT - Current Settings
    PRCU - Printing checks USA
    PRD1 - Create DME
    SM31 - Maintain Table
    SM12 - Locked Secessions
    TSTC - Table Look up
    SPRO - IMG
    SE16 - Data Browser (Table Reports)
    PP03 - PD Tables
    PPOM - Change Org Unit
    PO13 - Maintain Positions
    PO03 - Maintain Jobs
    Benefits
    PA85 - Benefits - Call RPLBEN11
    PA86 - Benefits - Call RPLBEN07
    PA87 - Benefits - Call RPLBEN09
    PA89 - COBRA Administration
    PA90 - Benefits Enrollment
    PA91 - Benefits - Forms
    PA92 - Benefits Tables - Maintain
    PA93 - Benefits Tables - Display
    PA94 - Benefits - Access Reporting Tree
    PA95 - Benefits IMG - Jump to Views
    PA96 - Benefits reporting
    PA97 - Salary Administration - Matrix
    PA98 - Salary Administration
    PA99 - Compensation Admin - rel. Changes
    PACP - HR-CH : Pension fund, interface
    General Reporting
    PM00 - Menu for HR Reports
    PM01 - Dialogs in HR - Create Custom info types
    PRFO - Standard Form
    PSVT - Dynamic Tools Menu
    PAR1 - Flexible Employee Data
    PAR2 - Employee List
    Organizational Management
    PPOM - Change org Unit
    PO03 - Maintain Jobs
    P013 - Maintain Position
    PO10 - Maintain Organizational Unit
    PP01 - Maintain Plan Data (menu-guided)
    PP02 - Maintain Plan Data (Open)
    PP03 - Maintain Plan Data (Event-guided)
    PP05 - Number Ranges
    PP06 - Number Ranges Maintenance HR Data
    PP07 - Tasks/Descriptions
    PP69 - Choose Text for Organizational Unit
    PP90 - Setup Organization
    PP01 - Change Cost Center Assignment
    PP02 - Display Cost Center Assignment
    PP03 - Change Reporting Structure
    PP04 - Display Reporting Structure
    PP05 - Change Object indicators (O/S)
    PP06 - Change Object indicators OS
    PPOA - Display Menu Interface (with dyn.)
    PPOC - Create Organizational Unit
    PPOM - Maintain Organizational Plan
    PPOS - Display Organizational Plan
    PQ01 - Events for Work Center
    PQ02 - Events for Training Program
    PQ03 - Events for Job
    PQ04 - Events for Business Event Type
    PQ06 - Local Events
    PQ07 - Resource Events
    PQ08 - Events for External Person
    PQ09 - Events for Business Event Group
    PQ10 - Events for Organizational Unit
    PQ11 - Events for Qualification
    PQ12 - Resource Type Events
    PQ13 - Events for Position
    PQ14 - Events for Task
    PQ15 - Events for Company
    PSO5 - PD : Administration Tool
    PSOA - Work Center Reporting
    PSOC - Job Reporting
    PSOG - Org Mgmt General Reporting
    PSO1 - Tools Integration PA-PD
    PSOO - Organizational Unit Reporting
    PSOS - Position Reporting
    PSOT - Task Reporting
    Recruitment
    PB10 - Initial Entry of applicant master data
    PB20 - Display applicant master data
    PB30 - Maintain applicant master data
    PB40 - Applicant events
    PB50 - Display applicant actions
    PB60 - Maintain Applicant Actions
    PB80 - Evaluate Vacancies
    PBA0 - Evaluate Advertisements
    PBA1 - Applicant Index
    PBA2 - List of applications
    PBA3 - Applicant vacancy assignment list
    PBA4 - Receipt of application
    Infotype tabes :0000,0001,0002,0006,0007,4000,40001,40002 etc
    DB Tables      :PA0000,PA0001,PA0006,PA0007 etc
    ****Reward points if found useful
    Regards,
    Naresh

  • How to Create and Use ldb in reports?

    Give examples that uses ldb.

    Hi Albert
    You can create and maintain logical databases via the transaction <b>SE36</b>.
    You can relate a LDB to your program using the 'Attributes' window by entering the LDB name to the relevant field.
    Additional to what Andreas told, many HR programs use LDB. Check programs with 'RH*'.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • Getting results from LDB (Logical Database)

    Hi All,
    I have a requirement where i need to pass LDB results to external application. It can be any LDB. Like in SE36 we put the LDB name and execute and final results are shown in ALV. I dont need it to display in ALV but from my custom program, need that output table which stores these results.
    I tried using LDB_PROCESS but that need custom subroutine names to pass in that, i tried  passing the same and results also came but thing is every logical database will have different tables in that, it'll be impossible to create those many subroutine to handle each and every table. So i need a generalized solution like se36 processes the data for any LDB.
    Is anyone knows how can i achieve this?
    Regards
    Munish Garg
    9041793217

    Hello
    Generally any LDB will have a event which triggers the data to be populated in the tables/memory. Now these data retrieval is written in a sub-routine "Perform PUT_<eventnamt>". So any LDB will have the sub-routine named "PUT_<eventname>" in its main program. May be you can create the sub-routine name dynamically using this method.
    Regards
    Ranganath

  • Infoset Query- How do I clear the in-built selection screen in LDB

    Dear Experts,
    When LDB is used in queries unwanted selection screen blocks appear.
    Please help in getting rid of the same.
    Kind Regards
    Jogeswara Rao

    Hello Jogeswara,
    1.  In the Infoset push button Extras and then select Code tab.
    2.  Select AT SELECTION-SCREEN OUTPUT for Code Section.
    Suppose your query is based on logical database KDF and you went to hide the SELECT-OPTIONS for Company Code.
    loop at screen.
      if SCREEN-NAME = '%_KD_BUKRS_%_APP_%-TEXT' OR
         SCREEN-NAME = '%_KD_BUKRS_%_APP_%-OPTI_PUSH' OR
         SCREEN-NAME = '%_KD_BUKRS_%_APP_%-TO_TEXT' OR
         SCREEN-NAME = '%_KD_BUKRS_%_APP_%-VALU_PUSH' OR
         SCREEN-NAME = 'KD_BUKRS-LOW' OR
         SCREEN-NAME = 'KD_BUKRS-HIGH'.
        screen-invisible = '1'.
        screen-active = '0'.
        modify screen.
      endif.
    endloop.
    Kind Regards,
    Rae Ellen Woytowiez

  • LDB(Logical Database) selection screen

    Dear Contributors,
    I am hopefull for finding solution to my problem from one of you.
    My requirement is i would like to pass all the elements of the selection screen of LDB to non-sap application so as they can replicate and show all those parameters there. Once those are filled from there then i need to take them and process the LDB.
    My question is i dont know how to get the selection screen parameters. I tried using FM 'RPY_DYNPRO_READ' and passed progname and screen number in that. It gave back all the parameters but we cant co-relate which parameter is from which table (like we say MATNR like MARA-MATNR).
    Without having Technical details of field, non-sap application could not able to process it or show the required F4 help etc
    Anyone know about it, can guide me....
    Regards
    Munish Garg

    call function 'LDB_CONVERT_LDBNAME_2_DBPROG'
           exporting  ldb_name             = headsg-logdb "#EC DOM_EQUAL
                      flag_existence_check = space
           importing  db_name              = logdbprog
           exceptions others               = 1.
      if sy-subrc eq 0.
        call function 'SELOPTS_AND_PARAMS'
             exporting  program              = logdbprog
             tables     selpars              = dbselpars
             exceptions program_non_existent = 1
                        subroutine_pool      = 2
                        load_problems        = 3
                        others               = 4.
    endif.

  • Reg : Selection-Screen in LDB's

    hi,
    Iam  working on a report which uses Logical DataBase : PSJ.
    Iam getting output based on the standard selection screen of LDB PSJ.
    Now my requirement is :
    I need to add a new field(select option) to the Selection screen and the output should be displayed based on  new field select option values
    how to do this?
    Plz answer
    Regards
    vaja

    Hi,
    You simply add the check in the relevant GET event of the LDB.
    For example, you may have an event for DOCUMENT as follows.
    GET DOCUMENT.
      check document-ref in s_ref.    
    S_REF being your new select option.
    Hope this helps.
    Darren

  • How to retrieve values from Dynamic Selection screen while using LDB  - PSJ

    I am having problem in PSJ Logical database. In a custom report which is using PSJ LDB, we are using PROJ and PRPS_R tables.
    When I run program it displays one dynamic selection screen, there we are giving selection criteria for PRPS (Master data WBS element) - Created on (giving some range like 2011/01/01 to 2011/01/31).
    So I want to display all WBS element which are created during the period (2011/01/01 - 2011/01/31).
    How do I retrieve the select-option low and high value of the field Created on Of WBS element if we Select data from any table based on this condition.
               Please help me.
    Thanks.

    in fact you don't have to get the values, you only need to tell to the program to take them into account :
    GET PRPS.
      CHECK SELECT-OPTIONS.

  • HOW TO IMPLEMENT SCREEN VALIDATION IN LDB?

    Hi,
    I am making use of Logical Database in my report, and I want to do screen validation with the screen which already exists in the system? Is it possible to do so? If yes, then how? The LDB, I am using is PSJ.
    Also, I would like to know, can we define our own selection screen incase of LDB? How is that possible if the answer is yes to it.BUt here I am not talking about dynamic selection screen. What I mean to say is that..., can we restrict the selection screen in LDB, by defining the fields which are required in the selection screen on execution of the report?
    Someone, please guide.
    Points will be rewarded for a satisfactory answer.
    Thanks & Regards,
    Ravi

    Hi Ravi,..
    Chk out the link - http://help.sap.com/saphelp_erp2005/helpdata/en/60/183d78163011d2953c0000e8353423/frameset.htm
    Yes, we can define our own selection screen and that will come right below your LDB selection screen.
    AND also LDB selection screen can be restricted ..for this you have to code in PBO of report for hiding the elements which u don't required.
    Regards
    Mithlesh

  • How to get a default variant screen using LDB.(HR-ABAP)

    Hello,
                   I have created a report using LDB PNP.Used HRBEN000 as a hr report category.
    Got a default selection screen, I want to add one more field, for this I have selected the field from further
    selection button, and displayed on the screen. Now i saved as a variant.
    how to get this default screen using the variant in the report/program when executed?
    Please help me.
    Thanks&Regards,
    Archana.

    Hi ,you camn always make your Z report category...if the field is present in further selection tab..
    if not you can create your own paramerter or select option.....
    but you have to handle it in your code ....as get pernr wont filter on its basis(parameter select optyin created by you)
    but why loop at screen is not working?
    let me know how you are doing...
    have to do it in at selection-screen output

Maybe you are looking for

  • Odd Windows/iTune Behavior

    Help!!!! When I plug my newly purchased 60GB ipod into both my XP SP2 laptop and dekstop my computer erradically freezes and itunes freezes. I checked the event logs and I notices this message. Event Type: Warning Event Source: PlugPlayManager Event

  • Individual COst center restriction in BI

    My company is also looking for restricting access to cost center specific & we have implemented a solution using Listcube tcode, let me explain the steps. 1. The Analysis auth obj (AA) contains ZCC_AUTH info object which is given aggregated values. 2

  • %@ page import="..." % does not seem to be working correctly

    Hi,           I am running Weblogic 6.1 sp1 and I am having a problem with import page           directive. <%@ page import="my.package.*" %> does not appear to be working           correctly when I try to reference classes in imported packages (my.p

  • How to publish PSE slideshow to the web

    I can't seem to figure how to publish the slideshow I created in PSE 7; I have a website, and want to post the show on it. Are my only options to save it as a .wmv file or a .pdf?? I can get the .pdf to publish, but when I try to publish the .wmv to

  • Significance of ldap in ORACLE_HOME

    My ORACLE_HOME of the installed Oracle Server contains Perl, JDK, JRE and many other tools. It also contains ldap. Can anybody explan its significance and how can I use it in connection to ldap server.