Saturday, August 29, 2009

Macros in HR-ABAP

Most commonly used Macros in HR ABAP ?

Macro contains some part of source code which it will be useful for number of applications.( Like function modules )

Generally we use two macros in HR ABAP
RP-PROVIDE-FROM-LAST
RP-PROVIDE-FROM-FRST

The macro RP-PROVIDE-FROM-LAST retrieves the last(latest) data record which is valid in the data selection period.
The macro RP-PROVIDE-FROM-FRST retrieves the first(start)data record which is valid in the data selection period.

For every macro, whether the operation was successful or not will be checked with PNP-SW-FOUND.
If PNP-SW-FOUND = 1 , then the operation is successful. ( same as sy-subrc but the value is in reverse case)

The macro RP-READ-INFOTYPE retrieves all the data record(s) which is valid in the data selection period.

If SY-SUBRC = 0 , then the process is successful.

All the Macros are stored in table TRMAC

Whenever you are using the macros like

RP-PROVIDE-FROM-LAST or
RP-PROVIDE-FROM-FRST,

check whether you have included logical database PNP in program attributes.

It is not necessary to include logical database PNP/PNPCE in your program when you are using the macro like

RP-READ-INFOTYPE A B C D E , where

A corresponds to PERNR which describes for which personnel number you require records.

B corresponds to INFOTYPE which describes from which infotype you require records.

C corresponds to data structure of the declared infotype (internal table like P0000 for infotype 0000) where all the records of the particular personnel number will be stored.

D corresponds to Start date.

E corresponds to End date.

No comments:

FEEDJIT Live Traffic Feed

meta name

Legal Disclaimer- Any actions and or activities related to the material contained within this Website is solely your responsibility. The misuse of the information in this website can result in criminal charges brought against the persons in question. The authors and Wetpaint will not be held responsible in the event any criminal charges be brought against any individuals misusing the information in this website to break the law. This site contains materials that can be potentially damaging or dangerous. If you do not fully understand something on this site, then GO OUT OF HERE! Refer to the laws in your province/country before accessing, using,or in any other way utilizing these materials. These materials are for educational and research purposes only. Do not attempt to violate the law with anything contained here. If this is your intention, then LEAVE NOW! Neither administration of this server, the authors of this material, or anyone else affiliated in any way, is going to accept responsibility for your actions. Neither the creator nor Wetpaint is responsible for the comments posted on this website. This site will Never harm u By giving Out Trojans, Virus or any related stuff. We do not Promote Hacking ! But Lets one be aware of all the Possibilities around. N promotes the way to Curb it to Protect urself.Rest is all Tricks n Tips.. ~ cheers ~

Blog Archive

Page copy protected against web site content infringement by Copyscape Website Hit Counter
Free Hit Counter