‎2008 May 05 11:43 AM
Hi all,
I have a problem in displaying the address in a smartform. For one sales order, I fetch the customer name, street, house number, str_suppl3, location etc from table adrc and I have to display the same in 5 lines. I first used a window and displayed the fields side by side. But in few cases, if str_suppl3 and location were not entered by the user, then that line remained blank. Sometimes the name which was a combination of name1 and name2 had to be checked bcoz some sales orders were related with 2 names and some had only one. In some cases region was not entered.
Because of all these comibinations and permutations it was difficult to give conditions. So I replaced this by the address node. Now for this, the problem is that each field takes a new line. But I need to display the two names side by side if present. the street and house number side by side and so on cause I have about 5 lines space to print the address.
Can anyone please give me solution to this problem.
Thanks
BP
‎2008 May 05 12:09 PM
hi in address window there is a tab called Aditional address specification:
in this there is a field calle 'Number of Lines to be Used'
specify 5 in this field.
i hope it will work.
reward if useful.
‎2008 May 05 12:11 PM
Hi,
When I specify lines 5, it prints only 5 fields on five lines and and the rest is ommited.
BP
‎2008 May 05 12:18 PM
‎2008 May 05 12:15 PM
Hi,
EXAMPLE on Address node
if you want to display the vendor's address , get the ADRNR for that particular LIFNR and put it that variable(&v_adrnr&) or the value in the the address number field .. select the type of the address you want to display. if you are not sure of the type then select the 'Determine Dynamically' radiobutton and give the variable there..
Regards,
Raj.
‎2008 May 05 12:21 PM
hii,
creating the address window ,we must specify it as a secondary window.then we have positon it as per requirement.then by left clicking it we have to create the program line..for eg
select adrnr
from t001
into v_adrnr
where bukrs eq company_code.
endselect.
and specufy in the input parameter as company_code and output parameter as v_adrnr.
then in the address option we have to specify the address number as & v_adrnr&,organizational address,and also the number of lines you must use.
if any more queries plz revert back..
reward points if helpful.
thankss...
‎2008 May 05 2:05 PM
Hi
My code fetches the adrnr etc into a work area. I have mentioned wa_adrc-adrnr in the address node. The address is being fetched but I want the fields side by side and if one field is empty it should not print a gap, thats all.
thanks
BP
‎2008 May 05 2:22 PM
Use the function module ADDRESS_INTO_PRINTFORM
it works just like the address node
You have to pass the same values to it.
It returns the address in an internal table
You can then display it as you like
there re different types of ways it returns the addresss
Simple itab , for printing
Short address (in one line)
and another one in which it returns what each line is (Name,comapny..etc)
Read the documentation on it