2009 Apr 30 12:49 PM
Hi All,
I want to display the vendor address in the script.I am using the FM ADDRESS_INTO_PRINTFORM.
CUstomer needs it as in XK03 Preview poup address.
When i am using this FM the data is coming importing aparameter
address_printform_table = address_printform_table.
I am looping the data like this and populating ADRS structure
LOOP AT address_printform_table INTO wa_address_printform_table.
IF wa_address_printform_table-line_type = '1'.
adrs-line1 = wa_address_printform_table-address_line.
ENDIF.
IF wa_address_printform_table-line_type = '5'.
adrs-line2 = wa_address_printform_table-address_line.
ENDIF.
IF wa_address_printform_table-line_type = '7'.
adrs-line3 = wa_address_printform_table-address_line.
ENDIF.
IF wa_address_printform_table-line_type = 'S'.
adrs-line4 = wa_address_printform_table-address_line.
ENDIF.
IF wa_address_printform_table-line_type = '0'.
adrs-line5 = wa_address_printform_table-address_line.
ENDIF.
IF wa_address_printform_table-line_type = 'R'.
adrs-line6 = wa_address_printform_table-address_line.
ENDIF.
IF wa_address_printform_table-line_type = 'C'.
adrs-line7 = wa_address_printform_table-address_line.
ENDIF.
ENDLOOP.
IF one value is empty then it is showing empty in the output.
DavidDonaldson
ACCOUNTS
57 xxx
USA.
How can i delete this space-How can i solve this problem.
Can aynbody please give me solution.
Thanks,
2009 Apr 30 3:15 PM
Hi all,
Thank u so muxh for u r reply.
ADDRESS TYPE &1& PARAGRAPH AD
ADDRESSNUMBER ®UH-ADRNR&
FROMCOUNTRY &t001-land1&
ENDADDRESS
but this not displaying the adrees in script.
I want the address to be displayed as in XK03 print priview adress.
This i am able to get through 'address_print_program' in importing parameter 'ADDRESS_PRINTFORM_TABLE-ADDRESS_LINE'
How can i display same output in print form.
Please can anybody give idea it is so quick forme
Thanks,
Hi all,
Thank u so muxh for u r reply.
ADDRESS TYPE &1& PARAGRAPH AD
ADDRESSNUMBER ®UH-ADRNR&
FROMCOUNTRY &t001-land1&
ENDADDRESS
but this not displaying the adrees in script.
I want the address to be displayed as in XK03 print priview adress.
This i am able to get through 'address_print_program' in importing parameter 'ADDRESS_PRINTFORM_TABLE-ADDRESS_LINE'
How can i display same output in print form.
Please can anybody give idea it is so quick forme
Thanks,
2009 Apr 30 12:55 PM
Hello ,
Get the address number or Person Number for the vendor from LFA1 or LFB1 and use
ADDRESS Command with in the script with the address number fetched .It will display the same in the script output.
Regards
2009 Apr 30 1:01 PM
Hi Sirish,
Can you please give me code how to write it.I have address number.
Thanks
2009 Apr 30 2:54 PM
hello sishu
I am writing coding like this
/: ADDRESS TYPE VENDOR PARAGRAPH AD
/:ADDRESSNUMBER ®UH-ADRNR&
/:FROMCOUNTRY &LFA1-LAND1&
/:LANGUAGE &SYST-LANGU&
/:ENDADDRESS
while i am checking the script it is throwing error.
Can you please let me know is this correct and where i am doing maisatek.
Thanks
2009 Apr 30 3:07 PM
ADDRESS
TITLE &SADR-ANRED&
NAME &SADR-NAME1&, &SADR-NAME2&, &SADR-NAME3&, &SADR-NAME4&
STREET &SADR-STRAS&
POBOX &SADR-PFACH& CODE &SADR-PSTL2&
POBOX CODE CITY &XXXX-PFORT&
POSTCODE &SADR-PSTLZ&
CITY &SADR-ORT01&, &SADR-ORT02&
REGION &SADR-REGIO&
COUNTRY &SADR-LAND1&
FROMCOUNTRY &XXXX-SLAND&
ENDADDRESS
2009 Apr 30 3:11 PM
Hello,
I don't believe 'VENDOR' is a valid address type. It should be 1,2,3 or ' ' (default).
For paragraph AD set the 'No Blank Lines' flag and it will stop printing the blank line in the address.
Note that some postal regulations want a space before printing the destination country, which is why the address_into_printform sometimes adds a blank line.
Michael
2009 Apr 30 3:15 PM
Hi all,
Thank u so muxh for u r reply.
ADDRESS TYPE &1& PARAGRAPH AD
ADDRESSNUMBER ®UH-ADRNR&
FROMCOUNTRY &t001-land1&
ENDADDRESS
but this not displaying the adrees in script.
I want the address to be displayed as in XK03 print priview adress.
This i am able to get through 'address_print_program' in importing parameter 'ADDRESS_PRINTFORM_TABLE-ADDRESS_LINE'
How can i display same output in print form.
Please can anybody give idea it is so quick forme
Thanks,
2009 Apr 30 3:25 PM
if at all you are using address .. endaddress tags SAP will automatically pick the country format of address and displays in the same fashion. If you want as per your specifications give all the fields you want to show and remove the tags ( address... endaddress)
2009 Apr 30 3:30 PM
Hi J@Y,
As u said I have all the fields in the script and removed the adress and end adrees tags.
as i have given in my code for first post i am getting the spaces in sructure and these spaces are coming output also.
Please let me know how to solve this.
Thanks.
2009 Apr 30 3:33 PM
How about trying like this :
TITLE &SADR-ANRED&
NAME &SADR-NAME1&, &SADR-NAME2&, &SADR-NAME3&, &SADR-NAME4&
STREET &SADR-STRAS&
if not SADR-PFACH is initial. "<<<<<<<<<<<check if we have value..
POBOX &SADR-PFACH& CODE &SADR-PSTL2&
endif.
POBOX CODE CITY &XXXX-PFORT&
if not SADR-PSTLZ is initial.
POSTCODE &SADR-PSTLZ&
endif.
CITY &SADR-ORT01&, &SADR-ORT02&
REGION &SADR-REGIO&
COUNTRY &SADR-LAND1&
FROMCOUNTRY &XXXX-SLAND&
2009 Apr 30 3:45 PM
2009 May 04 4:33 PM
Hi MIchael,
U have solved my problem.
I have a small question the address coming in bold letters.
How can i chnage the font style.
In printout is it come properly.
Please let me know .
Thanks u so much for u r help.
Thanks
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |