Custom field F4 help - selected value/index

Hi experts,
We have an F4 help for a custom field in an assignment block and the values are populated using a standard structure currency field (CRMST_PRICINGSET_BTIL-CURRENCY)  in the GET_V method.
We have also defined an event handler to capture the selection of the value from F4. But in this event handler, how can we get the value /index of the row selected in the F4 help?
Since it is an F4 help and not a pop-up of type IF_BSP_WD_POPUP, we can't use the get_fired_outbound_plug( ) concept here.
Regards,
Nisha

Hi NishaNC,
If field is already in the structure, just use a check table like field CURRENCY in structure CRMST_PRICINGSET_BTIL.
If not, please check component BT131QI_SLSQ, view Details, context node BTPRICINGSET, field NETPRICE_CURR.
Create the methods and do the same way as methods for field NETPRICE_CURR.
Of course, you need have a CURRENCY field in you structure first(same as structure CRMST_PRICINGSET_BTIL).
For your issue, I think you already have a field in the structure, so just add a check table is OK.
Regards,
Meng
Edited by: Lingxing Meng on Dec 2, 2010 3:27 PM

Similar Messages

  • Search Help Selected Values not reflected in WebUI

    Hello All, We have a requirement to create a standard F4 value help for PRODUCT_ID field and the selected value should be reflected in the WebUI field. This field is in a table view context node and the component is a stand alone WebUI component. Everything works fine till the Search help is called and the values is selected. But the selected value is not reflected in the Product_ID field. We have checked many forums and links and tried almost all the alternatives suggested. Here's is the code attached for reference.
    DATA:l_wa_map       TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
           l_i_inmap     TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
           l_i_outmap    TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
      DATA:  lv_str_index TYPE string.
    *  l_wa_map-context_attr = 'product_id'.
    *  l_wa_map-f4_attr      = 'PRODUCT_ID'.
    *  APPEND l_wa_map TO:l_i_inmap,l_i_outmap.
      lv_str_index = iv_index.
      CONCATENATE 'table[' lv_str_index '].PRODUCT_ID' INTO l_wa_map-context_attr.
      l_wa_map-f4_attr = 'KEY'. "'PRODUCT_ID'. "'
      APPEND l_wa_map TO: l_i_outmap.
      lv_str_index = iv_index.
      CONCATENATE 'table[' lv_str_index '].PRODUCT_ID' INTO l_wa_map-context_attr.
      l_wa_map-f4_attr = 'VALUE'. "'PRODUCT_ID'.   "
      APPEND l_wa_map TO: l_i_outmap.
      CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
         EXPORTING
          iv_help_id        = 'COM_PR_SHTEXT'      "#EC NOTEXT
          iv_help_id_kind   = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name  "if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
          iv_input_mapping  = l_i_inmap
          iv_output_mapping = l_i_outmap
          iv_object_ref     = me
          iv_trigger_submit = abap_true.
    Is there any further code or event call required to reflect the value in the WebUI? or what exactly is required to be done here?
    Thanks in Advance.
    Prasad

    Thanks Dharmakasi, your point to use Condense was the issue which was preventing the values from reflecting in the field.
    However, below code is not required.
    * lv_str_index = iv_index.
      CONCATENATE 'table[' lv_str_index '].PRODUCT_ID' INTO l_wa_map-context_attr.
      l_wa_map-f4_attr = 'PRODUCT_ID'.
      APPEND l_wa_map TO: l_i_inmap.
    I had another requirement which worked in below way. Note this is for Custom data elements with value help in domain. Hope this is helpful for other folks.
    DATA:l_wa_map TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
    l_i_inmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
    l_i_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
      DATA:  lv_str_index TYPE string.
      lv_str_index = iv_index.
      CONCATENATE 'table[' lv_str_index '].GC_CARD_TYPE' INTO l_wa_map-context_attr.
      CONDENSE l_wa_map-context_attr NO-GAPS.
      l_wa_map-f4_attr = 'KEY'.
      APPEND l_wa_map TO: l_i_outmap.
      CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
        EXPORTING
          iv_help_id        = '/GLB/CNPCR_GC_CARDTYPE'     "#EC NOTEXT
          iv_help_id_kind   = if_bsp_wd_valuehelp_f4descr=>help_id_kind_dtel
          iv_input_mapping  = l_i_inmap
          iv_output_mapping = l_i_outmap.

  • Add customer field in IH08 selection-screen

    Hi guys,
    I need to add 1 customer field ZZ to the selection screen IH08 in order to search equipments by the ZZ field.
    Did anybody know if it is possible?
    Thanks in advance,
    LMS

    I use enhacemente ITOB0001 to add one field to the screen of equipments (IE01, IE02 and IE03) and that is working perfectly.
    In IH08, i put an append structure on structure RIHEQUI_LIST in order to the ZZ field could be seen in the ALV list. But, my problem is to make that ZZ field searchable... I need to search equipment on IH08 by the ZZ field.
    I look on SPRO, for the equipments lists customization, i made tests and tests but nothing works...
    If anybody knows how to solve this, please help me.
    Other chance is to develop a Z program... But i prefer use the IH08...
    Best Regards
    Edited by: Luís Silva on Jul 31, 2009 11:28 AM
    Edited by: Luís Silva on Jul 31, 2009 11:29 AM

  • OVS_USAGE on Custom field don't keep value

    Hi Guru's,
    I'm not expert on WD4a, i've this problem.
    I've implemented an OVS search help on Custom Field, on SRM 7.0 Webdynpro (/SAPSRM/WDC_DODC_SC_I_BD), everything work fine, but if i change the tab (Split to another web dynpro) and then come back to my WEB DYNPRO, the value on custom field are Blank.
    Have some indication?
    Thank you
    Roberto
    Edited by: Roberto Della Frera on Dec 1, 2011 6:18 PM

    Can you check one thig - In the OVS related methods, can you check for this property. Are you clearing the node anywhere.
    Check in the IF_WD_OVS methods to have the value in place. Can you also check the OVS instance. Is that instantied again. where have you written the code..Try to instantiate it once, store it in the view's attributes as global and use that for further processing.
    Edited by: Lekha on Dec 5, 2011 3:36 PM

  • Add custom field in the selection screen for shopping cart monitor report

    Hello,
    refering to the notes 458591 an 672960, in order to add custom field at item level, we get the structure INCL_EEW_PD_ITEM_CSF.
    But this doesnt make it appear on the "Shopping Cart Monitor Report" selection screen.
    So should I try adding it in the existing interface of the badi bbp_sc_mon ?

    hello Yann,
    ok I will implement that. Is it possible to change the interface of the badi method to  include more data if we want to check the role of the user who is executing the shopping cart monitor report and accordingly do the settings of field display ? Or calling a function module inside the method to get the attributes of sy-uname would be easier?
    rita

  • Custom field in COOIS selection screen

    Hi all,
    how do I add a custom field (IOHEADER-ASTTX, User status) in the COOIS selection screen ?
    Thank's
    Edited by: Marco De Caro on Dec 6, 2011 2:15 PM
    Edited by: Marco De Caro on Dec 6, 2011 2:16 PM

    Hi,
    Use the BADI : WORKORDER_INFOSYSTEM
    Method: TABLES_MODIFY_LAY
    In the method TABLES_MODIFY_LAY there are many table parameters for different data display of the production order.In this scenario only the header detail structure is being extended with append structure. 
    Add the extra fields to be displayed to through append structure to IOHEADER_TAB.
    Example code :
    DATA : BEGIN OF st_matkl,
               matkl TYPE matkl,
               END OF st_matkl.
      DATA : st_header TYPE ioheader.   LOOP AT ct_ioheader INTO st_header.
        IF NOT st_header IS INITIAL.
          SELECT SINGLE  matkl
                 FROM mara
                 INTO st_matkl
                 WHERE matnr = st_header-matnr.
        ENDIF.
        st_header-matkl = st_matkl-matkl.
        MODIFY ct_ioheader FROM st_header.
      ENDLOOP.
    When you run the report will be able to see the added field in the ALV.
    Thanks,
    Shailaja Ainala.

  • Help with value index

    Hi,
    We need some help getting our queries to join on V() type indexes, so we think.
    Here is our situation: We are on DBXML 2.2.13, and not quite ready to upgrade.
    We are trying to do a join of 2 or sequences each 5000 in length.
    Based on our reading of the query plan, the joins are not using the V(...) type index on both sides of the join.
    One side will use a V() index, the other uses a P() regardless of the indexe(s) we apply.
    We used double data type on the index type because of another posting, but we we get the same results regardless of the datatypes used in out index(s)
    The @patient-ref and @id values are all positive integer values.
    We've re-arranged the query, we've tried many different datatypes on the query.... Help!
    The questions are:
    a) are we on to the correct optimization strategy, and
    b) please help us how to figure out how to get the right type of indexs applied.
    Thanks...
    dbxml> reindex system.dbxml n
    dbxml> list
    Default Index: node-attribute-equality-double
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2002/dbxml}:name
    2 indexes found.
    dbxml> queryplan 'for $pid in collection()/reports-catalog/report/@patient-ref where $pid = collection()/patient-index/patient/@id return $pid'
    <XQuery>
    <FLWOR>
    <ForBinding name="pid">
    <Navigation>
    <QueryPlanFunction result="collection" container="system.dbxml">
    <OQPlan>P(node-attribute-equality-double,prefix,@patient-ref)</OQPlan>
    </QueryPlanFunction>
    <Step axis="child" name="reports-catalog" nodeType="element"/>
    <Step axis="child" name="report" nodeType="element">
    <OQPlan>P(node-attribute-equality-double,prefix,@patient-ref)</OQPlan>
    </Step>
    <Step axis="attribute" name="patient-ref" nodeType="attribute"/>
    </Navigation>
    <Where>
    <Navigation>
    <QueryPlanFunction result="collection" container="system.dbxml">
    <RQPlan>V(@id,=,'[to be calculated]')</RQPlan>
    </QueryPlanFunction>
    <Step axis="child" name="patient-index" nodeType="element"/>
    <Step axis="child" name="patient" nodeType="element">
    <RQPlan>V(@id,=,'[to be calculated]')</RQPlan>
    </Step>
    <Step axis="attribute" name="id" nodeType="attribute"/>
    <DbXmlCompare name="equal">
    <Variable name="pid"/>
    </DbXmlCompare>
    </Navigation>
    </Where>
    </ForBinding>
    <Variable name="pid"/>
    </FLWOR>
    </XQuery>

    I did try the node-attribute-equality-string index before, but I must have left on my node-element-presence-none index, because now, I'm getting what looks like a much more improved query using the string index and NOT using the node-element-presence-none index.
    dbxml> run test.xq
    Default Index: node-attribute-equality-string
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2
    002/dbxml}:name
    2 indexes found.
    Adding default index type: node-attribute-equality-string
    Container reindexed: chb-system.dbxml
    5000 objects returned for eager expression '
    for $pid in collection()/reports-catalog/report/@patient-ref
    where   $pid = collection()/patient-index/patient/@patient-ref
    return
            $pid
    Time in seconds for command 'query': 2.438
    dbxml> run test.xq
    Default Index: node-attribute-equality-string
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2
    002/dbxml}:name
    2 indexes found.
    Adding default index type: node-attribute-equality-string
    Container reindexed: chb-system.dbxml
    <XQuery>
      <FLWOR>
        <ForBinding name="pid">
          <Navigation>
            <QueryPlanFunction result="collection" container="chb-system.dbxml">
              <OQPlan>P(node-attribute-equality-string,prefix,@patient-ref)</OQPlan>
            </QueryPlanFunction>
            <Step axis="child" name="reports-catalog" nodeType="element"/>
            <Step axis="child" name="report" nodeType="element">
              <OQPlan>P(node-attribute-equality-string,prefix,@patient-ref)</OQPlan>
            </Step>
            <Step axis="attribute" name="patient-ref" nodeType="attribute"/>
          </Navigation>
          <Where>
            <Navigation>
              <QueryPlanFunction result="collection" container="chb-system.dbxml">
                <RQPlan>V(@patient-ref,=,'[to be calculated]')</RQPlan>
              </QueryPlanFunction>
              <Step axis="child" name="patient-index" nodeType="element"/>
              <Step axis="child" name="patient" nodeType="element">
                <RQPlan>V(@patient-ref,=,'[to be calculated]')</RQPlan>
              </Step>
              <Step axis="attribute" name="patient-ref" nodeType="attribute"/>
              <DbXmlCompare name="equal">
                <Variable name="pid"/>
              </DbXmlCompare>
            </Navigation>
          </Where>
        </ForBinding>
        <Variable name="pid"/>
      </FLWOR>
    </XQuery>
    Time in seconds for command 'queryPlan': 0.188

  • Selected value in search help cannot be returned

    Hi experts!
    When I select value in search help, selected value is not returned to the field.
    I did like this.
    1. I enhanced BP using EEW.
    2. I created a new view and display an enhanced field via BSP workbench.
    (an enhanced field is assigned to a check table)
    3. I created GET_V_XX method as follows.
    method GET_V_ZZBUT000000102.
      DATA:
        ls_map    TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
        lt_inmap  TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
        lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
      ls_map-context_attr = 'STRUCT.ZZBUT000000102'.
      ls_map-f4_attr      = 'KEY'.
      APPEND ls_map TO: lt_inmap, lt_outmap.
      CREATE OBJECT rv_valuehelp_descriptor
        TYPE
          cl_bsp_wd_valuehelp_f4descr
        EXPORTING
          iv_help_id                  = 'CRMST_HEADER_OBJECT_BUIL-ZZBUT000000102'
          iv_help_id_kind             = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
          iv_input_mapping            = lt_inmap
          iv_output_mapping           = lt_outmap.
    endmethod.
    Does anyone know what is wrong?

    Hi Yohei,
    You could resolve your issue by changing the value of the "ls_map-context_attr" to the attribute value seen on the F2 help on WebUI screen.
    If you change the value   ls_map-context_attr  to   'ZZBUT000000102' , then F4 help would work properly.
    Hence the correct code would be:
    method GET_V_ZZBUT000000102.
      DATA:
        ls_map    TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
        lt_inmap  TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
        lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
      ls_map-context_attr = 'ZZBUT000000102'.
      ls_map-f4_attr      = 'KEY'.
      APPEND ls_map TO: lt_inmap, lt_outmap.
      CREATE OBJECT rv_valuehelp_descriptor
        TYPE
          cl_bsp_wd_valuehelp_f4descr
        EXPORTING
          iv_help_id                  = 'CRMST_HEADER_OBJECT_BUIL-ZZBUT000000102'
          iv_help_id_kind             = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
          iv_input_mapping            = lt_inmap
          iv_output_mapping           = lt_outmap.
    endmethod.
    Regards,
    Pratik Gandhi

  • How to make a custom field as text as well as value fied in ad hoc query

    hi,
      i have created a custom infotype 9004 in which the custom field contain the code values, and the text of this code values are maintained in another ztable.
    when i am viewing this infotype in Ad hoc query i am able to see this fields as only value fields and hence i am unable to get text for this field i.e when we right click on this field only the value option is enabled and the text option is disabled, both these options are enabled in some other standard fields like pernr(personnel no), persg(employee group),persk(employee subgroup).
       can anybody suggest me how to enable both these options for custom fields.

    Assign you table of text as a table text to the data element/domain of your custom field or thru external key on your infotype.
    Query is able to analyse these links.
    Regards.

  • User exit or Badi to add custom fields in selection screen of tcode CATS_AP

    Hi Guys,
    I want to add a custom field to the selection screen of report RCATS_APPROVE_ACTIVITIES (tcode CATS_APPR_LITE).
    I also want to display filtered by this custom fields.  Please let me know the user-exit (prefebly) or BADI.
    I will appreciate if somebody can share the steps.
    Thanks,

    Hi,
    Yes there is, the BADI name is CATS_REPORTING.
    It can be views in transaction SE17.
    thanks.
    JB

  • Transfer of Customer field for Confirmation

    Hello Expert,
    We are implementing Classic scenario for Self Service Procurement. We have implemented customer field in Confirmation for Goods.
    We want to know that how we can transfer the value of customer field to Backed GR?
    Your valuable inputs will help us.
    Thanks in advance.
    Aakash.

    You can try BADI 'BBP_DOC_CHANGE_BADI' , method 'BBP_CONF_CHANGE'. In 'IT_ITEM', you can try to find an unused placeholder and create the GR in backend with the custom field in the selected placeholder field.

  • CF9/Solr: cfindex custom fields limitation

    On CF9, using Solr, I'm trying to index a database query, but, like Verity in this and previous versions of CF, there is a limitation on the number of custom fields I can index.  I know the limitation lies with the cfindex tag as Solr is able to index whatever fields are specified in schema.xml.
    One workaround I have in mind is to modify the schema.xml file by adding all the custom fields I need and then index my content using Solr (post.jar?) instead of cfindex.  The cfsearch tag should then return all the new fields, not just the 4 custom ones.  Has anyone tried to do this?  What command do I need to invoke to index the content directly through Solr?
    Or, does anyone else have any other workaround suggestions?
    Thanks,
    -Jose

    Depending on your requirements, you might be over-complicating things.  Just because <cfindex> only offers CUSTOM1...CUSTOM4 doesn't mean you must only have one subkey value per CUSTOMn attribute.  You can put anything you like in those values, eg: lists of subkeys; serialised structs or keys, etc.
    I agree that it's less than ideal the way the Solr support has been implemented, but you probably will be able to get <cfindex> to work for you in this case.
    Adam

  • Custom fields in Report painter in CCSS table

    Hello Experts,
    I am in a processes of developing a report painter with custom fields in the selection screen.
    The custom fields are available in PRPS table.
    With hard difficulties I brought the custom fields in selection screen of the report painter.
    I have added the fields in the structure CI_CC1S
    Everything is fine. But if I enter a value in the custom field, the report is not fetching any data.
    These custom fields are related to the WBS element.
    For example if the value of the CUSTOM field is 'AAA', then I want to retrieve ony the WBS element which has 'AAA'.
    Somewhere I am missing a procedure.
    Could anyone suggest how to achieve this.
    Thanks !!!
    Best Regards,
    Vasanth M

    Any Suggestions

  • Data entered in the custom field in the SRM portal not getting saved..

    Hi Experts,
    I have added a custom field in Contract Screen of the SRM portal by adding the field as an append structutre in structure INCL_EEW_PD_HEADER_CSF_CTR.
    The custom field now appears in the header (basic data ) of the 'Process contract' screen.
    NOw It allows me to enter data in the custom field .
    The problem is ..
    When I  'CHECK' or "RELEASE'   the contract, the value entered in the custom field disappears..
    How do i capture the data entered in the custom field ...please HElp!!!
    Thanks in Advance.
    Vidya

    Hi Pradeep,
    Thanks for the reply!!
    We have upgraded our SRM system from 3.0 to 5.5
    I have added the custom field in structures INCL_EEW_PD_HEADER_CSF_CTR  and
    INCL_EEW_PD_HEADER_CSF  as the field has to appear in the basic data tab of 'Process Contract'.
    Regarding debugging:
    1. I tried to debug in BBP_DOC_CHECK_BADI by calling the FM BBP_PD_CTR_GETDETAIL. inside the badi and the parameter e_header of the function module contained the custom field but had no value...!!
    2. I tried to debug the badi BBP_CUF_BADI_2  method MODIFY_INPUT..
       The import variable iv_fieldname contains the field name amd the variable iv_value has the value entered in the custom field .........but another import structure ls_header also contains the custom field but no value....
    Method  MODIFY_INPUT has only one export parameter ev_value,,,,,,,,,,,,,,,,!!!!!!!!!!!!
    Edited by: vidya vidya on Apr 24, 2009 6:06 PM

  • Updating custom fields to MSEG through MIGO

    Hi,
    I got a requirement to add a tab with custom fields in MIGO transaction, which I did using BADI MB_MIGO_BADI
    and requirement also says to extend table MSEG with custom fields and store the values in MSEG.
    I have gone through example implimentation and updated MSEG in similar way. IS it a good approach to extend MSEG table? I read one thread says we can't extend MSEG table with custom fields. is it true?
    Goods receipt will be done only through MIGO to restrict inconsistensies in material documents.
    One more question.
    How to restrict the additional custom screen to be displayed for particular action in MIGO?
    Thanks

    Hi,
    Yes you can do it, i did it with the same BADI method to update to custom fields in MSEG table through MIGO transaction.
    Here is the steps you need to follow :-
    1. Create a append structure or you can use the CI include to add fields in MSEG table. I did it though append structure only.
    2. Create a implementaion of MB_MIGO_BADI through SE18 or SE19 transaction.
    3. Inplement the interface IF_EX_MB_MIGO_BADI methods, the details of interface implementaions are described below:-
    Attribute
    GV_VEND_LOT     Instance Attribute     Public     Type     CHAR1     'X' : Purchase order Type NB (Standard PO) found                                                                               
    GIT_MSEG     Instance Attribute     Public     Type     TY_T_MSEG     Table MSEG                                                                               
    GV_BSART     Instance Attribute     Public     Type     ESART     Purchasing Document Type                                                                               
    GV_GRMODE     Instance Attribute     Public     Type     CHAR1     X: Document is of Type GR with PO and Y : Document with Mat.                                                                               
    GWA_MSEG     Instance Attribute     Public     Type     MSEG     Document Segment: Material                                                                               
    GC_CLASS_ID     Constant     Private     Type     MIGO_CLASS_ID     Class ID for MIGO Components (External Detail Screen)     'ZIMP_MB_MIGO_BADI'
    GV_LINE_ID     Instance Attribute     Private     Type     GOITEM-GLOBAL_COUNTER     LINE_ID of Line Displayed in Detail                                                                               
    GIT_LINE_ID     Instance Attribute     Private     Type     /KYK/TRG_NUMC6     Range Table: NUMC6                                                                               
    GWA_LINE_ID     Instance Attribute     Private     Type     /KYK/SRG_NUMC6     Range Structure: NUMC6                                                                               
    GC_X     Constant     Private     Type     CHAR1     'X' : Select     'X'
    GC_BSART     Constant     Private     Type     ESART     Purchasing Document Type     'NB' 
    IF_EX_MB_MIGO_BADI~INIT
    METHOD if_ex_mb_migo_badi~init.
      IF gv_grmode = gc_x.
    Regristration of BAdI-Implementation:
    Append class attribute GF_CLASS_ID (='ZIMP_MB_MIGO_BADI') to
    regristration table.
        APPEND gc_class_id TO ct_init.
      ENDIF.
    ENDMETHOD.
    IF_EX_MB_MIGO_BADI~PBO_DETAIL
    METHOD if_ex_mb_migo_badi~pbo_detail.
    Lines added to do display Vendor lot tab in the item level
    Only for Purchase order type NB (Standard PO)
    Local constants
      DATA : lc_cprog TYPE sycprog VALUE 'ZMMM_MIGO_VENDOR_COO',
             lc_dynnr TYPE sydynnr VALUE '0100'.
            lc_heading TYPE migo_badi_heading VALUE 'Vendor Lot Number'.
    Read Line item from buffer table
    if sy-subrc =0 then only display vendor lot tab
      READ TABLE git_line_id WITH KEY low = i_line_id
      BINARY SEARCH TRANSPORTING NO FIELDS.
      IF sy-subrc EQ 0 AND ( gv_grmode IS NOT INITIAL
        AND gv_vend_lot = gc_x ).
        e_cprog   = lc_cprog. " Program name
        e_dynnr   = lc_dynnr. " Screen number
        e_heading = text-001. " Tab Heading
        gv_line_id = i_line_id. " line Item
      ENDIF.
    ENDMETHOD.
    IF_EX_MB_MIGO_BADI~PAI_DETAIL
    METHOD if_ex_mb_migo_badi~pai_detail.
      IF gv_grmode IS NOT INITIAL AND gv_vend_lot = gc_x.
    'X':  The Method LINE_MODIFY Is Processed
        e_force_change = gc_x.
    Reset the Flag for next line item selection
        CLEAR gv_vend_lot.
      ENDIF.
    ENDMETHOD.
    IF_EX_MB_MIGO_BADI~LINE_MODIFY
    METHOD if_ex_mb_migo_badi~line_modify.
      IF cs_goitem-ebeln IS NOT INITIAL.
    Look for Purchase order number from EKKO and get the Order Type.
    If the Order type is NB (Standard PO) then set the flag GV_VEND_LOT.
        SELECT SINGLE bsart FROM ekko INTO gv_bsart
          WHERE ebeln = cs_goitem-ebeln.
        IF sy-subrc EQ 0 AND gv_bsart = gc_bsart.
          gv_vend_lot = gc_x.
          IF NOT i_line_id IS INITIAL.
            gwa_line_id-low = i_line_id.
          ENDIF.
          IF git_line_id IS NOT INITIAL.
            SORT git_line_id BY low.
          ENDIF.
          READ TABLE git_line_id WITH KEY
          low = i_line_id BINARY SEARCH
          TRANSPORTING NO FIELDS.
          IF sy-subrc <> 0 AND gwa_line_id IS NOT INITIAL.
            APPEND gwa_line_id TO git_line_id.
          ENDIF.
        ELSE.
          CLEAR gv_vend_lot.
        ENDIF.
        CLEAR : gv_bsart,
                gwa_line_id.
      ENDIF.
    *************Buffer MSEG table with custom fields **********************
    *Item is Adopted in Document
      IF NOT cs_goitem-take_it IS INITIAL.
        CLEAR gwa_mseg.
        MOVE-CORRESPONDING cs_goitem TO gwa_mseg.
        APPEND gwa_mseg TO git_mseg.
      ENDIF.
    ENDMETHOD.
    METHOD if_ex_mb_migo_badi~post_document.
    Delete duplicate line item if avail in GIT_MSEG table
      SORT git_mseg BY zeile.
      DELETE ADJACENT DUPLICATES FROM git_mseg COMPARING zeile.
    To access these valu in Ennhancement Spot ZENHIMPL_MM_MB_MIGO_BADI_MB
      EXPORT : git_mseg FROM git_mseg TO MEMORY ID 'GIT_MSEG',
               gv_grmode FROM gv_grmode TO MEMORY ID 'GV_GRMODE'.
    Refresh all class content
      CLEAR : gv_vend_lot,
              gv_bsart,
              gv_grmode,
              gwa_mseg,
              gv_line_id,
              gwa_line_id.
      REFRESH : git_mseg,
                git_line_id.
    ENDMETHOD.    
    METHOD if_ex_mb_migo_badi~mode_set.
    Local Constants
      DATA : lc_a01 TYPE goaction VALUE 'A01', " Goods Receipt
             lc_r01 TYPE refdoc VALUE 'R01',   " Purchase order
             lc_a04 TYPE goaction VALUE 'A04', " Display
             lc_r02 TYPE refdoc VALUE 'R02',   " Material Document
             lc_y   TYPE char1 VALUE 'Y'.      " Indicator for Display material document
    Set mode variable for Good Receipt with Purchase order
      IF i_action = lc_a01 AND i_refdoc = lc_r01.
        gv_grmode = gc_x.
      ELSEIF i_action = lc_a04 AND i_refdoc = lc_r02.
    Set mode variable for Good Receipt with Purchase order
        gv_grmode = lc_y.
      ELSE.
        CLEAR gv_grmode.
      ENDIF.
    ENDMETHOD.
    METHOD if_ex_mb_migo_badi~publish_material_item.
      IF ls_goitem-ebeln IS NOT INITIAL.
    Look for Purchase order number from EKKO and get the Order Type.
    If the Order type is NB (Standard PO) then set the flag GV_VEND_LOT.
    This method is used to material document display
        SELECT SINGLE bsart FROM ekko INTO gv_bsart
          WHERE ebeln = ls_goitem-ebeln.
        IF sy-subrc EQ 0 AND gv_bsart = gc_bsart.
          gv_vend_lot = gc_x.
          IF NOT ls_goitem-zeile IS INITIAL.
            gwa_line_id-low = ls_goitem-zeile.
          ENDIF.
          IF git_line_id IS NOT INITIAL.
            SORT git_line_id BY low.
          ENDIF.
          READ TABLE git_line_id WITH KEY
          low = ls_goitem-zeile BINARY SEARCH
          TRANSPORTING NO FIELDS.
          IF sy-subrc <> 0 AND gwa_line_id IS NOT INITIAL.
            APPEND gwa_line_id TO git_line_id.
          ENDIF.
        ELSE.
          CLEAR gv_vend_lot.
        ENDIF.
        CLEAR : gv_bsart,
                gwa_line_id.
      ENDIF.
    ENDMETHOD.
    METHOD modify_mseg.
      DATA : lwa_mseg TYPE mseg.
    Check if buffer MSEG table is not initial
    and mode is GR with PO then only update XMSEG from GIT_MSEG
      IMPORT : git_mseg TO git_mseg FROM MEMORY ID 'GIT_MSEG',
               gv_grmode TO gv_grmode FROM MEMORY ID 'GV_GRMODE'.
      IF git_mseg IS NOT INITIAL
         AND gv_grmode = gc_x.
        SORT git_mseg BY zeile.
        LOOP AT xy_mseg INTO lwa_mseg.
    Identify the record and update XMSEG
          CLEAR gwa_mseg.
          READ TABLE git_mseg
          INTO gwa_mseg
          WITH KEY zeile = lwa_mseg-zeile BINARY SEARCH.
          IF sy-subrc EQ 0.
            MODIFY xy_mseg FROM gwa_mseg
            TRANSPORTING zvendlot zcoo WHERE zeile = gwa_mseg-zeile.
          ENDIF.
          CLEAR lwa_mseg.
        ENDLOOP.
    Reset buffer table and mode
        REFRESH git_mseg.
        CLEAR gv_grmode.
      ENDIF.
    Free memory ids
      FREE MEMORY ID : 'GIT_MSEG',
                       'GV_GRMODE'.
    ENDMETHOD.
    4. Now go to the function module MB_POST_GOODS_MOVEMENT andcall the method modify_msegfrom the implemented class ZCL_IM__MB_MIGO_BADI.
    ENHANCEMENT 110  ZENHIMPL_MM_MB_MIGO_BADI_MB.    "active version
    Data declaration for badi method
      Data : lo_ZCL_IM__MB_MIGO_BADI TYPE REF TO ZCL_IM__MB_MIGO_BADI.
      CREATE OBJECT lo_ZCL_IM__MB_MIGO_BADI.
      if sy-subrc eq 0 and xmseg[] is NOT INITIAL.
        CALL METHOD lo_zcl_im__mb_migo_badi->modify_mseg
          CHANGING
            xy_mseg = xmseg[].
      endif.
    ENDENHANCEMENT.   
    Regards,
    Dhirendra Pandit

Maybe you are looking for

  • Mac shuts down? Already updated firmware.

    My MacBook has been fine since I bought it in May 2007. However, today I had left my MacBook on and plugged in, while a read a book. I turned to my MacBook, and Firefox had shut down. I wasn't sure why, but I just opened it back up. I left my MacBook

  • IMac looses sound for 1-2 seconds when soundcard is idle for a minute

    I've had this problem coming and going. If I don't touch the computer for a minute or two, the sound automaticaly mutes or turns off or stops working or something. Meaning I get no notification sounds, no email sounds, no iMessage sounds, no system s

  • How can I clear the stored browsing history in iCloud?

    As the headline says, how can I clear the stored browsing history in iCloud? After resetting my iPhone, previous history came back as soon as I signed in with iCloud on it. I would really like this to not occur.

  • Has anyone gotten the Digi 002 to work on Mavericks?

    Has anyone gotten the Digi 002 rack to work on OSX Mavericks? I know it says '002 rack and console are not supported (untested)' according to Avid's site, but I was curious if anyone has got it to run. I am currently using Logic Pro 9 with it right n

  • Power Outage - Apple Cinema Not Turning On

    Hello, We had a power outage and after electricity came back I tried to turn on my computer. The G4 starts but somehow my Apple Cinema does not come on (the light does not turn on). Any suggestions what I should do to fix it? Thank you in advance for