cancel
Showing results for 
Search instead for 
Did you mean: 

sold-to-party and ship-to-party address printing

Former Member
0 Kudos

Hi experts,

I have one problem i am printing the Consignee address in smartforms,

if kunnr and kunag are equal then print the sold to party address. otherwise print ship to party address.

How will manage this.please give me suggestion.

Tables involved

"1).VBRP-VGBEL TAKE VGBEL

2). INSERT LIKP-VBELN CHECK KUNNR & KUNAG

3). KNA1-KUNNR OR KUNAG TAKE ADRNR

4) INSERT ADRC-ADDRNUMBER TAKE NAME1, CITY1, CITY2, POST_CODE1, STREET, HOUSE_NUM1"

Thanks in Advance,

Regards,

Prabharam

Edited by: prabhashram on Aug 20, 2010 8:26 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

raymond_giuseppi
Active Contributor
0 Kudos

Put two nodes in the form

- A code node which select from KNA1 with key kunnr or kunag the address number KNA1-ADDR into a global variable of the form, eg WA_ADDR (5 statements should be sufficient) /or/ put the coding in the calling program and fill a parameter with this address number.

- An address node with the variable &WA_ADDR& ([Inserting Addresses|http://help.sap.com/saphelp_crm50/helpdata/en/d2/69a151cd8b11d3b563006094192fe3/frameset.htm])

Regards,

Raymond

Former Member
0 Kudos

Hi,

Please give me clarity..

Former Member
0 Kudos

Create two nodes .

declare global variables - ADRNR_KUNNR AND ADRNR_KUNAG

if KUNNR = KUNAG.

adrnr_kunnr = ADRNR of kunnr

else.

adrnr_kunag = ADRNR of kunag.

endif.

on the first node-> conditions ( ADRNR_KUNNR NE SPACE)

*..WRITE CODE TO GET THE ADDRESS DETAILS FROM ADRNR_KUNNR

on the SECOND node-> conditions ( ADRNR_KUNAG NE SPACE)

*..WRITE CODE TO GET THE ADDRESS DETAILS FROM ADRNR_KUNAG

Former Member
0 Kudos

hi,

Is the printing driver coded by you or a SAP standard ones? And what tcode do you print form?

thanks,

Former Member
0 Kudos

Hi,

I am using print program ........and Using Custom TCode