Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
jogeswararao_kavala
Active Contributor

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:

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:

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.)

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

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

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)

Example for Column Header graphic (Font size 36)

Or

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

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

Column Header

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

Important:

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

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:

(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.


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.

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)

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)

Important:

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

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


----------------------------------------------------------------------------------------------------------------------------------------------------------------------

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

30 Comments
Labels in this area