on 12-03-2008 10:53 AM
HI all,
I'm printing address field in smartform header.
i'm using lfa1 table n fields like
name1, name2, nmae3, stras, ort01, ort02,pstlz,
land1, regio.
if some field is blank means in output i shouldn't get the blank space.
how to handle this condtion.
i'm coding in Smartform screen only..
Regards
Suprith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Chek If Condition for every variable in condition tab.U can use separate textelements for every variable.
Then u can't get any space if the variables r not having any value.
Eg:
if &name& NE ' '
&name&
Endif
and soon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
dont use select query fileds in the address format.
you can use ADDRESS command and pass the LFA1-ADRNR in the address command, you wont get the spaces.if you are not having the values..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
DATA: L_V_ADRNR TYPE ADRNR,
L_V_LEN TYPE I.
CLEAR: L_V_ADRNR,
V_STCEG,
V_VAT,
V_NAME,
V_CITY,
V_CODE,
V_STREET.
CONSTANTS:L_C_NATION TYPE AD_NATION VALUE 'I'.
*Get the details of the receiving company.
SELECT SINGLE ADRNR
STCEG
FROM T001
INTO (L_V_ADRNR,V_STCEG)
WHERE BUKRS = IS_VPHEADER-BUKRS.
IF SY-SUBRC IS INITIAL.
V_VAT = V_STCEG+2(18).
SELECT NAME1
CITY1
POST_CODE1
STREET
UP TO 1 ROWS
FROM ADRC
INTO (V_NAME,V_CITY,V_CODE,V_STREET)
WHERE ADDRNUMBER = L_V_ADRNR
AND NATION = L_C_NATION.
ENDSELECT.
ENDIF.
IF V_CITY IS NOT INITIAL OR
V_CODE IS NOT INITIAL OR
V_STREET IS NOT INITIAL.
CONCATENATE V_CITY V_CODE V_STREET INTO V_ADDRESS SEPARATED BY ','.
CONDENSE V_ADDRESS.
DO 2 TIMES.
IF V_ADDRESS+0(1) = ','.
V_ADDRESS = V_ADDRESS+1.
ENDIF.
ENDDO.
ENDIF.
Please modify your code according to your requirement.
Hope this will help.
Regards,
Rohan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suprith,
You can insert an address window instead of passing variables separately.
Hope this wont get you any issues.
Even now if the issue persues, you can reduce the number of line in the General Attributes of the address window to remove the blank space.
Regards,
Anand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi suprith,
say if you are printing the adress in a address window,just create
text elements in the window for each variable that you are printing in the
form(ex:v_name1 and v_name2).Then in the conditions tab of the text element
put a condition v_name1 not equalto initial.similarly for v_name2.
this will print the adress variables only when they have some value.
regards,
srikanth.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
u can use table it will adjust automatically ...
regards,
prashanti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.