LDB doubt

REPORT  yjsample4                               .
tables : bsik, t001.
START-OF-SELECTION.
GET BSIK.
  IF bsik IS NOT INITIAL.
    APPEND bsik TO g_t_bsik.
  ENDIF.
END-OF-SELECTION.
  SELECT * FROM bsik INTO TABLE g_t_bsik1 WHERE lifnr IN kd_lifnr.
  LOOP AT g_t_bsik.
    cnt = cnt + 1.
    WRITE:/ cnt, g_t_bsik-bukrs, g_t_bsik-belnr.
  ENDLOOP.
In above program attributes please assign LDB name as KDF and keep break point at REPORT  yjsample4  . If we go through debugging mode it is going into three function modules and doing some validations and giving the records in output. which are not same if we select the same from   SELECT * FROM bsik INTO TABLE g_t_bsik1 WHERE lifnr IN kd_lifnr.
Can any body help me. What is happennig? I need to remove LDB(Avoiding LDB usage) and need to replace with SELECT statement...

Hi
KDF is Vendor Database.
Note
The report SAPDBKDF controls access to the vendor data base from a Financial Accounting point of view. Since the program only contains physical accesss routines for the logical data base, it cannot be started separately.
Technical documentation
In the standard system, a basic selection screen (screen number 1000) and 4 screen variants are delivered for the logical data base SAPDBKDF. The basic selection screen contains all available data base selections. If you make changes to data base selections (for example, defining a new selection parameter or extending the vendor number to 10 characters), then this screen is regenerated automatically by the system. It can then be used immediately by all reports that use the logical data base DDF. Screen variants are available in reporting by entering the screen number in the attributes.
Available fields
The available fields on a screen are indicated with an 'X'.
                  Selection screen variant
Field name          1000 900 901 902 903
Vendor number         X   X   X   X   X
Company code          X   X   X   X   X
Fiscal year           X   X   X   X
Key date of OIs       X   X
Clearing date         X       X
Table selection
In order to improve performance, individual tables can be excluded from selection. The following fields can be set in the application report at the time of INITIALIZATION or at the START OF SELECTION:
B0SG-XAGSL (blank as a default): if this field is set, then only A and B segments are read; in this case, only A segments for which there are no B segments are selected - this is normally not the case.
B0SG-XBNKL ('X' as a default): if this field is left blank, then the bank data is not read.
B0SG-XSTDL ('X' as a default): if this field is left blank, then the tax data is not read.
B0SG-XMNDL ('X' as a default): if this field is left blank, then the dunning data is not read.
Authorization checks
account type authorization (F_BKPF_KOA)
company code authorization (F_LFA1_BUK, F_BKPF_BUK)
account authorization (F_LFA1_BEK)

Similar Messages

  • HR-ABAP PCH LDB

    Hi all,
    I want to get the latest record from 1007 infotype...hw can I do this using macros..??
    I had used PNP LDB before...In that v hv RP_PROVIDE_FROM_FRST and
    RP_PROVIDE_FROM_LAST to get the first and latest records...Do v hv such macros in PCH..??
    And one more doubt can v use Provide...Endprovide when using PCH LDB...???
    I had seen Include DBPCHCOM but I **** find ....
    Need help on this...

    Hi,
    According to infotype you are using 1xxx...check table HRP1xxx.
    here for you need find entry to depending upon object type e.g. P-Person, O-Org Unit..etc
    Regards,
    Amit R.

  • Regarding ldb pnp

    hi experts,
                     i m developing a hr report using pnp ldb,no doubt with the help of this ldb we get standard selection screen but here what i want that in this selection screen only payroll area and personel number sud come for this what sud i do for changing the selection screen......plz help me...

    Hi,
    In at selection-screen output, you try loop at screen.Inside that if screen-name is 
    PNPABKRS, then make screen-active = 1 otherwise, screen-active = 0.Simlarly in debugging you find out the lables for the input fields and then make it as active.
    tables pernr.
    at selection-screen output.
    loop at screen.
    if screen-name CS 'PNPABKRS'.
    screen-active = 1.
    else.
    screen-active = 0.
    endif.
    modify screen.
    endloop.endloop.

  • Can i make changes to standered ldb to z ldb.

    Hi Friends ,
                    Presently iam working with sales tax register , inthe attributes section logical database  is mentioned as BRF(document segmet) , the data is retrived according to document no ,and posting date .
    now i need to retrive the data according to vendor wise , my doubt is, can i copy the logical database  to z ldb and make changes to it , root node for this ldb is bosg . when i am trying to make changes inthe report it is not effecting in any wayz ,. please try to give me the solution , for retriving the data according to vendor wise. in the report the ldb is called by keyword get.

    Hi,
    pardon - it is only spare information you gave.
    A report is linked to a ldb by its properties.
    Moreover you can use a ldb by function ldb_process.
    Perhaps there is another way without changing the ldb.
    First fill an internal table with data you need.
    After that sort it and do your processing.
    Separating I/O from processing is a good approach in general.
    With kind regards
    Walter Habich

  • Abap hr doubt

    Hi all,
    When we use GET PERNR statement , we declare TABLES:PERNR to define the structure pernr in our program.
    We declare the logical database as PNP for the standard  selection screen.Now , if we dont declare LDB as PNP and create our own selection screen and use GET PERNR statement by including tables: pernr in the program , it is giving error at GET PERNR statement.My doubt is how is the LDB linked to GET PERNR statement.
    Can anyone explain me clearly.
    Plss dont send links to other threads.
    Thanks & Regards
    Chandrika

    Hi sarath,
    1. I just tried. When we try to use
        Include SAPDBPNP in our Z Program,
        it gives SYNTAX error that
      "  Each ABAP program can contain only one "REPORT", "PROGRAM".
    2. The reason is that SAPDBPNP is a Program
        and not an include.
       Hence, like any other program if we try to include,
       it will give error.
    3. The PNP ldb has the program SAPDBPNP behind the scenes. But to use it we have to assign the LDB PNP in the attributes.
    4. There are some FMs LDB*  (eg. LDB_PROCESS)
        (I have not used them ) which allow
       to use a LDB without specifying in the attribute.
    regards,
    amit m.

  • 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

  • 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

  • Removing LDB from proram attribute

    Hi experts,
    My requirement is to convert a LDB (PCH) report into a normal report and to do some changes in the converted report.
    Can anyone tell me how to remove the LDB name mentioned in the program attributes. I got the following error message when i tried to remove the LDB name from the program attribute.
    "Unable to specify selection screen (no logical database given)"

    Thanks. After removing the selection screen number, i can able to remove the LDB name also.
    I have one more doubt regarding LDB. Is there any way to keep the LDB, but to hide the standard selection screen provided by the LDB.
    I want to create my own selection screen by overriding the LDB selection screen (all selection screen fields need to be removed), but i want the GET objec coding to be triggered by the LDB.
    Is there any way to acieve this?
    Edited by: Jessica Rose on Dec 30, 2010 2:22 PM

  • Doubt in fbl1n transaction

    hi i have a doubt....
    in fbl1n transaction, there are open items and cleared items.
    in it the cleared items  for certain document types such as invoice etc is not present in the open item table (bsik)
    however the cleared items for document types such as general  voucher its present in the open items table (bsik)
    is this possible as all cleared item entries shld b present in the open item table with an indicator set for cleared or not...
    plz exlain!

    Hi
    There are 2 tables(open and Closed Items)  in FI for Account Payables and Account Receivables and GL accounts
    1.Account payables: BSIK is Open Items and BSAK is Closed items
    2.Account Receivables; BSID and BSAD for OPEN and closed items
    3/GL accounts :  BSIS and BSAS  for Open and Closed Items
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Doubt about report FBL5N of screen field:Open items and Cleared items

    hi
    i know the report FBL5N is use DDF LDB and the report work flow is BSID->BKFP->BSEG
    but i don't know to differentiate Open Items and Cleared items in this report.
    Open items and Cleared items stand for a field flag in these table (BSID,BKFP,BSEG )? if true the field is?
    or they must be calc in program ? if true what about calc rules?
    waiting for help! thank you!

    Hi,
    Here is the difference in Open Items and Cleared Items.
    In FI first the document is Open (when it is posted) so the entry is made in table BSID. Once the document is cleared, it will move from BSID to BSAD. And for Cleared item you will see Clearing Document no and Clearing date values updated (these are blank when the item is open).
    The only difference in Open and Cleared is via Clearing Document and Clearing Date. If the values are present, it means document is cleared.
    Hope this helps.
    ashish
    Message was edited by:
            Ashish Gundawar

  • Doubt in creation of a new object

    Hi All,
                 I have one doubt in creation of a new object.If a new object is to be created and it is not a subtype
    of any existing object, then what should we enter in the Program field for creating the object?
    I hope I am clear with my question.
    Thanks in Advance,
    Saket.

    Hi Saket,
    Following will be required for created a custom business object.
    1. Object Type - ZTEST (Internal Techincal Key)
    2. Object Name - ZTESTNAME (Technical Key Name)
    3. Name - TEST (Name of BO, it is used while selecting the object type)
    4. Description - (Short Description of BO)
    5. Program - ZTESTPROGRAM (ABAP program in which the methods of the object type are implemented)
    6. Application - A or B.. etc (Area to which your BO is related)
    Please remember that you can learn these basic things by giving F1 help on those fields and in HELP.SAP.COM.
    Regards,
    Gautham Paspala

  • Doubt in sender mail adapter

    Hi Everyone,
    Can we read and validate the attachment of the mail.If so how to do it.
    Thanks in advance,
    Sakthi

    Hi Sakthi,
       Please refere the below links:
      http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/bf93409c663228e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0d/52b240ac052817e10000000a1550b0/frameset.htm
    Let me know if you have any doubts regarding this.
    Thanks,
    sekhar.

  • 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

  • PI' RFC  Connection pool  doubt.

    Hi PI exports:
    i have a doubt about  pi' RFC  Connection pool ,pi RFC receive channel can set the conn pool size ,but when start the rfc receiver channel ,is there always only one Connection  pool ,or there is only one Connection  pool  instance?
      thinks
    Edited by: kevin liang on Oct 19, 2009 6:45 AM

    Hi,
      Connection poolins size means how many number of connection you want to make open to send data to ECC, We can define maximum number of connection in Receiver RFC Adapter,Go to additional parameters section and define Max Number of connection give the number there,thats it.Internally it works as Connection poolin mechanism.
    Regards,
    Raj

  • Small Doubt Regarding SY-MANDT

    Hi All,
         SELECT changenr FROM cdhdr CLIENT SPECIFIED INTO CORRESPONDING FIELDS OF TABLE it_cdhdr
                                             WHERE mandant = syst-mandt
                                             AND   objectclas = 'MATERIAL'
                                             AND   objectid   = wa_matl-matnr
                                             AND   tcode      = 'MM02'.
         I have written the select stament as shown above.
         In this i have a doubt like adding a field sy-mandt  in the where condition will increase the Efficiency of program or not.
    regards,
    raghu.

    Hi..
    No doubt the efficency would be affected but from business point of view there will many  things that need to be checked as in:
    If you are viewing data from CDHDR and CDPOS which is client specific then you are not viewing complete data.
    These tables give us and document changes made to a particular object in SAP but if anything is cross client like company code(lets assume) then changes to it wont be visible in all the clients..
    so there can be some key information you can miss out while working on some of the objects.
    else in this case its good to make query cross client.
    regards
    vishal

Maybe you are looking for

  • Is it possible to resize page column widths at runtime (by the user)?

    hi all, i have cretaed a page using the 2-columns narrow/wide layout.  this layout is perfect for what i want to do. however, the users have complained that they would like to be able to resize the columns, just like they are able to do with the Deta

  • Character encoding in unix environment.

    Hi, Users try to download files from my application. These files are uploaded by others. They may contain characters from foreign languages as well. The file names are displayed properly on the screen, but when the user clicks on the link to download

  • Updation of function group while transfering from one server to anather

    Hi all, In my client's quality server some function module . And the unicode check activity for the function group is checked for some user in quality and not checked for some user (might be somebody has changed it and created a new task for the func

  • Error Message: Not Supported Method

    I have been trying to access my email via Verizon.net all day and get the following error message: Not Supported Method. Does anyone have any insight???? Thanks.  Solved! Go to Solution.

  • Query for the huge table is not working.

    Hi, I am having a link between oracle server and Microsoft sql server let' say 'SQLWEB' this link is perfectly working fine when I query table having few hundred thousand records but It's not working for one of the table which is having a more then 3