In list problem

Dear All,
I have several id values with a comma separator in a column named matched_id like this 33577,33588,36987,62731 in a table named tab2. Then I am writing a query as follows:
select emp_id,name
from tab1
where to_char(emp_id) in(select matched_id from tab2 where id=1)
But it does not return me any value.matched_id column have the id of tab1 with comma separator.
TAB1 (EMP_ID number, NAME varchar2(100))
TAB2 (ID NUMBER,MATCHED_ID VARCHAR2(200))
Can anyone please help me to solve this problem.
Best Regards,

Try this
SQL> set lines 10000
SQL> select * from scott.emp;
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7369 SMITH      CLERK           7902 17-DEC-80        800                    20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
      7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
      7839 KING       PRESIDENT            17-NOV-81       5000                    10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7900 JAMES      CLERK           7698 03-DEC-81        950                    30
      7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
      7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
14 rows selected.
SQL> select * from t;
COL
7900,7902,7934
SQL> select
  2     empno,
  3     ename
  4  from
  5     scott.emp
  6  where
  7     (select ','||col||',' from t) like '%,'||to_char(empno)||',%' ;
     EMPNO ENAME
      7900 JAMES
      7902 FORD
      7934 MILLER
SQL> But your database is not normalized.

Similar Messages

  • HT201210 Contact List Problem.   I have duplicates on my iPhone.  I turned off my Contact and selected "Delete Contacts"  Most of the contacts were deleted but about 120 were left on my phone.   I've tried selecting individual contacts and deleting them,

    Contact List Problem.   I have duplicates on my iPhone.  I turned off my Contact and selected "Delete Contacts"  Most of the contacts were deleted but about 120 were left on my phone.   I've tried selecting individual contacts and deleting them, No Go. 
    Can anyone help?   How do I get rid of these contacts so I can re-synch my iPhone. 

    I have exactly the same problem on my ipad. It is happening on only some contacts but, as with you, when I delete one of the contacts on the ipad, the second ipad contact and the contact on the imac are also deleted. This is even the case when I have differentiated the two contacts on the ipad and can see the one I have deleted on the ipad is not the same one as is then deleted on the imac.

  • Application List problems - will Nokia ever addres...

    The empty Application List problem on the Nokia Go To select options list is well known.
    My new 5610 takes this a step further. When you try to select Applications List when choosing Go To options, the machine just hangs.
    Has anyone else experienced this? I guess the phone's a bit new for a s/w upgrade...
    Max

    Please, dial *#0010# to determine which firmware version do you have.
    Furthermore, what is the name of that theme you are using because that is non-standard, isn’t it?

  • Select List problem

    I have 3 select lists: the first two are with submit and the last one is just select list. Each list depends on the previous one.
    I have set null and default values for each list. The problem occurs when I first start the application, but after selecting an option in the first list all is fine and when I reset the fields everything works as it should.
    So the problem only occurs when the application is first launched....
    This is the error message:
    Error: ORA-01858: a non-numeric character was found where a numeric was expected performing List of Values query: "SELECT TESTTIME d, TESTTIME r FROM TESTSETUP WHERE TESTDATE = :P3_TESTDATE and TERM = :P3_TERM ".
    How can this be corrected?
    Any help would be greatly appreciated.
    Thank - Greg

    I have set null and default values for each list
    These values are not available in committed session state for the subsequent select lists to use.
    Solution: Create a OnLoad Before Header computation (conditional upon the value of the select list being null) to set it to whatever null/default value you want. This will "initialize" the value so that your dependent select lists can work properly.

  • SAP BW and Crystal Reports XI R2 Parameter list problem??

    Hello Experts,
    I facing a problem.
    I have a crystal report based on a BW Query. It has one parameter called Country.
    Eg:
    Until now, in BW query country variable has the following values.
    USA
    JAPAN
    GERMANY
    Now, from this fiscal year we have the following values for country variable
    USA
    JAPAN
    INDIA
    GERMANY
    UK
    I am trying to edit the list of values for the country variable in crystal reports. It is not getting reflected in SAP BW. I also tried refreshing it several times.
    THE VARIABLE IS A HIERARCHY VARIABLE.
    Can any one Please help.!!
    Regards
    NMU
    Edited by: Mohammad Usama on Oct 20, 2008 4:26 PM

    You said that you are using version XI R2 SP2 (for BO Enterprise)  - do you have any FixPacks on this codeline? (FP2.x)
    Question: If YES to above, have you made use of the equivalent FixPack for Integration Kit?  (known as "Partners Fix Pack 2.x ")
    There are a few fixes in this area, I was thinking like:
    ADAPT00716808 -  When scheduling a report from SAP Business Information Warehouse (BW) that contains parameters from a hierarchy or a hierarchy node variable, the default values fail to be displayed from InfoView. >>
    ADAPT00894127 -  When users enter date parameters in the Calendar dialog box in SAP InfoView, the dates entered fail to appear in the corresponding field.
    Good luck,
    Henry

  • New insight into my dropdown list problems: loss of session info

    I tried again, this time with NetBeans 5.5.1 (with Tomcat 5.5.17) and stepped through my code; code executed as a result of selecting an item in the second, misbehaving dropdown box.
    I have this function:
        public void prerender() {
            SessionBean1 sb = this.getSessionBean1();
            sb.setPortfolio_id(0);
            this.getDropDown2().setSelected(ddsi);
        }This uses a private data member:
    Object ddsi = null;
    And here is my value changed event handler for this combobox:
        public void dropDown2_processValueChange(ValueChangeEvent event) {
            SessionBean1 sb = this.getSessionBean1();
            String sp_id = (String) this.getDropDown2().getValue();
            ddsi = event.getNewValue();
            String desc = (String) ddsi;
            Long Ldesc = new Long(desc);
            long p_id = Ldesc.longValue();
            sb.setPortfolio_id(p_id); 
            this.getFacesContext().getCurrentInstance().renderResponse();
        }As you can see, I am trying to ensure that the value selected is preserved and used the next time the item is rendered.
    sb.setPortfolio_id(p_id); is a trivial setter function (taking a long argument) for the property portfolio_id.
    When I step through this code, at every step along the way, I see the correct value for p_id! The correct value is passed to the session bean! And I even see the correct value in ddsi when the function "prerender" is executed. However, it seems that this information is lost when the page is actually rendered.
    And, when the servlet that produces the image that is to be displayed on the page checks the session bean, the session bean has the default value (0) for the portfolio_id property rather than the the value (30) that had been passed to the session bean.
    It is as if the session information has been lost, or a new session bean is provided each time the page is rendered.
    The only additional clue is this (found in Tomcat's output);
    com.sun.rave.web.ui.component.DropDown::The current value of component form1:dropDown2 does not match any of the selections.
    Did you forget to reset the value after changing the options?
    Why is this happening? I know full well that at the time the value in dropdown2 is changed, the value in dropdown1 has not, and therefore the value passed to dropDown2 IS in the list of selections. But, when the value in dropDown1 is changed, the list of options in dropDown2 is changed. I wonder if the valueChanged event handler for dropdown1 is being executed every time the page is rendered, forcing dropDown2 to "forget" what was selected, and somehow losing the session info at the same time?????????
    Any ideas?
    Thanks
    Ted

    Upgrading to itunes 7.0 just cost me 2 days of messing around and in the end I had to revert back to v6.0 and resore my lib.
    Apple CS was good but did not belly up the fact that 7.0 is defective in some cases and in the end told me I had a hardware problem!
    The main issue is that I could not get itunes 7.0 to see my ipod (very infrequently after a hard boot I would see it but would not be able to upload anything). Worked(s) 100% with v 6.0.
    This is very defintey 1/2 baked following in the steps of the other well known producers of sw that is not always functional/buggy the first time around.
    My computer is a x40 IBM laptop with xp sp2. Will have to wait a few more weeks to see how this pans out.
    IBM X40 Windows XP

  • SM36 spool list problem

    Hi all,
    I scheduled a report to run in the background and it is working and generating a list in the spool. The thing is i am able to see all the records but all the columns are not being displayed. The list generated when running it in the foreground is coming perfectly correct but the problem comes only when we run it in the background.
    <b>Can anyone tell me how to increase the width of the list (in spool).</b>
    Urgent requirement
    Regards
    satish

    Hi,
    Thank you. Can you please tell me in detail all the steps how to change the width.
    'X_65_255" steps to do this and
    'SPAD' steps to do this
    Thank you once again
    Regards
    Satish

  • Table Control Dropdown List Problem

    Hi,
    I have this problem with my table control.
    I now have an input field (with input help) called: Reference Table, as well as a table control.
    What i need is to select the table names (select from the Reference table input help) and the field names will be populated inside the table control (according to the field names inside the respective tables) as a dropdown list.
    Refer to this diagram if unclear: http://img166.imageshack.us/img166/1066/tablecontrolwt4.png
    Please give me sample codes as i really need help.
    Will reward marks if useful.
    thanks a lot.
    Below is my codes:
    *& Report  ZHERA_TABLE3
    REPORT  ZHERA_TABLE3_EVONNE.
    DATA: P_HERA TYPE DNTAB-TABNAME VALUE 'Z07P4_REF',
           ITAB_HERA TYPE TABLE OF Z07P4_REF,
           FIELD_COUNT TYPE I,
           WA_HERA LIKE LINE OF ITAB_HERA.
    SELECT * INTO TABLE ITAB_HERA FROM Z07P4_REF.
    START-OF-SELECTION.
    CALL SCREEN 3000.
    MODULE STATUS_3000 OUTPUT.
      SET PF-STATUS 'UI'.
      SET TITLEBAR 'TITLE'.
    ENDMODULE.                    "STATUS_8000 OUTPUT
    MODULE USER_COMMAND_8000 INPUT
    MODULE USER_COMMAND_3000 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK' OR 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'SAVE'.
          PERFORM UPDATE_TABLE.
      ENDCASE.
    ENDMODULE.                    "USER_COMMAND_8000 INPUT
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'ZTABLE' ITSELF
    CONTROLS: ZTABLE TYPE TABLEVIEW USING SCREEN 3000.
    *&SPWIZARD: LINES OF TABLECONTROL 'ZTABLE'
    DATA:     G_ZTABLE_LINES  LIKE SY-LOOPC.
    DATA:     OK_CODE LIKE SY-UCOMM.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
    MODULE ZTABLE_CHANGE_TC_ATTR OUTPUT.
      DESCRIBE TABLE ITAB_HERA LINES ZTABLE-lines.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: GET LINES OF TABLECONTROL
    MODULE ZTABLE_GET_LINES OUTPUT.
      G_ZTABLE_LINES = SY-LOOPC.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MODIFY TABLE
    MODULE ZTABLE_MODIFY INPUT.
      MODIFY ITAB_HERA
        FROM WA_HERA
        INDEX ZTABLE-CURRENT_LINE.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: PROCESS USER COMMAND
    MODULE ZTABLE_USER_COMMAND INPUT.
      OK_CODE = SY-UCOMM.
      PERFORM USER_OK_TC USING    'ZTABLE'
                                  'ITAB_HERA'
                         CHANGING OK_CODE.
      SY-UCOMM = OK_CODE.
    ENDMODULE.
      INCLUDE TABLECONTROL_FORMS                                         *
    *&      Form  USER_OK_TC                                               *
    FORM USER_OK_TC USING    P_TC_NAME TYPE DYNFNAM
                              P_TABLE_NAME
                              P_MARK_NAME
                     CHANGING P_OK      LIKE SY-UCOMM.
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA: L_OK              TYPE SY-UCOMM,
             L_OFFSET          TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    *&SPWIZARD: Table control specific operations                          *
    *&SPWIZARD: evaluate TC name and operations                            *
       SEARCH P_OK FOR P_TC_NAME.
       IF SY-SUBRC <> 0.
         EXIT.
       ENDIF.
       L_OFFSET = STRLEN( P_TC_NAME ) + 1.
       L_OK = P_OK+L_OFFSET.
    *&SPWIZARD: execute general and TC specific operations                 *
       CASE L_OK.
         WHEN 'INSR'.                      "insert row
           PERFORM FCODE_INSERT_ROW USING    P_TC_NAME
                                             P_TABLE_NAME.
           CLEAR P_OK.
         WHEN 'DELE'.                      "delete row
           PERFORM FCODE_DELETE_ROW USING    P_TC_NAME
                                             P_TABLE_NAME
                                             P_MARK_NAME.
           CLEAR P_OK.
         WHEN 'P--' OR                     "top of list
              'P-'  OR                     "previous page
              'P+'  OR                     "next page
              'P++'.                       "bottom of list
           PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
                                                 L_OK.
           CLEAR P_OK.
        WHEN 'L--'.                       "total left
          PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
        WHEN 'L-'.                        "column left
          PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
        WHEN 'R+'.                        "column right
          PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
        WHEN 'R++'.                       "total right
          PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
         WHEN 'MARK'.                      "mark all filled lines
           PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
                                             P_TABLE_NAME
                                             P_MARK_NAME   .
           CLEAR P_OK.
         WHEN 'DMRK'.                      "demark all filled lines
           PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
                                               P_TABLE_NAME
                                               P_MARK_NAME .
           CLEAR P_OK.
        WHEN 'SASCEND'   OR
             'SDESCEND'.                  "sort column
          PERFORM FCODE_SORT_TC USING P_TC_NAME
                                      l_ok.
       ENDCASE.
    ENDFORM.                              " USER_OK_TC
    *&      Form  FCODE_INSERT_ROW                                         *
    FORM fcode_insert_row
                   USING    P_TC_NAME           TYPE DYNFNAM
                            P_TABLE_NAME             .
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_LINES_NAME       LIKE FELD-NAME.
       DATA L_SELLINE          LIKE SY-STEPL.
       DATA L_LASTLINE         TYPE I.
       DATA L_LINE             TYPE I.
       DATA L_TABLE_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>                 TYPE CXTAB_CONTROL.
       FIELD-SYMBOLS <TABLE>              TYPE STANDARD TABLE.
       FIELD-SYMBOLS <LINES>              TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: get looplines of TableControl                              *
       CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
       ASSIGN (L_LINES_NAME) TO <LINES>.
    *&SPWIZARD: get current line                                           *
       GET CURSOR LINE L_SELLINE.
       IF SY-SUBRC <> 0.                   " append line to table
         L_SELLINE = <TC>-LINES + 1.
    *&SPWIZARD: set top line                                               *
         IF L_SELLINE > <LINES>.
           <TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
         ELSE.
           <TC>-TOP_LINE = 1.
         ENDIF.
       ELSE.                               " insert line into table
         L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
         L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
       ENDIF.
    *&SPWIZARD: set new cursor line                                        *
       L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
    *&SPWIZARD: insert initial line                                        *
       INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
       <TC>-LINES = <TC>-LINES + 1.
    *&SPWIZARD: set cursor                                                 *
       SET CURSOR LINE L_LINE.
    ENDFORM.                              " FCODE_INSERT_ROW
    *&      Form  FCODE_DELETE_ROW                                         *
    FORM fcode_delete_row
                   USING    P_TC_NAME           TYPE DYNFNAM
                            P_TABLE_NAME
                            P_MARK_NAME   .
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_TABLE_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>         TYPE cxtab_control.
       FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
       FIELD-SYMBOLS <WA>.
       FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: delete marked lines                                        *
       DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
       LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         IF <MARK_FIELD> = 'X'.
           DELETE <TABLE> INDEX SYST-TABIX.
           IF SY-SUBRC = 0.
             <TC>-LINES = <TC>-LINES - 1.
           ENDIF.
         ENDIF.
       ENDLOOP.
    ENDFORM.                              " FCODE_DELETE_ROW
    *&      Form  COMPUTE_SCROLLING_IN_TC
          text
         -->P_TC_NAME  name of tablecontrol
         -->P_OK       ok code
    FORM COMPUTE_SCROLLING_IN_TC USING    P_TC_NAME
                                           P_OK.
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_TC_NEW_TOP_LINE     TYPE I.
       DATA L_TC_NAME             LIKE FELD-NAME.
       DATA L_TC_LINES_NAME       LIKE FELD-NAME.
       DATA L_TC_FIELD_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>         TYPE cxtab_control.
       FIELD-SYMBOLS <LINES>      TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get looplines of TableControl                              *
       CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
       ASSIGN (L_TC_LINES_NAME) TO <LINES>.
    *&SPWIZARD: is no line filled?                                         *
       IF <TC>-LINES = 0.
    *&SPWIZARD: yes, ...                                                   *
         L_TC_NEW_TOP_LINE = 1.
       ELSE.
    *&SPWIZARD: no, ...                                                    *
         CALL FUNCTION 'SCROLLING_IN_TABLE'
              EXPORTING
                   ENTRY_ACT             = <TC>-TOP_LINE
                   ENTRY_FROM            = 1
                   ENTRY_TO              = <TC>-LINES
                   LAST_PAGE_FULL        = 'X'
                   LOOPS                 = <LINES>
                   OK_CODE               = P_OK
                   OVERLAPPING           = 'X'
              IMPORTING
                   ENTRY_NEW             = L_TC_NEW_TOP_LINE
              EXCEPTIONS
                 NO_ENTRY_OR_PAGE_ACT  = 01
                 NO_ENTRY_TO           = 02
                 NO_OK_CODE_OR_PAGE_GO = 03
                   OTHERS                = 0.
       ENDIF.
    *&SPWIZARD: get actual tc and column                                   *
       GET CURSOR FIELD L_TC_FIELD_NAME
                  AREA  L_TC_NAME.
       IF SYST-SUBRC = 0.
         IF L_TC_NAME = P_TC_NAME.
    *&SPWIZARD: et actual column                                           *
           SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
         ENDIF.
       ENDIF.
    *&SPWIZARD: set the new top line                                       *
       <TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
    ENDFORM.                              " COMPUTE_SCROLLING_IN_TC
    *&      Form  FCODE_TC_MARK_LINES
          marks all TableControl lines
         -->P_TC_NAME  name of tablecontrol
    FORM FCODE_TC_MARK_LINES USING P_TC_NAME
                                   P_TABLE_NAME
                                   P_MARK_NAME.
    &SPWIZARD: EGIN OF LOCAL DATA----
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <WA>.
      FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: mark all filled lines                                      *
      LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         <MARK_FIELD> = 'X'.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Form  FCODE_TC_DEMARK_LINES
          demarks all TableControl lines
         -->P_TC_NAME  name of tablecontrol
    FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
                                     P_TABLE_NAME
                                     P_MARK_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <WA>.
      FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: demark all filled lines                                    *
      LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         <MARK_FIELD> = SPACE.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    FORM UPDATE_TABLE.
      "Update physical database table
      UPDATE Z07P4_REF FROM TABLE ITAB_HERA.
    ENDFORM.                    "UPDATE_TABLE
    Edited by: Evonne Gow on Jan 4, 2008 2:52 AM

    hey gary help me lei...
    Edited by: Evonne Gow on Jan 4, 2008 2:55 AM

  • List problem of birthdays in the calendar application

    Hi,
    I have an iPhone4 and an iPad. When using the list view in the calendar aplication in the iPad, then all birthday dates are one day too early, but when opening for example the week view then the date is correct. In my iPhone4 the dates of the birthdays in the list view are correct.
    I have synched the data in the iPad and the iPhone4 from exactly the same Outlook contacts/calender and I'm using IOS4.2 in both devices.
    I have double checked the set date and time zone in the iPad, and they seem to be OK.
    Any ideas?
    Thanks in advance for your help!

    Hi, My birthdays were all a day early no matter what view, I did the following process which completely solved it for me.
    Not sure if your problem is solved, if not try this which worked for me:
    (1) If your iPad/phone is syncing contacts with iCloud, turn it off. In Settings on your iPad/phone, Mail,Contacts,Calendars, Accounts, iCloud, turn off Contacts.
    (2) sync your iPad/phone to iTunes.
    (3) now select the ‘Info’ tab in iTunes for your iPad/iPhone. Ensure that ‘Sync Address Book Contacts’ is ticked. (You can revert to syncing with iCloud later, after this process is complete.)
    (4) scroll to the very bottom section of the Info tab. Where it says ‘Replace information on this iPad/iPhone’, select ‘Contacts’.
    (5) Sync again.
    Now check Calendars on iPad/iPhone, this process ‘fixes’ the information of birth dates and they should now appear correctly.

  • Save as list problem

    I have a save as/export problem. Im using cs6 for windows and it shows me 6 options for saving as psd, psb, exr, raw, bitmap, radiance and tiff but there is no jpeg or pdf or any other options listed. How can I bring these options to this list? is it a problem like fixing acrobat X with a patch?

    Hi,
    Check under Image>Mode as it sounds like maybe your image is 32 bits/channel.
    If you switch to 16 or 8 bits/channel then jpeg should become available.

  • List problems in ie

    Hi,
    Ok, I have 2 problems (once again with ie suprisingly)
    I have a horizontal list, which in FF displays and functions
    just as have coded it to, yet in ie 6.0 you cannot see the 2px
    margins, the whole line is just sold grey instead of the gaps.
    my second problem is, I have a vertical list, quite simple,
    with a bg img on hover, again FF is fine, but in ie 6.0 it goes all
    wrong, when I hover over the list its almost as if it freezes and
    the wording becomes unreadable and the image kind of stays there,
    weird. anyway, I would be very grateful if anyone could look at my
    code and advise me of the inevitable silly mistakes i'm making,
    many thanks in advance.

    Does the page have a valid and complete doctype? Does the
    page validate
    here -
    http://validator.w3.org
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "simbull" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi,
    > Ok, I have 2 problems (once again with ie suprisingly)
    >
    > I have a horizontal list, which in FF displays and
    functions just as have
    > coded it to, yet in ie 6.0 you cannot see the 2px
    margins, the whole line
    > is
    > just sold grey instead of the gaps.
    >
    > my second problem is, I have a vertical list, quite
    simple, with a bg img
    > on
    > hover, again FF is fine, but in ie 6.0 it goes all
    wrong, when I hover
    > over the
    > list its almost as if it freezes and the wording becomes
    unreadable and
    > the
    > image kind of stays there, weird. anyway, I would be
    very grateful if
    > anyone
    > could look at my code and advise me of the inevitable
    silly mistakes i'm
    > making, many thanks in advance.
    >
    > Horizontal List:
    >
    > html:
    >
    > <div id="subnavigation">
    > <ul>
    > <li><a href="#">Endpoint
    Security</a></li>
    > <li><a href="#">Unified Threat
    Management</a></li>
    > <li><a
    href="#">Firewalls</a></li>
    > <li><a href="#">Virtual Private
    Networks</a></li>
    > <li><a
    href="#">Anti-virus</a></li>
    > <li><a href="#">Wireless
    Security</a></li>
    > <li><a href="#">Add-ons</a></li>
    > </ul>
    > </div>
    >
    > css:
    >
    > #subnavigation {
    > width: 740px;
    > margin-top: 5px;
    > margin-right: 0px;
    > margin-left: 5px;
    > float: left;
    > margin-bottom: 5px;
    > clear: none;
    > }
    > #subnavigation ul {
    > margin: 0;
    > padding: 0;
    > list-style-type: none;
    > width: 740px;
    > background: #DBDBDB;
    > }
    > #subnavigation ul a {
    > display:block;
    > width:auto;
    > height:19px;
    > line-height:19px;
    > text-decoration:none;
    > text-align: center;
    > color: #620D4E;
    > font-size: 9pt;
    > background-color: #DBDBDB;
    > margin: 0 2px 0 2px;
    > padding: 0 2px 0 2px;
    > float:left;
    > }
    > #subnavigation ul a:hover{
    > background-color: #793068;
    > color:#FFFFFF;
    > }
    > #subnavigation li {
    > display: inline;
    > }
    >
    > Vertical list:
    >
    > html:
    >
    > <div id="optionbox">
    > <ul>
    > <li
    >
    style="display:block;width:174px;height:30px;line-height:30px;text-align:
    > right;font-size:11pt;font-weight:bold;">What would
    you like to do?</li>
    > <li
    >
    style="display:block;width:174px;height:26px;line-height:26px;text-align:
    > right;">Option 1</li>
    > <li><a href="#">Option
    2</a></li>
    > <li><a href="#">Option
    3</a></li>
    > <li><a href="#">Option
    4</a></li>
    > <li><a href="#">Option
    5</a></li>
    > <li><a href="#">Option6</a></li>
    > </ul>
    > </div>
    >
    > css:
    >
    > #optionbox {
    > float: right;
    > width: 180px;
    > height: 186px;
    > margin-top: 5px;
    > margin-right: 5px;
    > margin-bottom: 0px;
    > margin-left: 0px;
    > background-color: #CCCCCC;
    > border: 2px solid #620D4E;
    > display: inline;
    > }
    > #optionbox ul {
    > margin: 0;
    > padding: 0;
    > list-style-type: none;
    > color: #620D4E;
    > font-size: 10pt;
    > }
    > #optionbox ul a {
    > display:block;
    > width:174px;
    > height:26px;
    > line-height:26px;
    > text-decoration:none;
    > text-align: right;
    > color: #620D4E;
    > font-size: 10pt;
    > }
    > #optionbox ul a:hover{
    > background-image:url(../images/optionboxarrow.gif)
    > }
    > #optionbox li {
    > display: inline;
    > }
    >

  • Spry region drop-down list problems in IE

    Can someone please help me determine the reason that IE does not display the correct item in a spry region drop-down list when first opening the site.  You can see the problem at http://www.minursemap.org/agedistnurse.html.  The initial item in the drop-down list should be Alcona with the corresponding graphic displayed in the detail region.  In Firefox, this works correctly.  When first opening the page in IE, the graphic is Alcona, but the drop-down list displays Wexford (the last item in the list).  From then on, all of the links work correctly.
    The code for the two regions is below.  Thanks in advance for assisting someone new to spry.
    <div id="ctyname">
         <div spry:region="dsChartNurse">
           <select name="name" spry:repeatchildren="dsChartNurse" onchange="dsChartNurse.setCurrentRow(this.value)">
             <option value="{ds_RowID}">{name}</option>
           </select>
      </div> <!--spry:region close -->
    </div><!--ctyname close -->
    <div id="image">
       <div spry:detailregion="dsChartNurse">
            <div align="center" style="padding-bottom:15px"><img src="{dataimage}" width="405" height="202" />
            </div><!--un-named div close -->
       </div><!-- spry:detailregion close -->
    </div><!--image close -->

    Try the following code to replace yours:
           <select name="name" spry:repeatchildren="dsChartNurse" onchange="dsChartNurse.setCurrentRow(this.value)">
             <option spry:if="{dsChartNurse::ds_RowID}=={dsChartNurse::ds_CurrentRowID}" spry:selected="selected" value="{ds_RowID}">{name}</option>
             <option spry:if="{dsChartNurse::ds_RowID}!={dsChartNurse::ds_CurrentRowID}" value="{ds_RowID}">{name}</option>
           </select>
    I hope this helps.
    Ben

  • Contact list problems after update to OS 10.2.1.537

    Hi all,
    I have run into issues with my address book since I updated my BB Z10 to the new OS 10.2.1.537.
    My contacts are all synced with my Gmail contacts, and the syncing still works fine. However, they are displayed in the adress book on my Blackberry in a weird and random way. Some contacts are displayed perfectly fine as e.g. "Ms Jane Doe". In others, however, the institution at which the people work is displayed as part of the name, e.g. "Ms Doe Some Institute". In one case the display name of the contact was even changed to a date-time-coding (the time I last contacted that person?).
    I checked the entries via "Edit" and they seem to be OK, first and middle names, surname, title, institutions and alike are all stored in their respective fields. They are only displayed wrongly in the contact list. Moreover, some contacts are displayed wrongly and some are not, and I did not find any one particular thing that any of the two groups has in common and that could trigger the error: In both groups I find entries with many (e.g. websites, Skype names, several phone numbers) or few (only one number or e-mail adress) entry-fields, as well as entries which have links to LinkedIn accounts etc., and so forth. So this problem occurs randomly?
    I also figured out that "editing" a contact by just going to "Edit" and then saving without making any actual changes fixes the display issue. However, I would not want to manually go through that procedure for 200+ contacts. Also, since the problem seemingly occurs randomly, I have no idea whether it will happen again with new contacts in the future or even re-occur in already fixed contacts when I edit them in Gmail, upon the normal regular syncing, or after restarting the phone.
    Does somebody else have these problems as well? And does somebody have an idea what might be the problem and even better how to fix it?
    Thanks a lot.
    Solved!
    Go to Solution.

    No, I was just wondering since I have a second device on TMobile US and haven't gotten the update. I loaded this OS almost a month ago when it leaked on the Internet.
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • HELP - BB Curve 9320 Contact List Problem

    hi , please help me resolve this..
    previously my Curve 9320 was crash after update Whatsapp app..after restart, got error '102' - RESET..then after the problem resolved ( flash again using Desktop Software ) and i restore contact list from backup file, my problem happens..
    from my backup file, i got 800++ contacts, but on my phone there was just 124.! where's my other contact from my previous phone books..?
    thanks

    Open your BlackBerry Address Book > press the Menu key > Filters.
    Are any filters checked... if so, UNcheck them.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Linked lists problem -- help needed

    Hello again. I've got yet another problem in my C++ course that stems from my use of a Mac instead of Windows. I'm going to install Parallels so I can get Windows on my MacBook and install Visual Studio this week so that I don't have to deal with these discrepancies anymore, but in the meanwhile, I'm having a problem here that I don't know how to resolve. To be clear, I've spent a lot of time trying to work this out myself, so I'm not just throwing this up here to have you guys do the work for me -- I'm really stuck here, and am coming here as a last resort, so I'll be very, very appreciative for any help that anyone can offer.
    In my C++ course, we are on a chapter about linked lists, and the professor has given us a template to make the linked lists work. It comes in three files (a header, a source file, and a main source file). I've made some adjustments -- the original files the professor provided brought up 36 errors and a handful of warnings, but I altered the #include directives and got it down to 2 errors. The problematic part of the code (the part that contains the two errors) is in one of the function definitions, print_list(), in the source file. That function definition is shown below, and I've marked the two statements that have the errors using comments that say exactly what the errors say in my Xcode window under those two statements. If you want to see the entire template, I've pasted the full code from all three files at the bottom of this post, but for now, here is the function definition (in the source file) that contains the part of the code with the errors:
    void LinkedList::printlist( )
    // good for only a few nodes in a list
    if(isEmpty() == 1)
    cout << "No nodes to display" << endl;
    return;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->name; } cout << endl; // error: 'setw' was not declared in this scope
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->test_grade; } cout << endl; // error: 'setw' was not declared in this scope
    As you can see, the problem is with the two statements that contain the 'setw' function. Can anyone help me figure out how to get this template working and get by these two errors? I don't know enough about linked lists to know what I can and can't mess with here to get it working. The professor recommended that I try using 'printf' instead of 'cout' for those two statements, but I don't know how to achieve the same effect (how to do whatever 'setw' does) using 'printf'. Can anyone please help me get this template working? Thank you very, very much.
    For reference, here is the full code from all three files that make up the template:
    linkedlist.h (header file):
    #ifndef LINKED_LINKED_H
    #define LINKED_LINKED_H
    struct NODE
    string name;
    int test_grade;
    NODE * link;
    class Linked_List
    public:
    Linked_List();
    void insert(string n, int score);
    void remove(string target);
    void print_list();
    private:
    bool isEmpty();
    NODE *FRONT_ptr, *REAR_ptr, *CURSOR, *INSERT, *PREVIOUS_ptr;
    #endif
    linkedlist.cpp (source file):
    #include <iostream>
    using namespace std;
    #include "linkedlist.h"
    LinkedList::LinkedList()
    FRONT_ptr = NULL;
    REAR_ptr = NULL;
    PREVIOUS_ptr = NULL;
    CURSOR = NULL;
    void Linked_List::insert(string n, int score)
    INSERT = new NODE;
    if(isEmpty()) // first item in List
    // collect information into INSERT NODE
    INSERT-> name = n;
    // must use strcpy to assign strings
    INSERT -> test_grade = score;
    INSERT -> link = NULL;
    FRONT_ptr = INSERT;
    REAR_ptr = INSERT;
    else // else what?? When would this happen??
    // collect information into INSERT NODE
    INSERT-> name = n; // must use strcpy to assign strings
    INSERT -> test_grade = score;
    REAR_ptr -> link = INSERT;
    INSERT -> link = NULL;
    REAR_ptr = INSERT;
    void LinkedList::printlist( )
    // good for only a few nodes in a list
    if(isEmpty() == 1)
    cout << "No nodes to display" << endl;
    return;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->name; } cout << endl; // error: 'setw' was not declared in this scope
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->test_grade; } cout << endl; // error: 'setw' was not declared in this scope
    void Linked_List::remove(string target)
    // 3 possible places that NODES can be removed from in the Linked List
    // FRONT
    // MIDDLE
    // REAR
    // all 3 condition need to be covered and coded
    // use Trasversing to find TARGET
    PREVIOUS_ptr = NULL;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    if(CURSOR->name == target) // match
    { break; } // function will still continue, CURSOR will
    // mark NODE to be removed
    else
    { PREVIOUS_ptr = CURSOR; } // PREVIOUS marks what NODE CURSOR is marking
    // JUST before CURSOR is about to move to the next NODE
    if(CURSOR == NULL) // never found a match
    { return; }
    else
    // check each condition FRONT, REAR and MIDDLE
    if(CURSOR == FRONT_ptr)
    // TARGET node was the first in the list
    FRONT_ptr = FRONT_ptr -> link; // moves FRONT_ptr up one node
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    }// why no need for PREVIOUS??
    else if (CURSOR == REAR_ptr) // TARGET node was the last in the list
    { // will need PREVIOUS for this one
    PREVIOUS_ptr -> link = NULL; // since this node will become the last in the list
    REAR_ptr = PREVIOUS_ptr; // = REAR_ptr; // moves REAR_ptr into correct position in list
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    else // TARGET node was the middle of the list
    { // will need PREVIOUS also for this one
    PREVIOUS_ptr -> link = CURSOR-> link; // moves PREV nodes' link to point where CURSOR nodes' points
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    bool Linked_List::isEmpty()
    if ((FRONT_ptr == NULL) && (REAR_ptr == NULL))
    { return true; }
    else
    { return false;}
    llmain.cpp (main source file):
    #include <iostream>
    #include <string>
    #include <iomanip>
    using namespace std;
    #include "linkedlist.h"
    int main()
    Linked_List one;
    one.insert("Angela", 261);
    one.insert("Jack", 20);
    one.insert("Peter", 120);
    one.insert("Chris", 270);
    one.print_list();
    one.remove("Jack");
    one.print_list();
    one.remove("Angela");
    one.print_list();
    one.remove("Chris");
    one.print_list();
    return 0;

    setw is the equivalent of the field width value in printf. In your code, the printf version would look like:
    printf("%8s", CURSOR->name.c_str());
    I much prefer printf over any I/O formatting in C++. See the printf man page for more information. I recommend using Bwana: http://www.bruji.com/bwana/
    I do think it is a good idea to verify your code on the platform it will be tested against. That means Visual Studio. However, you don't want to use Visual Studio. As you have found out, it gets people into too many bad habits. Linux is much the same way. Both development platforms are designed to build anything, whether or not it is syntactically correct. Both GNU and Microsoft have a long history of changing the language standards just to suit themselves.
    I don't know what level you are in the class, but I have a few tips for you. I'll phrase them so that they answers are a good exercise for the student
    * Look into const-correctness.
    * You don't need to compare a bool to 1. You can just use bool. Plus, any integer or pointer type has an implicit cast to bool.
    * Don't reuse your CURSOR pointer as a temporary index. Create a new pointer inside the for loop.
    * In C++, a struct is the same thing as a class, with all of its members public by default. You can create constructors and member functions in a struct.
    * Optimize your function arguments. Pass by const reference instead of by copy. You will need to use pass by copy at a later date, but don't worry about that now.
    * Look into initializer lists.
    * In C++ NULL and 0 are always the same.
    * Return the result of an expression instead of true or false. Technically this isn't officially Return Value Optimization, but it is a good habit.
    Of course, get it running first, then make it fancy.

  • ALV list problem

    Hi all,
    I am facing a strange problem in ALV. i have two internal tables one is for alv header and another is alv line items. i have a proper data in in both internal tables.
    when i pass the data of these two internal tables to the function REUSE_ALV_HIERSEQ_LIST_DISPLAY i found in the output that line items date changes.
    actually date is in format 04112005 but when i see the output its showing like this 05.20.0411 .
    please help me to solve the problem.
    Regards,
    Lisa

    Hii
    use this func module
    <b>CONVERT_DATE_TO_INTERN_FORMAT</b>
    <b>CONVERSION_EXIT_PDATE_INPUT</b>
    Thsi will give the dtae in YYYY.MM.DD format
    check this program for reference
    REPORT  Z_50657_ALV_EX1
            MESSAGE-ID ZZ .
                                Type Pools                               *
    TYPE-POOLS: SLIS.
                                 Tables                                  *
    TABLES: LFA1, "Vendor Master
            LFB1, "Vendor Master (Company Code)
            LFM1. "purchasing organization data
                            Internal Tables                              *
    TABLE TO HOLD DATA FROM VENDOR MASTER
    DATA: BEGIN OF IT_LFA1 OCCURS 0,
            LIFNR LIKE LFA1-LIFNR,  "Account Number of Vendor
            KTOKK LIKE LFA1-KTOKK,  "Vendor account group
            NAME1 LIKE LFA1-NAME1,  "Name
            STRAS LIKE LFA1-STRAS,  "House Number and Street
            ORT01 LIKE LFA1-ORT01,  "City
            REGIO LIKE LFA1-REGIO,  "Region
            PFORT LIKE LFA1-PFORT,  "PO Box City
            PSTLZ LIKE LFA1-PSTLZ,  "Postal Code
            PSTL2 LIKE LFA1-PSTL2,  "P.O. Box
            TELF1 LIKE LFA1-TELF1,  "First telephone number
          END OF IT_LFA1.
    TABLE TO HOLD DATA ABOUT COMPANY
    DATA: BEGIN OF IT_LFB1 OCCURS 0,
            LIFNR LIKE LFB1-LIFNR, "Account Number of Vendor
            BUKRS LIKE LFB1-BUKRS, "COMP CODE
          END OF IT_LFB1.
    TABLE TO HOLD DATA ABOUT PURCHASING ORG
    DATA: BEGIN OF IT_LFM1 OCCURS 0,
            LIFNR LIKE LFM1-LIFNR, "Account Number of Vendor
            EKORG LIKE LFM1-EKORG, "Purchasing Organization
          END OF IT_LFM1.
    TABLE TO HOLD DATA FOR FINAL DISPLAY
    DATA: BEGIN OF IT_FINAL OCCURS 0,
            LIFNR LIKE LFB1-LIFNR,  "Account Number of Vendor
            BUKRS LIKE LFB1-BUKRS,  "COMP CODE
            EKORG LIKE LFM1-EKORG,  "Purchasing Organization
            KTOKK LIKE LFA1-KTOKK,  "Vendor account group
            NAME1 LIKE LFA1-NAME1,  "Name
            STRAS LIKE LFA1-STRAS,  "House Number and Street
            ORT01 LIKE LFA1-ORT01,  "City
            REGIO LIKE LFA1-REGIO,  "Region
            PFORT LIKE LFA1-PFORT,  "PO Box City
            PSTLZ LIKE LFA1-PSTLZ,  "Postal Code
            PSTL2 LIKE LFA1-PSTL2,  "P.O. Box
            TELF1 LIKE LFA1-TELF1,  "First telephone number
          END OF IT_FINAL.
    DATA: V_INDEX TYPE SY-TABIX.
                                Work Areas                               *
    *WORK AREAS DEFINED FOR ALV'S
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
          IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          L_LAYOUT TYPE SLIS_LAYOUT_ALV.
                          Selection-Screen                               *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_LIFNR FOR LFA1-LIFNR, "ACCOUNT NUMBER
                    S_BUKRS FOR LFB1-BUKRS, "COMPANY CODE
                    S_EKORG FOR LFM1-EKORG, "PURCHASING ORG
                    S_KTOKK FOR LFA1-KTOKK. "ACCOUNT GROUP
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS: LIST RADIOBUTTON GROUP G1, "ALV LIST DISPLAY
                GRID RADIOBUTTON GROUP G1. "ALV GRID DISPLAY
    SELECTION-SCREEN END OF BLOCK B2.
                        At  Selection-Screen                             *
    AT SELECTION-SCREEN.
      PERFORM VALIDATION.
                          Start of Selection                             *
    START-OF-SELECTION.
    *POPULATE DATA INTO ITAB_FINAL USING INNER JOINS OF IT_LFA1 IT_LFB1
    *IT_LFM1
      PERFORM GET_DATA.
    *CHECK FOR RADIO BUTTON SELECTION AND ACCORDINGLY DISPLAY ALV GRID/LIST
      PERFORM CHECK_SEL.
    *&      Form  VALIDATION
          text
    FORM VALIDATION.
      IF S_LIFNR IS NOT INITIAL.
        SELECT SINGLE LIFNR FROM LFA1 INTO IT_LFA1 WHERE LIFNR IN S_LIFNR.
        IF SY-SUBRC <> 0.
          MESSAGE I000 WITH 'THIS IS NOT A VALID VENDOR NUMBER'.
          STOP.
        ELSE.
          IF S_BUKRS IS NOT INITIAL.
            SELECT SINGLE BUKRS FROM LFB1 INTO IT_LFB1-BUKRS WHERE BUKRS IN
            S_BUKRS.
            IF SY-SUBRC <> 0.
              MESSAGE I000 WITH 'THIS IS NOT A VALID COMPANY CODE'.
              STOP.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
      CLEAR IT_LFA1.
      CLEAR IT_LFB1.
    ENDFORM.                    "VALIDATION
    *&      Form  GET_DATA
          text
    FORM GET_DATA.
      SELECT LIFNR
             KTOKK
             NAME1
             STRAS
             ORT01
             REGIO
             PFORT
             PSTLZ
             PSTL2
             TELF1
             FROM LFA1
             INTO TABLE IT_LFA1
             WHERE LIFNR IN S_LIFNR AND KTOKK IN S_KTOKK.
      SORT IT_LFA1 BY LIFNR.
      IF NOT IT_LFA1[] IS INITIAL.
        SELECT LIFNR
               BUKRS
               FROM LFB1
               INTO TABLE IT_LFB1
               FOR ALL ENTRIES IN IT_LFA1 WHERE LIFNR = IT_LFA1-LIFNR AND
                                                BUKRS IN S_BUKRS.
        SORT IT_LFB1 BY LIFNR BUKRS.
        SELECT LIFNR
               EKORG
               FROM LFM1
               INTO TABLE IT_LFM1
               FOR ALL ENTRIES IN IT_LFA1 WHERE LIFNR = IT_LFA1-LIFNR.
        SORT IT_LFM1 BY LIFNR.
      ENDIF.
      IT_FINAL[] = IT_LFB1[].
      LOOP AT IT_FINAL.
        V_INDEX = SY-TABIX.
        READ TABLE IT_LFA1 WITH KEY LIFNR = IT_FINAL-LIFNR BINARY SEARCH.
        IF SY-SUBRC = 0.
          MOVE: IT_LFA1-KTOKK TO IT_FINAL-KTOKK,
                IT_LFA1-NAME1 TO IT_FINAL-NAME1,
                IT_LFA1-STRAS TO IT_FINAL-STRAS,
                IT_LFA1-ORT01 TO IT_FINAL-ORT01,
                IT_LFA1-REGIO TO IT_FINAL-REGIO,
                IT_LFA1-PFORT TO IT_FINAL-PFORT,
                IT_LFA1-PSTLZ TO IT_FINAL-PSTLZ,
                IT_LFA1-PSTL2 TO IT_FINAL-PSTL2,
                IT_LFA1-TELF1 TO IT_FINAL-TELF1.
        ENDIF.
        READ TABLE IT_LFM1 WITH KEY LIFNR = IT_FINAL-LIFNR BINARY SEARCH.
        IF SY-SUBRC = 0.
          MOVE IT_LFM1-EKORG TO IT_FINAL-EKORG.
        ENDIF.
        MODIFY IT_FINAL INDEX V_INDEX.
      ENDLOOP.
    LOOP AT IT_LFA1.
       LOOP AT IT_FINAL WHERE LIFNR = IT_LFA1-LIFNR.
         MOVE IT_LFA1-KTOKK TO IT_FINAL-KTOKK.
         MODIFY IT_FINAL INDEX SY-TABIX.
         MOVE IT_LFA1-NAME1 TO IT_FINAL-NAME1.
         MODIFY IT_FINAL INDEX SY-TABIX.
         MOVE IT_LFA1-STRAS TO IT_FINAL-STRAS.
         MODIFY IT_FINAL INDEX SY-TABIX.
         MOVE IT_LFA1-ORT01 TO IT_FINAL-ORT01.
         MODIFY IT_FINAL INDEX SY-TABIX.
         MOVE IT_LFA1-REGIO TO IT_FINAL-REGIO.
         MODIFY IT_FINAL INDEX SY-TABIX.
         MOVE IT_LFA1-PFORT TO IT_FINAL-PFORT.
         MODIFY IT_FINAL INDEX SY-TABIX.
         MOVE IT_LFA1-PSTLZ TO IT_FINAL-PSTLZ.
         MODIFY IT_FINAL INDEX SY-TABIX.
         MOVE IT_LFA1-PSTL2 TO IT_FINAL-PSTL2.
         MODIFY IT_FINAL INDEX SY-TABIX.
         MOVE IT_LFA1-TELF1 TO IT_FINAL-TELF1.
         MODIFY IT_FINAL INDEX SY-TABIX.
       ENDLOOP.
    ENDLOOP.
    LOOP AT IT_LFM1.
       LOOP AT IT_FINAL WHERE LIFNR = IT_LFM1-LIFNR.
         MOVE IT_LFM1-EKORG TO IT_FINAL-EKORG.
         MODIFY IT_FINAL INDEX SY-TABIX.
       ENDLOOP.
    ENDLOOP.
    SORT IT_FINAL BY LIFNR BUKRS EKORG.
    ENDFORM.                    "GET_DATA
    *&      Form  CHECK_SEL
          text
    FORM CHECK_SEL.
    X_FIELDCAT-FIELDNAME = 'LIFNR'.
    X_FIELDCAT-TABNAME = 'IT_FINAL'.
    X_FIELDCAT-SELTEXT_L  = 'VENDOR'.
    X_FIELDCAT-NO_ZERO    = 'X'.
    X_FIELDCAT-OUTPUTLEN  = 10.
    X_FIELDCAT-COL_POS    = 1.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'BUKRS'.
    X_FIELDCAT-TABNAME = 'IT_FINAL'.
    X_FIELDCAT-SELTEXT_L  = 'COMPANY'.
    X_FIELDCAT-NO_ZERO    = 'X'.
    X_FIELDCAT-OUTPUTLEN  = 4.
    X_FIELDCAT-COL_POS    = 2.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'EKORG'.
    X_FIELDCAT-TABNAME = 'IT_FINAL'.
    X_FIELDCAT-SELTEXT_L  = 'PURCHASING ORGANISATION'.
    X_FIELDCAT-NO_ZERO    = 'X'.
    X_FIELDCAT-OUTPUTLEN  = 4.
    X_FIELDCAT-COL_POS    = 3.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'KTOKK'.
    X_FIELDCAT-TABNAME = 'IT_FINAL'.
    X_FIELDCAT-SELTEXT_L  = 'ACCOUNT GROUP'.
    X_FIELDCAT-NO_ZERO    = 'X'.
    X_FIELDCAT-OUTPUTLEN  = 4.
    X_FIELDCAT-COL_POS    = 4.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'NAME1'.
    X_FIELDCAT-TABNAME = 'IT_FINAL'.
    X_FIELDCAT-SELTEXT_L  = 'VENDOR NAME'.
    X_FIELDCAT-NO_ZERO    = 'X'.
    X_FIELDCAT-OUTPUTLEN  = 35.
    X_FIELDCAT-COL_POS    = 5.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'STRAS'.
    X_FIELDCAT-TABNAME = 'IT_FINAL'.
    X_FIELDCAT-SELTEXT_L  = 'STREET'.
    X_FIELDCAT-NO_ZERO    = 'X'.
    X_FIELDCAT-OUTPUTLEN  = 10.
    X_FIELDCAT-COL_POS    = 6.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'ORT01'.
    X_FIELDCAT-TABNAME = 'IT_FINAL'.
    X_FIELDCAT-SELTEXT_L  = 'CITY NAME'.
    X_FIELDCAT-NO_ZERO    = 'X'.
    X_FIELDCAT-OUTPUTLEN  = 20.
    X_FIELDCAT-COL_POS    = 7.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'REGIO'.
    X_FIELDCAT-TABNAME = 'IT_FINAL'.
    X_FIELDCAT-SELTEXT_L  = 'REGION NAME'.
    X_FIELDCAT-NO_ZERO    = 'X'.
    X_FIELDCAT-OUTPUTLEN  = 2.
    X_FIELDCAT-COL_POS    = 8.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
      IF LIST = 'X'.
        CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
          EXPORTING
            I_PROGRAM_NAME         = SY-REPID
            I_INTERNAL_TABNAME     = 'IT_FINAL'
            I_INCLNAME             = SY-REPID
          CHANGING
            CT_FIELDCAT            = IT_FIELDCAT
          EXCEPTIONS
            INCONSISTENT_INTERFACE = 1
            PROGRAM_ERROR          = 2
            OTHERS                 = 3.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        L_LAYOUT-ZEBRA = 'X'.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            I_CALLBACK_PROGRAM = SY-REPID
            IS_LAYOUT          = L_LAYOUT
            IT_FIELDCAT        = IT_FIELDCAT
          TABLES
            T_OUTTAB           = IT_FINAL
          EXCEPTIONS
            PROGRAM_ERROR      = 1
            OTHERS             = 2.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ELSE.
        CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
          EXPORTING
            I_PROGRAM_NAME         = SY-REPID
            I_INTERNAL_TABNAME     = 'IT_FINAL'
            I_INCLNAME             = SY-REPID
          CHANGING
            CT_FIELDCAT            = IT_FIELDCAT
          EXCEPTIONS
            INCONSISTENT_INTERFACE = 1
            PROGRAM_ERROR          = 2
            OTHERS                 = 3.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        L_LAYOUT-ZEBRA = 'X'.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            I_CALLBACK_PROGRAM = SY-REPID
            IS_LAYOUT          = L_LAYOUT
            IT_FIELDCAT        = IT_FIELDCAT
          TABLES
            T_OUTTAB           = IT_FINAL
          EXCEPTIONS
            PROGRAM_ERROR      = 1
            OTHERS             = 2.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    Regards
    Naresh

Maybe you are looking for

  • PO Version Number not available in PO List displays (ME2L, ME2K, etc)

    I have configured PO Version Management. My PO's are working as desired with proper output. However, the PO Version Number is not displayed in my PO List Display tcodes (ME2L, ME2K, etc) nor is it available to add to the layout.  I have configured th

  • My jdev 10.1.2 CVS Workflow Solution

    Well, I know many people here struggle with the awful mess that passes for CVS support in jdev. After many months, here is how we manage real work using integrated CVS in jdev 10.1.2 with more than 1 developer. Our projects are struts/bc4j broken dow

  • I can't type @ on iPhone to send iMessages, any help?

    I can't type @ on iPhone to send iMessages, any help?

  • VO To get all active employees

    Hi All, Can any body tell the query to get all the active employees in the Organization. Thanks UMA

  • Drilling with Discoverer style

    Hi all, is there a way to create a report and drill the values of a column through another column as in Discoverer? If i create a dimension I can drill through it, otherwise I have to create a link from a report to another. But if I want to build a r