Help in daynamic select

Hi,
i do FM and i wont to give to user option which field to select
i try to move name field to variable and try to do it all time with change field,how i can do that i try like below and i have error .
Regards
TYPES : BEGIN OF ab,
        dim0calmonth TYPE /bi0/oicalmonth,
        dim0costcenter TYPE /bi0/oicostcenter,
        change_fld TYPE p DECIMALS 2,
        END OF ab.
data: fl_tab type table of ab.
    SELECT  dim0calquarter dim0costcenter  ( key_field )
      FROM /bic/0
      INTO  TABLE fl_tab
      FOR ALL ENTRIES IN leaf_tab
      WHERE dim0costcenter =  leaf_tab-dim0costcenter
      AND dim0calquarter = year_q
      AND dim0curtype = curr_type.

Hi,
Pl. see the code below. May be it will help u.
parameters: cities as checkbox,
carriers as checkbox,
seats as checkbox,
names as checkbox.
data: begin of wa,
carrid type sbook-carrid,
connid type sbook-connid,
fldate type sbook-fldate,
customid type sbook-customid,
cityfrom type spfli-cityfrom,
cityto type spfli-cityto,
carrname type scarr-carrname,
seatsmax type sflight-seatsmax,
seatsocc type sflight-seatsocc,
name type scustom-name,
end of wa,
from type string value u2018sbook as bu2018,
list type string value
u2018bcarrid bconnid bfldate bcustomidu2018.
if cities = 'X'.
concatenate
from u2018 join spfli as p on bcarrid = pcarrid and bconnid = pconnidu2018
into from.
concatenate list u2018 cityfrom citytou2018 into list.
endif.
if carriers = 'X'.
concatenate
from u2018 join scarr as c on bcarrid = ccarridu2018 into from.
concatenate list u2018 c~carrnameu2018 into list.
endif.
if seats = 'X'.
concatenate
from u2018 join sflight as fu2018
u2018 on bcarrid = fcarrid and bconnid = fconnid and bfldate = ffldateu2018
into from.
concatenate list u2018 seatsmax, seatsoccu2018 into list.
endif.
if names = 'X'.
concatenate
from u2018 join scustom as u on bcustomid = uidu2018 into from.
concatenate list u2018 nameu2018 into list.
endif.
select (list) from (from) into corresponding fields of wa. << Without any space
write: / wa-connid, wa-carrid, wa-fldate, wa-customid.
if cities = 'X'.
write: wa-cityfrom, wa-cityto.
endif.
if carriers = 'X'.
write: wa-carrname.
endif.
if seats = 'X'.
write: wa-seatsmax, wa-seatsocc.
endif.
if names = 'X'.
write: wa-name.
endif.
endselect.
Regards,
Joy.
Edited by: Joyjit Ghosh on Jun 17, 2008 3:40 PM

Similar Messages

  • One search help for multiple select-options in webdynpro abap

    Hi,
    I need a way to use one search help for multiple select-options fields. My scenario is :
    I have a table for keeping different organizational units' values of different systems. I have pasted some sample data from this table at the end of this mail. On the screen I want to have 1 select-options filed for werks, and 1 select-options filed for vkorg. (In fact I will have more org. unit fields...) In the beginning of my application the user will select sid.
    If the user selects ADS as SID, when he opens search-help for the first org. unit (werks), he will see the records with SID: ADS, VARBL = $WERKS, LANGU = SY-LANGU.
    If the user selects AGT as SID, when he opens search-help for the second org. unit (vkorg), he will see the records with SID: AGT, VARBL = $VKORG, LANGU = SY-LANGU.
    I have created a search-help taking SIDD, VARBL and LANGU as import parameters; used field mapping and bound this search help to my table. I have created 2 context nodes : org1 and org2 having attributes SID, VARBL, VALUE, LANGU .
    I have assigned related SID, VARBL and Langu values to these attributes at runtime as I needed. That way, if I use input field and reference to the related context attributes org1-value and org2-value2 accordingly, search help works well as I want.
    However, when I use select-options field , I can not bind the field to the context data. I can give reference only to ddic structure. Is there any way to reference to a context attribute? I searched for this in SDN, but could find nothing.
    I think I won't be able to use this way. What do you say?
    As I read from forums maybe using OVS help will be suitable for me. But I have to use one search-help for all select-options fields. Do you know how I can determine the active select-options field and pass its name (for instance "werks" ) as parameter to this OVS search help. (Also I'll pass SID and LANGU.)
    MY TABLE (ZBYYT080) CONTENTS:
    SID     VARBL     VALUE     LANGU     VTEXT
    ADS     $WERKS     1     T     Werk 0001
    ADS     $WERKS     11     T     OZYAS  GIDA URETIM YERI
    ADS     $WERKS     5501     T     BOYA GEBZE FABRİKASI
    ADS     $WERKS     5502     T     BOYA CIGLI FABRİKASI
    AGT     $WERKS     2301     T     KAMLI DAMIZLIK
    AGT     $WERKS     9601     T     PANAR DENIZ URETIM YERI
    ADS     $VKORG     22     T     AA KİMYASALLAR
    ADS     $VKORG     8001     T     İINSAAT BOYALARI
    AGT     $VKORG     6500     T     DAMk St.Org
    AGT     $VKORG     5400     T     PANAR St.Org.
    I wish I'm clear enough..
    I will be gald if someone answers me as soon as possible...
    Thanks İn advance..
    MERAL

    Hi,
    Your ques is how to refer to a DDIC search help to refer to selection screen parameter ?
    Am I right ?
    If Yes, then in the interface IF_WD_SELECT_OPTIONS
    method ADD_SELECTION_FIELD, ADD_PARAMETER_FIELD etc
    have importing param like I_VALUE_HELP_TYPE and  I_VALUE_HELP_ID, I_VALUE_HELP_MODE, I_VALUE_HELP_STRUCTURE
    etc which may help you to link your create DDIC Search help to selection screen params.
    this is just a clue from my side. I haven't tried it myself.
    You can go to the where used list of this method and find some sample implementations which use these params.
    Hope this helps.
    Regards
    Manas Dua

  • F4 Help for the selection screen field

    Hi Gurus,
    I have to display F4 help for a selection screen field. i am using following code:
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
                  retfield        = 'CODE'
                  dynpprog        = lw_repid
                  dynpnr          = sy-dynnr
                  VALUE_ORG       = 'S'
             TABLES
                  value_tab       = gi_text
                 field_tab       = li_fields_tab
                  return_tab      = pi_return_tab
             EXCEPTIONS
                  parameter_error = 1
                  no_values_found = 2
                  OTHERS          = 3.
    My internal table gi_emp has two fields CODE & TEXT. When i select 1 particular value, it returns the CODE value in the pi_return_tab table.
    But my requirement is i have to capture the corresponding TEXT value for the Returned CODE. Ex: following is the F4 help being displayed: -
    001    test
    001    test1
    but is i select code 001(First Value), i also need to capture it's corresponding Text value. In return table pi_return_tab i have only Code value.
    Please help me out.
    Note: Based on return code i can't search into the internal table gi_code, because as shown in the example, code has multiple text.

    Sachin,
    I think this is what you need. The following code will return the key and the text (OR any other columns), if both columns are in the selection screen the selected values (both columns) will also be passed to the corresponding parameters. If you only need the text to be in the return table and not passed to the selection screen then set the parameter for text with NO-DISPLAY option.
    REPORT zktest01 .
    DATA :
      BEGIN OF value_tab OCCURS 0,
        field  LIKE e070-trkorr,
        text   LIKE e07t-as4text,
      END OF value_tab.
    DATA: t_fldtab LIKE dfies OCCURS 0 WITH HEADER LINE,
          t_rettab LIKE ddshretval OCCURS 0 WITH HEADER LINE,
          t_dynmap LIKE dselc OCCURS 0 WITH HEADER LINE.
    PARAMETERS : p_field  LIKE value_tab-field,
                 p_text   LIKE value_tab-text. "NO-DISPLAY.
    INITIALIZATION.
      t_fldtab-tabname   = 'VALUE_TAB'.
      t_fldtab-fieldname = 'FIELD'.
      t_fldtab-langu     = 'E'.
      t_fldtab-position  = 1.
      t_fldtab-offset    = 0.
      t_fldtab-fieldtext = 'Key'.
      t_fldtab-reptext   = 'Key'.
      t_fldtab-leng      = 20.
      t_fldtab-intlen    = 20.
      t_fldtab-outputlen = 20.
      t_fldtab-datatype  = 'CHAR'.
      t_fldtab-inttype   = 'C'.
      t_fldtab-headlen   = 20.
      t_fldtab-keyflag   = 'X'.
      t_fldtab-lowercase = ' '.
      APPEND t_fldtab.
      t_fldtab-tabname   = 'VALUE_TAB'.
      t_fldtab-fieldname = 'TEXT'.
      t_fldtab-position  = 2.
      t_fldtab-offset    = 20.
      t_fldtab-fieldtext = 'Text'.
      t_fldtab-reptext   = 'Text'.
      t_fldtab-leng      = 60.
      t_fldtab-intlen    = 60.
      t_fldtab-outputlen = 60.
      t_fldtab-headlen   = 60.
      t_fldtab-keyflag   = ' '.
      t_fldtab-lowercase = ' '.
      APPEND t_fldtab.
      value_tab-field = '101'.
      value_tab-text = 'dddd'.
      APPEND value_tab.
      value_tab-field = '202'.
      value_tab-text = 'aaaa'.
      APPEND value_tab.
      t_dynmap-fldname = 'FIELD'.
      t_dynmap-dyfldname = 'P_FIELD'.
      APPEND t_dynmap.
      t_dynmap-fldname = 'TEXT'.
      t_dynmap-dyfldname = 'P_TEXT'.
      APPEND t_dynmap.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'FIELD'
                dynpprog        = 'ZKTEST01'
                dynpnr          = '1000'
                dynprofield     = 'P_FIELD'
                value_org       = 'S'
           TABLES
                field_tab       = t_fldtab
                value_tab       = value_tab
                return_tab      = t_rettab
                dynpfld_mapping = t_dynmap
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc EQ 0.
      ENDIF.
    START-OF-SELECTION.
    Jeffrey Satriadi

  • Help on a selection screen

    I need some help on a selection screen.  I have the following:
    SELECTION-SCREEN: BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
    PARAMETERS:       p_bldat TYPE bkpf-bldat OBLIGATORY DEFAULT sy-datum,
                      p_budat TYPE bkpf-budat OBLIGATORY DEFAULT sy-datum,
                      p_xref1 TYPE proj-pspid OBLIGATORY,
                      p_bktxt TYPE bkpf-bktxt,
                      p_bukrs TYPE bkpf-bukrs OBLIGATORY DEFAULT '1100',
                      p_waers TYPE bkpf-waers OBLIGATORY DEFAULT 'USD'.
    SELECTION-SCREEN: END OF BLOCK a1.
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
    PARAMETERS:       p_lifnr TYPE ekko-lifnr OBLIGATORY,
                      p_ebeln TYPE ekko-ebeln OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK b1.
    SELECTION-SCREEN: BEGIN OF BLOCK c1 WITH FRAME TITLE text-003.
    PARAMETERS:       p_amt TYPE wrbtr,
                      p_ret  TYPE wrbtr.
    SELECTION-SCREEN: END OF BLOCK c1.
    SELECTION-SCREEN: BEGIN OF BLOCK d1 WITH FRAME TITLE text-004.
    PARAMETERS:       p_cmode  TYPE callmode DEFAULT 'N' OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK d1.
    AT SELECTION-SCREEN ON p_ebeln.
      SELECT SINGLE kwert INTO p_ret FROM zretention WHERE ebeln = p_ebeln AND ebelp = '00000' AND TYPE = 'C'.
      IF NOT sy-subrc = 0 OR p_ret IS INITIAL.
        CONCATENATE 'Purchase Order' p_ebeln 'does not have any retention available for release!' INTO d_string.
        MESSAGE d_string TYPE 'E'.
      ENDIF.
    AT SELECTION-SCREEN.
      check p_ret is not INITIAL.
      IF p_amt > p_ret.
        MESSAGE 'Amt. To Be Released is more than the remaining retention. Please check your input.' TYPE 'E'.
      ELSEIF p_amt IS INITIAL.
        MESSAGE 'Amt. To Be Released is required. Please check your input.' TYPE 'E'.
      ENDIF.
    What I want is for the parameter p_ret to be populated when the user inputs a PO (p_ebeln).  This seems to work except I want this to be brought in without running through the other checks (AT SELECTION-SCREEN).  In order to bring in p_ret I am having to hit ENTER which will trigger the event AT SELECTION-SCREEN.
    How can I bring in p_ret without triggering the event AT SELECTION-SCREEN?
    Regards,
    Davis

    In this case.
    If you don't want at selection-screen to be triggered on hitting enter, you can give an if condition in at selection-screen.
    tables : sscrfields.
    AT SELECTION-SCREEN ON p_ebeln.
      SELECT SINGLE kwert INTO p_ret FROM zretention WHERE ebeln = p_ebeln AND ebelp = '00000' AND TYPE = 'C'.
      IF NOT sy-subrc = 0 OR p_ret IS INITIAL.
        CONCATENATE 'Purchase Order' p_ebeln 'does not have any retention available for release!' INTO d_string.
       clear sscrfield-ucomm.
        MESSAGE d_string TYPE 'E'.
      ENDIF.
    AT SELECTION-SCREEN.
    if sscrfields-ucomm = 'ONLI'.
      check p_ret is not INITIAL.
      IF p_amt > p_ret.
        MESSAGE 'Amt. To Be Released is more than the remaining retention. Please check your input.' TYPE 'E'.
      ELSEIF p_amt IS INITIAL.
        MESSAGE 'Amt. To Be Released is required. Please check your input.' TYPE 'E'.
      ENDIF.
    endif.
    The code in at selection-screen is executed only when user presses F8. on pressing 'Enter' it will not be executed.
    Hope this helps you.
    Regards,
    Siddarth

  • Creation of search help manually fro select-options

    hi friends i got a requirement for creating the search helps manually for select-options.
    but i am facing a progbalem.
    i am attaching a sample code for what i have written for select-opions low of which when i am pressing f4 button i am getting list of data but when i am selecting that particular it is not withstading on the screen...kindly help in this regard very urguent..plz...all answers are rewarded..
    tableS: kna1.
    datA: BEGIN OF ITAB OCCURS 1,
        KUNNR TYPE KNA1-KUNNR,
        END OF ITAB.
    data: kunnr type kunnr.
    select-options: cust for kunnr .
    at selection-screen on value-request for cust-low.
    select kunnr from kna1 into table itab .
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
    *   DDIC_STRUCTURE      = ''
        RETFIELD               = 'CUST-LOW'
    *   PVALKEY                = ' '
    *   DYNPPROG               = ' '
    *   DYNPNR                 = ' '
    *   DYNPROFIELD            = ''
    *   STEPL                  = 0
    *   WINDOW_TITLE           =
       VALUE                  = 'CUST-LOW'
       VALUE_ORG              = 'S'
    *   MULTIPLE_CHOICE        = ' '
    *   DISPLAY                = 'X'
       CALLBACK_PROGRAM       = SY-CPROG
    *   CALLBACK_FORM          = ' '
    *   MARK_TAB               =
    * IMPORTING
    *   USER_RESET             =
      TABLES
        VALUE_TAB              = ITAB
    *   FIELD_TAB              =
    *   RETURN_TAB             =
    *   DYNPFLD_MAPPING        =
    * EXCEPTIONS
    *   PARAMETER_ERROR        = 1
    *   NO_VALUES_FOUND        = 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.

    Hai  Saslove,
    I think Problem Lies In this Area When U r Creating   Search Helps.
    Import and Export Parameters
    When an input help is called, the entries that the user already made in the input template are taken into consideration. For example, if a user calls the input help for the flight number and already specified the carrier, of course only the numbers of flights of this carrier should be offered.
    On the other hand, if the user selects one row of the hit list, more than one field of the input template might have to be filled with data from the selected row of the hit list. For example, if the flight number is obtained from the hit list, the city of departure and the destination should also be returned in the screen template.
    The interface of a search help defines the context data that can be used in the input help and the data that can be returned in the input template.
    A parameter of a search help can be classified as:
    Import parameters: Parameters with which context information from the processed input template (screen) may be copied to the help process.
    Export parameters: Parameters with which values from the hit list may be returned to the input template.
    A parameter can simultaneously be an input and an export parameter. A search help can also contain parameters that are neither import nor export parameters. Such parameters could be required for the internal input help process, for example.
    When you attach a search help, you must define where the import parameters of the search help get their values from and the fields in which the contents of the export parameters are returned. See also Value Transport for Input Helps.
    Regards.
    Eshwar.

  • Search help for PERNR select options in Webdynpro

    Hi,
    I am using the method: lv_r_helper_class->add_selection_field
    and passing the value:
    i_value_help_type            = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
    to get search help for pernr select option in the webdynpro application.
    But can anyone please tell me what value i have to pass to
    i_value_help_id              =  ??

    hi,
    pass your search help name there so that your desired search help ll come there..
    use this,
    i_value_help_type            = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
    i_value_help_id              =  'SEARCHHELPNAME'
    if you want standard SH means comment this stmt,
    if you dont want SH means,
    use tis,
    i_value_help_type            = if_wd_value_help_handler=>CO_PREFIX_NONE
    hope this helps,
    Mathan R.

  • Error in search help button at selection-screen

    hi all,
    i have a small issue.
    i have created a seach help button in selection screen .
    my code is as bellow.
    TYPES: BEGIN OF ty_ZSD_SNID,
           KUNNR TYPE KUNNR,
           BAREA TYPE WERKS_D,
          END OF ty_ZSD_SNID.
    DATA : it_z TYPE STANDARD TABLE OF ty_ZSD_SNID.
    selection-screen : begin of block b with frame title text-000.
    select-options : skunnr for zsd_snid-kunnr.
    parameters :     pbarea like zsd_snid-barea obligatory.
    selection-screen : end of block b.
    INITIALIZATION.
      SELECT KUNNR BAREA FROM ZSD_SNID INTO TABLE it_z.
      SORT it_z BY BAREA KUNNR.
      DELETE ADJACENT DUPLICATES FROM it_z COMPARING BAREA KUNNR.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SKUNNR-low.
      IF it_z[] IS NOT INITIAL.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
                 EXPORTING
              DDIC_STRUCTURE         = ' '
                   retfield               = 'KUNNR'  " data base table field name
              PVALKEY                = ' '
                  dynpprog               = sy-repid " program name
                  dynpnr                 = sy-dynnr          "screen name
                  dynprofield            = 'SKUNNR-LOW'  " layot field name
              STEPL                  = 0
              WINDOW_TITLE           =
              VALUE                  = ' '
                  value_org              = 'S'
              MULTIPLE_CHOICE        = ' '
              DISPLAY                = ' '
              CALLBACK_PROGRAM       = ' '
              CALLBACK_FORM          = ' '
              MARK_TAB               =
            IMPORTING
              USER_RESET             =
                 TABLES
                   value_tab              = it_z[]   " internal talble name
              FIELD_TAB              =
              RETURN_TAB             =
              DYNPFLD_MAPPING        =
            EXCEPTIONS
              PARAMETER_ERROR        = 1
              NO_VALUES_FOUND        = 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.
      ELSE.
        MESSAGE E000(zsdsn).
      ENDIF.
    my issue is , its working properly if records are there in my z table.
    if no records are there in the table then if i do comment the last message statement then its working.
    if i do uncomment like the above code, then its dumming.
    what i should i do ??
    kind regards

    closed because of no answer.

  • Standard input help in zreport selection screen

    Hi All,
       I am having a selection sceen like S_PERNR FOR PA0001-PERNR.
       when I put f4 help then it is comming right and showing the value
      of personnel number which is correct.
       But when you execute the transaction PA30 and select f4 help in
    personnel number then it iscomming with window and all information
    is cooming. I want to put that help on my selection screnn S_PERNR FOR PA0001-PERNR.
    is it possible? Please give me the solution.
    Thanks,
    Rakesh

    Yes, i am getting input help for position in that program also in ECC 6.0 version.
    SELECT-OPTIONS:pchobjid FOR pchdy-objid_seq.           
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pchobjid-low.    
      rhx-f4-objid-low pchplvar pchotype pchobjid '' ''.     
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pchobjid-high.   
      rhx-f4-objid-high pchplvar pchotype pchobjid '' ''.     
    AT SELECTION-SCREEN ON pchobjid.
      PERFORM check_objid_sign(rhxchk00) USING pchobjid-sign.
    Which version are you working ?
    Note: Plz post only one question per thread.

  • Help in Join Select Query

    Hi, Please help on the Select Join query. I want to compare code_stat_system1/code_stat_system2 and code_date_system1 /code_date_system2 column from table #system1 and #system2 but there is 2 rule to get correct row from table #system1 and #system2.
    Rule 1: We need to get max(code_date_system1) record from #system1  for every code_system1 for compare.
    Rule 1: We need to get max(code_date_system2) record from #system2  BUT BEFORE THE RECORD OF 'DKNOW' OF code_stat_system2 for every code_system2 for compare.
    drop table #system1,#system2
    create table #system1
    (Code_system1 varchar(10),code_stat_system1 varchar(10),code_date_system1 datetime)
    Insert into #system1 values ('10','Dead','2013-01-01')
    Insert into #system1 values ('10','Dead','2013-12-30')
    Insert into #system1 values ('10','UnOpen','2014-10-01')
    Insert into #system1 values ('10','Open','2014-11-01')   --This record should max(code_stat_system1) for compare
    Insert into #system1 values ('20','Dead','2013-12-01')
    Insert into #system1 values ('20','Dead','2013-12-30')
    Insert into #system1 values ('20','Open','2014-08-01')
    Insert into #system1 values ('20','UnOpen','2014-09-01') --This record should max(code_stat_system1) for compare
    create table #system2
    (Code_system2 varchar(10),code_stat_system2 varchar(10),code_date_system2 datetime)
    Insert into #system2 values ('10','Dead','2013-01-01')
    Insert into #system2 values ('10','Dead','2013-12-30')
    Insert into #system2 values ('10','Open','2014-10-01')
    Insert into #system2 values ('10','UnOpen','2014-12-01') --This record should max(code_stat_system2) which is before 'DKNOW' for compare
    Insert into #system2 values ('10','DKNOW','2015-01-01')
    Insert into #system2 values ('10','DKNOW','2015-02-01')
    Insert into #system2 values ('20','Dead','2013-12-01')
    Insert into #system2 values ('20','Dead','2013-12-30')
    Insert into #system2 values ('20','Open','2014-08-01')
    Insert into #system2 values ('20','UnOpen','2014-09-01') --This record should max(code_stat_system2) which is before 'DKNOW' for compare
    Insert into #system2 values ('20','DKNOW','2015-01-01')
    Insert into #system2 values ('20','DKNOW','2015-02-01')
    --Desired Output
    Code_system1  code_stat_system1  code_date_system1  Code_system1   code_stat_system2  code_date_system1    Rrmk_code_stat         Rrmk_code_date
    10            Open           2014-11-01        10          UnOpen         
    2014-12-01         Codes not matching     Dates not matching
    20            UnOpen         2014-09-01        20          UnOpen         
    2014-09-01         Codes matching          Dates matching
    Thanks.

    drop table #system1,#system2
    create table #system1
    (Code_system1 varchar(10),code_stat_system1 varchar(10),code_date_system1 datetime)
    Insert into #system1 values ('10','Dead','2013-01-01')
    Insert into #system1 values ('10','Dead','2013-12-30')
    Insert into #system1 values ('10','UnOpen','2014-10-01')
    Insert into #system1 values ('10','Open','2014-11-01') --This record should max(code_stat_system1) for compare
    Insert into #system1 values ('20','Dead','2013-12-01')
    Insert into #system1 values ('20','Dead','2013-12-30')
    Insert into #system1 values ('20','Open','2014-08-01')
    Insert into #system1 values ('20','UnOpen','2014-09-01') --This record should max(code_stat_system1) for compare
    create table #system2
    (Code_system2 varchar(10),code_stat_system2 varchar(10),code_date_system2 datetime)
    Insert into #system2 values ('10','Dead','2013-01-01')
    Insert into #system2 values ('10','Dead','2013-12-30')
    Insert into #system2 values ('10','Open','2014-10-01')
    Insert into #system2 values ('10','UnOpen','2014-12-01') --This record should max(code_stat_system2) which is before 'DKNOW' for compare
    Insert into #system2 values ('10','DKNOW','2015-01-01')
    Insert into #system2 values ('10','DKNOW','2015-02-01')
    Insert into #system2 values ('20','Dead','2013-12-01')
    Insert into #system2 values ('20','Dead','2013-12-30')
    Insert into #system2 values ('20','Open','2014-08-01')
    Insert into #system2 values ('20','UnOpen','2014-09-01') --This record should max(code_stat_system2) which is before 'DKNOW' for compare
    Insert into #system2 values ('20','DKNOW','2015-01-01')
    Insert into #system2 values ('20','DKNOW','2015-02-01')
    ;with mycte1 as (select * ,row_number() Over (partition by Code_system1 Order by code_date_system1 Desc ) rn from #system1)
    ,mycte2 as (select *,row_number() Over (partition by Code_system2 Order by code_date_system2 Desc ) rn2 from #system2
    where code_stat_system2<>'DKNOW')
    Select m1.Code_system1, m1.code_stat_system1, m1.code_date_system1, Code_system2, code_stat_system2,code_date_system2 ,
    case When code_date_system1=code_date_system2 then 'Dates matching' else 'Dates not matching' End as checkDate,
    case When code_stat_system1=code_stat_system2 then 'Codes matching' else 'Codes not matching' End as checkStat
    from mycte1 m1 inner join mycte2 m2 on m1.Code_system1= m2.Code_system2 and m1.rn=m2.rn2
    Where m1.rn=1

  • I want to change my primary e-mail address that I use with Apple ID - help guide says Select Edit next to "Apple ID and Primary Email Address." But there is no 'edit' on that section there is on every other but not that one. Can anyone help?

    I want to change my primary e-mail address that I use with Apple ID - help guide says Select Edit next to “Apple ID and Primary Email Address.” But there is no 'edit' on that section there is on every other but not that one. Can anyone help?

    You can create an alias @icloud.com email address within your current account that will receive email in your current iCloud inbox (see http://help.apple.com/icloud/#/mm6b1a490a).  (@me.com addresses are no longer available as new addresses.)  Just be aware that you cannot use an alias address later to create a new iCloud account or move it to a different account.
    Also, even if you created a new iCloud account with a new ID, your existing purchases would not be lost.  They are permanently tied to the original ID you used to purchase them.  You can also continue to use the existing ID for the iTunes store; it does not need to be the same as the ID you use for iCloud.

  • How to provide F4 help in a selection screen

    Hi..
       How to provide F4 help in a selection screen for a particular field  using  
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'.
    Thanks in Advance.
    Regards
    Raj Kumar

      AT SELECTION SCREEN
    at selection-screen on value-request for s_contr-low.
    Get contract (low value)
      perform get_contract changing s_contr-low.
    form get_contract  changing p_contr .
      types: begin of ty_ycontract,
               ycontract type xchcontract-ycontract,
               lifnr     type xchcontract-lifnr,
               ycontdate type xchcontract-ycontdate,
               ycont_end_dt type xchcontract-ycont_end_dt ,
             end of ty_ycontract.
      data: ds_returntab   type ddshretval,
            dt_returntab   type table of ddshretval,
            dl_fieldname     type dfies-fieldname.
      data: dt_ycontract type table of ty_ycontract.
      select ycontract lifnr ycontdate ycont_end_dt
        from xchcontract
        into table dt_ycontract.
      if sy-subrc = 0.
        clear dl_fieldname.
        dl_fieldname = 'YCONTRACT'.
        call function 'F4IF_INT_TABLE_VALUE_REQUEST'
          exporting
            retfield        = dl_fieldname
            value_org       = 'S'
          tables
            value_tab       = dt_ycontract
            return_tab      = dt_returntab
          exceptions
            parameter_error = 1
            no_values_found = 2
            others          = 3.
        if sy-subrc = 0.
          clear ds_returntab.
          read table dt_returntab into ds_returntab index 1.
          if sy-subrc = 0.
            p_contr = ds_returntab-fieldval.
          endif.
        endif.
      endif.
    endform.

  • F4 help in the selection screen from a int table

    I collected the datas from the function module. and the internal table is populated.
    the internal table contains manny fields.
    among these fields i need to take only one field and this field value to be used for F4 help in the selection screen ( not a dynpro)
    for example : in the selection screen
    I have to select the PO.
    based on the user i have filtered the PO. (determined dynamically by using the user name this i have done it)
    then i have to assign the PO the selection screen.
    which FM will be better to use  for this type of scenario and help me out with some example codes particularly for my req
    Thanks

    Hi ,
    use the FM 'F4IF_INT_TABLE_VALUE_REQUEST'
    This example is for search help for material type .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_mtart-low .
    select all material types you want to display in search help into table i_mtart.
    PERFORM select_material_type.
    PERFORM help_material_type.
    *& Form help_material_type
    text
    --> p1 text
    <-- p2 text
    FORM help_material_type .
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    retfield = 'MTART'
    PVALKEY = ' '
    dynpprog = sy-cprog
    dynpnr = sy-dynnr
    dynprofield = 'S_MTART-LOW'
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    value_org = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    TABLES
    value_tab = i_mtart
    FIELD_TAB =
    RETURN_TAB =
    DYNPFLD_MAPPING =
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 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.
    ENDFORM. " help_material_type
    Regards,
    Balaji.

  • How to link a search help to a selection screen field

    Hi All,
    I am using field PKWRG from PA0017 table in selection screen. I need F4 help there as in Tcode PA30 . But this field does not have value table or check table. However, it has a search help attached 'TRV_PKWRG' .
    But, I donot know how to assign a search help to a selection screen field. Please help.
    Regards,
    Nibha

    Hello,
    Fetch all the data which from the table which you want to show in the search help and pass the value to the FM
    F4IF_INT_TABLE_VALUE_REQUEST and the selection-screen event must be
    at selection-screen on value request parameter or selection option variable.
    BCALV_TEST_FULLSCREEN
    BCALV_TEST_FULLSCREEN_CALLS
    BCALV_TEST_FULLSCREEN_PRINT
    BCALV_TEST_FULLSCREEN_STATUS
    BCALV_TEST_GRID
    BCALV_TEST_GRID_DRAG_DROP
    BCALV_TEST_GRID_EDITABLE
    BCALV_TEST_GRID_EVENTS
    BCALV_TEST_GRID_INDEX
    BCALV_TEST_GRID_TOOLBAR
    BCALV_TEST_HIERSEQ_LIST
    BCALV_TEST_LIST
    BCALV_TEST_LIST_PRINT
    BCALV_TEST_LIST_STATUS
    BCALV_VERIFY_DTYPES_D0100_F01
    BCSMENUF01
    BDLCOF10
    BDLDVI10
    BDLTREDF

  • Can we create serach help for a selection screen field

    Can we create serach help for a selection screen field with out creating searchhelp object.
    I mean is it possible to create serchelp in the program itself with some specific values i want to give.
    E.g say we can define any internal table and fill it with values and using that into selection screen fields
    Regards
    Mave

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR paymeth.
      PERFORM PAYMENT_HELP.
    FORM PAYMENT_HELP.
      DATA: begin of DESCR_TAB occurs 0,
            DESCR LIKE BKPF-BKTXT,
            END OF DESCR_TAB.
      DATA: gd_repid like sy-repid.
      gd_repid = sy-repid.
      DESCR_TAB-DESCR = 'aaaaa'.
      append DESCR_TAB.
      DESCR_TAB-DESCR = 'bbbbb'.
      append DESCR_TAB.
      DESCR_TAB-DESCR = 'ccccc'.
      append DESCR_TAB.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield    = 'DESCR'
                DYNPPROG    = gd_repid
                DYNPNR      = '1000'
                DYNPROFIELD = 'paymeth'
                VALUE_ORG   = 'S'
                DISPLAY     = ' '
           TABLES
                value_tab   = DESCR_TAB.
    endform.
    Svetlin

  • I need help with a SELECT query - help!

    Hello, I need help with a select statement.
    I have a table with 2 fields as shown below
    Name | Type
    John | 1
    John | 2
    John | 3
    Paul | 1
    Paul | 2
    Paul | 3
    Mark | 1
    Mark | 2
    I need a query that returns everything where the name has type 1 or 2 but not type 3. So in the example above the qery should bring back all the "Mark" records.
    Thanks,
    Ian

    Or, if the types are sequential from 1 upwards you could simply do:-
    SQL> create table t as
      2  select 'John' as name, 1 as type from dual union
      3  select 'John',2 from dual union
      4  select 'John',3 from dual union
      5  select 'Paul',1 from dual union
      6  select 'Paul',2 from dual union
      7  select 'Paul',3 from dual union
      8  select 'Paul',4 from dual union
      9  select 'Mark',1 from dual union
    10  select 'Mark',2 from dual;
    Table created.
    SQL> select name
      2  from t
      3  group by name
      4  having count(*) <= 2;
    NAME
    Mark
    SQL>Or another alternative if they aren't sequential:
    SQL> ed
    Wrote file afiedt.buf
      1  select name from (
      2    select name, max(type) t
      3    from t
      4    group by name
      5    )
      6* where t < 3
    SQL> /
    NAME
    Mark
    SQL>Message was edited by:
    blushadow

Maybe you are looking for