<?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: Printing address using address number in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996487#M1494593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reshma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before code, First check table - ADRC&lt;/P&gt;&lt;P&gt;Here U find the link how with only address no., address prints in o/p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to work on few fields go for following code (Make changes according to your req.)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT SINGLE adrnr INTO twlad-adrnr FROM twlad WHERE werks = lips-werks AND
                                                          lgort = lips-lgort.

    IF sy-subrc = 0.
      CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
        EXPORTING
          address_type            = '1'
          address_number          = twlad-adrnr
        IMPORTING
          address_printform_table = lt_address.

      CLEAR : tel_no,fax_no,email.
      SELECT SINGLE tel_number fax_number INTO (tel_no,fax_no) FROM adrc WHERE addrnumber = twlad-adrnr.

      SELECT SINGLE smtp_addr INTO email FROM adr6 WHERE addrnumber = twlad-adrnr.
    ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reply, if want other info regarding it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 May 2010 11:32:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-05-26T11:32:04Z</dc:date>
    <item>
      <title>Printing address using address number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996481#M1494587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF &amp;amp;PAGE&amp;amp; EQ 1                                                           &lt;/P&gt;&lt;P&gt;   ADDRESSNUMBER &amp;amp;EKKO-ADRNR(K)&amp;amp;                                          &lt;/P&gt;&lt;P&gt;   FROMCOUNTRY &amp;amp;T001-LAND1&amp;amp;                                               &lt;/P&gt;&lt;P&gt; ELSE                                                                     &lt;/P&gt;&lt;P&gt;   TITLE    &amp;amp;LFA1-ANRED&amp;amp;                                                  &lt;/P&gt;&lt;P&gt;   NAME     &amp;amp;LFA1-NAME1&amp;amp;, &amp;amp;LFA1-NAME2&amp;amp;, &amp;amp;LFA1-NAME3&amp;amp;, &amp;amp;LFA1-NAME4&amp;amp;        &lt;/P&gt;&lt;P&gt; ENDIF                                                                    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this code ' If' statement is executed, i dont understand in if block , we are displaying only 'addressnumber' and 'from country', then how come entire address is printed in the sapscript.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 08:27:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996481#M1494587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-26T08:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Printing address using address number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996482#M1494588</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;I think this code in the script is under ADDRESS &amp;amp; ENDADDRESS statements. So, here the addressnumber is used to read the address from database and displayed in the output. Please check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 08:38:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996482#M1494588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-26T08:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Printing address using address number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996483#M1494589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You have to put the code between &lt;STRONG&gt;ADDRESS&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;ENDADDRESS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
/: IF &amp;amp;PAGE&amp;amp; EQ 1 
/: ADDRESS PARAGRAPH AS
/: ADDRESSNUMBER &amp;amp;EKKO-ADRNR(K)&amp;amp;
/: FROMCOUNTRY &amp;amp;T001-LAND1&amp;amp;
/: ENDADDRESS
/: ELSE
/: TITLE &amp;amp;LFA1-ANRED&amp;amp; 
/: NAME &amp;amp;LFA1-NAME1&amp;amp;, &amp;amp;LFA1-NAME2&amp;amp;, &amp;amp;LFA1-NAME3&amp;amp;, &amp;amp;LFA1-NAME4&amp;amp; 
/: ENDIF 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Dillip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 08:48:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996483#M1494589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-26T08:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Printing address using address number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996484#M1494590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes the actual code is as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF &amp;amp;EKKO-ADRNR(K)&amp;amp; EQ '          '                                    
ADDRESS PARAGRAPH AS                                                  
  TITLE    &amp;amp;LFA1-ANRED&amp;amp;                                               
  NAME     &amp;amp;LFA1-NAME1&amp;amp;, &amp;amp;LFA1-NAME2&amp;amp;, &amp;amp;LFA1-NAME3&amp;amp;, &amp;amp;LFA1-NAME4&amp;amp;     
IF &amp;amp;PAGE&amp;amp; EQ 1.                                                       
  STREET   &amp;amp;LFA1-STRAS&amp;amp;                                               
  POBOX    &amp;amp;LFA1-PFACH&amp;amp;  CODE &amp;amp;LFA1-PSTL2&amp;amp;                            
  CITY     &amp;amp;LFA1-ORT01&amp;amp;, &amp;amp;LFA1-ORT02&amp;amp;                                 
  POSTCODE &amp;amp;LFA1-PSTLZ&amp;amp;                                               
  COUNTRY  &amp;amp;LFA1-LAND1&amp;amp;                                               
  REGION   &amp;amp;LFA1-REGIO&amp;amp;                                               
  FROMCOUNTRY &amp;amp;T001-LAND1&amp;amp;                                            
ENDIF.                                                                
ENDADDRESS                                                            
ELSE                                                                  
ADDRESS PARAGRAPH AS                                                  
IF &amp;amp;PAGE&amp;amp; EQ 1                                                        
  ADDRESSNUMBER &amp;amp;EKKO-ADRNR(K)&amp;amp;                                       
  FROMCOUNTRY &amp;amp;T001-LAND1&amp;amp;                                            
ELSE                                                                  
  TITLE    &amp;amp;LFA1-ANRED&amp;amp;                                               
  NAME     &amp;amp;LFA1-NAME1&amp;amp;, &amp;amp;LFA1-NAME2&amp;amp;, &amp;amp;LFA1-NAME3&amp;amp;, &amp;amp;LFA1-NAME4&amp;amp;     
ENDIF                                                                 
ENDADDRESS&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;                                                            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the above code there is this 'if' block&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF &amp;amp;PAGE&amp;amp; EQ 1                                                        
  ADDRESSNUMBER &amp;amp;EKKO-ADRNR(K)&amp;amp;                                       
  FROMCOUNTRY &amp;amp;T001-LAND1&amp;amp;                                            
ELSE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;                                                     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in this 'if' block , using the address number , entire address is displayed in Final output of the sap script. When I debug the sapscript, i m able to see only the addres number and not the address. My actual requirement is to display only some fields in the address and not the entire address, how can i do that???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 10:44:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996484#M1494590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-26T10:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Printing address using address number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996485#M1494591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi reshma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u take address number it displays the entire address.&lt;/P&gt;&lt;P&gt;if u want only some parts of the address then u should not use address number.&lt;/P&gt;&lt;P&gt;u can use title , street n other commands between address and end address.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 10:56:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996485#M1494591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-26T10:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Printing address using address number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996486#M1494592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u plz give me a sample code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 11:14:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996486#M1494592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-26T11:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Printing address using address number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996487#M1494593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reshma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before code, First check table - ADRC&lt;/P&gt;&lt;P&gt;Here U find the link how with only address no., address prints in o/p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to work on few fields go for following code (Make changes according to your req.)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT SINGLE adrnr INTO twlad-adrnr FROM twlad WHERE werks = lips-werks AND
                                                          lgort = lips-lgort.

    IF sy-subrc = 0.
      CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
        EXPORTING
          address_type            = '1'
          address_number          = twlad-adrnr
        IMPORTING
          address_printform_table = lt_address.

      CLEAR : tel_no,fax_no,email.
      SELECT SINGLE tel_number fax_number INTO (tel_no,fax_no) FROM adrc WHERE addrnumber = twlad-adrnr.

      SELECT SINGLE smtp_addr INTO email FROM adr6 WHERE addrnumber = twlad-adrnr.
    ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reply, if want other info regarding it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 11:32:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996487#M1494593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-26T11:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Printing address using address number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996488#M1494594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;STREET   &amp;amp;LFA1-STRAS&amp;amp;                                               &lt;/P&gt;&lt;P&gt;  POBOX    &amp;amp;LFA1-PFACH&amp;amp;  CODE &amp;amp;LFA1-PSTL2&amp;amp;                            &lt;/P&gt;&lt;P&gt;  CITY     &amp;amp;LFA1-ORT01&amp;amp;, &amp;amp;LFA1-ORT02&amp;amp;                                 &lt;/P&gt;&lt;P&gt;  POSTCODE &amp;amp;LFA1-PSTLZ&amp;amp;                                               &lt;/P&gt;&lt;P&gt;  COUNTRY  &amp;amp;LFA1-LAND1&amp;amp;                                               &lt;/P&gt;&lt;P&gt;  REGION   &amp;amp;LFA1-REGIO&amp;amp;   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can use any of the above command.&lt;/P&gt;&lt;P&gt;if u want street n country then write as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Address&lt;/P&gt;&lt;P&gt;STREET   &amp;amp;LFA1-STRAS&amp;amp;  &lt;/P&gt;&lt;P&gt;COUNTRY  &amp;amp;LFA1-LAND1&amp;amp;&lt;/P&gt;&lt;P&gt;End address&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 12:21:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/printing-address-using-address-number/m-p/6996488#M1494594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-26T12:21:08Z</dc:date>
    </item>
  </channel>
</rss>

