Skip to Content
avatar image
Former Member

Vendor address in RFQ

Hi folks,

i want to print vendor address for RFQ in vendor address window.my question how can i print the vendor data by using address num in script by using std address format..

if iam using the following address format how can link this to script program.

/: IF &EKKO-ADRNR(K)& EQ ' '

/: ADDRESS paragraph as

/:TITLE &lfa1-ANRED&

/: NAME &lfa1-NAME1&, &lfa1-NAME2&, &lfa1-NAME3&, &lfa1-NAME4&

/: STREET &lfa1-STRAS&

/: POBOX &lfa1-PFACH& CODE &lfa1-PSTL2&

/: CITY &lfa1-ORT01&, &lfa1-ORT02&

/: POSTCODE &lfa1-PSTLZ&

/: COUNTRY &lfa1-LAND1&

/: REGION &lfa1-REGIO&

/: FROMCOUNTRY &t001-land1&

/: ENDADDRESS

please help me as soon as possible.

thx,

Neelu

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Jun 24, 2009 at 11:59 AM

    Hi

    Use the below code

    /: ADDRESS paragraph AS

    /: ADDRESSNUMBER &address number&

    /: FROMCOUNTRY &t001-land1&

    /: ENDADDRESS

    here AS is paragraph format for Address printing.

    Regards

    Vijai

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 24, 2009 at 12:16 PM

    Hi,

    Do not use command line

    /:TITLE &lfa1-ANRED&

    /: NAME &lfa1-NAME1&, &lfa1-NAME2&, &lfa1-NAME3&, &lfa1-NAME4&

    /: STREET &lfa1-STRAS&

    Instead use '*' or Paragraph format.

    Regards,

    Ranjitha

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 24, 2009 at 02:30 PM

    Hi,

    Loop on that internal table
    Call WRITE_FORM 
    
    CALL FUNCTION 'WRITE_FORM'
     EXPORTING
       ELEMENT                        = ' What ever you hav given in script'
    *   FUNCTION                       = 'SET'
    *   TYPE                           = 'BODY'
     WINDOW                         = 'Address window
    * IMPORTING
    *   PENDING_LINES                  =
    * EXCEPTIONS
    *   ELEMENT                        = 1
    *   FUNCTION                       = 2
    *   TYPE                           = 3
    *   UNOPENED                       = 4
    *   UNSTARTED                      = 5
    *   WINDOW                         = 6
    *   BAD_PAGEFORMAT_FOR_PRINT       = 7
    *   SPOOL_ERROR                    = 8
    *   OTHERS                         = 9
              .
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    
    endloop

    In SE71 what ever code you have written will work

    Regards,

    Sandhya

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 25, 2009 at 02:35 AM

    Hi,

    It will get linked with the Element name given in the FM WRITE_FORM...

    Eg:

    In program: call the below FM at correct place when u want to print the address..

    Call 'WRITE_FORM'

    element = 'ADDRESS'

    windoe = 'ADDRESS'.

    In Script in ADDRESS window:

    /E ADDRESS ---->Element name given in WRITE_FORM FM

    /: ADDRESS PARAGRAPH AS

    /: NUMBER &lfa1-lifnr&

    /: ENDADDRESS

    Hope it helps!!

    Rgds,

    Pavan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 25, 2009 at 04:28 AM

    Hi,

    Try Like this.

    /: IF &EKKO-ADRNR(K)& EQ ' ' (Here u can give the 10 spaces,because ADRNR length is 10 digits.)

    /: ADDRESS PARAGRAPH AS

    /: TITLE &LFA1-ANRED&

    /: NAME &LFA1-NAME1&, &LFA1-NAME2&, &LFA1-NAME3&, &LFA1-NAME4&

    /: STREET &LFA1-STRAS&

    /: POBOX &LFA1-PFACH& CODE &LFA1-PSTL2&

    /: CITY &LFA1-ORT01&, &LFA1-ORT02&

    /: POSTCODE &LFA1-PSTLZ&

    /: COUNTRY &LFA1-LAND1&

    /: REGION &LFA1-REGIO&

    /: FROMCOUNTRY &T001-LAND1&

    /: ENDADDRESS

    /: ELSE

    /: ADDRESS PARAGRAPH AS

    /: ADDRESSNUMBER &EKKO-ADRNR(K)&

    /: FROMCOUNTRY &T001-LAND1&

    /: ENDADDRESS

    /: ENDIF

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 30, 2009 at 06:29 AM

    answered

    Add comment
    10|10000 characters needed characters exceeded