cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in SCRIPT- pritning all Tax values at last after all materials.

Former Member
0 Kudos

hi all

i have a requirement, in scripts i modified standard invoice as per client reqirements. in that generally tax values are print after every material, my requirement is after all materials all tax values should be print. for this i written one subroutine but i am getting last loop value at output. is there any way to keep loop in script?? if anybody know please help me...

thank u.

krishna.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

closed for further post.

Former Member
0 Kudos

Hi,

U can call a PERFORM in script and define the FORM in a custom program...

eg:

In script:

PERFORM tax_value in program ztax_value

TABLES &itab&.

In Program ztax_value:

FORM tax_value in_tab structure itcsy

out_tab structure itcsy.

ENDFORM..

Hope it helps

Regards,

Pavan

Former Member
0 Kudos

hi vishnu

i already written subroutine, but while printing i am getting last value only. problem is how to keep loop in script.

thanks.

krishna.

Former Member
0 Kudos

Hi,

U should call the WRITE_FORM FM in the LOOP then only it iwll print all the values in the table..

eg:

LOOP AT it_tax.

call function 'WRITE_FORM'

exporting

element = tax_value

exceptions

.

ENDLOOP.

now, u call the ELEMENT 'TAX_VALUE' in script..so for each value in internal table it_tax it calls the element 'TAX_VALUE' in script and displays the value whatever we prints in it.

Hope its clear!

Rgds,

Pavan

Former Member
0 Kudos

Hi,

It is better to collect all the tax values into one internal table at the time of getting material values and display them in another secondary window by looping it. At this time Subroutine concept will not working here. Collect all the Tax values in Driver program it self.