About pernr orgeh on selection screen (PNP LDB)

Hi All,
ITS URGENT.....
i am tryieng to retrive the holiday compensation data from P0001 P2001 infotypes
i got screen but when i am tryieng to access the data by using person number (PERNR) WITHOUT GIVING ANY INFORMATION its coming out of the GET PERNR Event.
IF ANYBODY HAVE THE LOGIC PLEASE SEND ME .....
THX IN ADVANCE...........
MAHEN........

Hi,
IT2001 would give you results for absences and not compensation, look into IT0083 i think for leave compensation details..
as far as get pernr event is concerned follwings things are mandatory..
tables: pernr.
infotypes: 0001,2001.
start-of-selection.
get pernr.
Here you can retrive data if available..
like:
p2001-pernr
or
p0001-pernr.
end of selection.
please check if the data is present in infotypes with the period specified on the selection screen.
And always use addition MODE n while retrieving data from time infotype 2001 onwards...

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

  • Add new field infotype "z" in logical database selection screen pnp

    Can add new field infotype "z" in logical database selection screen pnp
    I could explain how to realize
    Thanks

    In case to somebody it interests to him: TO EXTEND SCREEN OF SELECTION WITH OPTIONAL DELIMITERS The case that can be given in a screen of selection of a logical data base it does not appear a certain field that we need in the filter, the steps that will be due to follow are the following:
    u2022 To create a view of selection in agreement with the fields that we want to show To review the following Link http://help.sap.com/saphelp_46c/helpdata/es/6e/6ed638e70ef679e10000000a114084/content.htm u2022 To assign the view of selection to a class of report
    u2022 In the code of report to create select option in the selection screen that allows to introduce imput to leak and after start-of-selection to put the following code,
    "Allocation operative area to optional delimiter
      IF NOT p_aroper IS INITIAL.
        DATA: lt_texpr TYPE rsds_expr OCCURS 0 WITH HEADER LINE,
              wa_texpr TYPE rsds_expr,
              lt_rsds_expr_tab LIKE rsdsexpr OCCURS 10 WITH HEADER LINE,
              wa_rsds_expr_tab LIKE rsdsexpr.
        REFRESH lt_rsds_expr_tab.
        wa_rsds_expr_tab-arity = '0'.
        wa_rsds_expr_tab-fieldname = 'OBJID'.
        wa_rsds_expr_tab-option = 'EQ'.
        wa_rsds_expr_tab-low = p_aroper.
        wa_rsds_expr_tab-high = '00000000'.
        MOVE-CORRESPONDING wa_rsds_expr_tab TO lt_rsds_expr_tab.
        APPEND lt_rsds_expr_tab.
        REFRESH lt_texpr.
        wa_texpr-tablename = 'PA9004'.
        wa_texpr-expr_tab[] = lt_rsds_expr_tab[].
        MOVE-CORRESPONDING wa_texpr TO lt_texpr.
        APPEND lt_texpr.
      pnpdynse[] = lt_texpr[].
      ENDIF.
    English is the forum language.
    Edited by: Rob Burbank on May 18, 2011 11:41 AM

  • 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 disable the Selection screens of LDB's ?

    Hi,
             How to disable the Selection screens of LDB's when we r using the predefined LDB for our executable pgm ? and how to include the predefined LDB  can u write the Code for including LDb or if possible give an example of a Pgm using a Predefined LDB?
    Thanks & Regards,
    Gopi.

    Hi Gopi,
    Go through the link,
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    Regards,
    Azaz Ali.

  • Can anybody explain in more detail about NO-DISPLAY in selection screens..

    an anybody explain in more detail about NO-DISPLAY in selection screens.. in that it is saying
    "If you want to display a parameter only in certain cases, for example, depending on the values entered by the user in other input fields of the selection screen, you cannot use the NO- DISPLAY addition. If you use NO-DISPLAY, the parameter actually is an element of the interface for program calls, but not an element of the selection screen. As a result, you cannot make it visible using the MODIFY SCREEN statement. To hide a parameter that is an element of the selection screen, you must declare it without the NO-DISPLAY addition and suppress its display using the MODIFY SCREEN statement."
    what is the meaning of this?

    This is use a lot in programs which are submitted using the SUBMIT statement.  Say that you have a program which runs as usally with a selection screen and nornal output, but you also have some logic built in there that needs to be execute when this program is not ran by the user with the selection screen, but submitted.  You can use a PARMETER statement the selection screen and NO-DISPLAY to hide it when normal processing by the user.  You could pass a value to the parameter when it is called via the SUBMIT statement.  Does this make sense?
    Regards,
    Rich Heilman

  • Is there a way to use 'GET PERNR' without the selection screens?

    I would like to use the GET PERNR event in a batch program without using the default selection screens.  I would like to be able to use my own selection screen and parameters, but only get them along with the default selection options for payroll period.  I've tried removing the screen number from the attributes screen, but still get these options.  Is this possible?

    hi Kiran,
    report Category is a Pushbutton on the Attributes popup, it only appears if you use PNP logical DB.
    this is from SAPHelp: "Report Category
    Category used for HR reports that use the PNP logical database. It controls the type and number of fields that appear on the selection screen of an evaluation report."
    hope this helps
    ec

  • Selection screen: PNP database or other selection criteria

    I received a specification of a new to be developed program where they defined a selection screen with a with 2 radio buttons:
    1.     Use the logical database PHP for data selection (rb1);
    2.     Use other criteria for data selection (rb2).
    My question is, is this possible?
    Or should I add the other criteria between the GET PERNR and the following code with?
    Sample:
    GET PERNR
      IF rb2 = ‘X’.
        [Check other criteria]
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
      ENDIF.
    null

    When either pnp OR other selection :
    Create program 1 with 2 radiobuttons ==> pnp-selection (rb1)or other selection (rb2). When rb1 is selected go to pgm1 with pnp ; when rb2 is selected go to pgm2 with other selection criteria. Copy pgm1 to pgm2 and add extra selections en delete pnp-statements.
    When pnp WITH extra selections : 1 pgm can be used as you described.

  • Supress Selection of PNP LDB

    Hi experts,
      How to supress the whole selection screen of PNP logical database with custom selection screen in report?
    Thanks&Regards,
    Karthi

    Hi,
    Why do you want to suppress all the fields? It seems not to logical. When you suppres (leave blank), no restriction will apply to data picked by LDB. This can have dramatic affect on performance as entire population from the system will be fetched.
    I suggest first to fill some PNP fields in PBO (like PNPBEGDA, PNPENDDA etc) then set those fields invisible (hence suppress) them. This way, thought invisible they still apply filtering and program run.
    Loop at screen.
    if screen-name CS 'PNP'.  "to suppress all fields use this.
       screen-active = 0.
      "or
      screen-input = 0.  "to make them visible but read only
       modify screeen.
    endif.
    endloop.
    Regards
    Marcin

  • How to disable a standard selection screen of LDB?

    Hi Friends,
       My requirement is to disable a standard selection screen of a standard LDB and use my own Selection screen instead.How to go about it?.
    Prompt replies would be rewarded.
    Regards,
    Tamilarasan.

    Hi Tamilarasan,
      U can hide LDB field, in the following way.
    1.In tables statement remove the table name for the fields
      you done require.
    2.You can modify the screen fields. LOOP AT SCREEN
    3.In the program attributes you can choose the SAP defined
      selection screen if provided.
    Add can add new field, in the following way,
    1.If it is Customer program then as normal way like
    SELECTION-SCREEN: BEGIN OF BLOCK 1
    SELECT-OPTIONS:
    SELECTION-SCREEN END OF BLOCK 1.
    2. Goto SE36 and modify the selection views by creating  'CUS'.
    All LBD will not have dynamic selection. If you want you can copy to Z* version and add the following statement to have dynamic selction
    "SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE" XXXX
    Regards,
    Prabhu Rajesh.

  • 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

  • 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

  • Modifying selection screen of LDB

    Hi,
         I copied a standard report (RFCLLIB04) in a Z Report. This Report uses a logical database BRF. I have to put a check box on the selection screen in between the fields provided by Logical Database BRF i.e i have to put a check box after the field 'Ledger'.
    How can i achieve this ?
    Thanks,
    Ibrahim

    Hi,
    You can not add a chec box in between the selection screen of a LDB but you can add as an extra field at the bottom. If the user dont want to add in this way you can also look for the other selection screen whic may have the fields like you wanted.
    To achieve this goto --> attributes >  Report category> search for the required category here. It will change the selection screen. Other wise you need to create one customisex report category.
    thanks,
    Preetham

  • Working with dynamic selection screen in LDB FMF

    Hi Guys,
    I am working with LDB FMF and I have a requirement where user need the selection field in initial screen which is already comming in dynamic selection option.
    Is it possible without changing the standerd LDB.
    Atul
    Edited by: Atul Dhariwal on Jun 16, 2009 6:27 AM

    Hi,
    my requirement is to list fields from dynamic selection to appear in the main selection screen.
    user doesn't want's to click on dynamic selection option and select the fields.
    I hope i am clear this time.
    Atul

  • How to change selection screen on LDB

    Hi everybody,
    Does anyone know how to change the selection screen on a ABAP report that uses LDB ?
    What I want to do is to suppress some fields and buttons and to add hidden fields.
    Thanks for your help.
    BT

    Hi bruno,
    1. use like this :
    2.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
      IF SCREEN-NAME = 'MYFIELD'.
      SCREEN-INPUT = 0.
      SCREEN-INVISIBLE = 1.
      MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    regards,
    amit m.

Maybe you are looking for