Skip to Content
author's profile photo
Former Member

Have to add fields to RVINVOICE01 by not changing the driver program


I need a help.I am trying to modify the standard script RVINVOICE01

for invoice generation according to my clients requirement.I copied the form to ZINVOICE AND did not make any changes to the driver program.I had to take the header and footer away as we have a pre printed header and footer available when we print the invoice output in a A4 paper.Now I had to make some changes in the allignment which i was able to do with a lot of struggle as I am new to scripts.The fields which were populating in the main window had most of the fields which my client gave.They are ITEM,MATERIAL,QTY,DESCRIPTION,PRICE AND VALUE.It also displays the BED,ECS,SECND HE,VAT TAXES and the calculations are perfect.The problem is that my client has given me two more fields which i need to populate in tha main window along with the rest,they are called JIT NO AND ASN NO (these fields are added to our tables as per our client req).These fields are added to the table VBRP and their fields are VBRP-JITCALLNO AND VBRP-ASNNO.Now I need to populate this data without changing the driver program.These new fields are related to the other fields which actually populate.Could please help me with a subroutine on how to populate these fields in the main window,where we get the invoice details.Let me know if you have any doubts on this,I will clarify for you.

Best Regards,

Karthik Sp

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Posted on Aug 11, 2007 at 07:14 PM

    Only way to add fields to SApscripts without touching the driver program is to use sub-routines..

    Go through this example


    /: PERFORM <Subroutine name> IN PROGRAM <subroutine prog name>

    /:USING &<field name>&

    /:CHANGING &<field name1&


    Then create subroutine pool program and you have to write the code.

    FORM ><subroutine name> tables int_cond structure itcsy

    outt_cond structure itcsy.

    data : value(20), value1(20). "do your own declarations

    Read int_cond table index 1.

    value = int_cond-value.

    value1 = value1 + value.

    Read outt_cond table index 1.

    outt_cond-value = value1.

    Modify outt_cond index 1.


    Just rough idea given above.



    Add comment
    10|10000 characters needed characters exceeded