Wednesday, August 30, 2006

SAP R/3 : Benefit - Dental File

In a recent week of work, a program was required to extract employee data into a third party system. The very main requirement was to extract and process employees data into 4 record types.

The first record is known as the 10 record type. This first record types holds the eligibility of employee for dental. The second record is known as the 20 record type. This holds the address of the employee. The third record is known as the 30 record type. This indicates whether the employee is either terminated or still active. However, this 30 record type will not be generated if the employee is still active. The last record is known as the 40 record type. This will list out all the valid dependents belonging to the employee. Dependents can be his wife, children or relatives.

A specification was made out by the functional consultants detailing the relevant fields. The first record type are obtained via "GET PERNR". The second record type is obtain from infotype Addresses. The third from infotypes Action (0000) and the last will be the infotype COBRA Health Plan and Health Plan (0211, 0212 and 0167). Then the list of valid dependents from infotype Dependents (0106).

Though the program is fairly easy now but it was quite tedious because the program need to determine when a dependent was drop or added when user selects a range of date for reporting. That was arduous as I need to make the program smart. Dropping meaning the employees drop one of its dependent from his or hers Health Plan or COBRA Health Plan. Adding meaning employees adding one of its dependent into his or hers current Health Plan or COBRA Health Plan. Regardless of it, i took about 4 days to complete it and another 6 days for maintenance in order to improve the accuracy of the reporting.

is sky the limit... benefit dental file extraction

Thursday, July 27, 2006

SAP R/3 : Field Exit from Vijayendra Rao

I was searching the SDN forum on field exit for my latest attempt to modify SAP standard screen fields and I found one contribution from Vijay answering a question put forth by another ABAPer.

I find it is worth saving it up for later use so here is the particulars,

OSS NOTES: 29377

Vijay's explained that,

Field exits are frozen on the 4.6C maintenance level and are not further developed. This means that the existing functionality is kept with all restrictions (see also the last item below). Existing exits can be further used and are called at runtime as usual.Existing exits can be maintained using program RSMODPRF (run theprogram using transaction SE38).

more here

is sky the limit... field exit...

SAP R/3 : BADI HRPAD00INFY for PA40 – Org. Key (VDSK1)

It was quite tedious when the requirement was slated to concatenate Personal Area (WERKS) and Cost Center (KOSTL) to be come an Organizational Key (VDSK1). I make one mistake in this issue while performing scoping. I was not careful enough when activating a BADI (Business Add-Ins).


In this issue, I have tried a different user exit that is made available by the main program in PA40 and include a question put forth to SDN forum.

There is one incident during my submission to ABAP Forum, a certain ABAPer told me that this (HRPAD00INFY) would not be call but just HRPAD00MGEACTIVATE. He was quite persistent on that matter that HRPAD00INFY would not be called up by PA40. So I had proof him wrong. Anyway, there is not much to argue in sdn.sap.com/forum on this issue as I have marked it as “Solve It On My Own”. Not to say that I underestimate him but one should get their facts right before one confidently point out to others.

-wilstroth, sdn.sap.com/forum/abap development-


Back to the lead, the concatenation was made possible in PA40 with the use of HRPAD00INFTY with one method called After Input. (please refer to 27 July's Correction below) This method will be called when the user have made the necessary changes to the employee position. At this point, the ABAPer will need a little ingenuity in being creativity. In order to make the concatenation a success in this method, the method should update the PA0001 (Org. Assignment) transparent table. Of course, you will need to ensure that is just update once and correctly. As you see, the BADI is not being called once but twice. Therefore, the consultant will need a certain mechanism to prevent twice updating the table.

Finally, I have solve this problem. I found that searching for a BADI is not that difficult at all. A little pinch of patience and a little pinch of time is all you need in order to look for a suitable one. Not to mention a little pinch of carefulness in the work done.
27 July 2006, Correction:
Actually, the method that should solve the problem is "Before Output" in HRPAD00INFY

Is sky the limit… who says HRPAD00INFY cannot work for PA40?!

Friday, July 21, 2006

SAP R/3 : Data Archiving / ArchiveLink® - Part 1

Just this week, I was requested to do a research on using Data Archive and ArchiveLink®. A project was being carried out on this two topic alone. A certain client from US wanted to archive their SAP system’s data.

Both of these feature is the fundamental archiving components in SAP. Data archive allows the writing and storing of collected data from master data into an archive object ready for archiving into a storage medium. On the latter, ArchiveLink® allows the storing of an archive object stored into an external optical storage medium. Not only it acts as a storage device but it enables scanning and storing, retrieval and digitizing of documentation.

These two basic components, as of from 4.6c above, that is the SAP version, these two grouped together as one function in SARA. SARA or SAP Archive Administration includes the above feature from writing, deletion to retrieval. This include management of data tables for archive, information system on archiving process, schedule and job logs related to archiving. Apart from that, SARA include another archive component known as SARI, SAP Archive Information System.

SARI allows a much greater and flexible retrieval of archived objects for later use. In SARI, one of the components are archive explorer which works like any windows explorer displaying archived objects. These archived objects can be visually display out.

In summary, archiving comprises:

1. Basic archiving tool:
- Data Archiving
- ArchiveLink®
2. Support tools that encapsulate above basic tool:
- SARA (SAP Archiving Administration)
- SARI (SAP Archive Information System)

Is sky the limit… SARA wears SARI!...

Thursday, July 20, 2006

SAP R/3 : Jiving and Raving... still alive and kicking!

Yup, i know it has been a two months long of absence from this technical blog whilst i still update my main blog. It has been a experiencing two months for me on my work.

Apart from trying to get more active in ABAP work itself, i have been involve in CMMI certification which have push my technical work to one side. Also fearing of leaving my team alone to their own things. As you know, that i am also assisting in the scoping of ABAP work; many things had happened. Good it is now that i am no longer doing the scoping. It might mean:

1. More work focus on ABAP.

2. More time on my own technical research.

3. CMMI... gosh... no comment!


I will be expecting more of ABAP work coming and some technical updates.

Oh shoot, i had totally forgotten about my whole MiniSAP installation deal. Yup, the two SAP WAS installation CDs and my SQLServer 2000 CD is still sitting on my desk in my study room. I am still figuring out the day i will harrass these CDs with my notebook.

is sky the limit... ABAP, ABAP, ABAP

Thursday, May 18, 2006

SAP R/3 : Transporting Table and its content

Recently, my colleague and me had a conversation on transporting tables and its data content. According to him in SAPFans' forum, transparent table can be transported from DEV to QAS together with its data.


To perform that activity:
1. Go to SE11 and choose a table or your test table.
2. Choose technical / Maintenance tab.
3. Select C as the delivery class. C option will enable you to transport data from DEV to QAS.


There are a few options in the delivery class that you might want to check it out. Click F1 to learn more about it.



is sky the limit... data transport...

Friday, May 05, 2006

SAP R/3 : ZHRI03 on 401K Plan List Download

ZHRI03 is a report that downloads a list of employee who are contributing 401K plan. This file will then be send to AMVESCAP for further processing. In this ZHRI03 program, an HIRDT field was not obtaining the value accurately and the Functional does not know which infotype it was using. Upon investigation, the HIRDT field is a Hire Date and is using infotype 0000. In this infotype, the BEGDA is the value being fed to HIRDT.

"The 401K plan is a retirement plan for employees in US. Similar to us having EPF in Malaysia. For more information on 401K retirement plan please refer to this link: The 401K Help Center"


Another problem was the text file being downloaded was not showing the HIRDT value. Therefore, there were two problems pertaining to ZHRI03 (ZHRI0003).

Solution:

HIRDT value should be from infotype 0041 (Date Specification) using date type Z2 or Z1.

“One portion of the original code was modified and added so that the HIRDT field obtains accurate and correct date value”

The text file that is not displaying the value is modified at the later section in the ZHRI0003. The internal table that is used to pass data to the download function did not have that HIRDT field filled.

“That internal table named I_DOWN was modified so that the HIRDT field is filled accordingly from the I_DETAIL. I_DETAIL internal table holds the process HIRDT value.”

Development took at least 3 hours including testing and debugging. One hour was allocated to do investigation.

Is sky the limit… ZHRI0003

SAP R/3 : Activation Process (Conversion)

In SAP system it is a must that developers perform activation after they are done with their modification or creation of a transparent table (this include performing table maintenance generator and the technical setting). While an active version of a transparent table is a version of a component of the runtime environment access but an inactive version will not reflect any latest update during the runtime event thus the active one will not reflect any changes.

In order to have transparent tables being reflected with the latest modification the activation process is carried out. This will change the inactive version into an active version. Activation process is not only for transparent tables but to any table types.

During the activation process, there are seven steps that the SAP system has behind it. This is not shown to the ABAPers nor the Functional. The process is automated and it will only show if it’s successful or have problems. Problems will be display and errors described in a report.

Condition:
Table X is enhance with a new field. Thus, we have one Active version Table X and one Revised version Table X. Revised version Table X will have the new field. Active version Table X is the old version. Now the activation process will activate Table X to have the latest changes. So below is the seven steps leading to the new Table X.

Step 1 : Set Lock

Active version Table X is locked against further structural changes.

Step 2 : Rename Table
Active version Table X is renamed as QCMTAB.
All indexes in QCMTAB is deleted.

Step 3 : Activating Tables
Revised version Table X is then activated as Active version Table X.
Active version Table X is now created in the database as QCM8TAB.

Step 4 : Reload Data

Data is then copied from QCMTAB to QCM8TAB.

Step 5 : Delete the QCM Table

QCMTAB is no longer required then it is deleted.

Step 6 : Rename Table and Create Secondary Indexes
QCM8TAB is renamed back to Table X.
Secondary indexes are defined back into Table X.

Step 7 : Remove the Lock
Table X is unlock and ready to use with new features.
Is sky the limit… Seven Activation Steps

Monday, April 24, 2006

SAP R/3 : Transporting FG and FM

inLately, we had a problem transporting a function module into the QAS. The error kept on returning an 8 describing it is missing one function module. We confirm the missing file not included in the se10.


We did another transport. First the function group then only the function modules.


Still the result was negative.


Then again we decided to go into se10 and looked at the transport particulars. This time we force the particular always missing function module into the list of function module to be transported and re-transport it again.


This time, the result was positive.


From my point of view, it might be that function module was automatically generated but that particular missing one does not have a source code included to it and thereby the transport does not include it. It makes sense also with the first include it has source code and it was listed in the transport number.


For that part, i will need to analyze more on that part.



is sky the limit... transports

Thursday, April 13, 2006

P2 Notebook on XP

I will be resuming my MiniSAP installation later. I had just got rid off the virus from notebook that have been closing my antivirus program and duplicating each folder as application in the system.
Though you can put the system in safe mode, install a Registry Cleaner, update your Antivirus software and restore your Windows system files but I chose to reformat the whole drive and install another Windows. I am now using Windows XP SP2.

Later i will put in an SQL Server 2000, Microsoft Visual Studio 6.0 and Microsoft Visual Studio .NET 2003 for the sake of my projects.

My notebook is slow and it took me 4 hours long to install that damn XP. Yes, its about time to get a new desktop for greater speed and performance. However, this notebook has been my good companion for the last four years and it had survived many projects and including one latest virus threat.

Thanks to COM who sold me this second hand HP notebook. Otherwise, my days will be very much lonely.

MiniSAP installation will continue in a few days time.


is sky the limit... P2 on XP

Monday, April 10, 2006

Progress on Programming - DELAY

Hi readers,

There will not be updates on MiniSAP Installation until i get a new desktop or my notebook fix.

Sorry for the inconvenience.

Thanks
William Wilstroth
ISTL Technical


is sky the limit... when your notebook is broken

Friday, March 31, 2006

SAP R/3 : MiniSAP & MySQL - Part 1

Today i got hold of a MiniSAP. It will be a great moment tonight. I shall be at my notebook and looking at the screen to figure out ABAP. Moreover, i also had just download a MySQL installer.

More will be reveal after tonight or this weekend.


is sky the limit... MiniSAP & MySQL

SAP R/3 : ZHRI0008 & SM69 - Part 2

ZHRI0008's logic was change as a result of inaccurate report. Its result was compare against PT_QTA10 (Leave Balance Display). PT_QTA10 is a standard SAP ALV report. Calculation on the entitlement, taken, compensation and balance was not accurate. Therefore, it was suggested that the report would only take values from infotype 2006.

So I was back to the drawing board. Considering the fact i have to go through PT_QTA10 to understand its logic behind. It took me half a day to figure that out. This program uses a call function "HR_GET_QUOTA_DATA". This function will take out all the necessary leaves for an employee. It saves time.

However, on one hand, ZHRI0008 logic was already well written just that it is taking infotypes 2001, 2006 and 0416. The new design will eliminate process on 2001 and 0416. So this would my life much easier by focusing on 2006.

Details:
Infotype 2006, is an Absence Quota Time Record from HR module. It stores all the accumulated taken leaves, entitled leaves and also the compensated leaves for employee.

So the new program will be focusing on the three fields, ANZHL and KVERB. KTEXT is the balance equal ANZHL deducting KVERB.

As usual, the whole other interface and KRONOS OS Command remains the same. Only the logic for leaves calculation changes.
In summary:
1. ZHRI0008_ON_IT2006 was created
2. ZHRI08_IT06 transaction code was created
3. Two new include files were copied to distinguish the new and the old files.
4. Infotypes 2001 and 0416 were taken out.
5. Vacation and Sick calculation deleted.
6. Put in a new calculation based infotype 2006 only.


At the end of the day it took me 14 hours to investigate, implement and testing. So far it has been send for testing. For previous amendments, please click here for more of it.


is sky the limit... changing logic...

Wednesday, March 08, 2006

SAP R/3 : ZHRI0008 & SM69 - Part 1

ZHRI0008 was quite a lengthy issue with a lot of in and out of emails between consultants. However, the issue was solve at end. It had cost me a lot of time and many misunderstanding in the emails.

ZHRI0008 is an ABAP program to interface with a third party software known as KRONOS. During the process, ZHRI08 or ZHRI0008 will determine whether files that is being used comes from the frontend or from the UNIX. Either two of this media storage type, the program will process the data by updating the latest leave (sick and vacation) by obtaining relevant row of records from infotype 2001 and 2006.

After all this process finish, the result is save to a file known as EMPBAL.TXT

This file is then use to interface with KRONOS. ZHRI08 will execute SXPG_COMMAND_EXECUTE to run a UNIX command so KRONOS will be able to use the EMPBAL file. This UNIX command being executed can be found in SM69 and SM49. SM69 is where ABAPer can create and make modifications to OS commands. While the latter displays job logs pertaining to OS Commands.

SM69 - External OS Command
SM49 - Job Logs External OS Command

Problem:
1. Balance were incorrect calculated and sent to EMPBAL.
2. KRONOS were not correctly interface in QAS system.

Solution:
1. I corrected the SELECT statement that finds records in IT2001 and IT2006
2. Reconfigure ZQUOTAS in SM69 ensuring that its OS command only runs back in its own system.

Edited - 31-03-2006
This program was later found not so accurate and the logic was changed. Please click here for more of it.



is sky the limit... SAP R/3

SAP R/3 : ALV Page Break

It has been weeks and.. probably months having many attempts to solve the page break in an ALV report. We had tried using REUSE_ALV_GRID_DISPLAY_LVC and returning to use REUSE_ALV_GRID_DISPLAY but both still couldn't force...

more


is sky the limit... SAP R/3

SAP R/3 : Converting EXCEL into Internal Table

Recently, i got an email requesting that how would one convert an EXCEL format report into SAP file system (internal table). Normally, ABAPer can use WS_UPLOAD to upload that file from EXCEL provided...

more


is sky the limit... SAP R/3

SAP R/3 : CJI3 (SAPLKAEP + PS05)...

This modification of SAP standard is none other than the good ALV reporting program. Readers who are non SAP user would want to know that ALV stands for ABAP List Viewer. However, non SAP user would also want to know that ABAP stands for Advance Business Application Program...

more


is sky the limit... SAP R/3

SAP R/3 : Combining Two Transparent Table... SE11

This problem had been left unsolved for almost two months. Now i am able to solve it.
Thanks Mr. Jackie Lee Seng Yong who had also help to solve this problem and Mr Yip Wai Yen who suggested this creative idea.
The problem or client requested was to able maintain two transparent table when they do transaction. After solving this problem, we have now two type of solutions to it. The first is to use coding to update both tables...

more


is sky the limit... SAP R/3

VS NET : Game Development(GD) Experience...

I have been meddling with developing games (GD) for the past two years. From a simple two player English chess, a few tic tac toes and a maze game to an online game. But recently, i had not been able to continue with an online game. I can't say i am the expert... but just a beginner...

more


is sky the limit... Game Development

VS NET : In 5 hours... i make a simple chat messenger...

SAP Problem.

A month of rumble in ME51N, still not going anywhere, Purchase Requisition... there must be something that i must have not done. Which part, where and how am i going to get myself out of this terrible problem. Nevertheless, lets not focus on this part yet. When i found the solution...

more


is sky the limit... SAP R/3