Skip to Content
Author's profile photo Former Member

SMARTFORMS using BIDIRECTIONAL LANGUAGES

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.

/wp-content/uploads/2014/03/1st_406703.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.)

     /wp-content/uploads/2014/03/2nd_406704.png

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

     /wp-content/uploads/2014/03/3rd_406705.png

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

/wp-content/uploads/2014/03/4th_406712.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:

/wp-content/uploads/2014/03/5th_406713.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:

/wp-content/uploads/2014/03/6th_406714.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.

/wp-content/uploads/2014/03/7th_406718.png

    Step 2: Declare a window for the Page number:

/wp-content/uploads/2014/03/8th_406719.png

There is a text defined and a code piece.

  Step3: Text is defined as follows:

/wp-content/uploads/2014/03/9th_406720.png

Step4: The code part is used to populate FNAME:

/wp-content/uploads/2014/03/10th_406728.png

Now the page number is displayed as follows:

/wp-content/uploads/2014/03/11th_406729.png

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Abdul Hameed Hussain
      Abdul Hameed Hussain

      Hi Barik,

           I was looking for the solution for this problem,but couldn't find any until this wonderful document.It's really helped me.Thank you .

      Regards,

      Abdul Hameed Hussain

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Its great that the document helped you.. đŸ™‚

      Author's profile photo Nooruddin Bohra
      Nooruddin Bohra

      Hi Argha,


      Thanks for the post.

      I am having a problem that if I am printing a line that starts with number or special character then it gets printed on right instead of left.  Also the special characters on last are getting printed on first place.


      I have written 1. Text 1 and so on.. But it is printing Text 1 .1

      Similarly page 1 of 1. is printed as .page 1 of 1

      Capture2.PNG


      It will be great if you can help me with this.


      Regards,

      Nooruddin Bohra

      Author's profile photo Sri Hari Anand Kumar
      Sri Hari Anand Kumar

       

      Did you got solution for this above issue ?

      Author's profile photo Richard Harper
      Richard Harper

      Anybody thoght about  Cascading Fonts ?

      https://wiki.scn.sap.com/wiki/display/ABAP/Unicode+Printing+Solutions+for+SAP