Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to display 'Original', 'Duplicate' , 'Triplicate' in Billing Document .

Former Member
0 Kudos
108

Hey All,

I am Abaper, I have a requirement to display original, duplicate, and triplicate text in billing document i.e. invoice. But the client requirement is to:

  1. When first time invoice is generated, text should be displayed has 'Original' in invoice.
  2. When second time I try to print same invoice the system should display a message that 'Original invoice has been generated for this billing document', and system should generate invoice with text 'duplicate' in voice.
  3. When third time I try to print same invoice the system should display a message that 'Original and duplicate invoice has been generated for this billing document', and system should generate invoice with text 'triplicate'. in invoice.

Note: Client also want to keep track on billing documents generated i.e. limit is '3' so that no billing document should be generated more then 3 time and if user try to do so error should be displayed.

I tried coding the requirement but fail to do so, each time I take print out of the invoice system is displaying original text. pl's help me code this requirement. If some one want to assist me accomplishing this task they can mail me.

Thanks and Regards

Faiz Khan

Moderator message: please do not post duplicates.

Message was edited by: Thomas Zloch

1 REPLY 1

koolspy_ultimate
Active Contributor
0 Kudos
33

Hi in your loop befor appind values to diplsy in output.

use this logic.

loop at it_form.        """"""your internal table with final values

move-corresponding it_form to wa_final. " passing into table for output

     do n times.
       if n = 3.
         flag = flag + 1.
       endif.

       if flag = 1.
         v_desc  = 'ORIGINAL-BUYERS COPY' .
         v_desc1 = 'NOT VALID FOR INPUT TAX CREDIT' .
       elseif flag = 2.
         v_desc = 'DUPLICATE-TRANSPORTERS COPY'.
         v_desc1 = 'NOT VALID FOR INPUT TAX CREDIT' .
       elseif flag = 3.
         v_desc = 'TRIPLICATE-SELLERS COPY' .
         v_desc1 = 'NOT VALID FOR INPUT TAX CREDIT' .
       endif.

       wa_final-zdesc  = v_desc.
       wa_final-zdesc1 = v_desc1.
       append wa_final to it_final.          """""""""use this it_final to print your doc's as Original, Duplicate & Triplicate
     enddo.
     clear: wa_final, wa_out.
   endloop.

Regards,

Madhumahesh