Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

SMARTFORMS using BIDIRECTIONAL LANGUAGES

$
0
0

Requirement: We have a current requirement where we need to print both ENGLISH and ARABIC texts and numerals in the same output form for Purchase Orders, Sales Orders, and Invoices etc.

 

Issue Faced:The smart forms while getting printed either shows the Arabic texts in jumbled format (when the print parameter passed is ‘EN’) or it shows all the numerals in Arabic (when the print parameter passed is ‘AR’).

 

Solution: We need to have the following things in place for printing bidirectional language texts (both fixed and dynamic) [in our case the languages being English – Left to Right (LTR) and Arabic – Right to Left (RTL)] in the same form printout:

 

  1. Create the form in Arabic language.

1st.png

 

b. Create all the windows as mirror image of what is the actual output (for example you want a window to appear in the form output to the left topmost      corner – so define it at the right topmost corner and vice versa.)

     2nd.png

     Here the page window is defined at the left lowermost part so that the page numberis printed at the rightmost lower corner.

     3rd.png

c.     Pass the control print parameter language as ‘A’.

 

 

4th.png

d.     Declare all numerals which you want to get displayed in English as dynamic texts.

       Before the declaration as dynamic text the output is as follows:

5th.png

     If you have a look at the left hand window, we see that the text is coming in English but the numerals are in Arabic.

    After using dynamic text the numerals are now coming in English:

6th.png

 

    So now we need to know, how to go ahead with using dynamic texts in Smart Forms:

    Let us take an example where we print the page number as

    Page <Page number> of <Total Page Count>.

    Step 1: Declare a variable of type TSFTEXT.

7th.png

    Step 2: Declare a window for the Page number:

8th.png

There is a text defined and a code piece.

  Step3: Text is defined as follows:

9th.png

Step4: The code part is used to populate FNAME:

10th.png

 

Now the page number is displayed as follows:

11th.png


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>