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

Similar Messages

  • Changing logical database DDF select order, and restricting the selection

    HI all,
    I am using logical database DDF for a report.  I would like to do two things:
    1) Change the sort order of records so that when my GET statements are processing, they are bringing the data back in sorted by a field of my choice (such as KNA1-REGIO, or KNB1-BUSAB).
    2) I would like to add KNA1-REGIO and KNB1-BUSAB as fields for selection during the LDB's initial selection, instead of filtering out records during the GET statements. 
    FYI, I did find the field DD_BUSAB in the LDB selection structure which I can use to restrict KNB1-BUSAB.  I am still not sure how to restrict by KNA1-REGIO though.
    Any thoughts?
    Thanks so much,
    L

    Thanks for the reply Shiba.  For that particular problem, the business wants to not have to use the dynamic selection, and just have KNA1-REGIO and KNB1-BUSAB as regular select options.  Like I said as well, I did find DD_BUSAB which I can use for KNB1-BUSAB, but KNA1-REGIO is still a problem. 
    Right now I just use a CHECK statement and filter kna1-regio after the GET kna1 statement.
    Thanks again,
    L

  • Problem with Logical Database DDF

    Hey All,
    I have a problem with Logical Database DDF.
    In my program I am typing this
    GET KNA1 based on selection screen. It is bringing back everything I want except BRAN1 whereby the field is ''. However in SE16 for KNA1 and for the same KUNNR, the field is populated with 'T180'
    I am not understanding this?! I thought LDB where menat to make things easy!!

    I think it's not used by DDF.
    so you must check it with:
    check kna1-bran1 in s_bran1.
    A.

  • Problem with logical database DDF in ABAP query

    Hi All,
          I have created an ABAP query via the transaction SQ01 using the logical database DDF to retrieve customer master data from tables KNA1 & KNB1. The selection screen used is the screen 903 of the logical database DDF. But now the problem is that when I execute the query, I am getting a blank value in the tax code4(KNA1-STCD4) field though there is value in the KNA1 table for this particular field. This field was added to the table by means of a customizing include. Can anyone suggest a way to get around this problem so that I can view the content of the field STCD4 in the query.
    Thanks and regards,
    Sarath.

    I think it's not used by DDF.
    so you must check it with:
    check kna1-bran1 in s_bran1.
    A.

  • Overlap/ connect / get info / change / method from another class

    I have checked this out but it did not help me much
    http://java.sun.com/docs/books/tutorial/java/javaOO/arguments.html
    Now the problem : I got 4 classes and they are connected together.
    The first MAIN class is Student witch lets you create a student with his student number and studio point.
    StudentTest is a class witch creates a new student in Student class...
    now the Student and the StudentTest work great togather, and they both check information and give a system.out.print with no problem.
    I have to make a class called Eksamenskontor ( SOrry its not in english ) and this will allow you to connect to the STUDENT class and modify ( add more studentPoeng )
    Then I have to make another class that test the Eksamenskontor to see if it really add and edit the studentPoeng method and returns the correct answer.
    Note that the max studentPoeng allowed is 500 and more.
    Posting code: this is what i have been working on so far and i cant greate or modify the studentPoeng from the new class witch edit the Eksamenskontor class... Im sorry if this is to confusing ! Im very new to java
    STUDENT CLASS
    public class Student
        private String navn;
        private int alder;
        private String studentNummer;
        private int studentPoeng;
        public int hentStudiepoeng() { return studentPoeng; } // CHECK THIS !!!
        public Student()
            this.navn = "Ukjent Student";
            this.alder = 0;
            this.studentNummer = "00000";
            this.studentPoeng = 0;
        public Student (String navn, int alder, String studentNummer, int studentPoeng)
            settNavn(navn);
            settAlder(alder);
            settStudentNummer(studentNummer);
            settStudentPoeng(studentPoeng); 
            // ALDER CHECK !
            if( alder >= 18 && alder <= 88 )
                System.out.println(navn + " er " + alder +  " ?r og er mellom 18-88 ?r sonen !");
            } else
            System.out.println(navn + " er " + alder + " ?r og er under 18 eller er over 88 ?r sonen !");
            // END ALDER CHECK !
            //STUDENTpoeng CHECK !
            if( studentPoeng <= 500 && studentPoeng >= 0)
                System.out.println(studentPoeng + ": Ditt student Poeng er mindre enn 500 eller er 500");
            } else
            System.out.println(studentPoeng + ": Ditt Student Poeng er mindre enn 0 eller h?yre enn 500");
            //END STUDENTpoeng CHECK !
            //STUDENTnummer CHECK !
            int stNumLength = studentNummer.length();
            if( stNumLength == 5 )
                System.out.print(studentNummer + ": Student nr innholder 5 tall !");  
            if ( stNumLength < 5 )
                System.out.print(studentNummer + ": Student nr innholder mindre enn 5 tall !");
            if ( stNumLength > 5 )
                System.out.print(studentNummer + ": Student nr innholder mer enn 5 tall !");
            //END Studentnummer CHECK !
        }// END STUDEN CONSTRUCTOR WITH PARATMITER
        // return methods !
        public String settNavn ( String navn )
            this.navn = navn;
            return navn;
        public int settAlder ( int alder )
            this.alder = alder;
            return alder;
        public String settStudentNummer( String studentNummer )
            this.studentNummer = studentNummer;
            return studentNummer;
        public void settStudentPoeng( int studentPoeng )
            this.studentPoeng = studentPoeng;
        // end return METHODS
        //?K STUDIO POENG ! METHOD !
        public int ?kStudentPoeng ( int nyPoeng )
            studentPoeng = nyPoeng + studentPoeng;
            if(studentPoeng > 500)
                System.out.println("\n*****************************************************");
                System.out.println("\n\nStudent Poeng er OVER grensen som er 500 max ! - Du har endret studie poeng eller legget mer enn nok!");
            } else if ( studentPoeng < 0 )
                System.out.println("\n\n\nNy verdi er satt til: " + nyPoeng + "\nStudentPoeng er under 0 OG DET ER ULOVELIG !");  
            return studentPoeng;
        //END ?K STUDIO POENG METHOD !
        //TO STRING !
        public String toString()
            return "\n\nDitt Studie Poeng er: " + studentPoeng + " og du er: " + navn + " og er : " + alder + " ?r gammel -\n se opp for noe feil !";
        //END TO STRING !
    }STUDENT TEST CLASS
    public class StudentTest
        public static void main ( String [] args )
            Student Milo = new Student("Milo", 18, "48588", 450);
            Milo.?kStudentPoeng(2);
            System.out.println(Milo.toString());
    }Eksamenskontor CLASS
    public class Eksamenskontor
        public Student tildelStudiepoeng (Student studentNummer, int studentPoeng )
            studentPoeng = studentPoeng;
            return studentNummer;
    }TEACHER CLASS ( WITCH CONNECT AND EDIT )
    public class Teacher
        public static void main(String [] args)
            Eksamenskontor tull = new Eksamenskontor();
            tull.tildelStudiepoeng(Student,5);  // THE PROBLEM IS HERE !!!! I CANNOT CONNECT IT RIGHT ! THIS IS IT THIS CANNOT CHANGE THE NEW ADDED STUDENTPOENG ! WHY ?!
    }I cannot connect teacher class to edit what in Eksamenkontor witch also is connected in Student.
    Edited by: hdMilo on Oct 17, 2007 7:10 AM

    the method returns the textfield, so you just need to get its text
    import java.awt.*;
    class Testing
      public Testing()
        Login login = new Login();
        System.out.println(login.getUsernameTF().getText());//<----
      public static void main(String[] args){new Testing();}
    class Login
    private TextField usernameTF = new TextField("Joe Blow");
    public TextField getUsernameTF() {
        return usernameTF;
    }

  • Optimization of DDF logical database

    Hi,
    I'm working on a program that uses DDF logical database to list accounting documents. In order to do this, we use three get sentences to loop into KNB1, BSID and BKPF tables.
    It's something like that:
    GET bkpf.
    gjahr is a range with several values
      CHECK bkpf-gjahr IN gjahr.
    checta is a range with several values
      CHECK bkpf-blart IN checta. "1
    GET bseg.
      CHECK bseg-bschl EQ '01' OR bseg-bschl EQ '11' OR  "2
            bseg-bschl EQ '12' OR bseg-bschl EQ '02'.
    GET gseg.
      PERFORM list_document.
    But my problem with this code is that it takes too much time to generate the report. Doing some performance analysis on execution, I've determined that the problem is with the access to tables of logical database (the "get" sentences).
    So I need to improve report performance, but I don't know how can I do this, maybe if the get returns only the fields I need for execution instead of all table fields runtime would be better, but I'm not very sure if this is possible.
    Another option could be changing GET sentences for SELECT, but looking into LDB code I see that as well as hard to change probably it will be useless.
    So any information about LDB optimization, or how to improve this kind of reports would be very appreciated.
    Thanks in advance
    Best regards

    Hi Raymond,
    first of all thanks for your answer, as you say it'd be better to use selection screen instead of check sentences, and I'll also use "GET bkpf FIELDS ..." to get only those fields that I need.
    I've tested this improvements but I believe that it doesn't decrease too much execution time, so I need to find more solutions to optimize access to logical databases.
    For Rob, maybe you're right and using LDB isn't the best solution, but I got this program done and I can't modify its way of retrieving data, only optimize it. To sum up, I can't erase LDB only optimize its execution.
    So any help in LDB optimization would be very appreciated.
    Thank you very much to both

  • How to refresh VO to get the changed value in other AM or backend database

    one VO is refrenced by two AMs, when i insert or update data by VO in one AM, how to get the changed data in another AM ?
    another case is i have updated some attributes of the record in database by SQL statement ,but the client can not get the updated value at once .
    i have tried to use executeQuery() ,but it does not work. now i always do a rollback method ,a bad idea.:)
    pls help me ! thanks
    Message was edited by:
    Guo Qinghua

    Mind that ADF BC (probably like any other persistence framework) caches data. So when you update something in the database other than via ADF BC, you then have in the ADF BC cache what is called 'stale data'. When you try to commit that nevertheless, the database will tell ADF BC that the record in the database has been updated by another user, and a rollback will be done. That is all to be expected.
    You can find some more info on how this works here:
    http://download-uk.oracle.com/docs/html/B25947_01/bcvoeo007.htm
    It also explains how to clear the cache and enforce that data will be read from the database.
    Jan Kettenis

  • Dynamic selection of DDF  standard logical database

    Dear All
    I have requirement like i have to hide dynamic selection button from my custom report where I am using logical database DDF .
    Is there any way to hide this button on my custom report .
    Regards
    Sunanda Mandavi

    Hello Thomas,
    thank you very much for the precious help.
    I appended the field BKTXT to BSIK and BSAK as used in logical database and these are automatically filled for new postings thanks to Move corresponding (as indicated).
    We are left with only to feed these new fields with existing data/records.
    kind regards..
    Edited by: Devi on May 19, 2009 12:51 PM
    Edited by: Devi on May 19, 2009 12:51 PM

  • Report Parameters with logical database

    Hello
    I have to read some HR infotypes that are provided with the logical database PNPCE.
    Fort his i have written a report that will use my logical database and get some information.
    What i need,are some new input parameters on the screen that are added by my report:
    parameters: p_persnr type person-pernr,
                        p_name type p0002-nachn,
                        p_sname type p0002-vorna.
    The problem is that i do not know how to link these parameters to my logical database reading.
    When i try to call "get <node>" ,my report is not returning anything.
    Is there a way to send  my parameters as selection parameters to the logical database?
    thank you

    The selection screen 1000 is created dynamically during runtime. I doubt change done by SE51 will solve the issue. In fact there is some code which can help on this.
    INITIALIZATION.
    To restrict the range of PERNRs
      PERFORM z_seloption_restrict USING 'PNPPERNR'.
    *&      Form  Z_Seloption_Restrict
    * Restrict range in select option
    *      -->VALUE(SOP_NAME)  Name of select option as string
    FORM z_seloption_restrict USING value(pv_sop_name).
      IF st_restrict-opt_list_tab[] IS INITIAL.
        CLEAR st_opt_list.
        MOVE: 'EQ' TO st_opt_list-name,
              'X'  TO st_opt_list-options-eq.
        APPEND st_opt_list TO st_restrict-opt_list_tab.
      ENDIF.
      REFRESH : st_restrict-***_tab.
    *  READ TABLE st_restrict-***_tab INTO st_asst
    *                        WITH KEY name = pv_sop_name.
    *  IF sy-subrc NE 0.
      CLEAR st_asst.
      MOVE: 'S'         TO st_asst-kind,
            pv_sop_name TO st_asst-name,
            'I'         TO st_asst-sg_main,
            ' '         TO st_asst-sg_addy,
            'EQ'        TO st_asst-op_main.
      APPEND st_asst TO st_restrict-***_tab.
    *  ENDIF.
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
        EXPORTING
          restriction = st_restrict.
    ENDFORM.                    "Z_Seloption_Restrict

  • Is Logical Database used in ABAP?????

    Hi All,
    I m very confused whether LDB's are used in ABAP or not.
    i have undergone a small training in ABAP-HR (HCM).
    In that training i was told that there is an advantage in HCM that LDB's are used here
    which were not used in ABAP.
    And i have read somewhere that LDB's are used in ABAP.
    can plz sumone give a light on this.
    Thanks,
    Sonali

    hi,
    The use of a logical database provides you with an alternative to having to program database accesses individually. Logical databases retrieve data records and make them available to ABAP programs.
    The same logical database can be the data source for several Quick Views, queries, and programs. In the Quick View, the LDB can be specified directly as a data source. A query works with the logical database when the functional area that generated the query is defined with a logical database. In the case of type 1 programs, the LDB is entered in the attributes or called using function module LDB_PROCESS. See appendix for information on how to use the function module.
    Logical databases offer several advantages:
    The system generates a selection screen. The use of selection screen versions or variants provides the required flexibility.
    The user does not have to know the exact structure of the tables involved (especially the foreign key dependencies); the data is made available in the correct order at GET events.
    Performance improvements within logical databases directly affect all programs linked to the logical database, without having to change the programs themselves.
    Maintenance can be performed at a central location.
    Authorization checks can also be performed centrally.
    A logical database is an ABAP program that reads predefined data from the database and makes it available to other programs.
    A hierarchical structure determines the order in which the data is supplied to the programs. A logical database also provides a selection screen that checks user entries and conducts error dialogs. These can be extended in programs.
    SAP provides some 200 logical databases in Release 4.6. The names of logical databases have been extended to 20 places in Release 4.0 (namespace prefix max. 10 characters).
    In the case of executable programs, you can enter a logical database in the attributes.
    Use the NODES statement to specify the nodes of the logical database that You want to use in the program. NODES allocates the appropriate storage space for the node - that is, a work area or a table area depending on the node type.
    The logical database makes the data records available for the corresponding GET events.
    The sequence in which these events are processed is determined by the structure of the logical database.
    Logical databases are made up of several sub-objects. The structure determines the hierarchy, and thus the read sequence of the data records.
    Hope this helps, Do reward

  • User defined Selection screen for Logical database

    hi all,
           can we display a user defined selection screen instead of the default selection screen in LDB . eg pnp
    cheers
    senthil

    Hi,
    to my knowledge, the selection screen of a logical database can only be changed (versions!) in the logical database itself.
    What you can do is, write a program with your own selection screen an then either call another program that uses the LDB or -  much better - you call the LDB from your program with function module LDB_PROCESS!
    Example taken from the example library (TA ABAPDOCU):
    <b>REPORT demo_logical_database.
    DATA wa_spfli TYPE spfli.
    SELECT-OPTIONS s_carr FOR wa_spfli-carrid.
    DATA: callback TYPE TABLE OF ldbcb,
          callback_wa LIKE LINE OF callback.
    DATA: seltab TYPE TABLE OF rsparams,
          seltab_wa LIKE LINE OF seltab.
    callback_wa-ldbnode     = 'SPFLI'.
    callback_wa-get         = 'X'.
    callback_wa-get_late    = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SPFLI'.
    APPEND callback_wa TO callback.
    CLEAR callback_wa.
    callback_wa-ldbnode     = 'SFLIGHT'.
    callback_wa-get         = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SFLIGHT'.
    APPEND callback_wa TO callback.
    seltab_wa-kind = 'S'.
    seltab_wa-selname = 'CARRID'.
    LOOP AT s_carr.
      MOVE-CORRESPONDING s_carr TO seltab_wa.
      APPEND seltab_wa TO seltab.
    ENDLOOP.
    CALL FUNCTION 'LDB_PROCESS'
         EXPORTING
              ldbname                     = 'F1S'
              variant                     = ' '
         TABLES
              callback                    = callback
              selections                  = seltab
         EXCEPTIONS
              ldb_not_reentrant           = 1
              ldb_incorrect               = 2
              ldb_already_running         = 3
              ldb_error                   = 4
              ldb_selections_error        = 5
              ldb_selections_not_accepted = 6
              variant_not_existent        = 7
              variant_obsolete            = 8
              variant_error               = 9
              free_selections_error       = 10
              callback_no_event           = 11
              callback_node_duplicate     = 12
              OTHERS                      = 13.
    IF sy-subrc <> 0.
      WRITE: 'Exception with SY-SUBRC', sy-subrc.
    ENDIF.
    FORM callback_spfli USING name  TYPE ldbn-ldbnode
                              wa    TYPE spfli
                              evt   TYPE c
                              check TYPE c.
      CASE evt.
        WHEN 'G'.
          WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
          ULINE.
        WHEN 'L'.
          ULINE.
      ENDCASE.
    ENDFORM.
    FORM callback_sflight USING name  TYPE ldbn-ldbnode
                                wa    TYPE sflight
                                evt   TYPE c
                                check TYPE c.
      WRITE: / wa-fldate, wa-seatsocc, wa-seatsmax.
    ENDFORM.</b>

  • How to debug Logical database

    HI all,
      I am trying to execute the report RFDOPR00 , where structure BSEGA is getting populated from Logical database DDF. Can I put break poing in DDF and see how BSEG is being populated.
    I tried doing so but , not able to reach the break point. Please suggest how to debug DDF?
    Regards
    Saurabh

    Hi,
    If you want to see how it is getting populated.
    Goto Tcode SE36, give DDF and press display.
    On the user menu bar click on source code to view the logic.
    Regards,
    Amit

  • Transport logical database

    Hello,
    I have added a new field for de logical database 'DDF'.
    I can´t transport this change.
    I have transported the structure but not the selection view. So, I don`t have the new field transported.
    Is it possible to transport new fields?
    Thanks in advance.

    Welcome to SCN.
    It is not at all advisable to change/modify the standard logical databases as it may be used in several standard programs.
    Instead use them in your report as it is and add the required functionality in the report itself.
    Still, if its require to change it then follow this SAP Link -
    http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    Edited by: Amit Khare on Dec 15, 2008 11:18 PM

  • Transport Request for logical database

    Hi ,
    Could you please advice how to create Transport Request when we made the changes to logical database ( added new filed to the logical database)
    I have added payment term field to the logical database DDF, but Transport Request was not created for this change.
    Please advise, we need to move this changes to other servers from development.
    Thanks,
    KSR

    How did you change the standard LDB ?
    Create a new reuqest in se09 and add this.
    R3TR  LDBA  DDF

  • Use of Logical Database in function module

    Hello Experts,
    Is there a way of using logical database and Get enent inside a function module.
    I am trying to create a RFC for HR module and need this badly. Any help would be highly appriciated.
    Thanks,
    Gregory fernando

    This fm will work fine with all LDBs including PNP
    Have you checked the fm documentation ?

Maybe you are looking for

  • ORA-24335 - cannot support more than 1000 columns - How to solve this?

    Hi, I got error message 'ORA-24335 - cannot support more than 1000 columns ' when i try to insert x no of rows for a table with following code: INSERT ALL INTO tableA Values ('A', 'B', 'C', 1, 2, 3) INTO tableA Values ('D', 'E', 'F', 4, 5, 6) INTO ta

  • I just bought an apple TV 2

    I just bought an Apple TV 2, and when connected, the picture on my TV is very doll.  I know that the problem is not my TV, because it works great with my cable box.  is my apple tv faulty or it is a setting on my TV?? Anyone??

  • As Is and To Be Process ?

    Hello SAP Guru,                                  Can any one Help me in doing To Be Process. I am in My First Implementation and I finished As IS Study. Next To Be Process . So Any One can Provide a Sample FICO To Be Process Document, It Will give so

  • Making A Button to make something happen....?!

    Okay... Basically, what I'm trying to do is make it so that when the user clicks a little arrow, some more text is revealed.... For example... the user might see.. "Bid starts at 15:00 GMT >" Then the user can click the ">" and the following is shown

  • Odd behaviour of OracleCommandBuilder.DeriveParameters(OracleCommand)

    Hi Gurus, Kinda lost here..needs expert help. I have a procedure with the following signature: procedure my_proc(param1 in varchar2 default null)... Now Im using the code below: OracleConnection con = Connect(connectionString); OracleCommand cmd = ne