<?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: What is unpack command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-unpack-command/m-p/1811971#M348057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harika , &lt;/P&gt;&lt;P&gt; Unpack command is used to add leading zeros .&lt;/P&gt;&lt;P&gt;This is usefull because when using many functions / in select statements the value is required in its full length.&lt;/P&gt;&lt;P&gt;An example of this is the function module 'CO2H_PROD_ORDER_READ' in this if u give the value of a valid production order of length 10 , it will execute and give u the result , but when u do the same from a program it will not give u the result the reasonf being that the FM starts to search for a the PO whose lenght is 10.&lt;/P&gt;&lt;P&gt;Now if you use the unpack command the 2 spaces which are blank are added as zeros in the front.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also try the same with material number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Dec 2006 05:13:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-12T05:13:02Z</dc:date>
    <item>
      <title>What is unpack command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-unpack-command/m-p/1811967#M348053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is unpack command&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 04:51:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-unpack-command/m-p/1811967#M348053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T04:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: What is unpack command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-unpack-command/m-p/1811968#M348054</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;Unpacks the packed field f and places it in the field g with leading zeros. If g is too short, it is truncated on the left. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA: P_FIELD(2) TYPE P VALUE 103, &lt;/P&gt;&lt;P&gt;      C_FIELD(4) TYPE C. &lt;/P&gt;&lt;P&gt;UNPACK P_FIELD TO C_FIELD. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / C_FIELD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 04:52:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-unpack-command/m-p/1811968#M348054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T04:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: What is unpack command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-unpack-command/m-p/1811969#M348055</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;Unpacks the packed field field1 and places it in the field field2 with leading zeros. If field2 is too short, it is truncated on the left.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA: P_FIELD(2) TYPE P VALUE 103, &lt;/P&gt;&lt;P&gt;C_FIELD(4) TYPE C. &lt;/P&gt;&lt;P&gt;UNPACK P_FIELD TO C_FIELD. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P_FIELD: P'103C' --&amp;gt; C_FIELD: C'0103' &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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 05:00:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-unpack-command/m-p/1811969#M348055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T05:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is unpack command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-unpack-command/m-p/1811970#M348056</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;execute this code, u will get the exact idea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZTEST_UNPACK.
 
DATA : VAR(5) VALUE '123'.
 
WRITE : / VAR.
 
UNPACK VAR TO VAR.
 
WRITE : / VAR.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 05:04:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-unpack-command/m-p/1811970#M348056</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-12-12T05:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: What is unpack command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-unpack-command/m-p/1811971#M348057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harika , &lt;/P&gt;&lt;P&gt; Unpack command is used to add leading zeros .&lt;/P&gt;&lt;P&gt;This is usefull because when using many functions / in select statements the value is required in its full length.&lt;/P&gt;&lt;P&gt;An example of this is the function module 'CO2H_PROD_ORDER_READ' in this if u give the value of a valid production order of length 10 , it will execute and give u the result , but when u do the same from a program it will not give u the result the reasonf being that the FM starts to search for a the PO whose lenght is 10.&lt;/P&gt;&lt;P&gt;Now if you use the unpack command the 2 spaces which are blank are added as zeros in the front.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also try the same with material number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 05:13:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-unpack-command/m-p/1811971#M348057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T05:13:02Z</dc:date>
    </item>
  </channel>
</rss>

