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

Similar Messages

  • Selection order to follow the select-option order rather than numerical ord

    Hi Gurus!
    I have created a program to print Form headers. The program selects the documents from nast table based on the document numbers eneterd in selection screen. When I eneter for example documents :
    10000007
    10000005
    10000001
    10000002
    10000004 and run the program it prints the headers in sequential order rather than the order I put the documents numbers in selection screen.
    It prints
    10000001
    10000002
    10000004
    10000005
    10000007.
    Is there by any chnace a way that I can print it exactly in the same order as the documents are entered in the selection screen?
    Thanks. Help will be greatly appreciated.

    Yes, I agree. But my suggestion was to display or call the Form FM within the Select-options loop and Read Nast internal table for details. Hope you have restricted the Select options to restrict the entries only for "=" with no extension.
      Loop at S_SELOPT.
         Read table GT_NAST into GS_NAST with key OBJKY = S_SELOPT-LOW.
         If Sy-Subrc eq 0.
    .....  your existing logic to display the form....
         endif.
      Endloop.

  • 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

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

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

  • I have corrected the orientation of all my photos on my PC. iTunes changes the order and ignores the orientation correction on just one founder" why?

    I have corrected the orientation of all my photos on my PC. iTunes changes the order and ignores the orientation correction on just one founder" why?

    See this thread...
    tt2

  • Bind Variable in SELECT statement and get the value  in PL/SQL block

    Hi All,
    I would like  pass bind variable in SELECT statement and get the value of the column in Dynamic SQL
    Please seee below
    I want to get the below value
    Expected result:
    select  distinct empno ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    100, HR
    select  distinct ename ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    TEST, HR
    select  distinct loc ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    NYC, HR
    Using the below block I am getting column names only not the value of the column. I need to pass that value(TEST,NYC..) into l_col_val variable
    Please suggest
    ----- TABLE LIST
    CREATE TABLE EMP(
    EMPNO NUMBER,
    ENAME VARCHAR2(255),
    DEPT VARCHAR2(255),
    LOC    VARCHAR2(255)
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (100,'TEST','HR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (200,'TEST1','IT','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (300,'TEST2','MR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (400,'TEST3','HR','DTR');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (500,'TEST4','HR','DAL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (600,'TEST5','IT','ATL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (700,'TEST6','IT','BOS');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (800,'TEST7','HR','NYC');
    COMMIT;
    CREATE TABLE COLUMNAMES(
    COLUMNAME VARCHAR2(255)
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('EMPNO');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('ENAME');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('DEPT');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('LOC');
    COMMIT;
    CREATE TABLE DEPT(
    DEPT VARCHAR2(255),
    DNAME VARCHAR2(255)
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('HR','HUMAN RESOURCE');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('MR','MARKETING');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    COMMIT;
    PL/SQL BLOCK
    DECLARE
      TYPE EMPCurTyp  IS REF CURSOR;
      v_EMP_cursor    EMPCurTyp;
      l_col_val           EMP.ENAME%type;
      l_ENAME_val       EMP.ENAME%type;
    l_col_ddl varchar2(4000);
    l_col_name varchar2(60);
    l_tab_name varchar2(60);
    l_empno number ;
    b_l_col_name VARCHAR2(255);
    b_l_empno NUMBER;
    begin
    for rec00 in (
    select EMPNO aa from  EMP
    loop
    l_empno := rec00.aa;
    for rec in (select COLUMNAME as column_name  from  columnames
    loop
    l_col_name := rec.column_name;
    begin
      l_col_val :=null;
       l_col_ddl := 'select  distinct :b_l_col_name ,pr.dept ' ||'  from emp pr, dept ps where   ps.dept like ''%IT'' '||' and pr.empno =:b_l_empno';
       dbms_output.put_line('DDL ...'||l_col_ddl);
       OPEN v_EMP_cursor FOR l_col_ddl USING l_col_name, l_empno;
    LOOP
        l_col_val :=null;
        FETCH v_EMP_cursor INTO l_col_val,l_ename_val;
        EXIT WHEN v_EMP_cursor%NOTFOUND;
          dbms_output.put_line('l_col_name='||l_col_name ||'  empno ='||l_empno);
       END LOOP;
    CLOSE v_EMP_cursor;
    END;
    END LOOP;
    END LOOP;
    END;

    user1758353 wrote:
    Thanks Billy, Would you be able to suggest any other faster method to load the data into table. Thanks,
    As Mark responded - it all depends on the actual data to load, structure and source/origin. On my busiest database, I am loading on average 30,000 rows every second from data in external files.
    However, the data structures are just that - structured. Logical.
    Having a data structure with 100's of fields (columns in a SQL table), raise all kinds of questions about how sane that structure is, and what impact it will have on a physical data model implementation.
    There is a gross misunderstanding by many when it comes to performance and scalability. The prime factor that determines performance is not how well you code, what tools/language you use, the h/w your c ode runs on, or anything like that. The prime factor that determines perform is the design of the data model - as it determines the complexity/ease to use the data model, and the amount of I/O (the slowest of all db operations) needed to effectively use the data model.

  • Using order by in the select query

    Hi All,
    I have query in which I need the latest record. To get the latest record, I can
    1) Select all entries into an internal table and sort them descending and get the first one
    2) Select all entries into an internal table and order by in the select statement itself.
    Then read the first one.
    Which approach should be better as for as the performance is concern.
    The query is on MKPF table and I have the material document number. I need the latest entry.
    Regards,
    Shahu

    Hi,
    The first one would be better.At the most we should not use order by in select statement bcoz it directly sorts the data according to that in database itself reverting performance issues.
    Otherwise you can use select max* if records are less.
    Reward points if helpful.
    Thanks,
    Ponraj.s.

  • How to Create a Selection Variable for restricting the querry output

    Hi Gurus,
    I have created a query in query designer on a Multiprovider and the output of the query is a Formula in a structure which calculates a % value, the client is looking for entering a range of number during the query selection screen and the output should be restricted to the given selection values.
    Can any one tell me how i should create a selection variable that would take the input from the user during the query selection screen and then restrict the output to that value which user specified.
    Is there a need to write any customer exit or is there any alternative way to make the query work as the requirement is.
    I hope this explains my problem but if any questions please let me know so that i can give u specific information.
    Thanks,
    Nisha.

    Hi Nisha,
    Firstly, in order to restrict the query output by a key figure value, you will need to create a condition on that key figure. This is done in the query deisgner. Now when you are creating the condition you can also use user entry variables (formula variables with user entry) to let the users enter the value that they want to see.
    See here for more details:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/702e39074dc93de10000000a114084/content.htm
    Hope this helps...

  • F4 Help in Module pool and restricting the entries

    Hi all,
          I was looking how to give F4 help in module pool program and restrict the number of entries on tht event.
    Take a example of VBELN, it is having number of entries so for F4 help we first take all the entries for VBAK for VBELN and then use FM 'F4IF_INT_TABLE_VALUE_REQUEST' and pass the table.
    So how can we restrict number of entries initially 200 and then user can input number of hits.
    ( How to use Callback subroutin ).
       Waiting for valuable additions.
    Thanks,
    Anmol.

    Hi ,
        This is my query, I want to restrict the number of entries fetched by the search help depending on the user input like in standard help.
    Like VBELN is having number of records how can we asign a help to field like VBELN( for example ), is there any way to restrict the entries on search help rather than selection all the entries for tht field from database which is not good for performance. Like initially it should fetch 100 or 200 records, then if user want more entries to be fetch he can input the number of entries like in standard help. Any idea on this.
    Thanks,
    Anmol.

  • I operate a windows 8,  62 bit computer.  I have ordered and downloaded the following product for AU$129 Adobe Photoshop Elements 13 (Windows,English) on the understanding that it would convert PD files to word.  It is not doing so. Is this a wrong order?

    I operate a windows 8,  62 bit computer.  I have ordered and downloaded the following product for AU$129 Adobe Photoshop Elements 13 (Windows,English) on the understanding that it would convert PD files to word.  It is not doing so. Is this a wrong order?

    if you're trying to convert pdf files to word files, you want acrobat pro or acrobat standard, Buying guide | Adobe Acrobat XI Standard
    http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html
    http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

  • HT2493 How to change preview image of a file and NOT the icon ?

    Hello dear Mac users
    How to change preview image of a file and NOT the icon ?
    I know how to change the icon of a file, but I wish to know how to change the preview of any file.
    For example: my file is "mysong.aif", I changed the icon to be "mylogo.png" using cmd+i, cmd+v on the icon. But the preview of the file still remain the same.
    I know it can be changed using iTunes, but I don't want to import all my files in iTune, and iTune cannot import all type of files.
    I hope someone will understand my needs...
    Thanks!

    Thanks BeerbarX
    You can't change the preview image for anything
    hoo
    QuickLook plugin
    what are the plugin ?
    In the case of a music file, it will be that generic black box with a note on it
    That is exactly what I'm asking about !
    MP3 which has a special tagging standard that can include artwork
    How can I "tag" my MP3 without going thru iTunes ? Is it possible to do it dirrectly in the Finder ? Is there other type of files that can include such tags ?
    Thank you for answering my question , wich I have to admit may seem useless, but I wish I could put something like a signature logo on each of the different file I produce (as AIF for music and MP4 for video clip) instead of that generic black box with a note on it, and by the meantime keeping a different icon for all of them in order to illustrate theire content.

  • I am trying to sync a playlist to my Nano,  but when I click on the Music tab at the top, it will not allow me to select the option Selected Playlist, Artists, etc.  I cannot un-check the Entire Music library option and check the Selected Artist - on

    I am trying to sync a playlist to my Nano,  but when I click on the Music tab at the top,
    it will not allow me to select the option Selected Playlist, Artists, etc.  I cannot un-check the Entire Music library
    option and check the Selected Artist … one.
    I have changed the Sync option to Manually sync, but that does not help.
    How can I change this to the second option?
    Thanks.

    There is a checkbox above those two options for how to sync.  It says Sync Music; it enables automatic syncing.  That box needs to be checked before you can select from the two options for how automatic syncing is performed.
    NOTE:  If the iPod is current set up to Manually manage music [and videos], checking that Sync Music box replaces its current content with content from your iTunes library, based on how automatic syncing is set up on that screen.
    So, if your goal is to add ONE playlist to an iPod that is managed manually, you do not want to do this because iTunes will erase the iPod's current content and replace it with just that ONE selected playlist (and whatever else you select on that Music settings screen).
    Instead, if the iPod currently uses the manual setting, you need to add playlists manually to the iPod (not use the automatic syncing setting).  Please post back with more details about your situation. 

  • Unable to decode and import the select wav/mp3 file

    Hi,
    I've been TRYING to test the Text-to-speech feature in
    Captivate 4. Problem: "Unable to decode and import the select
    wav/mp3 file" each and every time I want to use it. Frustrating!
    I also tried importing sounds from the library, same problem.
    My system is Vista Business 64Bit, 4Gb RAM, Intel SSD hard
    drive, conexant high definition audio 221 on a Lenovo T400.
    How do I fit this? I want to try it out damnt :)

    I went through the "unable to decode and import the selected wav/mp3 file" error.  After talking with an Adobe Rep,  I quickly realized that I could NOT use the directions.  I have no experience in using Command Prompts.  I have written down the directions by key stroke for those people that are similar to me.  Enjoy!
    For Vista and Win7,
    Click on the circle start menu,
    In the search box, type in command and in the generated list, "right-click" on the comman link and change to "run as administrator".
    Go back to the search box, type in command and hit enter.  This will take you to the command prompt window (black window w/ white text) lol
    You have to get to the right directory first.
    Type: cd (space-bar) .. (hit enter)
    Type: cd (space-bar) .. (hit enter)
    If Captivate is installed on Program Files (x86) ---
    Type: cd (space-bar) progra~2 (hit enter)
    If Captivate is installed on Program Files
    Type: cd (space-bar) progra~1 (hit enter)
    Type: cd (space-bar) Adobe (hit enter)
    Type: cd (space-bar) Adobe (space-bar) Captivate (space-bar) 4 (hit enter)
    Type: regsvr32 (space-bar) NSAudio.dll (hit enter)
    If you get an error at any point, re-key that particular line.
    Once you see that the last line of command went through, open up Captivate and test the Text to Speech.  These instructions fixed both computers I was working on!!!!

  • Cant use constant selection for ONE restriction in selection

    Hi, all
    BW70 SP8, BI Addon SP8 Rev 802. I cant use constant selection for ONE restriction in selection, i can set constant selection only for whole selection, but it fix value for all query. I need to fix only one character value.
    Is there a way of doing this?

    Global restricted key figure doesn't allow to restrict one char too. There is no constant selection checkbox in restricting char context menu.
    I use multiprov. Prov1 consists of Char1, Char2 and KF1. Prov2 consists of Char1, Char2, and KF2.
    I want to restrict Prov2.Char2 to # for KF2, and not restrict Char1, but! I can set constant selection for only whole selection(KF2 and Char2=#). So it has same value for all Char1 values. I need to constant selection only for char2.

Maybe you are looking for

  • IPhoto will not stay open after most recent upload! Help!

    Please help me out here. I am running on Mac 10.5.8 with a version of iPhoto, 8.1.2. After my most recent picture upload from my iphone my iphoto will NOT stay open. It keeps shutting down, and I can't even send the report to apple. It says the repor

  • Is there a way to store ITunes movies on an external wireless hard drive and access them from my IPAD.

    I am on deployment with VERY limited internet access. I have gone through all the movies on my IPad and would like to have access to the rest of my movies at home.  Is there a way for my wife to load ITunes movies off my Mac at home to an external ha

  • Using HUB4 Language Model in sphinx

    Would you please help me about dictation speech recognition using sphinx? I downloaded the HUB4 Language Model from source-forge, but the language model file name is language_model.arpaformat.DMP. In the demo example of helloNgram, it uses language m

  • Help needed~x61s dead after warranty expired

    I think the motherboard is burned. I saw the smoke came out from the left vent. Can I update my warranty one more year to avoid the cost of repair or just throw the machine to the rubbish? Its dead and can not light on.

  • Migrating  Solaris Systems to new servers.

    OK here is the secnario, we have currently purchased two shiny new sun t5220 servers for out NW7 systems. Our current systems run on solaris 9. The new Systems will be solaris 10. Due to this the only method i can think of to migrate the data is to d