<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Difficulty in FM. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402810#M1241056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the field MAKTG instead of MAKTX as MAKTG stored the description in the uppercase where as MAKTX stores as user entered..so in case of search you need to enter in same case as data exists in the MAKT table. If you use the MAKTG then you will be searching everything upper case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Ranges : r_maktg FOR makt-maktg.

r_maktg-sign = 'I'.
r_maktg-option = 'CS'.
TRANSLATE p_maktg to uppercase.
CONCATENATE '*' p_maktg '*' INTO r_maktg-low.
Append r_maktg.
  
Select * from MAKT into itab where spras EQ sy-langu and  MAKTG IN r_maktg.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Apr 2009 12:30:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-07T12:30:24Z</dc:date>
    <item>
      <title>Difficulty in FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402804#M1241050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to prepare a FM, in which user gives few letters of a material descrioption. &lt;/P&gt;&lt;P&gt;And I have to fetch material and material description from MAKT table containing same letters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If user giving material description as &lt;/P&gt;&lt;P&gt;u201CELOVACu201D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All materials containing ELOVAC will display.&lt;/P&gt;&lt;P&gt;ELOVAC-B 5 ml&lt;/P&gt;&lt;P&gt;ELOVAC-B 0.5 ml&lt;/P&gt;&lt;P&gt;ELOVAC-B 5 ml&lt;/P&gt;&lt;P&gt;ELOVAC B I.P. 5 ML (EPI)&lt;/P&gt;&lt;P&gt;ELOVAC B B.P. 0.5 ML&lt;/P&gt;&lt;P&gt;ELOVAC B B.P. 1 ML&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can experts please tell how to go about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;Lucky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:16:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402804#M1241050</guid>
      <dc:creator>former_member506713</dc:creator>
      <dc:date>2009-04-07T12:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty in FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402805#M1241051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i understand right u want to make a search help for material, &lt;/P&gt;&lt;P&gt;for example user enters &lt;STRONG&gt;ELOVAC&lt;/STRONG&gt; and gets material list with materials that have name with "ELOVAC" in it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:19:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402805#M1241051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty in FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402806#M1241052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Concatenate '%' i_desc '%' into gv_description.

Select * from MAKT into itab where maktx like gv_description.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i_desc is the string you are passing to the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhupal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:22:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402806#M1241052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty in FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402807#M1241053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of  wa_makt,&lt;/P&gt;&lt;P&gt;           matnr type matnr,&lt;/P&gt;&lt;P&gt;           maktx like makt-maktx,&lt;/P&gt;&lt;P&gt;       end of wa_makt.&lt;/P&gt;&lt;P&gt;data: it_makt like table of wa_makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ranges: ra_description for wa_makt-maktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_maktx like wa_makt-maktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ra_description-sign = 'I'.&lt;/P&gt;&lt;P&gt;ra_description-option = 'CP'.&lt;/P&gt;&lt;P&gt;ra_description-low = p_maktx.&lt;/P&gt;&lt;P&gt;append ra_description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr maktx from makt into corresponding fields of table it_makt where spras = sy-langu and maktx in ra_description.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;loop at it_makt into wa_makt.&lt;/P&gt;&lt;P&gt;write: / wa_makt-matnr, wa_makt-maktx.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write: / 'No record found'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:24:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402807#M1241053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty in FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402808#M1241054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rimantas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for ur quick response.&lt;/P&gt;&lt;P&gt;In function module the input should be some part of material description ( like ELOVAC ).&lt;/P&gt;&lt;P&gt;And output should be material description containing ELOVAC in it and material.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:25:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402808#M1241054</guid>
      <dc:creator>former_member506713</dc:creator>
      <dc:date>2009-04-07T12:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty in FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402809#M1241055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lucky,&lt;/P&gt;&lt;P&gt;  Try using the following logic.&lt;/P&gt;&lt;P&gt;Go to SE37 -&amp;gt;Create a fumction Module assigned to a function group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Now in the Import parameters, declare a variable i.e what the user has to gie in your case there are few letters like (elovac) of material description.&lt;/P&gt;&lt;P&gt;2.Declare a field of the material description type(you find it from F1) and assign it to your import parameters.&lt;/P&gt;&lt;P&gt;3.In the export parameters you want to display the materials with those letters, so declare a field with the material type.&lt;/P&gt;&lt;P&gt;4. In the source code, try this logic.&lt;/P&gt;&lt;P&gt;5. In the field what you have declared in the Import parameters write a select statment and verify using 'CA' or 'CO'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer the code attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*"--------------------------------------------------------------------*
**                       INITIALIZATION                                *
**"--------------------------------------------------------------------*
initialization.

  clear s_devcl.
  s_devcl-sign = 'I'.
  s_devcl-option = 'CP'.
  s_devcl-low = 'Y*'.
  append s_devcl.

  s_devcl-sign = 'I'.
  s_devcl-option = 'CP'.
  s_devcl-low = 'Z*'.
  append s_devcl.

*&amp;amp;--------------------------------------------------------------------*
*At Selection Screen.
*&amp;amp;--------------------------------------------------------------------*
at selection-screen.

  if not s_devcl[] is initial.
    select single devclass
      into tdevc-devclass
      from tdevc
      where devclass in s_devcl.

    if sy-subrc ne 0.
      message e012.
    endif.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Much Regards,&lt;/P&gt;&lt;P&gt;Amuktha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Amuktha Naraparaju on Apr 7, 2009 2:27 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:26:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402809#M1241055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty in FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402810#M1241056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the field MAKTG instead of MAKTX as MAKTG stored the description in the uppercase where as MAKTX stores as user entered..so in case of search you need to enter in same case as data exists in the MAKT table. If you use the MAKTG then you will be searching everything upper case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Ranges : r_maktg FOR makt-maktg.

r_maktg-sign = 'I'.
r_maktg-option = 'CS'.
TRANSLATE p_maktg to uppercase.
CONCATENATE '*' p_maktg '*' INTO r_maktg-low.
Append r_maktg.
  
Select * from MAKT into itab where spras EQ sy-langu and  MAKTG IN r_maktg.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:30:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402810#M1241056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty in FM.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402811#M1241057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Experts.&lt;/P&gt;&lt;P&gt;I got the solution.&lt;/P&gt;&lt;P&gt;Closing the thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 07:39:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difficulty-in-fm/m-p/5402811#M1241057</guid>
      <dc:creator>former_member506713</dc:creator>
      <dc:date>2009-04-08T07:39:19Z</dc:date>
    </item>
  </channel>
</rss>

