Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 20, 2010 at 06:55 AM

    hi,

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

    thanks,

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 20, 2010 at 06:57 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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