09-19-2016 5:31 PM
Hi Team,
I need to display the address in smartform via so10 format in a dynamic way .
I have attached the screen shot for reference. But i want to delete the first line which apprears in this dynamic address.
Can anyone suggest an idea on it.
Regards,
Karthik S
09-19-2016 8:12 PM
See the documentation at http://help.sap.com/saphelp_nw70/helpdata/en/d2/69a151cd8b11d3b563006094192fe3/frameset.htm
It explains the function module ADDRESS_INTO_PRINTFORM.
09-20-2016 6:17 AM
Hi Sandra,
Thanks for your reply .
I have checked it and i have listed sample code in driver program .
Can i know what to be done in smartform End and sample screen shot of it .
CALL FUNCTION 'ADDR_GET'
EXPORTING
address_selection = lw_addr_sel
IMPORTING
sadr = lt_sadr.
IF sy-subrc EQ 0.
lw_adrs1-name1 = lt_sadr-name1.
lw_adrs1-name2 = lt_sadr-name2.
lw_adrs1-name3 = lt_sadr-name3.
lw_adrs1-name4 = lt_sadr-name4.
lw_adrs1-post_code1 = lt_sadr-pstlz.
lw_adrs1-city1 = lt_sadr-ort01.
lw_adrs1-city2 = lt_sadr-ort02.
lw_adrs1-street = lt_sadr-stras.
lw_adrs1-country = c_de.
CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
EXPORTING
address_1 = lw_adrs1
address_type = '1'
number_of_lines = 10
IMPORTING
address_printform = lw_adrs_print.
WRITE lw_adrs_print-line0 TO w_line0.
WRITE lw_adrs_print-line1 TO w_line1.
WRITE lw_adrs_print-line2 TO w_line2.
WRITE lw_adrs_print-line3 TO w_line3.
WRITE lw_adrs_print-line4 TO w_line4.
WRITE lw_adrs_print-line5 TO w_line5.
WRITE lw_adrs_print-line6 TO w_line6.
WRITE lw_adrs_print-line7 TO w_line7.
ENDIF.
ENDIF.
Regards,
KArthik S
09-20-2016 1:49 PM
Hi Team,
Can i know , wat i need to do in Smartform End inorder to display the address .
Can suggest an idea on this ?
Regards,
KArthik S
09-20-2016 3:20 PM
Why did you use 'number_of_lines = 10' if you only map to 8 fields, and what are you asking for, the FM provide you 8 lines of texts, and I suppose you are able to use table, loop and templates in Smartforms?
In online documentation or your course notes on Smart Forms, Using SAP Smart Forms, Basic Elements of a Form, look for Inserting Addresses and Printing Data in a Table.
Of course you could also play with Customer-Specific Settings to change the address format (removing the first line ?) but I won’t…
Regards,
Raymond
09-20-2016 3:38 PM
For this you need to use "Priority of Lines" string to exclude the line you do not want to print..(in general attribute tab of the Address)
The priority string you specify in the Smartform defines which address lines SAP chucks out if the number of lines in the address exceeds the "Number of Lines to be Used" specified. Each address line is assigned a character as follows:
Ex- if you put A2 in the priority string SAP will remove the title line and then name2 to try to make the address fit into number of lines specified.
Remember to use suitable 'Number of Lines to be Used' with 'Priority of Lines'..
-Satya