<?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: Parameter Value. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402474#M1995762</link>
    <description>&lt;P&gt;Hi Matthew&lt;/P&gt;&lt;P&gt;   Yes. Can u pls help me with my scenario where i should write to access this function in my code.&lt;/P&gt;&lt;P&gt;Internally i think Matnr is saved as 000000000000000045 (with leading Zeros) or  i am wrong&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 14 May 2021 13:37:38 GMT</pubDate>
    <dc:creator>ramco1917</dc:creator>
    <dc:date>2021-05-14T13:37:38Z</dc:date>
    <item>
      <title>Parameter Value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402470#M1995758</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
  &lt;P&gt; I have below code . In Parameter i have to enter value - 000000000000000038.&lt;/P&gt;
  &lt;P&gt;I want that i should enter only 38 . Since Value in Matnr is stored as 38.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;REPORT  ZABAP_GETMATERIALDETAILS.

data : wa_mara type mara.
PARAMETERS : p_matnr type mara-matnr.
CALL FUNCTION 'ZABAP_GETMATERIALDETAILS'
  EXPORTING
    IM_MATNR       = p_matnr
 IMPORTING
   EX_MARA        = wa_mara
.

Write : SY-SUBRC.
*WRITE : WA_MARA-MATNR, WA_MARA-MTART, WA_MARA-MEINS, WA_MARA-MBRSH .
IF SY-SUBRC = 0.
* Implement suitable error handling here
 WRITE : WA_MARA-MATNR, WA_MARA-MTART, WA_MARA-MEINS, WA_MARA-MBRSH .
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 11:27:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402470#M1995758</guid>
      <dc:creator>ramco1917</dc:creator>
      <dc:date>2021-05-14T11:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402471#M1995759</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;check the following&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;shift matnr left deleting leading '0'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;kind regards,&lt;/P&gt;&lt;P&gt;tobias&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 11:49:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402471#M1995759</guid>
      <dc:creator>TobiH</dc:creator>
      <dc:date>2021-05-14T11:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402472#M1995760</link>
      <description>&lt;P&gt;Do not use SHIFT. &lt;/P&gt;&lt;P&gt;Go to SE11, look at the domain for the data element MATNR. You'll see it has a conversion exit called MATN1. This means there are function modules to convert from the external (your parameter) to the internal (how it's held on the database). These are:&lt;/P&gt;&lt;P&gt;CONVERSION_EXIT_MATN1_INPUT and&lt;/P&gt;&lt;P&gt;CONVERSION_EXIT_MATN1_OUTPUT&lt;/P&gt;&lt;P&gt;Use these function modules.&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 11:56:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402472#M1995760</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-05-14T11:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402473#M1995761</link>
      <description>&lt;P&gt;Other alternative is to use the keyword WRITE TO, maybe have a look here regarding the syntax&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapwrite_to.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapwrite_to.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;it should execute the conversion(routines)&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 12:47:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402473#M1995761</guid>
      <dc:creator>former_member660513</dc:creator>
      <dc:date>2021-05-14T12:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402474#M1995762</link>
      <description>&lt;P&gt;Hi Matthew&lt;/P&gt;&lt;P&gt;   Yes. Can u pls help me with my scenario where i should write to access this function in my code.&lt;/P&gt;&lt;P&gt;Internally i think Matnr is saved as 000000000000000045 (with leading Zeros) or  i am wrong&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 13:37:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402474#M1995762</guid>
      <dc:creator>ramco1917</dc:creator>
      <dc:date>2021-05-14T13:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402475#M1995763</link>
      <description>&lt;P&gt;Hi Tobias&lt;/P&gt;&lt;P&gt;  How i can use Shift in my code. &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 13:39:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402475#M1995763</guid>
      <dc:creator>ramco1917</dc:creator>
      <dc:date>2021-05-14T13:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402476#M1995764</link>
      <description>&lt;P&gt;Use the INPUT function module just before you call your Z_ function module. Internally, leading zeros are used, yes.&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 14:22:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402476#M1995764</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-05-14T14:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402477#M1995765</link>
      <description>&lt;P&gt;Don't use the solution. First of all, Tobias is converting from 000000000000000038 to 38 and I think you want form 38 to 000000000000000038, so using the conversion FM is easiest (or WRITE... USING EDIT MASK '==MATN1' )&lt;/P&gt;&lt;P&gt;Secondly, it won't help you if you encounter conversion functions of a different kind somewhere else.&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 14:33:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402477#M1995765</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-05-14T14:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Parameter Value.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402478#M1995766</link>
      <description>&lt;P&gt;Your question and the comments are a lot confusing.&lt;/P&gt;&lt;P&gt;With this line of code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS : p_matnr type mara-matnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if you type "38" in P_MATNR screen field, the variable P_MATNR will automatically contain the value "000000000000000038" because of the conversion exit defined by MARA-MATNR.&lt;/P&gt;&lt;P&gt;Why do you need to convert it?&lt;/P&gt;&lt;P&gt;NB: ZABAP_GETMATERIALDETAILS should work with value "000000000000000038", not with value "38". That would probably be a bad design if it works only with "38".&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 17:51:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/parameter-value/m-p/12402478#M1995766</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-05-14T17:51:42Z</dc:date>
    </item>
  </channel>
</rss>

