Wednesday, May 14, 2008

SAP R/3 : Trailing The Pricing Condition

Last several weeks, an unusual incident occured at the area of pricing condition in which one of the pricing (condition type) is not populating price correctly. Initial coding were done in one of the user exit to recorrect the value. However, the value was not updated as the functional wanted. So I had to follow the trail of Indiana Jones by tracing the standard program. So below is one of the gruesome steps on how the pricing condition was determine during invoice creation (VF01).

Put a break point accordingly to each of the path below:

1. SAPMV60A (Travel Here)
*****>MV60AF0X_XKOMFK_ENDE
**********>RV_INVOICE_CREATE

2. SAPLV60A (Travel Here)
*****>LV60AU01
********>PERFORM FAKTURA_ERZEUGEN

3. SAPLV60A (Travel Here)
*****>LV60AA26
********>PERFORM FAKTURA_LIEFERBEZ0GEN

4. SAPLV60A (Travel Here)
*****>LV60AA22
********>PERFORM FAKTURAPOSI_LIEFERBZ0GEN

5. SAPLV60A (Travel Here)
*****>LV60AA21
********>PRICING_COPY
******>(INITIALLY JIN1 KWERT IS STILL 0.00)<br>
6. SAPLV60A (Travel Here)
*****>LV60AA60
********>PRICING
******>(At this point, JIN1 KWERT WAS REINITIALIZE TO 0.22 -> Which We do not WANT!)<br>
7. SAPLV61A (Travel Here)
*****>LV61AU01
********>PERFORM XKOMV_BEWERTEN
******>(How all 0.22 started)

8. SAPLV61A (Travel Here)
*****>LV61AA55
********>XKOMV_BEWERTEN
******>(91 - LOOP AT XKOMV - WHERE IT ALL HAPPEN!)
******> KSTEU and KMPRG (This is the two brothers that caused it!)


Therefore, we had the good owner to initialize the KSTEU and KMPRG to a certain value so it the value can be remain as the Functional wanted to meet the requirements.

is sky the limit... pricing procedures rocks!

SAP R/3 : User Exits in VF01

Something to help everyone on all the userexits and BADI for transaction code VF01. VF01 is to create invoice. Below are the list of all userexits and some BADI invoke (maybe). In which of late, i had a headache to check out why VF01 had problem in creating invoice successfully.


EXIT_SAPLV60B_006
EXIT_SAPLV60B_002
EXIT_SAPLKBER_002
COPA_CALL_CUSTOMER_EXIT_KEAB04
EXIT_SAPLKEAB_003
SD_CIN_LV60AU02
EXIT_SAPLMCS6_000
EXIT_SAPLMCS6_999
EXIT_SAPLMCS6_001
BADI_SD_DOCUMENTFLOW
IDOC_OUTPUT_INVOIC

SDVFX010 - for those who wants to do something during SAVE

In any way, if you find this user exit unable to help you and would want to know more if there are other user exits. You can always punch up the ST05 to do an analysis on your VF01.



is sky the limit... user exits on VF01

Tuesday, May 06, 2008

SAP R/3 : Sending Multiple PDF Invoice From Output Type

Sending email with an invoice attached to it has never occured to me if it can be done without the working mechanism of business workflow. The requirement was fairly simple during discussion and it was seriously sounded simple enough to put it straight to development immediately. However, I am not very familiar with business workflow. So the question now was how am I going to send an email out with an invoice attach to it. So here is the requirement in question:


"When user create an invoice via VF01 or from a customized IDOC that creates invoice, several output types are created and one of them is an outbound IDOC that will send back to the sender to let them know invoice has been created. Now, after the invoice and IDOC has been sent out, there should be a mechanism to check whether the outbound IDOC is successfully send out. If it is successfully sent out, the mechanism will grab that invoice, convert it to PDF, attach it to an email and send it to responsible recipients..."


Oh boy, it sounds easy to one who is not aware of the workaround behind or does it sounds very technical to one who has minimal working knowledge on it? I was the latter. So below are some of the questions which had formed in my brain:


1. How do you grab an invoice which has been produced by the system (VF01)?
The CLOSE_FORM function module will return a spool no when the SAPSCript has finish processing and display.
2. How do you convert an invoice to a PDF?
The CONVERT_OTFSPOOLJOB_2_PDF function module take the input of SAPScript and returns in PDF format.

3. How do you attach a PDF to the email?
The SO_NEW_DOCUMENT_ATT_SEND_API1 function module will hold the PDF

4. How do you send an email?
The SO_NEW_DOCUMENT_ATT_SEND_API1 function module will hold the PDF and send the email


After giving some thoughts to those questions above, now comes the big part of the whole mother of all questions:

How on earth at which point in the VF01 should I initiate this whole process?

So the my mind start to processing again. The answer to this might be using USER EXITS or Business Add-Ins (BADI). These two solutions seem to be the most absolute answer to the problem. However, when I revealed a solution at the end of this entry, you might find it with disbelief. But to the very few people who started with that solution was real good! Now, let me tell you what I had implemented initially to cater to that problem.

I went ahead to ST05 to get down all the USER EXITS and BADI from VF01 so I see which of them are more suitable to initiate this process. Doing so, I'd found one, it was XXXX. At this point, my imagination went beyond. Somehow, it is sometimes bad to venture too far from my own imagination. Because the next step I wanted to know how do I check the outbound IDOC's status from this USER EXIT XXX. It was simple, I used transparent table NAST and EDIDC to check the outbound IDOC's status. If its status are 03, 30 and XX, then it should go ahead to process the invoice convertion and IDOC send out. For the time being I'd solved 2 major problems.


Next, I need to get the latest invoice to do conversion. Unfortunately, with the current USER EXIT, I might not be able to get that SPOOL ID because it has not been created yet. VF01 has to be finished first. This pose another problem, how do I let VF01 finish off so I can get the SPOOL ID? After an overnight sleep, I decided that creating another RFC function module in the USER EXIT will do the trick. An RFC that executes with a new process created in the background. Thus, with this RFC initated as a new process run and letting the VF01 to finish processing, I can get the SPOOL ID.
Hence, I was definitely sure that my concept will surely work. However that will not work. Because of the RFC that i am using, it will cause overlapping. If you ever do my silly method, you will come across overlapping problem. RFC does not care if your PDF has been generated and sent by previoius document. It will just grab and resent everything including the new. Thus, my way does not work.


The only solution is to have the PDF converted, attached and sent from the print program. Not only does this eliminate duplicates of document but will ensure that it will not sent out duplicate copies of form due to overlapping. Printprogram should be any program that is used to process and display your SAPScript. For any standard program that prints forms, you can go to NACE to find out which program and form that it is using for print out. This way you also know the output type that is used by the standard program.


is sky the limit.... print, converting and sending...



SAP R/3 : Tracing Outbound IDOC

Troubleshooting outbound IDOCS can be very exciting and interesting activity. You get to see the wonders of sending data out of SAP to some other 3rd party systems. If you are unaware of some technicalities and behavorial of outbound IDOCS then testing it can be quite a challenge. Recently, I had this problem of trying to trace an outbound IDOC.

Previously, I could trace the outbound IDOC with minimal difficulty in WE19. If you put a break-point in your outbound process code or function module, the WE19 will stop at that point. But, what if WE19 fails to stop at that point? You will be scratching your head until you reach to a certain point you want to write an extra program just to trace the outbound IDOC. That is just what i did. Read my statement, I wrote an extra program to do that.

Though its a bit consuming but if you know which table and which fields to use then the concept will work just like the my now ever loving standard output type program RSNAST00. I shall have to thanks one person who let me know this existing program. But first, I would like to let you know what I'd gone through the latter method.

To developed an extra program to trace outbound programs is not as difficult as it seems. All you need is declare three tables i.e. NAST, EDIDC and EDID4. NAST is the output type control table that stores all of your 6 output types from printout to telefax. EDIDC is the IDOC control table. EDID4 is the IDOC data table. Therefore, you need to access the first table, NAST, in order to get the output type that you are supposed to execute. After you had obtain the necessary data from NAST, you will need to approach the EDIDC to get the DOCNUM and subsequently the EDID4 for its data. Then you pass all these three data selected data to your outbound's function module. Therefore, you can primitively test your outbound data. However, you will still need to set your output type to be scheduled run at other time.

Now, let us move on to life saving method to test your outbound IDOC or output types. In any of your standard programs that can send out IDOC, Telefax, Print out, set it to 1 (scheduled run at other time) in the FURTHER DATA section. Then you turn to RSNAST00 program where you put in your APPLICATION, OBJECT KEY, MEDIUM and OUTPUT TYPE. Before executing, put a break-point at your function module. Then you are ready to trace your outbound IDOC.

A note, the RSNAST00 does not only let you trace your outbound IDOC it is in fact a standard program that let you execute output types that you have schedule for later run. Hence, a very great thanks to Vincent Teoh from the SD (Sales and Distribution) module team. The RSNAST00 had definitely helped me a lot. Though I am still keeping my old program for reference. Concept still work very the same like RSNAST00.

is sky the limit... RSNAST00 and NAST, EDIDC, EDID4

Saturday, November 03, 2007

SAP R/3 : Payroll Detail and Field Symbol

Very similar to a past report which I had done and requires it to display dynamic numbers of column and it occurs to me maybe I should just put a template here and share it with everyone who are using it. The report which I had just completed displayed list of employees with all of their basic pay, allowance, deductions and employer contribution from left to right.

Thus, any employee at one point might not have the same number of wagetypes [allowance/deductions] with hers or his peers. So the list that displaying those wage types will need to be very flexible when its display an employee and spreading their wagetypes to right of the report. Here goes the coding that I used to display it dynamically.

Assumingly your field for wagetypes in a structure looks like below:

DATA : BEGIN OF ta_wage,
pernr like pernr-pernr,
col001(010) type c,
col002(010) type c,
col003(010) type c,
col004(010) type c,
...
col050(010) type c,
DATA : END OF ta_wage.

As you see the above data structure has 50 columns. Each of this columns will hold a number of wagetypes [allowance/deductions] for an employee. So it should be dynamically to recognize a column that is occupied and to append it with the next employee's wagetype. Otherwise, it will use the next column.

Thus the coding to recognize the degree of each column that spread from left to right is as follows.

DATA : tp_ind(003) TYPE n.
CONSTANTS : cn_col(011) TYPE c VALUE 'TA_WAGE-COL'.
FIELD SYMBOLS : TYPE any.

LOOP ta_wagetype.
DO VARYING tp_value FROM ta_wage-col001 NEXT ta_wage-col002.
IF tp_ind = 50.
exit.
ENDIF.

CONCATENATE cn_col tp_ind INTO tp_dyncol.
ASSIGN (tp_dyncol) TO tp_value.

[add your logic here]

ADD 1 TO tp_ind.
ENDDO.
ENDLOOP.

Notice that i had declared an index variable to hold the count of item; a constant to assign to a field symbol to capture the column dynamically; and the field symbol to move contents fluidly (in my terms not SAP official explanation).

After that i perform a DO VARYING in the INTERNAL TABLE ta_wagetype so that for each employee, I can scroll the columns dynamically to the right and get the content. As I go to the right of each column's content I can actually assign a new value, shift left or shift right and determine which is the last column that it last stop.

is sky the limit... do varying and field symbol...

Thursday, October 18, 2007

SAP R/3 : Transaction Codes

I have gathered a few important transaction codes along the way in my projects and it had helped me a lot. Here are the following and I hope it will help you like it had helped me in the past, the present and the future:

SE43 - Menu Customization
SE93 - Transaction Code Maintenance
SE16N - Enjoy Screen version of SE16 for data viewing
SCC1 - Transport Copy
SE18 - Class and Methods templates for creation and maintenance
SE19 - Class and Methods maintenance
PA03 - Payroll Run - Release
FS00 - GL master data maintenance (create, change, delete, display)
FK03 - Display vendor master data
FK01 - Create vendor master data
FK02 - Change vendor master data
F-02 - FI posting
S_ALR_87012086 - to be confirmed
PC00_M99_DKON - GL account and wage type display (payroll)
PE01 - Schema maintenance
PA40 - HR maintenance
RSTXSCRP - SAPScript Export/Import


is sky the limit... transaction codes

Wednesday, October 10, 2007

SAP R/3 : GUI_UPLOAD with # as SPACE...

There are many times when we need to upload a text file into an internal table we are not aware that the SPACE among the line of strings in the text file is represented as '#'. When we unknowingly get a row of items and started to split it, using SPLIT syntax with the normal '#' symbol, into the columns of your internal table then we get garbage or unreadable contents in the internal table.


That is because the space is not recognized during upload by GUI_UPLOAD function module. The SPACE among the strings of line items will be replace by '#'. However, this hash or '#' is not your average character '#' but it is an ASCII character of value 09. Thus it showed as '#' in your strings of line items.

Therefore, you will need to do something in your coding so you can SPLIT your string of items properly with the '#'. So, you have to declare a variable with X and value of 09 at the begining of your code. Then only you can use it in your SPLIT syntax. For example, the code below.

Data : tp_hash TYPE x VALUE '09'.
Data : tp_result1(15) TYPE c.
Data : tp_result2(15) TYPE c.

Assuming variable tp_file-item contains 'WILLIAM#WILSTROTH' and obtained via GUI_UPLOAD.

SPLIT tp_file-item AT tp_hash INTO tp_result1 tp_result2.

Write : / tp_result1, tp_result2.

Thus, it now shows:

William Wilstroth


is sky the limit... split with ASCII 09... not #...

Thursday, July 19, 2007

SAP ECC6.0 : GEN - RSTXSCRP

There is a need when you had created a SAPScript in one server and you need to move that SAPScript to another server. Or, you wanted to download the SAPScript and later upload it back to another server. Maybe, you wanted to copy one SAPScript from one to another server. The solution to this is this transaction code : RSTXSCRP. This program is called the 'SAPScript Export to Dataset OR Import from Dataset'.

It allows you to capture the following SAPScript items:
1. Form
2. Style
3. Standard Text
4. Device Type

Thus, this program is very handy when you need to do a copy from one server to another server.

is sky the limit... RSTXSCRP

Wednesday, May 30, 2007

SAP ECC6.0 : Payroll - DELIMIT

This is i must put credit to Hisyam who shared this knowledge with me on how to delimit a record in a table. Needless to say, one of my original requirement needs this feature so we go straight to the procedure:

1. I assume that you have created a master table
2. I also assume that you had made the table maintainable.
3. Go to table generator maintenance.
4. click "generate time dependent" button.
5. Click "maintenance object" then "Generate".

There you are, your table can be maintain...

is sky the limit... delimit your record

Tuesday, May 29, 2007

SAP ECC6.0 : Payroll - SAPMail Function Module

Sometimes you might want to include an email alert to users when they run their program. Recently, I was asked to provide an email alert if one of the records failed to process when run overnight. Thus in the morning, they can get feedback and proceed with their next course of action. So the very nice function module which you can use is below:

FM : SO_NEW_DOCUMENT_SEND_API1

To use this function module, fill up the following parameter:
1. DOCUMENT_DATA : obj_name, obj_descr
2. OBJECT_HEADER : line.
3. OBJECT_CONTENT : line.
4. RECEIVERS : line. (SAP Users)

Then you are ready to send. Check your email in your SAP Business Workplace at the main menu or you can use TCODE : SBWP.

is sky the limit... you've got mail...

SAP ECC6.0 : TAX - EC Form Enhancement

Annually, Malaysians working either in private or public sector will received a tax form from their employers. Those working in the private sector will get the EA Form. Others in the public sector will get the EC Form. EC Form describes how much one earns and gets remunerated (benefits) as well as how much of one earnings gets deducted. Thus the calculation of taxable of one employee. Therefore EC/EA Form denotes all of this in one year.

EC Form which i had to modify to fill up some blank spaces which was not filled up by SAP standard program took me nearly a week or more. I had to go through the standard program and see how the SAPScript (EC Form) and the standard program goes together to process payroll information. Nevertheless, I had to enhance one include file and pump the data into the SAPScript EC Form.


Although SAP did provide 2 BADI for developers to enhance those forms but it only work on certain way and i find it hard to fullfil my functional request thus forcing me to activate enhancement on the standard program itself. This solved one issue over another. Perhaps I would like to meet people who have experience similar situation in modifying or enhancing the EC Form.

So here goes the famous BADI offered by SAP:
1. HRPAYMY_ECFORM - calculation for BIK (Benefit In Kind). This generally displays a lump sum of benefit in kind into the section B (Manfaat Barangan). Unfortunately, my request was to display the breakdown list of all the benefits to one person.

2. HRPAYMY_EAFORM - process to fill up EA Form header only.

Now for those who had not gone through the EC Form or just started to modify it, my adviced is to really go over the program thoroughly because SAP did provide us a EC/EA Form Breakdown List. You need not to modify it.

Yet, that does not solve my problem because the EC Form still does not display the total amount of earnings, benefit and tax deductible. Thus I have to enhance the standard program.

That took me another few days to trace so i can find the best logical and reasonable point to make the enhancement. As you see, enhancement does not allow you to modify the standard program but you may add your coding at the top or bottom of a standard function without modify the mid section part. If you get my point, enhancement only allows addition of custom code at the top and bottom of the standard code. That is where i have to think where is the best part. Not to mention, that customized code should not affect other process too. It should be safe. So far my enhancement has not yield any justifiable complain that will lead to taking off the code. God knows if that happens!

Note : RPCTEAL0 is the original version given by SAP. RPCTEAL0_01 in this context is the new version given to the customer by SAP after a report was make to correct a certain mistake in the past.
So, in order to enhance the EC Form, there is this INCLUDE file named RCPTEAL3_01 that you can enhance to fullfil the request as above mentioned. RPCTEAL3_01 is an include file that do all the calculation process and also assigning of data to SAPScript. That is where you can modify it. In the process, the following are what i have done:

1. Enhancing subroutine FUELLEN : FUELLEN is a subroutine that will pass data to the SAPScript. This portion i put control to certain feature of the SAPScript to only display a specific format of PERNR(PNALT).

2. Changing PERNR to display a concatenated version PERNR(PNALT) and pass it to FUELLEN.

3. Changing DEPT to hold WERK/TEXT and KOSTL/TEXT and pass it to FUELLEN. Currently the DEPT field in SAPScript is left empty even though SAP did provided logic to determine it.

4. Calculation of earnings and benefits from internal table IT_BLTAB and pass it to EC Form Breakdown List.

For points 1 to 4, enhanced subroutine Fill_HD_TAB to cater the changes.

For points 1, enhanced subroutine FUELLEN to cater the changes.

SAPScript involves:
1. HR_MY_TAXECLM05Y - EC Form
2. HR_MY_TAXEABL007 - EC BreakDown List

IMPORTANT: You will need to open up your SAPScript EC Form to see what fields are displaying your value as you do your enhancement.

is sky the limit... EC Form the best enhancement ever done so far....

Thursday, May 17, 2007

SAP ECC6.0 : Payroll - Steps to create schema functions

Just like previous assignment in this entry, an additional 6 more functions to be added to the Payroll Driver Malaysia to validate existence:
- IT0003 (Payroll Status)
- IT0009 (Bank Details)
- IT0185 (Personnel IDs)
- IT0196 (EPF)
- IT0000 (BackDated Pay)
- IT0198 (Check if record exist)


When you need to create or add functions to payroll driver of a certain country, you will need to know three things and there are:

- PE01 - Schema Directory

Schema directory allows you to include steps, constraints and functions to be group together (its like maintaining a group of belonging functions or steps). In a schema, it can have subschemas, processess and instructions. Schema directory must be created if you are customizing a new functions for standard payroll driver. PE01 does not only cater for payroll but time management too.

Steps to create a schema structure:

Step 1: Enter a name e.g. ZTSW

Figure 1.0 : PE01 Main Screen

Step 2: Click create to get into the schema attributes. (Note : Choose country grouping accordingly to which payroll is being used. E.g. 14 is for Malaysia because this example is using Malaysian payroll).

Figure 1.1 : Schema attributes.

Step 3: Choose program class either payroll or time management.

Figure 1.3 : Program class selection

Step 4 : Save and exit. (Note : For the time being we go to PE04 to create functions before we come back to link both of them up)

- PE04 - Maintain Functions and Directories

PE04 allows you to create functions/operations for either payroll or time management. This functions will be saved and enabled in the following program and link to the schema directory above. Thus completing your setting up of additional schemas to your payroll program.

Steps to create function(s) in schema functions

Step 1: create a new name e.g. zsub1.

Figure 2.0 : Create a function

Step 2: Click create to go into characteristics of function payroll. Provide description and country assignment should be according to which country payroll are being run by the client.

Figure 2.1 : Choosing country assignment and description.

Step 3 : Click Save. (Note : Ensure your country assignment is selected correctly.)

- PCBURZMY0

After performing the above steps, you can start to insert functions into include program (PCBURZMY0) of main program (RPCALCL0). Additional functions of payroll schema/driver are added to PCBURZMY0. RPCALCL0 will go through each of the functions in PCBURZMY0 when payroll administrator runs payroll.

is sky the limit... payroll driver... how-to

Friday, April 27, 2007

SAP ECC6.0 : Payroll - Integration for PA30

A BADI (HRPADOOINFTY) activated to execute an external program that will capture payroll infotypes into a customized table when user click the 'SAVE' button.

It will take 5 types of table
IT0008 - Basic Pay
IT0017 - Tabung Haji
IT0198 - Income Tax
IT0014 - Koperasi
IT0196 - EPF

All these data when user modified and click the SAVE button will be captured and sent to a customized table. Eventually this data saved in the customized table can be utilized by another program.

However, one should take note that doing so, especially in implementing this BADI (HRPADOOINFTY), must be careful that it will not affect the payroll run program. Otherwise, this BADI is useless and not helping at all.

is sky the limit... HRPADOOINFTY to save the 5 tables

SAP ECC6.0 : Payroll - DME Enhancement - New Layout...

Last month, i was required to modify DME (RFFOM100) standard program to add a new layout to the bank transfer file format.

DME is also known as international payment transfer

Although SAP provided a few standard file layout but as agreement between the client and its banks, the file was not supported by SAP. Thus a customized file layout was given to suit their needs.In order to modify this, there are a few requirements that you need to know:

1. In DME, under Output Control, Alternative Format must have the customized new file layout. In order to achieve that, go to OBF5 to add your customized file name. (Editor : Remember to set your ISO Code otherwise it won't go to your desired country specific customized alternative file format. Side Effect : it will make use of International MT100 if not set properly)

2. You will need to modify 3 function modules that will create the header file, item file and the trailer file. In order to do this, you can copy the following standard Malaysia file format (Malaysian Banking Berhad) and modified it. Thus, the standard are:
- DME_MY_HR_MBB_1(Header)
- DME_MY_HR_MBB_2(Item)
- DME_MY_HR_MBB_3(Trailer)

With this three standard function modules, you will copy and modified to become your custom file:
- ZDME_XXX_MT100_1(Header)
- ZDME_XXX_MT100_2(Item)
- ZDME_XXX_MT100_3(Trailer)

In each of this function module, please take note that certain lines you will need to retain and do some modifications so it could pass your parameters back to RFFOM100 (DME) program. The DME program will take this customized files and download accordingly to it.

3. Now, after you have modified your function module here comes the big question on how to link the alternative file format to your customized function module. Yes, you need to modify 3 more additional FMs. These FMs will tie your DME to your customized function module in step 2. Those FM are as follows:
- MT_MOD_MALAYSIA_1
- MT_MOD_MALAYSIA_2
- MT_MOD_MALAYSIA_3

In this three standard function modules, you do not need to copy and modified it. You just have to activate enhancement that is provided by ECC6.0. This feature is provided in ECC6.0 to make adjustment to standard programs easier. So to enhance the three function modules:

1. Open up enhancement feature by going to Function Module/Enhancement.
2. Go to Edit/Enhancement Operations/Show Implicit Enhancement Options
3. Then click on dotted lines indicating where enhancement is allowed on editor panel
4. Go to Edit/Enhancement Operations/Create Enhancement.

Now you can start to enhance the three standard function modules to call your customized function module to use your customized file format.

is sky the limit... DME (International Payment Transfer for Malaysia)

SAP ECC6.0 : Payroll – Payee Key for Alimony

In one of a payroll process when an employee or an entity that is identified to include in the payroll run, certain amount will be deducted or added to/from their gross pay. Thus, payee key in this context is the number that will determine a certain deduction to their gross pay.

The payment code here refers to employees, for example, who has alimony, child care, and so forth that needs to be pay by the person. Thus, this derive the Nafkah or dependent care payment.

The feature in this design:
1. The first two prefix dictates the key for personnel deduction. For example AL and followed by six running digits. (ALXXXXXX)
2. Creation of this requires particulars such as bank key, bank account, country, reference key (payee code), name, date begin, date end, and payment method (restricted to P or S).

If payment method is P then bank key and bank account fields
are not required. Else payment method is S thus the reversed.

3. Either able to modify or display after payee key is created.
4. Delimit the payee key. Delimit actually restricts certain validity of the payee key in this context.

Unlike delimiting a record in a table which creating a few record with similar key and different dates.

Tables that are affected by the process are T521B (payee key) and T521C (check table payee key)

This program is very much similar cheque number program but purpose is to maintain payee key.


More on how to DELIMIT record.


Is Sky The Limit... Payee Key

SAP ECC6.0 : Payroll - Cheque Number

This assignment requires a new infotype 9001 (Check Info) to store newly created cheque number(s). Each of this newly created cheque number is control by personnel area and is a running number too.

The cheque number is 6 digits in length.


In order to maintain cheque numbers, a dialog program is required to create, modify, display and delimit it by users manually. Currently, this program will be used by the conversion team to create cheque numbers by batch for testing. Other particulars that required by user is only the payee description.

This cheque will be use in the later stage when payroll department issue cheques to different personnel in personnel areas monthly.

Now, that you have a table that cater maintainence of cheque number, thus an infotype is required to support this information and tie to certain employee(s) when cheque numbers are allocated during payroll processing. This infotype will call PA9001.
I will explain more on infotype and infotype creation in the next entry.
In summary there are 3 portions to this development:
1. A customized table to hold cheque numbers
2. A program to maintain cheque numbers
3. An infotype to relate cheque numbers to payee.

is sky the limit... cheque numbers

SAP ECC6.0 : Payroll - Driver (Old wage type to new wage type)

This assignment requires a customized table and a payroll schema to maintain old wage type. A customized table containing existing bank key and bank name, begin date and end date, and the new wage type and text for replacement.

At PE04 (schema maintenance for payroll and time management) will be used to create a new payroll function to replace existing wage type to the new wage type based on the above content in customized table. Thus, a payroll driver will be created to maintain old wage type with new wage type.

Known tables or structure involved:
1. RT Table (Result Table) - holds all income/deduction wage types for a person

2. BT Table (Basic Pay Table) - holds all basic pay information (ie pay method, pers. area, etc)
3. V_T012 – House Banks - view of all banks alias with the company/org.

After payroll function has been defined, the new function will be added in PCBURZMY0. (this will require a developer key).

In this new function, certain logic is required to differentiate its outcome based on the payment method. If the payment method is bank transfer denoted by the 'T' then the payroll driver's schema must take into consideration of bank's information. However, on the denotion of 'C' meaning payment method is cheque thus, the bank's information is not required when replacing the wage type.


is sky the limit... payroll driver

SAP ECC6.0 : Payroll - Summarized Bank Report

In this second payroll program, it will display 3 types of report and there are the following:

Bank Cover Slip
Summary of Bank Credit Report
Summary of Employees Report

First, the bank cover slip will calculate the total number of amount payroll to be credited and the total number of employees to be credited. This is an overall calculated by the program when its process report 1 and report 2.

Second, the summary of employees report will display all the eligible employee for payroll. In this report, it will show the employee numbers (PNALT-PERNR), employee’s name, employee IC, employee bank account no and total amount paid. Each of this employee will be group according to a bank code. This bank code determine which bank will be credited.

Third, the summary of bank credit report, simply shows a list of bank and its total amount to be credited. The bank code, bank name and total amount are fields in the report.


is sky the limit... bank reports

SAP ECC6.0 : Payroll - Credit Control Statement

I had started my new project a month ago in one of the main government sector on payroll only. Yes, I will be revisiting HR’s Payroll module for another two months, possibly, might get extended according to the work’s urgency.

My first assignment was to come out with a payroll control statement that will display every employees income and benefit and deductions in a list. This control statement will be group accordingly to its WERKS-personnel area and ANSVH-work contract. This is due to large number of department (with 9XK employees) or states to manage its payroll. In this control statement, the payroll department will be able to validate all of its recipient correct amount of take home wage types and deductible wage types.

Apart from this, the technicality behind this program can be found in my previous entry on flexible spending account.

is sky the limit… payroll revisited for two months

Wednesday, March 21, 2007

SAP R/3 : Profit & Loss Report - Part 2

This profit and loss program has finally span to about one month and three weeks. Most of the time was spent in debugging and testing for additional requirements which were left out and accuracy in the reporting layout.

The very first amendment that took me quite some time after the first development was the reversal of FI documents (line items). FI modules in SAP allows reversal.
(Reversal meaning reversing a charge document in moments when there is a wrong charge or cancellation of order. This is my own definition and it could technically meant something else in a functional prospective as well as SAP's definition; so pardon me.)
All the six report in my program had to had the reversal mechanism following the standard SAP procedure so it took about one week and more. Apart from that the testing on the direct operating expenses took in the reversal and charge off too. So additional testing was required to ensure the accuracy of the report.

The second amendment came when the vendor reports related to cost codes being used in cost of sales report need to add an additional column. This amendment was a mistake not drawn in the layout but mention in the specification. So i was careless in this part; thus, a correction was immediately carried out in two days. So the vendors and its details are categorized accordingly to the cost code.

This project is a Project System (PS) and Account Receivables (AR), Account Payable (AP) combine reporting tool. Many late nights were carried out to complete this program. After all a 3000 line of codes really does worth my nights to make this program up and running smoothly. The best thing about this, the wholesome of AI logic taken in consideration when there is charge off, reversal, balance payment of direct operating expenses and most important, not to mention the ultra code that determine all mother of all problem, a certain cost code group that could take in other cost code groups only if it is not a VESSEL (This is another cost code group). This make the program a very challenging task and a lot of deployment of brain cells into activity.

Today, marks the last day of development for it has passed User Acceptance Test and will find myself less commit coming to maintain this PNL report. Unless, there are new requirements and another new challenging report that they are unable to report it out from SAP.

is sky the limit... profit a skill from this task and loss many sleepless nights!