Skip to Content
avatar image
Former Member

SAP Script form Related Query

Hello Everyone,

I am a newbie to SAP Script.I have to find a way to display an alternative payee addrees on the cheque output, if specified in the vendor record rather than the actual vendor's address, Can any one please help me out here,Thanks.At the moment it is just printing the each line of the address as a separate fields from the REGUH table.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 05, 2008 at 09:37 AM

    In REGUH table just go through the fields

    ZANRE

    ZNME1

    ZNME2

    ZNME3

    ZNME4

    ZPSTL

    ZORT1

    ZSTRA

    ZPFAC

    ZLAND

    ZREGI

    (and other fields after that). It will automatically take the alternate payee address and name if you maintain that in vendor master. Other wise it will take same vendor name and address. In your script just print above mentioned fields.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 05, 2008 at 09:01 AM

    Hi,

    After the perform -- endperform check for the condition.

    if <changing parameter value> eq ' '

    display vendor address

    else.

    display alternative address

    endif.

    regards

    padma

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 04, 2008 at 01:41 PM

    Hi,

    Use subroutine in SAPScript to get the Alternate Payee address from LFA1 table. Use LFA1-LIFNR and USING parameter and get LFA1-LNRZA value.

    read this daocuments

    http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm

    Regards

    Bala Krishna

    Add comment
    10|10000 characters needed characters exceeded

    • Hi ,

      You need to create a new Subroutine type program, with name which you will be giving in your PERFORM statement.

      For that you write the PERFORM statement in IF and ENDIF statement.

      Ex:-

      /: IF &REGUH-LIFNR& EQ ' '.

      /: PERFORM ....

      code

      /:ENDPERFORM

      address fields of Alternate Payee

      /: ENDIF

      Regards

      Bala Krishna

      Edited by: Bala Krishna on Sep 5, 2008 1:23 PM

  • avatar image
    Former Member
    Sep 05, 2008 at 09:37 AM

    The suggestions have been help to progress sooner than I expected,Thanks a lot

    Add comment
    10|10000 characters needed characters exceeded