GET (logical database)

Hi experts,
I have a get statement with logical database,
when it is executed,  it should go to END-OF-SELECTION. But it goes to GET statement again. Why is it happening? Do anybody have explanation about it?

hi,
Get statement functions as loop and endloop statement .... and comes out of it only when it sees any exit statement after executing that statement ....For more information check out
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/get_.htm
Regards,
Santosh

Similar Messages

  • Sorting before get logical database

    Hi,
    I would like to know any way to apply sorting before get logical database?
    for e.g.
    GET regup.
       PERFORM extract.
       IF reguh-zbukr NE regup-bukrs.
         tab_uebergreifend-zbukr = reguh-zbukr.
         tab_uebergreifend-vblnr = reguh-vblnr.
         COLLECT tab_uebergreifend.
       ENDIF.
    END-OF-SELECTION.
    I need to sort regup before GET regup which before it trigger for each line.
    Thanks.

    Hi,
    Instead of going for a sort before GET statement, you can move the required fields into an internal table first and sort that table and use it for your processing.
    A small eg:
    GET bkpf.
      MOVE:bkpf-bukrs TO tb_bkpf-bukrs,
                 bkpf-budat TO tb_bkpf-budat,
                 bkpf-belnr TO tb_bkpf-belnr.
          APPEND tb_bkpf.
          CLEAR  tb_bkpf.
    Please revert back for any further queries.
    Regards,
    Chandra.

  • Logical Database DDF - GET KNA1 - change KUNNR to another customer....

    Hi
    Question 1a:
    When using logical database DDF I perform a GET KNA1 a check is performed in order to see if customer should be within selection or not. In some cases this customer refers to another customer (fiscal address) that should be used instead.
    So Customer KNA1-KUNNR: 123 should instead be Customer 456 which contains the relevant data for the next step in the selections from the logical database.
    ..GET KNB1
    ..GET BSID...
    How is it possible to replace customer 123 with customer 456 so the continous processing of the logical database will use the new customer number instead.
    Question 1b
    And a follow up question - If there is a solution to question above....
    How can I make sure that IF customer 456 pops up in the regular selection from the logical database - It is excluded since it was already used (when customer 123 was replaced with 456 above)...
    Best regards
    Henrik

    Hi Ranganath!
    Thankyou for looking into my problem.
    Ranganath Ramesh wrote:
    ...If you want to do something like that then you need to manually populate the customer numbers which are related to the selection screen field....
    Could you please clarify how I manually could add this new customer number to my selection screen field...whithout disturbing the origianal selection with GET KNA1 - at the same time as the CHECK-statement for my old customer number fails and is excluded from the selection.
    BR
    Henrik

  • How to get the selection parameters from logical database into one of the t

    Hi Sap ABAP Champians,
    How to get the selection parameters from logical database into one of the tab in the tabstrip selection-screen.
    Please help me for this
    Thanks
    Basu

    Hi
    Thanks, that will work, but then I'll have to insert code into all my reports.
    I can see that "Application Server Control Console" is able to rerun a report.
    This must mean that the Report Server has access to the runtime parameters.
    But how?
    Cheers
    Nils Peter

  • Not getting fields in logical database of infotypes

    Hi All,
    I have created Infotype(9xxx) through PM01, and also maintained the screen for this with 6 feilds..
    BEGDA, ENDDA, SUBTY, OBJPS, Zxxx1, Zxxx2
    every thing is going fine but when im creating logical database for that infotype,
    im getting only 3 feilds there
    PERNR
    Zxxx1
    Zxxx2
    I need to take all the fields there.. please suggest how to do this?
    Regards
    Neha Gupta

    Solved on own.

  • Get mapl gives ' mapl not defined in the current logical database'.

    Hello,
    i am going through the report RCPDRK00, i found a statement get plkod , get mapl .
    When i try to run this statement in my test program it says ' not defined in the curent logical database' .
    How to link with  logical database.
    regards,
    kevin.

    GET statements will provide your program with database records based on the code for the logical database. The program in this case is SAPDBPNM.
    Each GET will be supplied with data by the corresponding PUT subroutine.
    Read the help about the logical databases. This is considered obsolete technology, but still, they can be very useful.
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm

  • Logical Database-GET-LOOP.

    Hi,
    I am debugging a standard code where PYF logical database is used.
    START-OF-SELECTION.
    GET REGUH.
      CHECK SEL_ZAWE.
      CHECK SEL_UZAW.
      CHECK SEL_HBKI.
      CHECK SEL_HKTI.
      CHECK SEL_WAER.
      CHECK SEL_VBLN.
      PERFORM PRUEFUNG.
      PERFORM EXTRACT_VORBEREITUNG.
      PERFORM SORTBANK.
    GET REGUP.
      PERFORM SORTBOLETO.
      PERFORM EXTRACT.
    END-OF-SELECTION.
    SORT BY
        REGUH-ZBUKR                      
        REGUH-UBNKS                      
        REGUH-UBNKY                      
        REGUH-UBNKL                      
        REGUH-UBKNT                       
        REGUD-XEINZ                       
        REGUH-ZBNKS   
        REGUH-ZBNKY
        REGUH-ZBNKL
        REGUH-ZBNKN
        REGUH-LIFNR
        REGUH-KUNNR
        REGUH-EMPFG
        REGUH-VBLNR
        REGUP-BELNR.
    LOOP.
    AT END OF REGUH-VBLNR.
    ENDAT.
    ENDLOOP.
    Can anyone here please let me know
    1.whether it is looping on REGUH or REGUP.Is it on REGUH ?
    2.How to see the records in debugging for this loop.
    I mean as in internal table where we will get to see all the records that it is looping (loop at itab..endloop),how to see
    all the records that are considered for this loop in debugging.
    3.Does it loops both REGUH and REGUP ?
    Thanks,
    K.Kiran.

    INSERT
      reguh
      regup
      regud-gjahr
      regud-xabwz
    INTO daten.
    this create a structure (field group) for DATEN with every fields of reguh and regup, and two fields of regud.
    EXTRACT daten.
    move current values of the above mentionned structures to the group field and append it into the extract.
    LOOP.
    ENDLOOP.
    will read the extract, here DATEN, so in each loop the whole data of the above mentionned structures will be available.
    There are also SORT and AT options similar to those of internal tables, and a AT field_group when multiple structures were defined by INSERT statements.
    Read some documentation at [Extracts|http://help.sap.com/abapdocu_70/en/ABENABAP_EXTRACTS_EXTENDED.htm]
    Regards,
    Raymond

  • How to extract current record using get pernr (logical database)

    Hi all,
    I am using logical database in the program and using <b>get pernr</b> method. But there are multiple entries in the infotype for a perticular employee. i want to extract employees current record whose end date is greater than sy-datum.
    how to do this using <b>get pernr</b>?
    Thanks in advance.

    Hi Priti,
    Get Pernr statement will get all the records for each employee spcicified for the Begin and End dates on the selection screen and store in an internal table for the infotypes declared in the infotypes statement.
    You need to read this table and copy only the records that meet the date criteria in an internal table for further use.
    For Ex:
    infotypes : 0001.
    tables : pernr.
    TYPES : BEGIN OF ty_kostl,
             pernr TYPE pernr-pernr,
             kostl TYPE p0001-kostl,
             ename TYPE p0001-ename,
            END   OF ty_kostl.
    Work Areas
    DATA : g_kostl_wa  TYPE ty_kostl.
    Internal Tables
    DATA : i_kostl  TYPE TABLE OF ty_kostl.
    start-of-selection.
       get pernr.
       PROVIDE * FROM p0001 BETWEEN pn-begda AND pn-endda.
        if p0001-endda GT sy-datum.
           g_kostl_wa-pernr = p0001-pernr.
           g_kostl_wa-kostl = p0001-kostl.
           g_kostl_wa-ename = p0001-ename.
           APPEND g_kostl_wa TO i_kostl.
           CLEAR  g_kostl_wa.
        endif.
      ENDPROVIDE.

  • 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

  • Usage of GET - Basic LOGICAL database question

    Hi,
    I have a few doubts in Logical Databases.
    1.) Why should i include a logical database in a abap program.
    2.) Can i add more than 1 LDB to a abap program
    3.) can Nodes statement used on all nodes on LDB
    4.) Please provide a example program based on F1S LDB with small explanation.
    Thanks in advance,
    Bala.

    >
    Bala Shanmuga Priyan wrote:
    > Thank you all.
    >
    > What is the difference between tables and nodes statement,
    >
    > Thanks in advance,
    > Bala.
    AFAIK, it is expected that we should we the TABLES statement if the node type is a TABLE and if the node type is DDIC type then it is expected that we should use NODES statement, however I found that they can be used interchangeably.
    We can find the node type info in the structure defintion of the LDB(in SE36)
    Also check this extract from the SAP help
    The nodes of the structure are declared with the TABLES statement which generates
    the appropriate table work areas. You can also use the NODES statement to define
    database tables as nodes. If a node of a logical database is not a database table,
    you must use the NODES statement.
    [Example of a Logical Database |http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9be035c111d1829f0000e829fbfe/content.htm]

  • Logical Database in Abap Objects

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

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

  • Logical database in adhoc query

    Hello All,
    Can anyone tell me what is the logical database in adhoc query?

    Hi
    When you create a query , you have to select an infoset. Infoset can be considered as a source from which data is populated in the Query Fields.
    Infosets are created from Transaction SQ02.
    There can be four methods through which an Infoset can become a source of data:
    1.  Table join ( By joining two or more tables from Data dictionary)
         example: Joining tables PA0001 and PA0006 on Pernr to get a one resultant dataset
    2. Direct read of Basis Table ( Like PA0001 as a source for data in Infoset )
    3. Logical Database ( A Pre-written Program by SAP that extract data from clusters, tables taking care of authorizations and validity periods)
    Example : Logical database PNP, PNPCE (Concurrent Employement),PCH ( LDB for Personnel Development Data)
    Custom Logical DBs can be created in T_Code SE-36.
    4. Data Retrieval by a Program ( Custom code written by ABAP developers which will collect and process data) . This program has a corresponding Structure in data dictionary and the fields of this structure will be used in query)
    Reward Points, if helpful.
    Regards
    Waseem Imran

  • Logical Database and Logical Thing

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

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

  • Logical database access in abap HR

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

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

  • How to use Logical database in function module?

    I will create a function module in HR.
    but how to use Logical database  in function module ?  Logical database PNP always show screen.in function (RFC) code , it is a matter.

    You cannot attach the LDB to the main program of the function group.
    - So you may [SUBMIT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=submit&adv=false&sortby=cm_rnd_rankvalue] a report which use the LDB and get back the data (export/import), by default in the syntax of SUBMIT the selection-screen will not be displayed
    - Use [LDB_PROCESS|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=ldb_process&cat=sdn_all], fill a structured table for selection, and get data back in another table
    - Use [HR function modules to read Infotypes|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=hrfunctionmodulestoread+Infotypes&adv=false&sortby=cm_rnd_rankvalue].
    Regards

Maybe you are looking for

  • [JSP] I want execute a script only on click image

    Hello.Is it possible to execute a script JSP, only if I click on a image. Particulary i want to fill a field in a form only if I click on an image in the same page .jsp. In this field I should insert a name that I can recover like request.getParamete

  • Change "Date" From a Column in Table A, to New Column in Table B:

    I'm trying to pull a Date from TABLE_A, and change the year to a current date, and popluate this into a new table. I also want to pull the PK of TABLE_A over, so that I can create a link back to the master record. In my example I'm useing SYSDATE for

  • IK Bone Tool Bones are not Displaying

    This may be a very dumb question, but how do you get the bones to display? I have connected 5 graphics together with the bone tool, but when I was clicking and dragging the bones did not appear. The armature was created and I can click and drag them

  • Iphone 4 shutdown and came up with connect to itunes, but wont work, help!

    my iphone 4 shutdown on me, when it finally decided to turn back on it came up with "connect to itunes" when i did it woudlnt connect, ive had this come up before and i got of the "connect to itunes" but i forget how,im unable to use my phone and i n

  • PD problem: missing organization units in t-code PPEM-plan for organizaion

    An organizational unit do exist in organization management. If you display the structure by using PPOME you can see it. From expert mode, you can also see the relationship B002 to it's supervise organization. But when using PPEM, it was missing. If I