Custom FM for material search

Hi expert,
I am trying to make custom FM for material search based on certain search criteria.
It give me error like" In unicode programs, the " " character can not appears in names, as it does here in names "LT_MATNRSEL   TYPE TABLE OF BAPIMATRAM".
Also it giving option for  me as use " type range of" instead of "type table of"
also when i am making changes saying it is not expected. I am pasting the sample code below.
""Local Interface:
*"  IMPORTING
*"     VALUE(IV_MAXROWS) TYPE  BAPIMAXROW DEFAULT 100
*"     VALUE(IV_MATERIAL_NBR) TYPE  MATNR OPTIONAL
*"     VALUE(IV_PLANT) TYPE  WERKS_D
*"     VALUE(IV_MATERIAL_DESC) TYPE  TEXT40 OPTIONAL
*"  EXPORTING
*"     VALUE(EV_PLANT) TYPE  WERKS
*"  TABLES
*"      RETURN STRUCTURE  BAPIRET2
*"      RT_MATNRLIST STRUCTURE  BAPIMATLST
   DATA:   lt_matnrsel   TYPE TABLE OF bapimatram,
          ls_matnrsel   TYPE bapimatram,
          lt_matdescsel TYPE TABLE OF  bapimatras,
          ls_matdescsel TYPE bapimatras,
          lt_plantsel   TYPE TABLE OF   bapimatraw,
          ls_plantsel   TYPE bapimatraw,
          lt_return     TYPE TABLE OF bapiret2,
          ls_return     TYPE bapiret2,
          ls_matnrlist  TYPE bapimatlst,
          lt_generaldata TYPE TABLE OF bapimatdoa,
          ls_generaldata TYPE bapimatdoa,
          lt_materialvaluationdata TYPE TABLE OF bapimatdobew,
          ls_materialvaluationdata TYPE bapimatdobew.
*---  Returning the plant so it can be used as a MBO attribute
        ev_plant = iv_plant.
*--- fill search ranges value
*--- Material Description
  IF iv_material_desc IS NOT INITIAL.
    ls_matdescsel-sign        = 'I'.
    ls_matdescsel-option      = 'CP'.
    ls_matdescsel-descr_low   = iv_material_desc.
    APPEND ls_matdescsel TO lt_matdescsel.
  ENDIF.
  IF iv_material_nbr IS NOT INITIAL.
    ls_matnrsel-sign        = 'I'.
    ls_matnrsel-option      = 'EQ'.
    ls_matnrsel-matnr_low   = iv_material_nbr.
    APPEND ls_matnrsel TO lt_matnrsel.
  ENDIF.
*--- Material Description
  ls_plantsel-sign        = 'I'.
  ls_plantsel-option      = 'EQ'.
  ls_plantsel-plant_low  = iv_plant.
  APPEND ls_plantsel TO lt_plantsel.
*--- call BAPI
  CALL FUNCTION 'BAPI_MATERIAL_GETLIST'
    EXPORTING
      maxrows              = iv_maxrows
    TABLES
      matnrselection       = lt_matnrsel
      materialshortdescsel = lt_matdescsel
      plantselection       = lt_plantsel
      matnrlist            = lt_matnrlist
      return               = lt_return.
Thanks And Regards
Ranjeet Singh

This post is successful. Only error was in formatting. In my screen there are some dots which was creating problems.
Thanks for Reply.
Ranjeet Singh.

Similar Messages

  • Customisation of F4 for material search

    dear all,
    while creating a sales order, when i enter material in line item, i want to customise search i.e. F4
    i want to search material on two criteria at a time
    1) material type
    2) material group.
    please give solution

    If You are in ECC 6 the option in the search crieteria is Advanced search for material using search engine.
    Here you need to fill both Material type and Material Group manually.

  • Custom Fields for Content Search WebPart

    I created a custom item display template to control the look of the data.  I copied the template "Picture on left, 3 lines on right" and just rearranged the div and added my own styles. 
    I created a custom List for Company Information.  The list consists these fields;
    Title
    Hyperlink
    Main Paragraph
    Image
    Sub Paragraph
    I can not map Main Paragraph and Sub Paragraph as they do not display in the drop down for mapping fields.  I have crawled the database.
    Please let me know if you have any ideas for getting those fields to show in the mapping.
    Thank you

    Hi  Phillip6653,
    For solving your issue, you can create Main Paragraph site column and Sub Paragraph site column. If you create a site column (not a list column), populate it with data, and run a full crawl  SharePoint
    will create a crawled property and a corresponding managed property.
    Reference:
    Automatically created managed properties in SharePoint Server 2013
    Hope this helps!
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Downloading the Customizing Objects for Material replicationfrom ECC to CRM

    Hi Experts,
        I am trying to download the three customizings objects for Material Download:
    1) DNL_CUST_PROD0
    2) DNL_CUST_PROD1
    3) DNL_CUST_PROD3
    After Initial Load,The Status of all three are coming as Running in R3AM1.
    What could be the possible reasons for this? How do I rectify this.
    Its very urgent.Please reply fast.
    Regards
    Puneet

    Hi,
    You can check for dumps(txn. ST22) on CRM and ECC both. Or see if the SMQ1/SMQ2 queues are in error state in either of these systems. If this doesn't help check if the table CRMATAB on the ECC is filled properly by the report SMOF_FILL_CRMATAB.
    Regards,
    Rohit

  • How to add customized fields for free search in PA30

    Hi,guys
       I have created some customized infotype. and I want to add the field of that infotype into free search.
       How do I do that?
       Please help
    Thank you in advance

    Hi Luke,
    I am getting follwoing error in cds file 1906. 05 Oct 2011 09:46:58 ERROR com.nakisa.Logger - com.nakisa.framework.data.commandProcessor.impl.OracleCommandProcessor : getDataTables : Problem executing query. Data Element Name: SAPOrgUnitDataElement.
    This error is only coming in Quality & not in dev. In Dev, It is showing Org Structure for a scenario but in Quality, it is showing a blank screen & giving this error in cds log file.
    I have copied SAPOrgUnitDataElement.xml into SAPOrgUnitDataElement_copy.xml & then used standard SAPOrgUnitCostCenterInheDataElement data element to create a linked data element called SAPOrgUnitDataElement (using SAPOrgUnitDataElement_copy & SAPOrgUnitCostCenterInheDataElement).
    All the fields in SAPOrgUnitCostCenterInheDataElement got added in source Organization Structure feilds & I have also added cost center name field in view but still it is not showing in scenario Org chart in dev. Because of data issues, I thought to test it on Quality but there I am even not able to see Org chart for a scenario & it is giving above said error in cds log file.
    Please help!
    Thanks,
    Prashant

  • Custom operator for advanced search in OIM

    Hi All,
    We have two operators like Equals and Begin with in Advanced users search. I want to search with new operator, Can we add any other new operators
    Regards
    user7609

    You will have to look at the canonical framework which 11g uses for such operations. Refer to article id: 1311568.1 which talks about modifying the search user page during request creation to add additional search fields.
    Also you must have done through this doc: http://docs.oracle.com/cd/E21764_01/doc.1111/e14309/uicust.htm
    Not a trivial task but not impossible either.
    -Bikash

  • Shel life experation date for material and customer

    we will need a specify minimum Shelf Life Expiration Date/Production Date for a material and customer.
    example:
    The customer X for  material  Y require 200 days for minimum shelf life expiration. This means we send this material his shelf life expiration have great than 200 days.
    Thanks

    Hi,
    If you are into FMCG industry, you need to maintain BBD (Best before date) also along with SLED & Production Dt.

  • Material search by description

    Hi,
    we want to use TREX for material search from MM03  F4 search .
    we are able to search based on material no , EAN no  , but not with material description.
    I dont want to use full text search field because it do the search on other fields as well.
    Let me know what could be the cause that material is not getting searched by description.
    Regards
    Yashpal Gupta
    Please see the attached screen shot.

    Hi Gupta
    Just refer the SCN link
    TREX_Search Not working
    BR
    SS

  • Issue Search Help Exit for Material Group

    Dear Expertsl,
    I developed a search help exit for material group for the search helps both H_T023 and H_2023_MEPO to restrict certain material groups from the actual display as follows
    1)  I developed custom table to hold the Invalid material groups
    2) Developed search help as same as in the bellow link
    link:[https://wiki.sdn.sap.com/wiki/display/Snippets/CaseInsensitiveSearchHelpExitforMaterial+Group]
    3) Before the statement
        SELECT matkl wgbez wgbez60 FROM t023t INTO s_t023t
          WHERE matkl IN t_matkl
    i selected the Invalid materials from the custom table into an internal table
    4)    i am restricting the entries with the following code.
    LOOP AT a_tab.
    only move values that meet the requirements
    after you convert to upper case.
         MOVE a_tab-wgbez60 TO a_tab-wgbez60_test.
         TRANSLATE a_tab-wgbez60_test TO UPPER CASE.
            MOVE      a_tab-wgbez        TO a_tab-wgbez_test.
            TRANSLATE a_tab-WGBEZ_test   TO UPPER CASE.
            MOVE      a_tab-wgbez60      TO a_tab-wgbez60_test.
            TRANSLATE a_tab-wgbez60_test TO UPPER CASE.
          IF a_tab-wgbez60_test IN i_wgbez60 AND
             a_tab-wgbez_test   IN i_wgbez   AND   
             a_tab-matkl        IN i_matkl.
            ADD 1 TO findex.
            MOVE a_tab-matkl   TO temp_tab-matkl.
            MOVE a_tab-WGBEZ   TO temp_tab-WGBEZ.   
            MOVE a_tab-wgbez60 TO temp_tab-wgbez60.
            IF findex > callcontrol-maxrecords.
              MOVE 'X' TO callcontrol-maxexceed.
              EXIT.
            ENDIF.
            READ TABLE i_invalid INTO w_invalid
            WITH KEY matkl = a_tab-matkl.
            IF sy-subrc NE 0.
              APPEND temp_tab.
            ENDIF.
            CLEAR temp_tab.
          ENDIF.
        ENDLOOP.
    This is working fine when we press F4 in ME21N Transaction and give some description and then press enter the popup screen.
    But my requirement is user will enter some description in ME21N material group field and press enter ( Not pressing the F4 here) at this moment this is not going through the search help exit and displaying all the entries including the Invalid materials.
    Note: We can delete the Invalid material groups but the documents which are having the invalid material already will have an issue and need to be corrected all the documents. But our requirement is only to use the correct materials  groups from now onwards.
    I would appropriate if any one can helping this regard.
    Thanks in advance.,
    Regards,
    Venkat

    Hi Venkat,
    You can call your ZSEARCH_HELP from the PAI , on the event SY-UCOMM = Enter using the function module F4IF_FIELD_VALUE_REQUEST.
    For example, your screen field is MARA-ZXXXX, screen 0100 and search help :  ZSEARCH_HELP
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname                   = 'MARA'
          fieldname                  = 'ZXXXX'
          searchhelp               = 'ZSEARCH_HELP '
          dynpnr                      = '0100'
          dynprofield                =  'MARA-ZXXXX'
    TABLES
       return_tab                = lt_returntab.
    This F4IF_FIELD_VALUE_REQUEST will call your custom search help exit.
    Regards
    Deepa.

  • SAP Cloud For Customer : Code List Mapping For Material or Product

    Hi Experts,
    I wnat some information about the SAP cloud code list mapping.
    If i want to replicate Material / Product from SAP ECC / SAP CRM to SAP cloud for customer then any code list mapping entry we need to maintain in cloud side?
    Or
    Any Code list mapping for Material or Product in Cloud?
    If yes anyone have list with SAP ECC / SAP CRM table details?
    Many Thanks
    Mithun

    Hi Mithun,
    Code list data type is available in SAP Cloud. As of my knowledge I trying to find is code list mapping is available or not.
    Yes we can replicate exactly the same values in SAP Cloud that we see in the SAP ECC / SAP CRM. For this, We need to create custom 'Code list' for the required one you want and assign that code list data type name which you created in the previous step to the required element in the BO.
    For creating the code list data type: Go the Solution Explorer, Right Click on the Solution name, Click on 'Add' and Click on "New Item', then Add new item window will open with Installed templates, you will see the list of templates select the code list data type. Give the name as per your requirement starting with Z, max length is 27 only. click next, in 2/3 step, here you can add the list of values you want, add description to them. after clicking on the finish. activate the solution. Go to the BO and for the required element add the name you provided in creating the Custom code list ( ZXxxxxCode ) . Save and activate the BO as well as the solution then update the metadata in the designer part and in date model also, In data model, bind the required root element which is on the left pane to the required BO element which are in the right pane. Click Save and activate here also after the changes are made. finally activate the solution. In the solution explorer Right click on the OIF ui component and click on preview, it will open in the browser, here you will find the custom list you created, for the required one which you added code list date type name for the element in the BO.
    Mithun.. Sorry if I"m confusing you more on this. let me know is this solution enough for the requirement you are searching.
    Best Regards
    Bandhav

  • Supplementary billing for material dispatched from Depot to Customer

    Dear All,
    My client have a scenario where they had dispatched material to customer while negotiation is going on.
    After price finalization, they will raise a supplementary bill to customer for material which had dispatched from the date from which new price got applied.
    EX.--  New price got finalized on 25.01.2012 but applicable from 01.01.2012.
    Now they will raise supplementary invoice for the material dispatched between 01.01.2012 to 25.01.2012.
    I need process to map this scenario in SAP.
    J1IS is not possible as it is specially created for plants as local number range is hard-coded in J1IS.
    Please revert with valuable solutions.
    Regards,
    Balaji

    Dear Laxmipathi,
    Thanks for your input but the process you had mentioned in the given thread is applicable for the material which is lying at the depot & yet to be dispatched. You can update the excise duties of the materials which are lying at the depot through J1IGA.
    But in my case, material is already dispatched to customer.
    I had tried J1IGA for those materials, but additional BED field is greyed out there.
    I request you to suggest some alternate process or workaround so that I can satisfy the client's requirement of supplementary billing.
    Regards,
    Balaji

  • REG: Creating customer stock for different material codes has an single set

    Hi FRIENDS,
    we  are purchasing finished items from our vendor in numbers (Eg. Item Number 1 to 6 (all different items and having different item codes)) and selling it to our customer in a set ( 1 set contains all this 6 items and we have code for this Set).  Please let me know how to create the customer stock for these items in the store as the store shows stock for 7 different  items, not in a set.
    Please let em know if any more information is nedded

    hi dan,
    as per your requriment you can have all MRP viewsfor HAWA material type.
    that means you are purchasing, use HAWA for finished goods in SAP system.
    if you are having different item codes seperately for each item.
    take one packing material called CARTON and maintain UOM as 6 items and you can pack the same in BOM.
    use PP -PHANTOM - BOM which should add all the 7 materials in & gives one single material as OUTPUT.
    use 561 GMT and upload that material as a final finished goods and in MMBE you can see only one called CARTON inside it set of 6 materials will be there.
    BUT BE AWARE OF COSTING OF THE MATERIAL because each material will be having the its price. So discuiss with PP as well as FICO consultants.
    whether you will cost the total set of carton or individual material
    go ahead
    test and confirm
    this clears your issue
    balajia

  • Search help for material number in table control

    Hi
    I have a table which i have generated using table control wizard.
    I have used an interal table while creating the table control through wizard.
    In this internal table i have field matnr.Now my requirement is to have a search help for this field.
    I want a default search help for material as you get one instandard transactions.
    In my other i have ip/op field i.e matnr and i have used the field directly from ztable,it has got the search help but since i am using the internal table i am notting getting a search help .
    can anyone tell how to assign a search help to my table control material field

    hi deepthi,
    chk a sample one which will help u. <b><i>f4 hlp in table control</i></b>
    * Screen flow logic........
    PROCESS BEFORE OUTPUT.
    *MODULE PBO_MODULE.
    PROCESS AFTER INPUT.
    *MODULE PAI_MODULE.
    PROCESS ON VALUE-REQUEST. "F4
      FIELD EKPO-EBELP MODULE help_ekpo.
    * populate screen field from within PROCESS ON VALUE-REQUEST(F4) call
    *&      Module  help_responsibility  INPUT
    *       text
    MODULE help_ekpo INPUT.
    **Transport values to table dynpro/screen table control
      DATA: l_stepl LIKE  sy-stepl,
            l_indx  LIKE  sy-stepl.
      DATA: dynpfields        LIKE dynpread OCCURS 5 WITH HEADER LINE.
    * Adjust for scroling within table control
      CALL FUNCTION 'DYNP_GET_STEPL'
        IMPORTING
          povstepl        = l_stepl
        EXCEPTIONS
          stepl_not_found = 0
          OTHERS          = 0.
      l_indx = tc_ekpotable-top_line + l_stepl - 1.
              "tc_ekpotable should already have been declared
      REFRESH dynpfields.
      CLEAR   dynpfields.
      dynpfields-fieldname  = 'EKPO-EBELN'.
      dynpfields-fieldvalue = '00010'   "wa_ekpo-ebeln.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      dynpfields-fieldname  = 'EKPO-EBELP'.
      dynpfields-fieldvalue = '00020'   "wa_ekpo-ebelp.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
        EXPORTING
          dyname     = 'SAPLZZ_EKKO'    "Program name
          dynumb     = '0100'           "Screen number
        TABLES
          dynpfields = dynpfields
        EXCEPTIONS
          OTHERS     = 0.
    ENDMODULE.                 " help_ekpo  INPUT
    rgds
    Anver
    <b><i>if hlped kindly mark points</i></b>

  • How to implement the search help exit to MM01 for Material by product hiera

    Hi,
    How to implement the search help exit to MM01 T-code for Material by product hierarchy,
    but system default it gives the data from MVKE table, my client wants from MARA table,
    i created the one Function Module, write this code in that FM.
    IF CALLCONTROL-STEP EQ 'DISP'.
    REFRESH RECORD_TAB.
    SELECT * FROM MARA INTO TABLE RECORD_TAB
    WHERE PRDHA = 
    ENDIF.
    I Face the problem what variable i have to pass in WHERE CONDITION, FROM THE MM01 T-code.
    is't require to IMPORT variable from MM01 program, what is that import variable, please give me the solution.
    thanks to all.

    Hi there..
    check my web blog on search help exit...
    [Search help exit code|https://wiki.sdn.sap.com/wiki/x/du0]

  • How to get Name 2 also when we search for a customer using 'Name' as search

    In XD03, when I am searching for Customer using ‘Name’ as Search term I am getting postal code, Name1, City, Customer no. I want Name2 also to be displayed. Can somebody please suggest.
    Thank you.

    hi,
        for this you will have to change the search term involved during the master data creation.
    now during the creation of customer master data , enter the name as the search term in the data base.
    if possible change the database of customers and insert the name in the search term.
    without it, it will be really difficult to locate the customers with the search term as their name
    regards,
    Siddharth.

Maybe you are looking for