Skip to Content
Author's profile photo K Jogeswara Rao

Innovative use of Graphics in Smartforms – 2 Ideas

Introduction

It has been experienced consistently, while working in SAP, that the end user often needs to explore/experiment to cater his local needs, which are not addressed in standard system. While doing that sometimes, some creative ideas are born. The author would like to share 2 such Ideas with the members.

Into the Document

Let’s first see the screens of End Result out of these Ideas, so that, the readers can assess the relevance and usefulness for them, before going through the entire document.


End Result of Idea1

To print Page Headers and Column Headers of the form in Regional language.

In this example, a Regional Language Hindi font is taken as example. Same will be applicable to any other language.

……..And the screen is:

/wp-content/uploads/2013/11/11_323680.jpg

End Result of Idea2

To have time-line graphics printed against line items such as scheduled jobs during repairs etc.  This will be valid for any such applications where Start Date and End Date are involved .

.…And the screen is:

/wp-content/uploads/2013/11/2_323657.jpg

Let us now see how to go about it?

The similarity in both the ideas dealt here is that, both use tiny graphics uploaded to system through Transaction code SE78.

(I am not going into the SE78 graphic uploading procedure, as it is a basic thing and has been already available in other documents in the forum)

———————————————————————————————————————————————————————-

Idea1:


Objective:

To print Page Headers and Table Column Headers of the form  in Regional Languages where SAP Language support is not there.

Pre-requisite:

You should be able o punch your translated words in the Regional Language you prefer into a MS-Word document.
For this sometimes, Regional language font (in this case Hindi) needs to be installed in the PC. (We can download  regional fonts from net like Indic IME 1 fonts etc. and install in our OS). After installing, the font options can be selected through Language bar (or Atl + Shift key),

(Active language is shown near the right bottom of the Windows OS taskbar like this.)

/wp-content/uploads/2013/11/3_323658.jpg

Now,  I punch my translated words (sometime Bi-lingual) in a MS Word document  like below.

/wp-content/uploads/2013/11/4_323659.jpg

NOTE:

After many trials I’ve settled at the Font Sizes below.

For  Page Header (medium sized)  it is 48

       Page Header (large sized)  it is 60

and for  Column Headers it is 36

(As I have selected suitable font size above, there is no need for mention of picture resolution here.)

Now I use Windows snipping tool

/wp-content/uploads/2013/11/5_323666.jpg

to  cut these into individual small graphics. (One or two for Page Header, As many required for Column Headers etc)

Like:

Example for Page Header graphic (Font Size 48)

/wp-content/uploads/2013/11/6_323667.jpg

Example for Column Header graphic (Font size 36)

/wp-content/uploads/2013/11/7_323668.jpg

Or

Example for Bi-lingual Column Header graphic (Font size 36)

/wp-content/uploads/2013/11/8_323669.jpg

Note: These Graphics are required to be with BMP extension.

          Also take care that snipping to be done close to fonts (not giving margins)


Then, I upload all these Graphics through Tcode SE78 and use them in Smartforms.

Now, let’s see the screens inside Smartform, how these graphics are used.

Page Header

/wp-content/uploads/2013/11/9_323670.jpg

Column Header

(Notice here that,  under the Table-line Cells, instead of Text, we have used Graphics.

/wp-content/uploads/2013/11/10_323893.jpg

Important:

I have used, 300dpi resolution option in smartform graphic screens (see below), for all the graphics used in this section.

Capture.JPG

This technique can be used in a similar way, to get your forms bi-lingual and connect the users with their local language to some extent .

So our end-product here is:

/wp-content/uploads/2013/11/11_323680.jpg

(It may please be noted that, we are talking about the Headers only, not the data inside the internal tables)

———————————————————————————————————————————————————————-

Let’s move now to

Idea2:


Objective is to have Graphical printing of Time-line chart, by using different colors for different job executing agencies, in SAP objects like Repair Work Orders.

As we have already discussed, this idea is relevant where you have duration fields like Start Date and End Dates in your internal table.

Pre-requisites

1. Tiny graphics of resolution 23 X 16 pixels (0.58 X 0.41 cm) as many colors as you need to be uploaded through SE78.

For example here:

I want to print the time-line with different colors for different job executing agency (ITAB-ARBPL). I have 3 such categories. So I have created 3 graphics of above resolution with 3 different colors.


/wp-content/uploads/2013/11/12_323699.jpg

2. Repair Start date and Duration of Repairs (Days) are the inputs through Selection screen.

Now let’s discuss things inside the smartform.

1. Design the table for time-line.

This can be done by defining cells with narrowest width, and nos. equal to duration days (higher side).

e.g., A Repair of maximum possible duration with 9 days can be provided 10 or 11 time-line cells.

Remember, the first time-line cell represents the Day1 of the Duration, next one, the  Day2 and so on.

/wp-content/uploads/2013/11/13_323700.jpg

2. In each time-line cell, you need to maintain  program lines to give code, which decides whether this cell is included in the time-line comparing to the start/end dates of the Job in this line item.

Example:

Repair Start date:   29.09.2013    and   Duration :  9 Days.

Job (Line item ) Start Date :  30.09.2013   and   End Date: 04.10.2013.

Then, for this particular job, the code in the program lines stores value ‘X’ into a variable for 2nd, 3rd, 4th, 5th and 6th time-line cells and no value for the other cells. 

(The code in the picture below is illustrative only. Relevant codes to be written as per the variables used)

/wp-content/uploads/2013/11/14_323711.jpg

If  a particular time-line cell is with value ‘X’  above, then this code identifies the graphic to be displayed in the cell depending upon the value of the executing agency (ITAB-ARBPL).

You can see here in the picture below that we have provided all 3 graphics (one  for each color) under each cell, so that the program lines code and the lines given in the Condition tab will choose which colored graphic is to be displayed in this cell.

(Again the conditions shown here are just illustrative only)

/wp-content/uploads/2013/11/15_323712.jpg

Important:

I have used,  0 dpi resolution option in smartform graphic screens (see below), for the time-line graphics (23×16 pixels) used in this section.

Capture1.JPG

So we have arrived at the end of the task, to get an output like:


/wp-content/uploads/2013/11/16_323713.jpg

———————————————————————————————————————————————————————-

2nd Idea above looks a bit complex because of the code and conditions involved. The focus of this document is about the use of tiny graphics in smartforms. The coding requirements involved in this, are simple and can be easily understood by members using the program-lines in the forms.

At the end,

Anticipating this documentation will be useful for members in two ways:

1. To be used as it is discussed above

2. In triggering some more and improved ideas in their minds.

Thank you

KJogeswaraRao

———————————————————————————————————————————————————————-

May like to read SAP and Creativity

Assigned Tags

      30 Comments
      Comments are closed.
      Author's profile photo Former Member
      Former Member

      Useful document,thanks for sharing.

      Thanks

      Sukant Chakraborthy

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      Thank you Sukant !

      Author's profile photo zafar karnalkar
      zafar karnalkar

      Nice Document...

      Regards,

      Zafar

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      Thank you Zafar!

      Regards

      Jogeswara Rao K

      Author's profile photo Thangam Perumal
      Thangam Perumal

      Really helpful and innovative......

      Regards,

                Thangam.P

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      Thank you Thangam,

      Regards

      Jogeswara Rao K

      Author's profile photo Dinesh K
      Dinesh K

      Hi jogeswara Rao,

          

                Very Good document and nice idea too.Thanks for sharing.

      Regards,

      Dinesh K

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      Hi Dinesh,

      Thank you very much

      Regards

      Jogeswara Rao K

      Author's profile photo Ragini sap
      Ragini sap

      Good job keep it up....

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      Thank you Ragini !

      Author's profile photo Vimal Vidyadharan
      Vimal Vidyadharan

      Very thoughtful of you to make a write up like this one. Many a time most of us forget to document such innovation, as a result someone will always have to re-invent the wheel. Keep more coming!

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      Thank you Vimal, Yes ! That's the very idea of such documentation!

      Author's profile photo Mahadeo Kedari
      Mahadeo Kedari

      hii  Jogeswara Rao Kavala,

      Very Good Document..

      Thanks for Sharing....

      Regards,

      Mahadeo...

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      Thank you Mahadeo 🙂 .

      Author's profile photo Eduardo Hinojosa
      Eduardo Hinojosa

      Very useful, Thanks for sharing.

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      Thank you Eduardo !

      Author's profile photo Ravindra Ch
      Ravindra Ch

      HI jogeswara Rao,

      Very good Document you shared.

      Thanks a lot..

      Ravindra

      Author's profile photo Ravi Prakash
      Ravi Prakash

      Thank you Sir

      Very clear and good approach for understanding & implementing.

      Author's profile photo Mahi vangeti
      Mahi vangeti

      Hi Jogeshwar,

       

                                  Reallly its very helpful document.

      Thanks for sharing.

      Mahipal.

      Author's profile photo Naveen Vishal
      Naveen Vishal

      Quite Innovative. 🙂

      Author's profile photo Former Member
      Former Member

      This is really an Innovative solution, I will try n use this solution in my next project.

      Thanks

      Vijay

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      🙂

      Author's profile photo Monika Patel
      Monika Patel

      Gr8 sharing.

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      🙂

      Author's profile photo Former Member
      Former Member

      Thanks for this nice document and Thanks for Boosting the abap Innovation.

      Regards

      Sam

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      🙂

      Author's profile photo Former Member
      Former Member

      nice article thanks for sharing.

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      Thank you Vasudevan. 🙂

      Author's profile photo Richard Harper
      Richard Harper

      Hmmm.

      I may be misreading your idea1 post here,  but isn't this the point of using Smartform texts and translation ?  (And if your problem is the mixture of fonts on the smartform have a look as Cascading Fonts in SAP).

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      Actually this is meant for languages where SAP support is not there.

      Comments are closed.