cancel
Showing results for 
Search instead for 
Did you mean: 

can i have a basic ABAP HR program

Former Member
0 Kudos

hi gurus,

I just started working on ABAP Hr ,can any body send me a basic program in HR aswell as how can i acesses infotypes data through abap codes.

thanks in advance

regards,

hema

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Hema,

Basic coding in fetch the infotype data.

tables: pernr.

infotypes: 0000,

0001.

get pernr.

u want use provide and endprovide statement

provide * from p0000 between pn-begda and pn-endda.

write:/ p0000-pernr,

p0000-massn,

p0000-massg,

p0000-stat2,

p0000-endda,

p0000-begda.

endprovide.

provide * from p0001 between pn-begda and pn-endda.

write:/ p0001-pernr,

p0001-werks,

p0001-btrtl,

p0001-persg,

p0001-persk.

endprovide.

Another way you have to use macros

rp-provide-from-last space pn-begda pn-endda.

if pnp-sw-found eq 1.

write:/ p0000-pernr,

p0000-massn,

p0000-massg,

p0000-stat2,

p0000-endda,

p0000-begda.

else.

reject.

endif.

Former Member
0 Kudos

Hi Hema,

Basic coding in fetch the infotype data.

tables: pernr.

infotypes: 0000,

0001.

get pernr.

u want use provide and endprovide statement

provide * from p0000 between pn-begda and pn-endda.

write:/ p0000-pernr,

p0000-massn,

p0000-massg,

p0000-stat2,

p0000-endda,

p0000-begda.

endprovide.

provide * from p0001 between pn-begda and pn-endda.

write:/ p0001-pernr,

p0001-werks,

p0001-btrtl,

p0001-persg,

p0001-persk.

endprovide.

Another way you have to use macros

rp-provide-from-last space pn-begda pn-endda.

if pnp-sw-found eq 1.

write:/ p0000-pernr,

p0000-massn,

p0000-massg,

p0000-stat2,

p0000-endda,

p0000-begda.

else.

reject.

endif.

Former Member
0 Kudos

hi hema,

this might give some idea.

Process Infotypes

• RMAC Modules - RMAC module as referred to Macro, is a special construct of ABAP/4 codes. Normally, the program code of these modules is stored in table 'TRMAC'. The table key combines the program code under a given name. It can also be defined in programs.The RMAC defined in the TRMAC can be used in all Reports. When an RMAC is changed, the report has to be regenerated manually to reflect the change.

• Reading Infotypes - by using RMAC (macro) RP-READ-INFOTYPE

REPORT ZHR00001.

INFOTYPE: 0002.

PARAMETERS: PERNR LIKE P0002-PERNR.

RP-READ-INFOTYPE PERNR 0002 P0002 <BEGIN> <END>.

PROVIDE * FROM P0002

if ... then ...endif.

ENDPROVIDE.

• Changing Infotypes - by using RMAC (macro) RP-READ-INFOTYPE.

• Three steps are involved in changing infotypes:

1. Select the infotype records to be changed;

2. Make the required changes and store the records in an alternative table;

3. Save this table to the database;

The RP-UPDATE macro updates the database. The parameters of this macro are the OLD internal table containing the unchanged records and the NEW internal table containing the changed records. You cannot create or delete data. Only modification is possible.

INFOTYPES: Pnnnn NAME OLD,

Pnnnn NAME NEW.

GET PERNR.

PROVIDE * FROM OLD

WHERE .... = ... "Change old record

*Save old record in alternate table

NEW = OLD.

ENDPROVIDE.

RP-UPDATE OLD NEW. "Update changed record

for more information on the same plz send your e-mail id. i ll send you the document related to it

anuj

plz award point for each helpful answers

Former Member
0 Kudos

Hi,thank you anuj for your reply my mail id is hemalike@gmail.com

please send me some basic abaphr programming data.

thanks in advance.

regards,

Hema

Former Member
0 Kudos

hi hema,

just check your mail once for abap hr report...

regards..

seshu.

Former Member
0 Kudos

Hi <b>Anuj</b>,

Will you please send me the document to lokesh.lolly@gmail.com

Danx in Advance

<b>Saplok</b>

McF
Advisor
Advisor
0 Kudos

Hi,

TRMAC is the old technique from R/2.

If possible avoid these! Also if needed take the new ones defined from 4.7 on with underscores _ not with the hyphens -

For documentation and sample programs go to SE36 and check the documentation of the Logical Database PNPCE.

Regards,

Michael

Former Member
0 Kudos

Hi Anuj,

Will you please send me the document to manojlakhanpal@gmail.com

Thanx in Advance

manoj

Former Member
0 Kudos

Hi Anuj,

Will you please send me the ABAP HR document to this mail id sriram.jyothi@gmail.com.

Thanks & Regards,

Naga Jyothi.S

Former Member
0 Kudos

Hi Anuj,

Will you please send me the ABAP HR document to this mail id san754@gmail.com

Thanks in Advance,

Sandeep.

former_member31961
Contributor
0 Kudos

Hi

Check this very useful link.

/thread/238726 [original link is broken]

Regards,

Shrinivas