Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Smartform :Address Window

Former Member
0 Likes
1,060

HI All,

I am working on a smartform, where in i have to print the address of a business partner.

I have used the address window to that, and i am passing the addrnumber, to it. The address gets printed, but without phone number and fax number fro ADRC table.

How to get the phone number and fax number.

How to do that.....???

All answers will be rewarded.

1 ACCEPTED SOLUTION
Read only

olivier_segol
Active Participant
0 Likes
831

Hello Runal,

You should have a look at BAS:

http://help.sap.com/saphelp_nw70/helpdata/EN/18/c042e1da4811d3b571006094192fe3/frameset.htm

Perhaps there is an option somewherein BAS, but as far as I remimber I always add tel number as text node under the adress node in my SF.

Hope it helps

Olivier

6 REPLIES 6
Read only

olivier_segol
Active Participant
0 Likes
832

Hello Runal,

You should have a look at BAS:

http://help.sap.com/saphelp_nw70/helpdata/EN/18/c042e1da4811d3b571006094192fe3/frameset.htm

Perhaps there is an option somewherein BAS, but as far as I remimber I always add tel number as text node under the adress node in my SF.

Hope it helps

Olivier

Read only

0 Likes
831

hi oliver,

thanks for the reply.

I tried doing that, but a huge gap appears between the address window and the new window which i create for printing tel number.

I tried adjustingit, but then this solutions just doesnt work.

Thanks for the link, seems really usefull.

Read only

0 Likes
831

Hi,

You will get Phone Number from ADRC and FAx From ADR5.

Regards,

Shiva Kumar

Read only

0 Likes
831

Hi,

Perhaps try this solution:

Create a secondary window, put the address node AND the text node for telephone in this window (you'll have both nodes in the same window).

If you still have gap perhaps it's a problem of space before, space after in your style (check the paragraph style you use).

Olivier

Read only

Former Member
0 Likes
831

Dear runal,

you can use this code in driver program.

i am sending you the code, this is for the vendor

like this u can do for customer also(kunnr).

FORM get_data .

SELECT lifnr

NAME1

ADRNR

FROM lfA1

INTO TABLE it_lfA1.

SORT it_lfA1.

SELECT lifnr

EKORG

FROM lfM1

INTO TABLE it_lfm1

FOR ALL ENTRIES IN IT_LFA1

WHERE LIFNR = IT_LFa1-LIFNR

and EKORG in SALE.

SORT it_lfm1.

SELECT addrnumber

name1

city1

str_suppl1

str_suppl2

street

str_suppl3

post_code1

country

tel_number

fax_number

FROM adRC INTO TABLE it_ADRC

FOR ALL ENTRIES IN IT_LFA1

WHERE ADDRNUMBER = IT_LFA1-ADRNR.

IF sy-subrc <> 0.

MESSAGE 'No Data Available' TYPE 'S'.

ELSE.

SORT it_ADRC BY name1 .

SELECT LAND1

landx

from

t005t into TABLE IT_T005T

FOR ALL ENTRIES IN IT_ADRC

where land1 = IT_adrc-country

and spras = 'EN'.

ENDIF.

ENDFORM. "get_data

rewards are expected.

if any problem pls keep in touch.

vivek srivastava

Read only

Former Member
0 Likes
831

Dear Runal

You can use this code also in your command line

directly in smartforms.

this is an example for the sale order.

hope this will definatly help u out.

select single adrnr from kna1 into v_adrnr where kunnr = v_kunnr.

select single * from adrc into wa_adrc where addrnumber = v_adrnr.

select single landx from t005t into v_landx where land1 = wa_adrc-country

and spras = 'EN'.

rewards are expected.

vivek srivastava