Address_into_printform

Hi kind professionals,
We are still sadly using version 4.6c of SAP.
Problem:
From what I have read in the OSS notes I can not print additional address fields like 'steet_2' and 'C/O' using the function module 'address_into_printform' from SAP script without implementing a customer exit and a BADI.
Please can you tell me if this is the case or have I missed something ?
Plus if above is correct, how do I pass the additional data to 'address_into_printform'.
I am pushing my luck but is there any sample code for a novice coder.
More info.
Using short form of address,
The documents in question are F8 invoice and packing note.

I have a similar problem, I need to print Street2 and street 3 (along with Street).  Is there any way to print these fields using the current ADDRESS ... ENDADDRESS code?
Thank you

Similar Messages

  • How to use function module ADDRESS_INTO_PRINTFORM in a smart form

    Hi Experts,
    I have a requirement where in the address window in the smart form output should be  country specific. For example if the customer is an Indian . The address should NAME,CITY and POSTAL CODE. I searched on web to find a function module wich will display the address in country specific format I found ADDRESS_INTO_PRINTFORM I am not sure whether this is right function module or not. If this is correct please help me in using this.
    Thanks and Regards,
    Srini..

    That function module should be able to do the formatting you're after, as long as the necessary settings are present in the country configuration. It appears the default formatting routine for India would want the postal code before the city, so you may have to change that if your requirement calls it for being after the city. But keep in mind that such config changes will have an effect on other programs that format addresses.
    The function module also has pretty extensive documentation.
    In a Smartform, you have an ADDRESS element that does the formatting for you, so theoretically you shouldn't have to use the function module though...

  • ADDRESS_INTO_PRINTFORM - Is it possible to chose the order of line output ?

    Hello,
    I use this FM  - ADDRESS_INTO_PRINTFORM, that provide me am output format for address.
    The output is:
    lineo
    line1
    line2
    line3 etc etc
    Is it possible to chose the order output ? I mean, first line0, after line1, after line4, after line3, etc etc ??
    Tks.

    Hi,
    You can influence the address returned by ADDRESS_INTO_PRINTFORM.  You would need to create and address layout in the customer range (900 to 999) and assign this to the required country in config.  Then use the user exit EXIT_SAPLSADR_001 to apply your own formatting.
    Regards,
    Nick

  • FM: ADDRESS_INTO_PRINTFORM not returning Country

    Hi,
    I am using the FM: ADDRESS_INTO_PRINTFORM to get the vendor address in my PO Smart form.
    I am passing the below fields into the FM.
    address_type            = '1'
    address_number       = sf_po-vendor-addr_no   " addree number of vendor in PO
    number_of_lines       = '6'
    For some of the vendors (US base vendors), it is returning the address with country in export parameter  ADDRESS_PRINTFORM_TABLE.
    But for other vendors (German base vendors) it is returning the address without country.
    In ADRC table, both the address numbers are having country.
    What could be the issue with this? What else should I need to pass to get the country for all the vendors? Plz help.
    Thanks,
    Arun

    Hi ..
    On debugging this FM, I found that all European countries are defined with address layout key 001 and "Print country name" flag is not set in customizing (table: T005).
    Any idea, what is the "Sender country" refers to? Is it the country of PO sender OR goods sender?
    Is it possible to add the country name to the output parameter ADDRESS_PRINTFORM_TABLE without changing the customizing settings?
    I saw one badi ADDR_PRINTFORM_SHORT related to this. But this is not changing the above mentioned export parameter.
    Thanks.
    Arun

  • Address using FM ADDRESS_INTO_PRINTFORM

    Hi experts,
    I am using the function module ADDRESS_INTO_PRINTFORM to fetch the address by passing the ADRNR as address_number, address_type as 1,sender_country and street_has_priority as 'X' and fetching the address from address_printform. When i am doing this for US addresses i am getting the city, region and postal code concatenated in a single line whereas for UK address city, region and postal codes are appearing on different lines. I want the UK addresses also to have city, region and postal code concatenated in a single line. Can anyone tell me the reason for this and how to solve this.

    Hi,
    Using that ADRNR field value, u can write a select query
    Select field(city)
              (country)
              (postalcode) into table it_adrc
              where ADRNR = v_adrnr(Your ADRNR value)...
    Using this internal table, u can print whatever u want with the help of work area..
    if u want country in the particular line, give your work area as &wa_adrc-country&
    like wise u can acheive your result
    regards
    vijay

  • How to use the function module ADDRESS_INTO_PRINTFORM?

    Hi there,
    i need to use the function module ADDRESS_INTO_PRINTFORM. While doing so, I found out that the output parameter ADDRESS_PRINTFORM_TABLE has the District after the City, which is not at all acceptable. I am using the following import parameters only.
    ADDRESS_TYPE           
    ADDRESS_NUMBER      
    SENDER_COUNTRY       
    NUMBER_OF_LINES       
    IV_NATION                      
    Kindly help me to find out what's missing to have the district before the city in the output.

    Hi
    I think, It is because of wrong data maintained in ADRC table.
    Check ADRC table. CITY2 is district and CITY1 is city.
    In the output of ADDRESS, CITY2(District) has to come first.

  • ADDRESS_INTO_PRINTFORM : address with street and po_box

    Hello,
    I  use function module 'ADDRESS_INTO_PRINTFORM' to format vendor adress :
    CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
    EXPORTING
       ADDRESS_TYPE                         = '1'
       ADDRESS_NUMBER                       = zxpekko-adrn2
       SENDER_COUNTRY                       = 'FR'
    IMPORTING
       ADDRESS_PRINTFORM                    = ws_adresse
    In the vendor address, street and po-box are filled but only the po-box is in structure ws_adresse.
    I would like to have street and po-box in structure ws_adresse.
    In my system, land 'FR' has '001' for 'Address layout key' in OY01.
    Can you help me ?
    Thanks for your help.
                                            Sébastien

    If function module is giving problem get the address using below code...
    SELECT SINGLE adrnr
      FROM LFA1
      INTO LFA1-adrnr
      WHERE LIFNR EQ W_LIFNR.
      if sy-subrc eq 0.
        select single *
          from adrc
          into adrc
         where ADDRNUMBER eq LFA1-ADRNR.
    Close the thread once your question is answered.
    Regards,
    SaiRam

  • OSS note for FM ADDRESS_INTO_PRINTFORM

    Hi All,
    Can anyone please provide me OSS note numbers available for FM ADDRESS_INTO_PRINTFORM.
    I want to see OSS notes applicable for printing Countries in address.
    Regards,
    Imran Kundan.

    Better perform (yourself or basis) the search yourself at http://service.sap.com/notes, as the list depends on your exact version/sp level and list of application/add-ons, use keyword BAS_PRINT. And there are MANY notes, already 2 exist for July 2014. You could also start with collective note  35931 - Collective note: Formatting/printing addresses .
    Regards,
    Raymond

  • Help needed for Address_into_printform

    Hi,
    In my PO form,i used the standard address.  in that it is printing everything except the region and country.
    IF &PEKKO-ADRNR(K)& EQ '          ' AND &PEKKO-ADRN2(K)& EQ '          '
    ADDRESS DELIVERY PARAGRAPH AS
      TITLE    &SADR-ANRED&
      NAME     &SADR-NAME1&, &SADR-NAME2&, &SADR-NAME3&, &SADR-NAME4&
      STREET   &SADR-STRAS&
      CITY     &SADR-ORT01&, &SADR-ORT02&
      POSTCODE &SADR-PSTLZ&
      COUNTRY  &SADR-LAND1&
      REGION   &SADR-REGIO&
      FROMCOUNTRY &LFA1-LAND1&
    ENDADDRESS
    ELSE
    IF &PEKKO-ADRNR(K)& NE '          '
    ADDRESS DELIVERY PARAGRAPH AS
      ADDRESSNUMBER &PEKKO-ADRNR(K)&
      FROMCOUNTRY &LFA1-LAND1&
    ENDADDRESS
    ELSE
    ADDRESS DELIVERY PARAGRAPH AS
      ADDRESSNUMBER &PEKKO-ADRN2(K)&
      FROMCOUNTRY &LFA1-LAND1&
    ENDADDRESS
    ENDIF
    ENDIF
    I have debugged the script and the Functional module Address_into_printform. In the script it is going to the else statement "if &pekko-adrnr(K)& ne '  '". And i have debugged the FM and i found out as far as my understanding,  All the address values are passing including (region and country) to the FM from the script and the region and country values are not printing in the output.
    When i checked this internal table lt_adrtab[], it has only the values without region and country with their types. and for the type P it is having the blank line.
    Here is the it_adrtab[] looks like
    type    text
    A        Company
    1         ABC pvt limited
    6        plot no 5, xyz street,
    S       z distict
    P                                         (blank line)
    0       999999(postal code)..
    In the print out also i am having hte same values wiht the blank line and the region and countyry missing.
    Please help me to solve this ...
    Regards,
    Ahamed.

    HI,
    Can you please provide the code snippet for the priority and lines. I think it would solve my problem.
    Thanks in advance.
    Regards,
    Ahamed.

  • HOW TO DEAL WITH ADDRESS_INTO_PRINTFORM

    Scenario:
    Call FM ADDRESS_INTO_PRINTFORM with the Address Type = 1, ADDRESS_NUMBER = ADRNR, SENDER_COUNTRY = LAND1 and NUMBER_OF_LINES = 6. Read the exporting parameter ADDRESS_PRINTFORM and populate the fields Ship-To Name with LINE0 and Ship-To Address Line 1, 2, 3, 4 and 5 with LINE 1, 2, 3,4,5 respectively.
    can anyone suggest me how to deal with it..point will be rewarded for an attempt.Thankyou

    Thank all of you so much to respond my questions. I think I have solved the problem. Since the key point was that Oracle 10g OEM console could not work with the frequent changes of IP address made by my ISP. I just bought a 54G wireless router. Then connecting router to cable modem. The cable modem still gets the dynamic IP from ISP, but the router automatically assigned a static IP address to my Linux system with the range from 192.168.0.0 - 192.168.255.255. This IP was control by my router. It is nothing to do with ISP. So I re-created Oracle database with this new static IP. Then OEM console and listener can startup and connect to database without problem. I do think other guru's methods also will work. I just have no time to try them one by one. Thanks again. Your inputs make me learn many things.

  • Address_into_printform - where used?

    Hi,
    this is a pretty vague question - just kind of hoping this happened to someone else before and you have some inspiration.....
    during our current project we have made some changes to sapscripts/smartforms on the address output. These changes were checked and worked fine. All transported to production, which already has HR on it. HR team printed pay slips but the addresses are different. Investigations found that during our project someone changed the address layout key to standard (006) but HR were always using a customised version (900). The 900 version calls a user-exit.
    We have done tests on the sapscripts we worked on and they seem okay but anyone know if there is anywhere else that this FM (address_into_printform) might be used?
    A 'where-used' just gives a list of all includes - which seem to be print programs so it should be okay, but asking the question, just in case.
    Thanks.

    We found a document "International Address Versions" attached to note 316331.  It was very helpful.

  • Address_into_printform function module

    hi pls
    let me know the above function moudle as we use in sap script retrieves adddress from which table ADRC for some other table pls respon asap
    regards
    Arora

    hi
    My question is that how this function moudle is picking up the data from table
    and which table it is picking up to get the address data when we pass the adressnumbe4 to the funtion module ???????
    i need to know the table only from where this FM get the data
    regards
    Arora

  • How to get the address in last page in script?

    I have the requirement ....in 4 page script i want to print header logo in first page and in last 4 th page i want to print address....how is it possssible?

    use the command address ......end address.......
    The ADDRESS - ENDADDRESS control command formats an address according to the postal convention of the recipient country defined in the COUNTRY parameter. The reference fields are described in the structures ADRS1, ADRS2, or ADRS3, depending on the type of address. Either direct values or symbols may be assigned to the parameters
    The parameter values contain both formatting and address information. The address data are formatted for output according to the data in the following parameters:
    TYPE
    FROMCOUNTRY
    COUNTRY
    LANGUAGE
    PRIORITY
    DELIVERY
    LINES
    Parameters
    DELIVERY
    Means that the address should be formatted as a complete delivery address, using the street name and number rather than the P.O. Box.
    TYPE
    Specifies the type of address. The following types are possible:
    Normal address (ADRS1). This is the address of a company or organization. It corresponds to the address structure that is expected in most SAP applications.
    Private or personal address (ADRS2). This is the address of a natural person, a private or home address.
    Company addressDienstadresse (ADRS3) with contact person. This is the address of a colleague or contact within a company or organization. The company name should be specified in the TITLE and NAME fields; the ATTN: contact person should be named in PERSON and TITLE.
    Should you enter another address type or leave the field blank, then type 1 is used for formatting.
    PARAGRAPH
    Specifies the paragraph format to be used for outputting the address. If this parameter is not given, the address will be output using the default paragraph format.
    PRIORITY
    Specifies which of the address lines may be omitted should this be necessary. Any combination of the following codes may be specified. The order in which you list the codes determines the order in which address lines are left out.
    The codes are as follows:
    A Title
    P Mandatory empty line
    4 Name4
    3 Name3
    R Region
    T Neighborhood, administrative section of a city (CITY2)l
    D Department
    L Country name
    C Post code or zip code
    2 Name2
    B P.O. Box (Japan only)
    S Street name and number or P.O. Box, depending upon DELIVERY parameter
    N Name and form of address of natural person (PERSON and TITLE)
    I Location information in LOCATION
    O City
    LINES
    Specifies how many lines may be used for formatting the address. If there are too few lines available to allow all the address data to be formatted, then the data specified in the PRIORITY parameter are omitted. If there is no LINES parameter and if this command is in a form window of a type other than MAIN, then the number of lines available for formatting the address are automatically calculated based on the current output position and the size of the window.
    TITLE
    Title or form of address. Used only with addresses of types 1 and 3.
    NAME
    Up to four names may be given, separated by commas. Used only with addresses of types 1 and 3.
    PERSON
    Name of the addressee. Used only for addresses of type 2 (private or personal address) or type 3 (company contact address). In type 3 addresses, use PERSON for the name of your contact person: ‘Attn: Mr. Jeffries’. The name fields should be used for the company address.
    PERSONNUMBER
    Personal number. Can be used only for address types 2 or 3 (private or personal address).
    TITLE (with PERSON)
    Title of the addressee. Can be used only for address types 2 or type 3 (private or personal address).
    DEPARTMENT
    Department of the addressee. Can be used only for address type 3 (company address).
    STREET
    Street name.
    HOUSE
    House number for the corresponding street.
    LOCATION
    Additional location information, such as the building, "Upstairs Apartment" and so on. Appears on its own line in the address.
    POBOX
    P. O. Box
    CODE
    The post code / zip code of the P. O. Box if this differs from the post code / zip code of the recipient.
    CITY
    The city in which the destination P.O. Box is located if this differs from the city of the recipient.
    POSTCODE
    Post code / zip code of the recipient.
    CITY
    Addressee’s city. city1 is expected to be the city; city2 is the neighborhood or administrative section, if required.
    NO_UPPERCASE_FOR_CITY
    Default = NO_UPPERCASE_FOR_CITY ‘ ‘
    Usually, the system prints the city and country names of foreign addresses in uppercase ( NO_UPPERCASE_FOR_CITY ‘ ‘ ).
    You can use this parameter to force the system to output city and country name unchanged (uppercase/lowercase).
    ( NO_UPPERCASE_FOR_CITY ‘X’ )
    REGION
    This allows an administrative region, county, province, or state etc. to be specified.
    COUNTRY
    Specifies the recipient country, i.e. the country according to whose postal conventions the address is to be formatted.
    COUNTRY_IN_REC_LANG
    This flag tells the system to use the recipient language for the country name.
    ( COUNTRY_IN_REC_LANG ‘X‘ )
    ( Default: Recipient language is not used: COUNTRY_IN_REC_LANG ‘ ‘ )
    LANG_FOR_COUNTRY
    Default = Space
    Use this parameter to explicitly set the language in which to print the country name of a foreign address. By default, the system uses the language of the sending country.
    LANGUAGE
    Language code of the language of the recipient country, if it differs from that of the recipient COUNTRY. Example: addresses in Switzerland. Standard SAP language codes are used; you can display these in the initial SAPscript text processing screen or in table T002.
    FROMCOUNTRY
    Specifies the language to be used for formatting the name of the recipient country. For most European countries, the recipient country is specified by placing the international car registration letters in front of the post code and separating them from the post code with a hyphen. You must always specify the sender country.
    ADDRESSNUMBER
    The number is used to index a central address file, from which the desired address is read instead of using the set of the above fields. You can find more information on this facility in the documentation for the function module ADDRESS_INTO_PRINTFORM.
    You use this one parameter instead of the set of parameters described before.
    /: ADDRESS
    /: TITLE 'Firma'
    /: NAME 'Schneider & Co', 'Finanzberatung'
    /: STREET 'Kapitalgasse 33'
    /: POBOX '12345' CODE '68499'
    /: POSTCODE '68309'
    /: CITY 'Mannheim'
    /: COUNTRY 'DE'
    /: FROMCOUNTRY 'DE'
    /: ENDADDRESS
    This produces the following output address:
    Firma
    Schneider & Co
    Finanzberatung
    Postfach 12345
    68499 Mannheim
    If the DELIVERY parameter is specified on the ADDRESS command, then the street name and number will appear in the address in place of the P. O. Box number.
    Firma
    Schneider & Co
    Finanzberatung
    Kapitalgasse 33
    68309 Mannheim
    SAPscript makes an internal call to the ADDRESS_INTO_PRINTFORM function module for formatting the address. If the result is not as expected, you should check the settings for this function module
    If DELIVERY is not specified and if a POBOX is specified, then the POBOX is used in an address instead of a STREET.
    reward points if helpful....
    Message was edited by:
            raam

  • Select query in SAP SCRIPT

    Dear Experts,
    In printing of MB23n , I need to print STR_SUPPL1 and STR_SUPPL2 from ARDC table. I already have ADDRNUMBER.
    We are using SAP SCRIPT.
    Please guide me how to insert the following query in SAP SCRIPT.
    tables: lfa1, adrc.
    data: begin of it_test occurs 0 ,
    str_suppl1 like adrc-str_suppl1,
    str_suppl2 like adrc-str_suppl2,
    end of it_test.
    select str_suppl1 str_suppl2 into corresponding fields of table it_test from adrc addrnumber = lfa1-adrnr.
    Please hekp me to solve the issue.
    Thanks in advance.
    Regards
    Ankur

    Hi,
    In Script - Page Window -
         PERFORM <form name> IN PROGRAM <Program Name>
         USING &VBDKR-VBELN_VL&
         USING &VBDKR-VBELN_VAUF&
         CHANGING &ADDR_LINE1&
         CHANGING &ADDR_LINE2&
         CHANGING &ADDR_LINE3&
         CHANGING &ADDR_LINE4&
         CHANGING &ADDR_LINE5&
         ENDPERFORM
                         &ADDr_line1&&ADDR_LINE3& &ADDr_line2&
         &ADDR_LINE4&
         PROTECT
         &ADDR_LINE5&
         ENDPROTECT
    In SE38 - Create Prog as Subroutine pool --> Write a Form with same name
    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.

  • How to get the Country Name details always in Eng while using the SForms

    Hi Group,
    I have a requirement as under:
    the Smartform has to display the COUNTRY NAME - always and it should be printed in ENGLISH only.
    The Smartform is having a Alternative option(for printing the Address) and for YES part(for certain countries) - the fm "ADDRESS_INTO_PRINTFORM" is being used and for the NO(for the rest of the countries) part an ADDRESS TEMPLATE is being used....
    The issues are:
    - the fm 'ADDRESS.......FORM" is printing the COUNTRY Name for certain cases and for the rest it is not...
    - the Address template has no option to do any manipulation on the COUNTRY Name to come
    how can have the COUNTRY NAME to appear in both the cases(YES part and NO part) printed in ENGLISH always?
    I tried for a USEREXIT "EXIT_SAPLSADR_900" but still not able to tweak it and get the COUNTRY NAME always in ENGLISH.
    Kindly provide your valuable inputs.
    Regards,
    Vishnu.

              Hi Laura Taylor ,
              Thanks for your Reply and Thanks for ur Guidelines.
              Thanks & Regards
              Subu.
              "Laura Taylor" <[email protected]> wrote:
              >
              >Unfortunately, there is no way to determine the country unless the client
              >indicates
              >that to you directly(i.e. via a form input value). However, there are
              >two request
              >headers that can help you determine the language preference(s) of the
              >client:
              >
              >Accept-Language -- Specifies the language preference(s) the client prefers
              >to
              >receive.
              >Accept-Charset -- Identifies the charset(s) the client understands.
              >
              >Laura
              >Developer Relations Engineer
              >BEA Support
              >
              >
              >"Subu" <[email protected]> wrote:
              >>
              >>Hi ,
              >> i have a requiremtn in which i want to display the country name
              >from
              >>where
              >>the user browse our webpages . for example if he is browsing from us
              >>, then i
              >>should display US and if he is browsing from UK , then i should dispaly
              >>"uk" etc...
              >>can anyone guide me how to proceed .
              >>
              >>thanks in advance
              >>
              >>Regards
              >>Subu
              >
              

Maybe you are looking for