Application Development and Automation 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: 
Read only

SAP Script Standard Text Issue

Former Member
0 Likes
535

Dear Experts,

Can anyone give some suggestion in this

i have 4 windows in a SAP Scripts in footer window i want to print text based on condition

Add text field containing the VAT directive based on the following conditions

A0 Debit VAT Exempt according to art.44 of BE VAT Code
A0 Credit or VAT Exempt according to Art.135 Directive 2006/112/EC
A4 Debit VAT due by the Co-contracting party according to Art.51$2,5 ,of BE VAT Code
A4 Credit or VAT Due by the customer according to Art.194 of Directive 2006/112/EC



Eg:
for a debit posting with Tax code A0 insert text "VAT Exempt according to art.44 of BE VAT Code"

i want this type of output for this in which way i need to approach

Thanks

Surendra

2 REPLIES 2
Read only

GauthamV
Active Contributor
0 Likes
382

You can put condition in your footer window something like this.



Example:

IF &T001-BUKRS& = '01'.
INCLUDE &T001G-TXTFU& OBJECT TEXT ID ADRS LANGUAGE E.
ELSEIF &T001-BUKRS& = '02'.
INCLUDE ZTEXT OBJECT TEXT ID ADRS LANGUAGE E.
ELSEIF &T001-BUKRS& = '03'.
INCLUDE ZTEXT2 OBJECT TEXT ID ADRS LANGUAGE E.
ENDIF.

Read only

Former Member
0 Likes
382

Hi Surendra,

Maintain these 4 texts in 4 separate standard texts in SO10 i.e. ztext1, ztext2, ztext3, ztext4. Put the tax code and debit or credit in 2 variables i.e. var1 & var2. In your SAPscript check the contents of these two variables and call the standard text accordingly.


/:  if &var1& = 'A0' and &var2& = 'DEBIT'.
*  Call the standtext ztext1
/:  endif.
/:  if &var1& = 'A0' and &var2& = 'CREDIT'.
*  Call the standtext ztext2
/:  endif.
/:  if &var1& = 'A4' and &var2& = 'DEBIT'.
*  Call the standtext ztext3
/:  endif.
/:  if &var1& = 'A4' and &var2& = 'CREDIT'.
*  Call the standtext ztext4
/:  endif.

Also no need to create 4 seperate windows.

Regards

Dillip