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

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

  • 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.

  • Reg : Selection Screen For PNP LDB

    Hi All,
    I am having problem in selection screen of logical database PNP..  I am attaching the screenshot of the screen which I am using.
    [https://www.2big2send.com/collect/861452b5d77254eea4fa17cec4842d63]
    Actually.. I created 3 radio buttons down in the screen.. i.e. Delta, delta for X date, full file.
    If the user click on Delta radio button then he can only select today radio button.. If he select others than.. the error message should come.. Can anyone help me.. coz.. I dont know.. which event is triggering if the user select other than today radio button of the PNP screen.
    I put break points on the AT SELECTION SCREEN and AT SELECTION SCREEN OUTPUT.
    But, none of the event is triggering.. Can anyone help me regarding this.
    Thanks,
    Regards,
    Jhings.

    Hi...
    Thanks for the reply.. I did this also..
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP $zb2.
      BREAK-POINT.
    $zb2 is the group name of the radio button which is there in PNP logical database selection screen..
    Same problem again.. this event is not triggering also..
    Regards,
    Jhings

  • 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 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.

  • 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.

  • Change selection screen in LDB (KDF logical database - NOT HR)

    Hi All,
    Iu2019d like to use KDF logical database to keep the dynamic selections since user wants to use it but I need to change the selection screen itself. The existing variants for KDF donu2019t meet the user requirements. Some fields I need to hide some add. Like I want to u201Cremoveu201D the field u2018Posting periodu2019 (MONAT) (which is available in dynamic selection screen) and put it on the u201Cmainu201D selection screen.
    Do I need to create my own logical database or there is a way around?
    Could someone give me a practical advice or sample of solution?
    Thanks a lot.

    Thanks Himanshu,
    I did as you suggested but problem is that it does not allow me to hide the whole block.
    I have 3 filelds actually on block KD_0 I need to hide (its from selection screen of KDF logical database.)
      SELECT-OPTIONS: KD_LIFNR FOR LFA1-LIFNR MATCHCODE OBJECT KRED.
      SELECT-OPTIONS: KD_BUKRS    FOR  LFB1-BUKRS.
    SELECTION-SCREEN END OF BLOCK KD_0.
    PARAMETERS KD_INDEX AS SEARCH PATTERN FOR TABLE LFA1.
    What I did is below.  I used sp instead of  u201C=u201D since it has many screen for field KD_LIFNR(for frame, text etc).
    And when I did just for KD_LIFNR it was hidden but when I did the same for KD_BUKRS it was not hidden . The field has stars u201C*********u201D in it.
    Same happen with KD_INDEX. The name of the field is hidden but field not and it filled with ********. Do you have any ideas what it can be?
    I debugged it to catch all screen names but no luck
      loop at screen.
        if screen-name cp 'KD_LIFNR' or
        screen-name cp 'KD_BUKRS' or
        screen-name cp 'KD_INDEX' or
        screen-name = '%B000003_BLOCK_1000' or       
        screen-name = 'SSCRTEXTS-FRAME_TEXT' or
        screen-name = 'SSCRTEXTS-MCID_TEXT' or
        screen-name = 'SSCRTEXTS-STRNG_TEXT' or
        screen-name = 'SSCRFIELDS-SEARCH_BTN' or
        screen-name =  '%B025008_BLOCK_1000' or
        screen-name =  '%F021010_1000' or
        screen-name =  'ALCUR' or
        screen-name =  '%F022012_1000' or
        screen-name =  'EXCDT' or
        screen-name = 'SSCRFIELDS-UCOMM'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.

  • Question reg. selection screen

    I am writing a report. On selection screen, I have a field for Sales order (vbeln) from a custom table zsales.  Now when the user selects this field on selection screen and press F4, he/she should be able to select the salesorders from the table zsales.
    I wrote:
    SELECT-OPTIONS: s_vbeln FOR zsales-vbeln.
    But on the output, when I press F4, I am still not getting any input help. What change can you suggest?
    Appreciate your input.
    Thanks,
    Krishen

    Try something like this.
    report zrich_0001 .
    tables: zsales
    data: begin of izsales occurs 0,
           vbeln type vbak-vbeln,
          end of izsales.
    select-options s_vbeln for zsales-vbeln.
    initialization.
      select vbeln into table izsales from zsales.
      sort izsales ascending by vbeln.
      delete adjacent duplicates from izsales comparing vbeln.
    at selection-screen on value-request for s_vbeln-low.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'VBELN'
                dynprofield = 'S_VBELN'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = izsales.
    start-of-selection.
    Regards,
    Rich Heilman

  • Reg selection screen

    Hi I have a requirement where I have to consider my field which is there on the selection screen.
    I want to capture like user may select select options and selection option as '=' and he don't enter any values for this field so for this scenario i have to execute my program by taking that field as empty field.
    second scenario is the user will not give any value on the selection screen for this field then the report has to take all the values of that field for the report.This second scenario is we can do that when use in operator in the selection.
    But I am not getting how to achieive the ist scenario I mean how I will get for that field user has entered '=' from select options?
    Thanks&Regards
    Mahesh

    Hi All,
    Thanks a lot to all of you I got it actually i was debugged that to find option value 'EQ' before I post this issue but I could not found that may be something wrong i did that time.
    Thanks&Regards
    Mahesh

  • Reg Selection Screen Events

    Hi Friends,
    I have 3 input field  and two radio button in my selection screen, On clicking the first radio button, the sum of two fields should be displayed in the third input field. Similarly when i click the second radio button, the multiply of two fields should be displayed in third inpur field.
    Could you please all help me on this?
    Regrads,
    Sundaresan

    Hi,
    Check this code..
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    parameter : num1 TYPE i,
                num2 TYPE i,
                num3 TYPE i.
    PARAMETERS: r1 RADIOBUTTON GROUP rad1 user-command usr DEFAULT 'X',
                r2 RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN OUTPUT.
      IF r1 EQ 'X'.
        num3 = num1 + num2.
      ENDIF.
      IF r2 EQ 'X'.
        num3 = num1 * num2.
      ENDIF.

  • Reg: Selection screen tabstrip

    Hi all,
      I need to create a screen with tab strip and inside the tab it should hold a subscreen containing text element and checkbox and a  button.
    This is to be done using the selection-screen begin of screen method and not as a module pool.
    SELECTION-SCREEN BEGIN OF SCREEN 9000 TITLE title.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                        TAB (20) button1 USER-COMMAND push1,
                      END OF BLOCK mytab.
    SELECTION-SCREEN END OF SCREEN 9000.
    I tried by above way but it's going to dump.
    Kindly help me on this by providing a sample code as to how to go about it.
    Thanks in advance,
    Krithika

    Hi
    Sample programs:
    DEMO_DYNPRO_TABSTRIP_LOCAL Tabstrip Control - Scrolling at SAPgui
    DEMO_DYNPRO_TABSTRIP_SERVER Tabstrip Control - Scrolling at Application Server
    DEMO_SEL_SCREEN_IN_TABSTRIP Selection Screen as Subscreen in Tabstrip
    DEMO_SEL_SCREEN_WITH_TABSTRIP Selection Screen with Tabstrips
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK selec FOR 17 LINES,
                        TAB (23) button1 USER-COMMAND push1,
                        TAB (23) button2 USER-COMMAND push2,
                        TAB (23) button3 USER-COMMAND push3
                        DEFAULT SCREEN 1001,
                        END OF BLOCK selec.
      SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.
      SELECTION-SCREEN END OF SCREEN 1001.
      SELECTION-SCREEN BEGIN OF SCREEN 1002 AS SUBSCREEN.
      SELECTION-SCREEN END OF SCREEN 1002.
      SELECTION-SCREEN BEGIN OF SCREEN 1003 AS SUBSCREEN.
      SELECTION-SCREEN END OF SCREEN 1003.
    Initialization
    INITIALIZATION.
      button1 = text-det.
      button2 = text-sup.
      button3 = text-mef.
      selec-prog = sy-repid.
      selec-dynnr = 1001.
      selec-activetab = 'BUTTON1'.
    Managing the keys
    AT SELECTION-SCREEN.
      CASE sy-ucomm.
        WHEN 'PUSH1'.
          selec-dynnr = 1001.
          selec-activetab = 'BUTTON1'.
        WHEN 'PUSH2'.
          selec-dynnr = 1002.
          selec-activetab = 'BUTTON2'.
        WHEN 'PUSH3'.
          selec-dynnr = 1003.
          selec-activetab = 'BUTTON3'.
      ENDCASE.
    2)  DATA flag(1) TYPE c.
    SUBSCREEN 1
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p1(10) TYPE c,
    p2(10) TYPE c,
    p3(10) TYPE c.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 100.
    SUBSCREEN 2
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
    PARAMETERS: q1(10) TYPE c OBLIGATORY,
    q2(10) TYPE c OBLIGATORY,
    q3(10) TYPE c OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF SCREEN 200.
    STANDARD SELECTION SCREEN
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
    TAB (20) button1 USER-COMMAND push1,
    TAB (20) button2 USER-COMMAND push2,
    TAB (20) button3 USER-COMMAND push3
    DEFAULT SCREEN 300,
    END OF BLOCK mytab.
    INITIALIZATION.
    button1 = text-010.
    button2 = text-020.
    button3 = text-030.
    mytab-prog = sy-repid.
    mytab-dynnr = 100.
    mytab-activetab = 'BUTTON1'.
    AT SELECTION-SCREEN.
    CASE sy-dynnr.
    WHEN 1000.
    CASE sy-ucomm.
    WHEN 'PUSH1'.
    mytab-dynnr = 100.
    mytab-activetab = 'BUTTON1'.
    WHEN 'PUSH2'.
    mytab-dynnr = 200.
    mytab-activetab = 'BUTTON2'.
    ENDCASE.
    WHEN 100.
    MESSAGE s888(sabapdocu) WITH text-040 sy-dynnr.
    WHEN 200.
    MESSAGE s888(sabapdocu) WITH text-040 sy-dynnr.
    ENDCASE.
    MODULE init_0100 OUTPUT.
    LOOP AT SCREEN.
    IF screen-group1 = 'MOD'.
    CASE flag.
    WHEN 'X'.
    screen-input = '1'.
    WHEN ' '.
    screen-input = '0'.
    ENDCASE.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
    MESSAGE s888(sabapdocu) WITH text-050 sy-dynnr.
    CASE sy-ucomm.
    WHEN 'TOGGLE'.
    IF flag = ' '.
    flag = 'X'.
    ELSEIF flag = 'X'.
    flag = ' '.
    ENDIF.
    ENDCASE.
    ENDMODULE.
    START-OF-SELECTION.
    WRITE: / 'P1:', p1,'Q1:', q1,
    / 'P2:', p2,'Q2:', q2,
    / 'P3:', p3,'Q3:', q3.
    <b>Reward if usefull</b>

Maybe you are looking for