ICCMP_BP_SEARCH/BuPaSelectContactPerson filter for valid relationships

Hello,
in the IC-Webclient we only want to display contact persons with vaild relationships (check validity end date) in the result list ICCMP_BP_SEARCH/BuPaSelectContactPerson.
I redefined method "DO_INIT_CONTEXT" of the impl. class for this like follows:
METHOD do_init_context.
  DATA: lv_wrapper    TYPE REF TO cl_bsp_wd_collection_wrapper,
        lv_rel_col    TYPE REF TO if_bol_bo_col,
        lr_entity     TYPE REF TO cl_crm_bol_entity,
        lv_date       TYPE        dats.
  CALL METHOD super->do_init_context.
* Feger 20.07.2010 Es sollen nur gültige AP-Beziehungen angezeigt werden
  lv_wrapper = typed_context->contactrelation->get_collection_wrapper( ).
  IF lv_wrapper->size( ) > 0.
    TRY.
        lv_rel_col ?= lv_wrapper.
        lr_entity ?= lv_rel_col->get_first( ).
        WHILE lr_entity IS BOUND.
          CALL METHOD lr_entity->if_bol_bo_property_access~get_property_as_value
            EXPORTING
              iv_attr_name = 'DATE_TO'
            IMPORTING
              ev_result    = lv_date.
          IF lv_date LT sy-datum.
            CALL METHOD lv_rel_col->remove
              EXPORTING
                iv_bo = lr_entity.
            lr_entity ?= lv_rel_col->get_next( ).
          ELSE.
            lr_entity ?= lv_rel_col->get_next( ).
          ENDIF.
        ENDWHILE.
      CATCH cx_crm_genil_model_error.
    ENDTRY.
    lv_wrapper->sort( iv_attr_name = 'NAME1'
                      iv_path_2_subobject = 'BuilGetHeaderforContactRel' ).
  ENDIF.
ENDMETHOD.
This works with two restrictions:
1. If only one contact person is in the result this coding is not processed - do not really understand why.
2. If a user do more than one search without clicking the IC "END-Button" between this coding is not processed.
Could you please give me some hinds how to solve this.
Is DO_INIT_CONTEXT maybe the wrong place?
Thank you
Kind regards
Manfred

Hi
I made a testing in our CRM 7.0 system, and I found the view I got is not the same as yours, mine is:
  ICCMP_BP_SEARCH/BuPaSelectCPforCustomer
and I am not using multiple bp profile, and the scenario has been tested under both B2B and MIX.
For this view, it does not have the two restrictions you mentioned.
Anyway, please try to put the coding to bit before the DO_INIT_CONTEXT which should bypass the problem you are now having.
in
CL_CRMCMP_B_BUPASEARCHB2B_IMPL
PROCESS_CUSTOMER_SEARCH
about line 56
* normal contact person processing
        TRY.
            rel_col = lv_bp->get_related_entities( iv_relation_name = cl_crm_buil=>contact_person_rel ).
          CATCH cx_crm_genil_model_error.
        ENDTRY.
here the search of the related CP is performed. You may try to put your codings there to do the initial filter.
I've not tested, please feel free to let me know if it does not help.
Hongyan

Similar Messages

  • Performing filter for field Tax Code (MWSKZ) in the Purchase Order

    Hello Experts,
    We have to perform a filter for field Tax Code in the purchase order (ME21N / ME22N / ME23N). We've tried to use SH SH_T007A and SSH_T007A with search help exit (e.g. F4_TAXCODE_USER_EXIT) but it is not working. The ABAP programmer has performed a debug and the standard does not check any line code in this function (the ABAP programmer has set a breakpoint into function F4_TAXCODE_USER_EXIT after assigning it for mentioned search helps)... it sounds like this program / search help is not called by standard program of ME2* transactions...
    I've tried to look for some other object and other function called FI_F4_MWSKZ has been found... I've set a breakpoint there and when I open the search help for field tax code into transaction ME21N it works... but as I could see this function FI_F4_MWSKZ is a standard one which we can not change...
    Have you ever had the same problem?
    We are currently in the SAP 4.6C version. I've found lots of OSS notes but only valid for 6.0.
    Maybe someone can help me on that.
    Best regards,
    Nilmar

    hi,
    goto gs01 transaction,give some name to ur step.
    give the table name and field name.
    then u can create a specific value set for that field.
    save.
    now u can use this set to define conditions for ur fields in obbh transaction.

  • Filter for one hierarchy and expanding for another one?

    Hi to all,
    We've a dimension A with 2 different hierarchies (call them as usual PARENTH1 and PARENTH2).
    What I've been asked by the users is a little interface, where they can:
    - filter for one parent of the first hierarchy
    - expand for the parents of the second hierarchy, who share the same base members.
    Initially I had hoped that imposing the value desired of the parenth1 in the PageKeyRange, and expanding with a filter like HIR="H2" and HLEVEL="2" would work, but it doesn't work (I get ALL the parents at level 2 of the second hierarchy, not the parents who shares the same basemembers).
    Is it possible to model this with an evDRE? If so how? Unfortunately, I cannot make a single hierarchy (this parents aren't in a 1-N relationship between them, unfortunately).
    Thank you
    Daniele

    Hi James,
    could you explain more in detail your solution? Because I tried it, and it didn't work as I expected...
    Let me explain with an example
    Hierarchy1:
    Dir_01 has got 4 basemembers (test1, test2, test3, test4), while Dir_02 has got other 2 basemembers (test5, test6)
    Hierarchy 2
    Es1 has got 3 basemembers (test1, test2, test3), Es2 has got 1 basemember(test4), Es3 has got 2 basemembers (test5, test6)
    What I would like to do is to
    - filter an evDRE with Dir_01
    - "expand" (I believe i've wrongfully explained myself in this point) with the other Hierarchy, which means: I want in the report only the nodes in the hierarchy 2 that share the same basemembers
    In this way, I would have as available keys in my evDRE report:
    Es1
    Es2
    With your solution, I even get Es3, which doesn't have any common basemember...
    Kind regards
    Daniele

  • How to design a stable IIR-Filter for FPGA?

    Hi, I´m new to Labview for FPGA and currently trying to design a lowpass-filter (for a digital mixer, more or less). It should work with a sample-frequency of 200kHz, a passband edge frequency of 3Hz and a stopband edge frequency of 8Hz. An FIR-filter would have a too large order to be implemented, an IIR one seems more practicable. For the design of the filter I'm using the digital filter design toolkit, refering to its manual and the casestudy with analyzing, modeling, simulating and generating a fixed-point filter. Now, I have problems to get a stable filter. While the manual states to adjust the coefficents by trial and error, the designed filter never matches the floating-point reference. Does anyone have experience in creating such filters? Or a hint, how to optimize the coefficient finding process?
    Thanks in advance!
    thilo

    LabVIEW FPGA 8.20 does include a Butterworth filter function (1st, 2nd and 4th order) in the FPGA palette. You can configure it directly using a dialog on your FPGA diagram. The cutoff may not be quite as sharp as you want but it could be an option for you to consider. Once you have configured the filter VI, you have the option of opening up the subVI with the code that is generated based on your filter parameters, which would allow you to further configure the code directly.
    I have attached the configuration dialog with the settings you specified.
    Message Edited by Christian L on 11-16-2006 09:27 AM
    Christian Loew, CLA
    Principal Systems Engineer, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
    Attachments:
    filterdialog.JPG ‏44 KB

  • Deploying Oracle Password filter for Microsoft Active Directory.

    We created the Oracle Wallet w/ Self-Signed Certificate. When we setup the Oracle Password filter for Microsoft Active Directory from LDAP server. We are getting the error. Certificate is not valid.
    Is this OK or Can we get the success message.

    You can't ignore it. A valid certificate is important to make it work.
    --olaf                                                                                                                                                                               

  • Reverse Proxy Filter for EP7?

    Hi! on
    https://websmp208.sap-ag.de/nw-ep-how-to,
    we notice an article called:
    "How to… Configure the Reverse Proxy Filter for SAP Enterprise Portal 6.0 SP2"
    Did anyone use the method there to resolve their problems?
    If so, would you please share your experience?
    We have a question about what code should be put in the web.xml.
    Points guaranteed. Thanks!

    It appears that the Light Portal Framework in EP 7.0 uses FQDN in the anchors (<A>) on the pages it sends back to the Client Browser (not relative URI's).
    This could be a configuration setting somewhere that I missed, however, I would expect the Light Framework to be the best at making sure links are relative.
    I would like to explore all options, from making our Reverse Proxy Server handle the filtering to making sure Portal sends back a valid link.
    If the Reverse Proxy Filter is not available in EP 7.0, what can I do to replace it's functionality?
    Mike

  • How to get values from a table(in jsp) for validation using javascript.

    hi,
    this is praveen,pls tell me the procedure to get values from a table(in jsp) for validation using javascript.
    thank you in advance.

    Yes i did try the same ..
    BEGIN
    select PROD_tYPE into :P185_OFF_CITY from
    magcrm_setup where atype = 'CITY' ;
    :p185_OFF_CITY := 'XXX';
    insert into mtest values ('inside foolter');
    END;
    When i checked the mtest table it shos me the row inserted...
    inside foolter .. Now this means everything did get execute properly
    But still the vallue of off_city is null or emtpy...
    i check the filed and still its empty..
    while mtest had those records..seems like some process is cleaining the values...but cant see such process...
    a bit confused..here..I tried on Load after footer...
    tried chaning the squence number of process ..but still it doesnt help
    some how the session variables gets changed...and it is changed to empty
    Edited by: pauljohny on Jan 3, 2012 2:01 AM
    Edited by: pauljohny on Jan 3, 2012 2:03 AM

  • Interactive report filter for date not working correctly

    Hi,
    I am having an interactive report. I tried to give a filter for a column(created_on) as created on>29-oct-2009 17:17
    but i am getting the row containing created on as *29-oct-2009 17:17* in the report result. How can i correct this
    problem
    Thanks,
    TJ

    Hi,
    I think it is because seconds.
    So it is 29-oct-2009 17:17:00 and your record is e.g. 29-oct-2009 17:17:02
    br, Jari
    Edit
    You can use trunc function in your select so that it round date to minutes
    TRUNC(created_on,'MI') AS created_onBr, Jari
    Edited by: jarola on Nov 5, 2009 3:02 PM

  • Table for Valid To date field in C203 Tcode

    Let me know the table name for "Valid To Date" field in C203 transaction.
    Thanks,
    Angavai.E

    Hi Angavai,
    Check with table PLMW.
    Regards,
    Raghu

  • How to create one filter for N views in the same report

    Hello everybody,
    I need to have the same filter for diferent views that I have in the same report. Anyone knows how to do it?
    Thanks in advance
    Mario Mesquita

    Hi,
    In India site, you can create a SMTP connector which point to the local ISP.
    Thanks.
    Niko Cheng
    TechNet Community Support

  • I restore my iPhone 4S on iTunes and then when restarted it is asking for valid SIM card and I don't have SIM card for that, I was just using the iPhone with wifi, any one can help? Please.

    I restore my iPhone 4S on iTunes after the restore was completed the iPhone was restarted and now asking for valid SIM card which I didn't,t have and I was using the iPhone with wifi, and now can't use it because the screen is locked for SIM card. Can anyone help me please.
    Thanks,
    David

    wjosten wrote:
    Phil0124 wrote:
    I doubt the phone is locked to GCI in any way
    Well, you're wrong, & in fact not only is it locked, GCI does not offer unlocking for iPhones.
    Fact is your post won't help the OP.
    And you are 100% sure its locked to them? How can you know this? While GCI does not offer unlocking that does not mean the phone is actually locked to it. Get off your high horse.
    Its possible the original owner had an unlocked phone. he was using with GCI. Or that GCI doesn't actually have locked phones. Seeing as they don't even have their own infrastructure but instead use AT&T's I doubt they'd have iPhones specifically locked to them and that would be the reason they do not offer unlocking (because there's nothing for them to unlock). And just to clarify, I'm not saying for a fact its not locked to them. It very well maybe be, but without knowing more about the phone and going by the fact GCI uses AT&T infrastrucure its possible its not locked. But here's no way to say for sure either way.
    Trying a Sim card from AT&T or another carrier might just help the OP if its actually unlocked or locked to AT&T rather than GCI.

  • Set filter for only one column in tableview

    Hi
    i am using in MVC a htmlb:tableview with filter in only one column of 8.
    This is all working fine, except that the user can enter a searchsting in the filterfield for all columns, but in handle_event (of the controller) ; i only react to a text in the filterfield of column 4 and ignore all other filtertext , which were maybe entered in the other columns.
    My question:
    how can i  enter the filter only for one column, in a way that the user cannot enter any text in the filterfield of the other columns, only in column 4 ?
    my view:
    <htmlb:tableView id             = "requirements"
                     table          = "//model/pdst_reqs"
                     filter         = "APPLICATION"                
                     keyColumn       = "EXTID"
                     iterator        = "<%=model%>"
                     footerVisible   = "FALSE"
                     encode          = "TRUE"
                     visibleRowCount = "<%=model->rowcount%>"
                     width           = "100%"/>
    Best Regards
    Britta

    You can disbale the Filter for the particular column by setting the DISABLE_FILTER in the Iterator method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS. Here is the sample code
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS .
      CLEAR p_column_definitions.
      CLEAR p_overwrites.
      data tv_column TYPE TABLEVIEWCONTROL.
      tv_column-COLUMNNAME          = 'FLDATE'.
      tv_column-SORT                = 'X'.
      tv_column-EDIT                = 'X'.
      tv_column-ONCELLCLICK         = 'MyCellClick1'.
      tv_column-title               = 'Date '.
      APPEND tv_column TO p_column_definitions.
      CLEAR tv_column.
      tv_column-COLUMNNAME          = 'PRICE'.
      tv_column-horizontalAlignment = 'right'.
      tv_column-verticalAlignment   = 'middle'.
      tv_column-ONCELLCLICK         = 'MyCellClick2'.
      tv_column-title               = 'Currency'. 
      tv_column-EDIT                = 'X'.
      tv_column-DISABLE_FILTER      = 'X'.    " <-------Like this
      APPEND tv_column TO p_column_definitions.
    endmethod.
    Hope this will solve your problem.
    Raja

  • Looking for a 58mm protective or UV filter for a Canon Macro using a Cannon MR-14EX Macro Ring Lite.

    Looking for a 58mm protective or UV filter for a Canon Macro Lens EF using a Cannon MR-14EX Macro Ring Lite flash unit.
    The lens has an external groove for the ring flash pawls, but filters I've found do not.  The external diameter of the filters does not allow the ring flash pawls to reach the lens groove.  I either need a filter with an external groove or one with no part larger diameter than the threads.  Any ideas?  Thanks, Tom

    Which lens are you using?  This adapter will work, so long as the front element doesn't rotate.
    http://www.amazon.com/Canon-Macrolite-Adapter-Digital-Cameras/dp/B00006HRMH

  • Error while posting the ID for Validation

    Hello Experts,
                 We are running a report from a ECC 6.0 server which connects to the PI server via RFC connection defined through RFC Adapter on the PI server. This Pi server then connects to the web server for validation and then returns the status as true or false. But while executing the report on the ECC 6.0 server we are getting the error as " Sender Agreement not found:lookup of binding via CPA-cache failed for Adapter type RFC, AdapterNS http://sap.com/xi/XI/Sy". The connection test for the RFC from the ECC 6.0 server is fine and okay.
    When we get this error we keep trying to validate the ID twicw and third time the transaction happens sucessfully. How do we overcome this error? While creating the communication channel for this scenario on the PI server the * has been removed from the Party field as suggested in one of the blogs in this forum. But in our case the problem still persists even after removing the * in the party field in the Communication channel of the scenario. Kindly suggest the remedy for this problem.
    Thanks
    Best Regards
    PI team

    Hi,
        You could have an issue because the RFC definition has changed and the cache is out-of-synch
    1) Reimport and activate the RFC.
    2) Restart the RFC Adapter service in the Visual Administrator. This will flush the metadata cache in case the RFC has changed.
    If this doesn't work, verify that your Sender Agreement is setup correctly
    1) A common mistake is to create a Message Interface in the IR (Design) for RFC and IDoc senders and point the sender agreement to this Message Interface which won't work. The Sender Agreement should be setup as follows:
    Service: SAP Business System
    Interface: RFC name
    Namespace: urn:sap-com:document:sap:rfc:functions
    please go through below threads,
    senderAgreement not found - PLEASE read
    Error: Sender agreement not found, lookup of binding via CPA-CACHE failed.
    regards,
    ganesh.

  • Regarding Error message in ME_PROCESS_PO_CUST badi for validation.

    hi Friends,
    I am Using ME_PROCESS_PO_CUST badi for validation in Purchase order (ME21N),
    For that I implemented PROCESS_ITEM method which fires during each row now i  add another validation in same implementation for plant  should be same through out the all line item. Now following code is woking fine but when for second line item user changese plant then it shows error message as per logic which is fine but even after changing plant to correct one the error message is still coming why is it so?
    following is my current validation code
    method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.
      DATA:ls_poitem TYPE mepoitem,
           ls_poitem_set TYPE mepoitem.
      DATA:ls_poheader TYPE MEPOHEADER.
      DATA:lm_poheader TYPE ref to IF_PURCHASE_ORDER_MM.
      DATA:w_mara TYPE mara.
      DATA:IT_ZMMTBL039 TYPE STANDARD TABLE OF ZMMTBL039 ,
           WA_ZMMTBL039 TYPE ZMMTBL039 .
      DATA:ls_poitem1 TYPE mepoitem.
      DATA:V_KUNNR1 TYPE KNA1-KUNNR.
      DATA:V_KUNNR2 TYPE KNA1-KUNNR.
      DATA:W_WERKS(4),
           w_werks_tmp(4),
           w_flag(1).
      ls_poitem = im_item->get_data( ).
      lm_poheader = im_item->GET_HEADER( ).
      ls_poheader = lm_poheader->GET_DATA( ).
      IF ls_poitem-werks IS NOT INITIAL.
        w_werks = ls_poitem-werks.
        import w_flag to w_flag from MEMORY ID 'FLAG'.
        if w_flag is initial.
          w_flag = 'X'.
          EXPORT w_werks_tmp FROM w_werks TO MEMORY ID 'MEMO1'.
          export w_flag from w_flag to MEMORY ID 'FLAG'.
          clear: w_flag.
        endif.
      ENDIF.
      IMPORT w_werks_tmp TO w_werks FROM MEMORY ID 'MEMO1'.
    break swaroopb.
      IF ls_poitem-werks NE w_werks.
          MESSAGE E010(zparts) with 'Different plants are not allowed in single PO.'.
      ENDIF.
      CLEAR: WA_ZMMTBL039,w_mara.
      REFRESH:IT_ZMMTBL039[] .
      SELECT *
        INTO TABLE IT_ZMMTBL039
        FROM ZMMTBL039
       WHERE bsart EQ ls_poheader-bsart.
      IF sy-subrc EQ 0.
        CLEAR: WA_ZMMTBL039,w_mara.
        SELECT SINGLE *
          INTO w_mara
          FROM mara
         WHERE matnr EQ ls_poitem-MATNR.
        IF SY-SUBRC EQ 0.
          READ TABLE IT_ZMMTBL039 INTO WA_ZMMTBL039 WITH KEY  bsart = ls_poheader-bsart
                                                              mtart = w_mara-mtart
                                                              spart = w_mara-spart.
          IF SY-SUBRC NE 0.
            MESSAGE E009(zparts) WITH ls_poitem-MATNR w_mara-spart ls_poheader-bsart .
          ENDIF.
        ENDIF.
      ENDIF.
    end method

    Hello Swarup
    Since you want to compare all items together (having the same plant) I would suggest to implement this logic either in method CHECK or POST of the interface.
    However, if you want to make your checks within the PROCESS_ITEM method then you should change your logic.
    It does not make sense to work with the ABAP memory within a BAdI implementing class because the class itself is your "memory".
    I would use the following logic to implement your validation:
      lo_poheader = im_item->get_header( ).  " retrieve header instance
      lt_items = lo_poheader->get_items( ).   " retrieve all items
      ls_detail_x = im_item->get_detail( ).  " details of currently processed item
      LOOP AT lt_items INTO ls_item.
        ls_detail = ls_item-item->get_detail( ).
        IF ( ls_detail-werks NE ls_detail_x-werks ).  " validation failed
        " do something...
       ENDIF.
      ENDLOOP.
    However, I would prefer to do this kind of validation in CHECK or POST method.
    Regards,
      Uwe

Maybe you are looking for