Re: I need basic ABAP OOPS material to learn OOPS concepts
Hi Anitha,
Can you send me the material which you have!!!
[email protected]
Thanks in advance!!!
Chandra
Hi Chandra,
Check out the following links.
http://www.sappressbooks.com/downloads/h958_preview.pdf
http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
http://www.sapgenie.com/abap/OO/index.htm
http://www.geocities.com/victorav15/sapr3/abap_ood.html
http://www.brabandt.de/html/abap_oo.html
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sapgenie.com/
http://help.sap.com
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
For funtion module to class
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
for classes
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
for methods
http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
for inheritance
http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
for interfaces
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
For Materials:
1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
1) http://www.erpgenie.com/sap/abap/OO/index.htm
2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
Award points if found useful.
Regrads
Indrajit
Similar Messages
-
I need basic ABAP OOPS material to learn OOPS concepts
Hi,
I need ABAP Object oriented programming material.
if any one having pls send it to my mail id
[email protected]
Thanks
lokeshHi,
check the below links lot of info and examples r there
http://www.sapgenie.com/abap/OO/index.htm
http://www.geocities.com/victorav15/sapr3/abap_ood.html
http://www.brabandt.de/html/abap_oo.html
Check this cool weblog:
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sapgenie.com/
http://help.sap.com
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
these links
http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
For funtion module to class
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
for classes
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
for methods
http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
for inheritance
http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
for interfaces
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
For Materials:
1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
1) http://www.erpgenie.com/sap/abap/OO/index.htm
2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
Regards,
Priyanka. -
Need basic knowledge and material on WORKFLOWS
Hi all,
Need some material on workflows and their creation(step by step)..
I do not have any knowledge of workflows in SAP ABAP....
ShivaHi,
please check the Developer's Guide in general:
http://www.sdn.sap.com/sdn/developersguide.sdn
the concrete information on workflow you can find here:
Business Process Management
http://help.sap.com/saphelp_nw70/helpdata/en/9c/8d8442dcaad665e10000000a155106/frameset.htm
Embedded processes (workflow)
http://help.sap.com/saphelp_nw70/helpdata/en/fd/517b42303e0e53e10000000a155106/frameset.htm
Please follow the links,
http://help.sap.com/saphelp_nw04s/helpdata/en/04/926f8546f311d189470000e829fbbd/content.htm
http://help.sap.com/saphelp_46c/helpdata/en/c5/e4a930453d11d189430000e829fbbd/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/a1/172437130e0d09e10000009b38f839/frameset.htm
A good tutorial
http://www.thespot4sap.com/articles/Invoice_Verification_Automation_Using_SAP_Workflow.asp
http://www.sap-basis-abap.com/wf/sap-business-workflow.htm
http://www.sap-img.com/workflow/sap-workflow.htm
/people/alan.rickayzen/blog
/people/jocelyn.dart/blog/2006/06/19/why-use-abap-oo-with-workflow
a good book
http://www.sap-press.com/product.cfm?account=&product=H950
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
Check the following PDF
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMDEMO/BCBMTWFMDEMO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPM/BCBMTWFMPM.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
Thanks,
Reward If Helpful. -
Help needed Displaying ALV Secondary list without using oops concept
Hi Experts
Help needed Displaying ALV Secondary list without using oops concept.
its urgent
regds
rajasekharhi chk this code
******************TABLES DECLARATION*****************
TABLES : VBAP,MARA.
*****************TYPE POOLS**************************
TYPE-POOLS : SLIS.
****************INTERNAL TABLES**********************
DATA : BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
END OF IT_VBAP.
****************TEMPORARY VARIABLES******************
DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
*****************FIELD CATALOG***********************
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
****************LAYOUT*******************************
DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
***************VARIANT*******************************
DATA : G_VARIANT LIKE DISVARIANT.
****************SAVE*********************************
DATA : G_SAVE(1) TYPE C.
*****************EVENTS******************************
DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
G_EVENTS TYPE SLIS_T_EVENT.
******************PF STATUS**************************
DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
******************USER COMMAND************************
DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
R_UCOMM LIKE SY-UCOMM.
****************SELECTION SCREEN************************
SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
***************AT SELECTION SCREEN*********************
AT SELECTION-SCREEN.
PERFORM VALIDATE.
**************START-OF-SELECTION**************************
START-OF-SELECTION.
PERFORM GET_DETAILS.
PERFORM FIELDCAT.
PERFORM LAYOUT.
PERFORM VARIANT.
PERFORM SAVE.
PERFORM EVENTS.
PERFORM ALV_DISPLAY.
*********************FORMS*******************************************
*& Form validate
text
--> p1 text
<-- p2 text
FORM VALIDATE .
SELECT SINGLE VBELN
FROM VBAP
INTO V_VBELN
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'enter valid vbeln'.
ENDIF.
ENDFORM. " validate
*& Form get_details
text
--> p1 text
<-- p2 text
FORM GET_DETAILS .
SELECT VBELN
POSNR
MATNR
FROM VBAP
INTO TABLE IT_VBAP
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'no details found'.
ENDIF.
ENDFORM. " get_details
*& Form fieldcat
text
--> p1 text
<-- p2 text
FORM FIELDCAT .
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-OUTPUTLEN = 10.
WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'POSNR'.
WA_FIELDCAT-OUTPUTLEN = 6.
WA_FIELDCAT-SELTEXT_L = 'ITEM'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-OUTPUTLEN = 18.
WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. " fieldcat
*& Form LAYOUT
text
--> p1 text
<-- p2 text
FORM LAYOUT .
WA_LAYOUT-ZEBRA = 'X'.
ENDFORM. " LAYOUT
*& Form VARIANT
text
--> p1 text
<-- p2 text
FORM VARIANT .
CLEAR G_VARIANT.
G_VARIANT-REPORT = SY-REPID.
ENDFORM. " VARIANT
*& Form SAVE
text
--> p1 text
<-- p2 text
FORM SAVE .
CLEAR G_SAVE.
G_SAVE = 'A'.
ENDFORM. " SAVE
*& Form EVENTS
text
--> p1 text
<-- p2 text
FORM EVENTS .
CLEAR XS_EVENTS.
XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENTS-FORM = 'TOP_OF_PAGE'.
APPEND XS_EVENTS TO G_EVENTS.
ENDFORM. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
WRITE :/ ' INTELLI GROUP'.
ENDFORM. "TOP_OF_PAGE
*& Form ALV_DISPLAY
text
--> p1 text
<-- p2 text
FORM ALV_DISPLAY .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = PF_STATUS
I_CALLBACK_USER_COMMAND = USER_COMMAND
I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = G_SAVE
IS_VARIANT = G_VARIANT
IT_EVENTS = G_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_VBAP
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " ALV_DISPLAY
*& Form SET_PF_STATUS
text
FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'Z50651_PFSTATUS' EXCLUDING EXTAB.
ENDFORM. "SET_PF_STATUS
*& Form SET_USER_COMMAND
text
FORM SET_USER_COMMAND USING R_UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'DC'.
READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
SELECT SINGLE MTART
FROM MARA
INTO V_MTART
WHERE MATNR = IT_VBAP-MATNR.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
ELSE.
WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
WRITE :/ 'MATERIAL TYPE :' , V_MTART.
ENDIF.
ENDIF.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'CLOSE'.
CALL TRANSACTION 'SE38'.
ENDCASE.
REPORT Z_ALV_INTERACTIVE MESSAGE-ID ZMSG_50651
LINE-SIZE 100
LINE-COUNT 60
NO STANDARD PAGE HEADING.
******************TABLES DECLARATION*****************
TABLES : VBAP,MARA.
*****************TYPE POOLS**************************
TYPE-POOLS : SLIS.
****************INTERNAL TABLES**********************
DATA : BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
END OF IT_VBAP.
****************TEMPORARY VARIABLES******************
DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
*****************FIELD CATALOG***********************
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
****************LAYOUT*******************************
DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
***************VARIANT*******************************
DATA : G_VARIANT LIKE DISVARIANT.
****************SAVE*********************************
DATA : G_SAVE(1) TYPE C.
*****************EVENTS******************************
DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
G_EVENTS TYPE SLIS_T_EVENT.
******************PF STATUS**************************
DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
******************USER COMMAND************************
DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
R_UCOMM LIKE SY-UCOMM.
****************SELECTION SCREEN************************
SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
***************AT SELECTION SCREEN*********************
AT SELECTION-SCREEN.
PERFORM VALIDATE.
**************START-OF-SELECTION**************************
START-OF-SELECTION.
PERFORM GET_DETAILS.
PERFORM FIELDCAT.
PERFORM LAYOUT.
PERFORM VARIANT.
PERFORM SAVE.
PERFORM EVENTS.
PERFORM ALV_DISPLAY.
*********************FORMS*******************************************
*& Form validate
text
--> p1 text
<-- p2 text
FORM VALIDATE .
SELECT SINGLE VBELN
FROM VBAP
INTO V_VBELN
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'enter valid vbeln'.
ENDIF.
ENDFORM. " validate
*& Form get_details
text
--> p1 text
<-- p2 text
FORM GET_DETAILS .
SELECT VBELN
POSNR
MATNR
FROM VBAP
INTO TABLE IT_VBAP
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'no details found'.
ENDIF.
ENDFORM. " get_details
*& Form fieldcat
text
--> p1 text
<-- p2 text
FORM FIELDCAT .
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-OUTPUTLEN = 10.
WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'POSNR'.
WA_FIELDCAT-OUTPUTLEN = 6.
WA_FIELDCAT-SELTEXT_L = 'ITEM'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-OUTPUTLEN = 18.
WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. " fieldcat
*& Form LAYOUT
text
--> p1 text
<-- p2 text
FORM LAYOUT .
WA_LAYOUT-ZEBRA = 'X'.
ENDFORM. " LAYOUT
*& Form VARIANT
text
--> p1 text
<-- p2 text
FORM VARIANT .
CLEAR G_VARIANT.
G_VARIANT-REPORT = SY-REPID.
ENDFORM. " VARIANT
*& Form SAVE
text
--> p1 text
<-- p2 text
FORM SAVE .
CLEAR G_SAVE.
G_SAVE = 'A'.
ENDFORM. " SAVE
*& Form EVENTS
text
--> p1 text
<-- p2 text
FORM EVENTS .
CLEAR XS_EVENTS.
XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENTS-FORM = 'TOP_OF_PAGE'.
APPEND XS_EVENTS TO G_EVENTS.
ENDFORM. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
WRITE :/ ' INTELLI GROUP'.
ENDFORM. "TOP_OF_PAGE
*& Form ALV_DISPLAY
text
--> p1 text
<-- p2 text
FORM ALV_DISPLAY .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = PF_STATUS
I_CALLBACK_USER_COMMAND = USER_COMMAND
I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = G_SAVE
IS_VARIANT = G_VARIANT
IT_EVENTS = G_EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_VBAP
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " ALV_DISPLAY
*& Form SET_PF_STATUS
text
FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
ENDFORM. "SET_PF_STATUS
*& Form SET_USER_COMMAND
text
FORM SET_USER_COMMAND USING R_UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'DC'.
READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
SELECT SINGLE MTART
FROM MARA
INTO V_MTART
WHERE MATNR = IT_VBAP-MATNR.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
ELSE.
WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
WRITE :/ 'MATERIAL TYPE :' , V_MTART.
SUBMIT SLIS_DUMMY WITH P_MATNR EQ IT_VBAP-MATNR
WITH P_MTART EQ V_MTART.
ENDIF.
ENDIF.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'CLOSE'.
CALL TRANSACTION 'SE38'.
ENDCASE.
plz reward if useful -
Hi Gurus,
I have a small doubt in basic ABAP.
What is the exact difference between the below statements.
Types: Begin of ty_data,
matnr type mara-matnr,
end of ty_data.
Types: Begin of ty_data,
matnr type matnr,
end of ty_data.
Types: Begin of ty_data,
matnr like mara-matnr,
end of ty_data.
Types: Begin of ty_data,
matnr like matnr,
end of ty_data.
data: matnr type mara-matnr.
data: matnr type matnr
data: matnr like mara-matnr
data: matnr like matnr.
In those above statement which are correct. And the difference between those statements.
Thanks,
Srihari.hi,
LIKE means the datatype of the variable is similar to the referenced variable.
TYPE means it is a predefined data type.
Eg:
DATA int TYPE i.
Here int is of integer data type.
DATA var LIKE int.
var IS a variable having same data type of int. which in turn is integer.
You can find these helpful when you reference database table variables... You need not know what is the datatype defined.
Also it adds to FLEXIBILITY.
Whenever you make changes to your database tables and fields,
that change is REFLECTED back to your program that is,
You need not change all your program code when you change your table fields...
Hope you understand and appreciate the flexibility that SAP provides to the programmers...
Thanks
Arun -
HI FRIENDS,
CAN ANYONE SEND ME THE ABAP-HR MATERIAL .
THAXS AND REGARDS.
HITESHMaybe this link can be helpfull
http://www.sapdevelopment.co.uk/hr/hr_infotypes2.htm
Have a look at http://www.sap-img.com/human/how-to-create-a-hr-infotype.htm, but have also a look at this thread
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FthreadID%3D9945%26messageID%3D63016
found this link probably can be helpful to someone
http://help.sap.com/saphelp_46b/helpdata/en/f7/2fe034ee251f34e10000009b38f83b/frameset.htm
http://sap.ittoolbox.com/groups/technical-functional/sap-hr/how-to-create-z-infotype-in-organizational-management-745603
How to create a HR infotype?
1) Go to Transaction PM01.
2) Enter the custom Infotype number which you want to create (Should be a 4 digit number, start with 9).
3) Select the Employee Infotype radio button.
4) Select the PS Structure Infotype.
5) Click on Create A separate table maintenance window appears
6) Create a PS structure with all the fields you want on the Infotype
7) Save and Activate the PS structure
8) Go back to the initial screen of PM01.
9) Click on All push button. It takes a few moments.
10) Click on Technical Characteristics. Infotype list screen appears
11) Click on Change(pencil) button
12) Select your Infotype and click on Detail (magnifying glass) button
13) Give T591A as subtype table
14) Give T591S as subtype txt tab
15) Give your subtype field as subtype field
16) Save and come back to PM01 initial screen
17) Click on Infotype Characteristics Infotype list screen appears
18) Click on Change (pencil) button
19) Click on New Entries
20) Enter your Infotype number and short text
21) Here we have to set different Infotype Characteristics as per the requirement. (Better open another session with some standard Infotypes infotype characteristics screen and use as the reference to fill yours)
22) Save your entries.
23) Now the Infotype is created and ready to use.
24) If you want to change the layout of the Infotype as per your requirement
25) In the PM01 initial screen Select Screen radio button and give 2000 as the screen name, then click on edit.
26) In the next screen.. Select Layout Editor and click Change.
27) Screen default layout appears here you can design/modify the screen..change the attributes of the fields..etc.
28) Save and activate. (Dont forget to Activate at every level)
InfoSets in the HR Application
You can use SAP Query in HR to report on HR data. Queries are maintained as described in Creating Queries. The special features of queries created for HR are described in Maintaining Queries in the Human Resources Application. The maintenance procedure for HR InfoSets differs from the described procedure inasmuch as HR data fields are grouped together in infotypes.
InfoSet management in SAP Query is also used for InfoSet Query. For further information, see Functions for Managing InfoSets.
If you want to create InfoSets for HR, you can use logical databases PNP, PAP, and PCH (see HR Logical Databases). The database you must use to create your InfoSet depends on the component in which the data you want to report on is stored.
The reports you can execute using InfoSets based on logical databases PNP or PCH are similar, but differ in that they can select different objects. The following table describes the connection between the logical database, and the infotypes you can include in an InfoSet. It also provides you with one or two examples of reports that you can execute using the appropriate InfoSets.
Logical database PNP PCH PAP
Selection of Persons Objects from Personnel Planning Applicants
Infotypes that can be included in the InfoSet Infotypes for
Personnel Administration (0000-0999)
Time Management (2000-2999)
Payroll infotypes
Infotypes for Personnel Planning objects that can be related to persons If the object type is specified:
Infotypes for the object type
Infotypes for objects that can be related to the specified object type
If the object type is not specified:
All infotypes Infotypes for Recruitment (4000-4999)
Some infotypes for Personnel Administration (such as 0001 and 0002)
Customer infotypes
Reporting examples Selection of all persons who participated in a specific business event, output of prices for reserved business events
Selection of all persons assigned to a specific personnel area, output of qualifications held by these persons Selection of all business events held in London in March, output of all persons who participated in these business events
Selection of all positions assigned to a specific organizational unit, output of all persons assigned to the positions Selection of all applicants hired last year to work on special projects, output of addresses for the applicants selected
Creating InfoSets
The maintenance procedure for HR InfoSets differs from the procedure described so far in this section inasmuch as HR data fields are grouped together in infotypes. To set up an InfoSet for the HR application, proceed as follows:
1. On the initial screen for maintaining InfoSets, enter a name for the InfoSet and choose Create.
2. On the next screen, enter a name for the InfoSet and select one of the HR logical databases in accordance with your reporting requirements.
Customer infotypes can be created on all HR logical databases. In each individual case, therefore, you must decide which database to select so that you can report on customer infotypes.
This screen enables you to enter an authorization group. All of the queries that are subsequently created using this InfoSet can only be executed by persons who have this authorization group.
3. Choose .
This takes you to the Infotype Selection for InfoSet .
The logical HR database uses the table APPLICANT. You must declare it in the TABLES statement.
At the GET APPLICANT event, the APPLICANT structure contains the data for an applicant number chosen on the basis of selection screen entries.
The APPLICANT-APLNO field contains the applicant number which is selected for processing.
Only the APPLICANT-APLNO field should be read from the work area of the APPLICANT table. The other fields are intended for internal use only.
2.7 Authorization Checks in Reporting (PA-APP)
Generally, authorization checks in reporting do not differ from those in the transactions. Since data access in reporting is always of the read type, the system checks for a read authorization; the authorization group must be R or *.
In some situations, you may want to use a simplified authorization check when running reports. The object RPABAP is required for the check as well as the object RPORGIN; if these authorizations are available, a simpler and faster check is performed.
If the report cannot read certain applicant data due to lack of authorization, data for these persons is not processed at the GET APPLICANT time point. A note appears at the end of the list stating the number of applicants who were skipped due to lack of authorization.
2.8 Views
Introduction
When evaluating data, we distinguish between the logical and the physical view.
The physical view corresponds to the form in which the infotype data is stored in the HR tables. This data is stored in infotype records with a validity period.
In the logical view, the validity periods of individual fields are determined for several infotype records. For example, for an evaluation, the time period during which an employee worked at a particular job may be important, irrespective of whether a company code, personnel area or cost center change occurred during this time.
Data from several infotypes can also be provided for a specific partial period. When calculating partial payroll periods, it is especially important that data on basic pay, work schedule and cost distribution are provided for the relevant partial period.
These two types of logical views are implemented in the projection and join.
 Join
 Projection
 Join and Projection
 Time-Dependent Control Tables
 Generalization of the View
Join
A join processes records from two or more infotypes. The data from these infotypes is provided for a specific partial period.
 We would like to know in which time period an employee worked at which job and at which address he or she resided during this time.
The following address data is available:
January June Hamburg
June December Munich
The following work center data is available:
January April Programmer
May December Course instructor
If the address and work center data are provided for specific partial periods, the following cases result:
January April Hamburg / programmer
May June Hamburg / course instructor
July December Munich / Course instructor
The ABAP syntax of this join is as follows:
PROVIDE * FROM Pomp
FROM Pnnnn
BETWEEN PN-BEGDA AND PN-ENDDA.
The partial periods for infotypes Pomp and Pnnnn as well as for all other infotypes of the join are defined in the fields BEGDA and ENDDA.
The data of each infotype in the join must be available during the entire validity period of the infotype. The time periods of infotype records may not overlap; therefore, the join may not contain infotypes with time constraint "three".
The time periods of records overlap if an infotype is read without any subtype restrictions. For example, the Address infotype has the subtypes Permanent residence, Temporary residence and Home address.
Time periods will ultimately overlap if all addresses are read. Therefore, you must always select a subtype for a join, and this subtype may not have the time constraint "three".
The program code for the above join for work center and address data is as follows:
REPORT RPABAP03.
TABLES: PERNR.
INFOTYPES: 0001, 0006.
GET PERNR.
PROVIDE * FROM P0001
FROM P0006 BETWEEN PN-BEGDA AND PN-ENDDA
WHERE P0006-SUBTY eq '1'.
WRITE: / PERNR-PERNR, P0001-STELL,
P0006-STRAS, P0006-BEGDA, P0006-ENDDA.
ENDPROVIDE.
Sometimes no data is available for a particular infotype in the selected partial period. Infotype validity periods may not overlap but gaps are permitted.
For example, gaps can occur when personal data is joined with address data:
Personal data
January 1960 - May 1998 Miller
May 1998 - December 1998 Smith
Address data:
January 1998 - December 1998 Hamburg
A join for personal and address data is presented as follows:
January 1960 - December 1997 Miller
January 1998 - April 1998 Miller / Hamburg
May 1998 - December 1998 Smith / Hamburg
Only personal data is available in the first partial period. Since the record does not provide the required information, the join's function of providing data from all associated infotypes has not been fulfilled.
The variables Pnnnn_VALID recognize that only incomplete data is available for a particular partial period.
This variable is formed when the report is run for each Pnnnn infotype included in a join.
If data exists in the partial period for the Pnnnn infotype, the variable Pnnnn_VALID is filled with X.
These variables are evaluated as follows:
REPORT RPDEMO03.
TABLES: PERNR.
INFOTYPES: 0002,
0006.
GET PERNR.
PROVIDE * FROM P0002
FROM P0006 BETWEEN PN-BEGDA AND PN-ENDDA
WHERE P0006-SUBTY = '1'.
IF P0006_VALID EQ 'X'.
WRITE: / PERNR-PERNR,
P0002-BEGDA DD/MM/YYYY,
P0002-ENDDA DD/MM/YYYY,
P0002-NACHN,
P0006-ORT01.
ENDIF.
ENDPROVIDE.
A list is generated only if address data is available. The first partial period, for which only personal data is available, is suppressed.
Projection
All data of an infotype is stored on the database with its period of validity.
When you change one or more fields of an infotype record, the system creates a new record with a new validity period. The date on which you changed the record is the start date of this new record.
Therefore, the data fields that are not affected by the changes contain the same data over several infotype records and validity periods.
From a logical perspective, these fields are valid in all infotype records until they are changed.
When seen from this logical perspective, each field of an infotype has its own validity period.
This is illustrated in the following case:
An employee has worked as a programmer for three years in three different personnel areas.
The following organizational assignment data is available:
January 1992 - December 1992: Programmer /personnel area 1
January 1993 - December 1993: Programmer /personnel area 2
January 1994 - December 1994: Programmer /personnel area 3
If you only require the time period during which an employee performs a specific job and not his or her personnel area for an evaluation, the following applies:
January 1996 - December 1998: Programmer
The physical view has three infotype records, the logical view one.
To create meaningful evaluations and avoid redundancies, create logical views for infotype records.
Select the infotype fields that are important for the evaluation and disregard the others.
In the above example, the data in the other fields is invalid for the evaluation since it is unknown which personnel area the employee belonged to from 1996 - 1998.
This view of the validity period of a group of infotype fields is known as projection.
The program code for the projection is:
PROVIDE FROM Pnnnn
BETWEEN PN-BEGDA AND PN-ENDDA .
The infotype data for a projection must be available throughout the entire validity period. If the time periods of certain infotype records overlap, the data cannot be clearly assigned to one period.
Therefore, you should not use projections for infotype records with time constraint three. The report for the above projection is:
REPORT RPABAP04.
TABLES: PERNR.
INFOTYPES: 0001.
GET PERNR.
PROVIDE STELL FROM P0001 BETWEEN PN-BEGDA AND PN-ENDDA.
WRITE: / PERNR-PERNR, P0001-STELL, P0001-BEGDA,
P0001-ENDDA.
ENDPROVIDE .
The logical validity for the activity period is included in the infotype BEGDA and ENDDA fields.
Join and Projection
You can combine the two logical views of infotype data, the join and the projection.
We read the data from several infotypes and create new partial periods. We select the infotype fields that are important for the evaluation and combine these partial periods again.
The following example illustrates this.
An employee works as a programmer in the current year and marries in May. Her name does not change.
Organizational assignment:
January - December Programmer
Personal data:
January - April Donna Debug - single
May - December Donna Debug - married
When the data from both infotypes is read concurrently, the result is:
January - April Donna Debug - single /
programmer
May - December Donna Debug - married /
programmer
Since we can disregard her marital status in the evaluation, we project on her first and last names:
January - December Donna Debug / programmer
The following report exemplifies the above case:
REPORT RPDEMO04.
TABLES: PERNR.
INFOTYPES: 0001,
0002.
GET PERNR.
PROVIDE STELL FROM P0001
NACHN VORNA FROM P0002
BETWEEN PN-BEGDA AND PN-ENDDA
IF P0001_VALID = 'X'.
WRITE: / P0002-NACHN, P0002-VORNA,
P0001-BEGDA DD/MM/YYYY,
P0001-ENDDA DD/MM/YYYY,
P0001-STELL.
ENDIF.
ENDPROVIDE.
This report combines the associated validity periods and provides the data of relevant infotype fields for a specific period.
 Fields which are not accessed have their initial value in the projection.
Provision of data for a specific partial period is especially important for partial period factoring in payroll.
If an employee's basic pay or the cost distribution changes during the payroll period, you must calculate the salary proportionately for the resulting partial periods.
However, if the payroll administrator of the organizational unit changes, this has no effect on payroll.
By linking a join and a projection, you can read the master data for a specific partial period.
Time-Dependent Control Tables
Infotype data is generally coded as a key (for example, infotype P0006, address type 1 = permanent residence) to allow fast data entry and space-saving storage. When you process infotypes, the texts or attributes of the keys are read from the relevant control tables.
In many control tables, storage of data is time-dependent and therefore assigned a validity period.
In HR, this applies to the following areas:
Work schedules
Pay scale structures
Wage types
Wage type valuation
Bank data
Positions
Payee codes
When you read the data for an infotype key from time-dependent control tables, you must determine which record is valid in the specified validity period.
If you use a transaction to process an infotype, the system reads the table record which is valid on the start date.
Generalization of the View
You can use the logical view to edit and output data according to user specifications.
The special feature of HR views is the time dependency of the data. Personnel data is almost always related to specific validity periods. A HR view provides data for specific time intervals.
In general terms, a HR view is a logical perspective of interval-dependent internal tables.
See also:
Processing All Infotype Records (PA-PAD)
Processing All Infotype Records (PA-APP)
Processing a Specific Infotype Record (PA-PAD)
Processing a Specific Infotype Record (PA-APP)
3 Import/Export Files in HR
The following sections describe the purpose of files PCL1 and PCL2 and explains how to access them.
Files PCL1, PCL2, PCL3 and PCL4
Storing Data in PCLn Files
PCLn Buffer
Cluster Directory Manager
3.1 Files PCL1, PCL2, PCL3 and PCL4
Which information is stored in the files?
File PCL1 is the basis for the HR work area data. It contains information from the time data recording, for example, incentive wage time tickets or infotype supplement texts.
File PCL2 contains derived information, for example, payroll results. It also contains all generated payroll schemas.
File PCL3 contains applicant data.
File PCL4 contains the change documents for HR master data and recruitment.
The structure of PCLn files corresponds to that of the INDX file which you may be familiar with from other applications. The structure of all PCLn files (n = 1, 2, 3, and 4) is identical.
Structure of Files
Like in almost all SAP files, the key element with the highest priority is the client; data within a client is grouped according to basic relations (field PCLn-RELID).
The type of basic relation is known as a cluster and characterizes the stored data according to the type, for example, cluster RX contains the payroll result for country X (from table T500L) and cluster TE contains the trip costs data.
Depending on the cluster, the structure of PCLn-SRTFD is defined in a field string xx-KEY, which is defined in an include RPCnxxy0.
Naming conventions
n = 1, 2, 3, or 4 (for PCL1, PCL2, PCL3, or PCL4)
xx = for the cluster
y = 0 for international clusters
y = country grouping according to T500L for national clusters
The personnel number is usually the first component of xx-KEY.
Importing and Exporting Data
The import/export files PCLn are managed with the ABAP/4® commands IMPORT and EXPORT . These commands store objects such as fields, field strings, or internal tables on the database, or read these from the database. Data is read from and written to the database using a unique key( xx-Key).
Please note that the RMAC macros RP-IMP-Cn-xx and RP-EXP-Cn-xx are provided for importing and exporting data. Only these macros should be used.
See also Macro Modules
3.2 Storing Data in PCLn Files
Data from the different HR application areas is stored in data clusters in PCLn files (n = 1, 2, 3, or 4).
This collection of data objects can consist of:
Fields used within reports
Field strings
Internal tables
The structure of the PCLn files provides a framework for the individual application areas.
Each application area must have a two-character cluster name (relation ID). It must also have a key structure; 40 bytes of the SRTFD field are available for this structure.
When a record is exported to the PCLn file, the cluster ID is written to the RELID field and the key value to the SRTFD field.
Naming convention for includes when defining clusters:
RPCnxxy0 n = 1, 2, 3 or 4 (for PCL1, PCL2, PCL3, PCL4)
xx = cluster ID
y = country indicator
Description of Cluster Data using Cluster RX as an Example
The data definition is stored in the include RPC2RX00 in accordance with the above naming conventions.
Structure of cluster key:
Data: BEGIN OF RX-KEY.
INCLUDE STRUCTURE PC200.
DATA: END OF RX-KEY.
The DDIC structure PC200 contains the fields PERNR (personnel number) and SEQNO (sequential number).
The data definition of the cluster also contains other internal tables.
For a list of available data clusters, refer to the domain description in the Data Dictionary.
xx Key
The xx key name is dependent on the cluster.
The RX KEY is used for all Rx and Xx clusters. In all other cases, the name of the xx key corresponds to that of the cluster.
Cluster xx Key
RA RX-KEY
B1 B1-KEY
G3 G3-KEY
XA RX-KEY
3.3 PCLn Buffer
To keep the number of database accesses to a minimum, import and export data is stored in the main memory buffer. Buffer management routines ensure that exported data can be stored in the PCLn files.
The following two examples illustrate which problems can occur without a buffer.
Retroactive accounting of payroll results
Starting payroll in the test mode
Retroactive Accounting of Payroll Results
In February 1998, a retroactive accounting run is executed for January.
FOR PERIOD 199801 IN PERIOD 199802
The payroll results for January are recalculated and then written directly to the database.
Result:
The database now contains the results of the following payroll periods.
FOR-PERIOD 199801 IN-PERIOD 199802
FOR-PERIOD 199801 IN-PERIOD 199801
Payroll is then run for February.
FOR-PERIOD 199802 IN-PERIOD 199802
If problems should arise during the payroll run for this period, the February record is not stored on the database.
Result:
The current January record on the database is:
FOR-PERIOD 199801 IN-PERIOD 199802
This problem does not arise if you use the buffer since all data of a transaction is always updated collectively. In the above example, the recalculated January result would be stored in the buffer and, if the payroll run for February were terminated prematurely, the database would not be updated.
The current January record on the database would thus be:
FOR-PERIOD 199801 IN-PERIOD 199802
Starting Payroll in the Test Mode
In a test run, the database is not updated. Since the payroll results from the previous period are used as the basis for calculating the results of the following period, the results of the actual payroll run would differ from those of the test run, if this test run were executed over several periods.
The use of the buffer enables trouble-free access to the required results for the previous period.
What is required for exporting/importing data to/from the PCLn files using the buffer?
 The following includes contain the data definition for the buffer. They must be included in the report that writes the data to or reads the data from the database.
RPPPXD00
RPPPXD10
 Include RPPPXD10 must be in the common part BUFFER .
Include RPPPXM00, which contains the buffer management routines, is also required.
The macros for importing and exporting data must comply with the following naming convention:
Naming Convention for EXPORT/ IMPORT Macros:
RP-aaa-Cn-xy
where aaa = IMP / EXP, n=1 for PCL1, 2 for PCL2, 3 for PCL3, 4 or PCL4
and xy = cluster name.
This guarantees consistency between the export and import of data and also ensures that all exported objects are imported again.
Export Using the Data Buffer
When macros are used for exporting, records are written to a main memory buffer and not directly to the database. When the program run has been completed, the records in the buffer are stored in the appropriate PCLn database.
Import Using the Data Buffer
When the macros are used to import data, the data records are not read directly from file PCLn. Instead, the system checks the buffer directory to see whether the main memory already contains a record with the same key. If this is not the case, the record is read from PCLn to the buffer and then retrieved from the buffer for the report.
If the import is successful, the return code RP-IMP-xy-SUBRC = 0 is set. When data is read from the buffer, the system carries out a check for cluster authorization. Standard import programs follow the naming convention RPCLSTxy (xy = cluster name).
 report rpttcdmg.
tables:
pernr,
pcl1,
pcl2.
include rpppxd00. "buffer definitions
data: begin of common part 'BUFFER'.
include rpppxd10. "PCLx buffer
data: end of common part.
data: begin of common part 'CLUSTER_DIRECTORY'.
include rpc2cd00. " "cluster directory definitions
data: end of common part.
include rpc2rdd0.
get pernr.
rp-init-buffer. "reset buffer
cd-key-pernr = pernr-pernr.
rp-imp-c2-cd. "read cluster CD from
buffer/DB
perform cd_manager using ... .
alternative: call function rp_evaluation_periods...
rx-key-pernr = pernr-pernr.
rx-key-seqno = rgdir-seqnr.
rp-imp-c2-rd. "read cluster RD from
buffer/DB
rp-exp-c2-rd. "update cluster RD in buffer
perform prepare_update using 'V'. "update database (DB)
Subroutines CD manager and Cluster buffer
include rpcmgr00. "Cluster Directory Manager
include rpppxm00. "module pcl1(2)-buffer
3.4 Cluster Directory
Finding Payroll Results for a Specific Query
Payroll results are stored in cluster Rx of the PCL2.
The cluster key is non-mnemonic. It contains the PERNR (personnel number) and SEQNO (sequential number) fields.
The internal table RGDIR contains a directory entry for each payroll result. This entry is a sequential number (RGDIR-SEQNR) which uniquely identifies the payroll result.
Payroll results can only be imported if the payroll cluster key contains the personnel number and sequential number.
Before you can import a payroll record, you must select the entry in the RGDIR on the basis of existing data such as for-period, for-payroll area, for-payroll category, in-period, in-payroll area, in-payroll category, and so on, in order to determine the sequential number.
You will probably always have the same queries when importing payroll records. For example, "Which payroll results (original and retroactively accounted records) were written for a specific payroll run (defined by IN payroll category, IN payroll area, IN period)"?
There are standard modules that can be used. It is advantageous to use the standard modules rather than self-programmed solutions because no program modifications will be required if the payroll directory changes. The modules are described in the following section:
Function Modules for Selecting Payroll Results
3.5 Function Modules for Selecting Payroll Results
The employees payroll directory is always transferred to the function modules using the table RGDIR.
The modules then transfer the payroll records which satisfy the specified selection criteria using a table whose type corresponds to that of the RGDIR but which has a different name. The selection parameters differ according to the function of the module. For more information, read the module documentation.
All module names begin with CD_.
Function Module: CD_EVALUATION_PERIODS
Function Module: CD_READ_PREVIOUS
Function Module: CD_READ_PREVIOUS_ORIGINAL
Other Modules for the Payroll Cluster
Sample Report
Function Module: CD_EVALUATION_PERIODS
This module transfers the payroll results to a payroll run as A records (current). It also transfers the accompanying P records (previous).
This is the module most frequently used in evaluation programs.
Table contents before the function module is accessed:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY PAYID INPTY INPID
00001 01.1996 01.01.96 01.15.96 01.1996 01.01.96 01.15.96
00002 01.1996 01.01.96 01.15.96 01.16.96 01.16.96 B 0
00003 01.16.96 01.16.96 01.16.96 01.16.96 01.16.96 B 0 B 0
00004 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 0 A 0
00005 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 1 A 1
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96
00007 02.1996 01.16.96 01.31.96 03.1996 02.01.96 01.15.96
00008 03.1996 01.16.96 01.31.96 03.1996 01.01.96 02.15.96
The following parameters are transferred:
- BONUS_DATE = '00000000'
- INPER_MODIF = '02'
- INPER = '199803'
- PAYTY = ' '
- PAYID = ' '
Result:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY INPTY INPID SRTZA
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96 P
00007 02.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96 A
00008 03.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96 A
Explanation of individual fields
Function Module: CD_READ_PREVIOUS
This module transfers a previous payroll record for a payroll record; this is the newest record for the payroll period (or daily payroll run) which was written before the transferred payroll record and contains the same FOR data as the transferring record.
Table contents before the function module is accessed:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY PAYID
00001 01.1996 01.01.96 01.15.96 01.1996 01.01.96 01.15.96
00002 01.1996 01.01.96 01.15.96 01.16.96 01.16.96
00003 01.16.96 01.16.96 01.16.96 01.16.96 01.16.96 B 0
00004 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 0
00005 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 1
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96
00007 02.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
00008 03.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
The following parameters are transferred:
- Record with SEQNR '00007'
Result:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY SRTZA
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96 P
Explanation of individual fields
Function Module: CD_READ_PREVIOUS_ORIGINAL
This module reads the previous original payroll result.
Table contents before the function module is accessed:
SEQNR FPPER FPBEG FPEND INPER IPBEG IIPEND BONDT PAYTY PAYID
00001 01.1996 01.01.96 01.15.96 01.1996 01.01.96 01.15.96
00002 01.1996 01.01.96 01.15.96 01.16.96 01.16.96
00003 01.16.96 01.16.96 01.16.96 01.16.96 01.16.96 B 0
00004 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 0
00005 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 1
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96
00007 02.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
00008 03.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
The following parameters are transferred:
- Record with SEQNR '00008'
Result:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY SRTZA
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.3196 P
Explanation of individual fields
3.6 Other Modules for the Payroll Cluster
Modules which derive information from the payroll cluster are available in addition to the modules for payroll result selection.
1. CD_RETROCALC_PERIOD
This module differentiates between original payroll records and retroactive accounting records.
Table contents before the function module is accessed:
SEQNR FPPER FPBEG FPEND INPER IPBEG IPEND BONDT PAYTY PAYID
00001 01.1996 01.01.96 01.15.96 01.1996 01.01.96 01.15.96
00002 01.1996 01.01.96 01.15.96 01.16.96 01.16.96
00003 01.16.96 01.16.96 01.16.96 01.16.96 01.16.96 B 0
00004 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 0
00005 01.17.96 01.17.96 01.17.96 01.17.96 01.17.96 A 1
00006 02.1996 01.16.96 01.31.96 02.1996 01.16.96 01.31.96
00007 02.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
00008 03.1996 01.16.96 01.31.96 03.1996 02.01.96 02.15.96
The following parameters are transferred:
- Record with SEQNR '00008'
Result:
- CALCD = ' '
Explanation of individual fields
2. CD_PAYROLL_UNTIL
This module reads the RGDIR for the date up to which the regular payroll run was executed for an employee.
3. CD_HIGHEST_PAYDT
This module reads the most recent check date for an employee from the RGDIR.
4. CD_GET_INFO
This module provides information (most recent check date, accounted to date) for a particular personnel number.
3.7 Explanation of Individual Fields
For-Information
The FPPER, FPBEG, FPEND, BONDT, PAYTY, PAYID, ABKRS, PERMO, PAYDT, JUPER fields contain information on the period for which payroll is run.
In-Information
The INPER, IPEND, INPTY, INPID, IABKRS, IPERM fields contain information on the period in which payroll is run.
SEQNR
The field is used as a key to uniquely identify the payroll record.
This field also defines the sequence of payroll results (history).
Control Indicator (SRTZA)
Control indicator Meaning
a Current
p Previous
o Old
 For more information, see the online documentation for the individual function modules.
3.8 Sample Report
REPORT RPTTMWBS.
DATA: RGDIR LIKE PC261 OCCURS 0 WITH HEADER LINE.
DATA: EVPDIR LIKE RGDIR OCCURS 0 WITH HEADER LINE.
DATA: PREVIOUS_RESULTS LIKE RGDIR OCCURS 0 WITH HEADER LINE.
DATA: CALCD TYPE C.
DATA: IN_ENTRY LIKE PC261.
DATA: OUT_ENTRY LIKE PC261.
INCLUDE RPCCCD09.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
PERSNR = '00021218'
TABLES IN_RGDIR = RGDIR
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2.
Read RGDIR
CALL FUNCTION 'CD_EVALUATION_PERIODS'
EXPORTING
BONUS_DATE = '00000000'
INPER_MODIF = '02'
INPER = '199603'
PAY_TYPE = CD_C-REGULAR
PAY_IDENT = ' '
TABLES
RGDIR = RGDIR
EVPDIR = EVPDIR
IABKRS =
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2.
output:
00006
00007
00008
Read regular payroll results for January
A results (original result plus retroactive calculations)
and P results
LOOP AT EVPDIR WHERE SRTZA = CD_C-ACTUAL.
Only current results (00007 and 00008)
CALL FUNCTION 'CD_RETROCALC_PERIOD'
EXPORTING
ENTRY = EVPDIR
IMPORTING
CALCD = CALCD
EXCEPTIONS
OTHERS = 1.
Determine, whether original result
CHECK CALCD = ' '.
Special processing: Only the original period
March is processed (seqnr 00008).
IN_ENTRY = EVPDIR.
CALL FUNCTION 'CD_READ_PREVIOUS_ORIGINAL'
EXPORTING
IN_RECORD = IN_ENTRY
IMPORTING
OUT_RECORD = OUT_ENTRY
TABLES
RGDIR = RGDIR
EXCEPTIONS
OTHERS = 1.
out_entry now contains the previous results
Input 00008 ----> Output 00006
ENDLOOP.
LOOP AT EVPDIR WHERE SRTZA = CD_C-ACTUAL.
IN_ENTRY = EVPDIR.
CALL FUNCTION 'CD_READ_PREVIOUS'
EXPORTING
IN_RECORD = IN_ENTRY
TABLES
RGDIR = RGDIR
OUT_RGDIR = PREVIOUS_RESULTS
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2.
Input 00007 ---> 00006
Input 00008 ---> no record found
Output structure is a table, since there can be
several previous results: for example, if legal person
changes, and is retroactively deleted
ENDLOOP
4 Specific Commands
The following sections describe the different specific commands in HR.
Function modules in HR
Macro modules
4.1 Function Modules in HR
Function modules are program modules which have a defined interface and allow type testing of parameters.
They are managed with transaction SE37 and combined to function groups according to relevant criteria. You can access this transaction under Tools  ABAP Workbench  Function Builder.
The HR function groups use the naming convention RPxx or HRxx where xx is an identifier of your choice.
You can use the SHOW FUNCTION * editor command to branch from report processing to function module display.
4.2 Macro Modules
Definition
An module that can be called within an ABAP program.
Use
Like subprograms and function modules, macro modules are a means of presenting programs in modular form. Macro modules (macros) are used often in the Human Resources application component (HR).
Defining and Calling Modules
Two options are provided:
Macros can be defined in reports or includes using the ABAP command DEFINE. A macro can be used within a report or within an include. If a macro is used in a report, and the macro is defined in an include with the DEFINE command, the include must be integrated.
 Macros have the following advantages:
If a macro is changed, each report using this macro is automatically regenerated when it is executed.
Macros can also be defined as RMAC macros. The source code of these modules is stored in the function section of the control table TRMAC (Macros in ABAP Programs). The coding is grouped under a specific name in the table key.
According to conventions, the first two letters of the name must stand for the application. The rest of the name is freely definable.
 Customer-specific RMAC modules should begin with a special character.
The macros defined in the control table TRMAC can be used by all reports.
 When you change a RMAC macro in the table TRMAC, the reports that use this macro are not regenerated automatically. You must regenerate them manually.
The following section includes a list of programming utilities for the logical databases PNP and PAP.
5 Utilities in HR
The following utilities are available.
General Utilities
Report Meaning
RPUACG00 Code generation / authorization check
RPUAUD00 Infotype auditing
Programming Utilities
Report Meaning
RPINCL10 String search in reports
Cluster Utilities
Report Meaning
RPCLSTyy Display cluster for PCLx (yy = RELID)
RPUPxD00 Delete cluster for PCLx (individual data records)
RPUPxD10 Delete cluster for PCLx (several data records)
6 References:
Different parts of the document has been prepared with the help of articles available on Internet
Following websites are referred :
a). http://help.sap.com
b). http://sapfans.com
c). http://www.sap-basis-abap.com/saphr.htm -
hi gurus
i need some information about basic abap programming like archieving,periodical job,batch job , user exist,varients
any info about batch job management?? (abap)
help ful answers reward points
[email protected]
kishoreHi
Follow this detail PDF File
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Regards
Rehman
Reward Points If Useful -
Need case studies and sample code for all concept of ABAP
Hello,
Can anybody provide me the case studies and sample code for learning different concepts in ABAP programming like: module pool, ALV, interactive reports, BDC, Smart Form etc.? As I want to do some practical application by which i can learn more.
Thanks & Regards,
Vikram RawalIn this link You can find Step by Step Scren Shot document :
http://www.201interviewquestions.com/docs/User%20exits.ppt
http://erpgenie.com/abaptips/component/option,com_docman/task,doc_details/gid,27/
<b>
Reprots</b>
http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
<b>Dictionary</b>
http://sapabap.iespana.es/sapabap/manuales/learnabap/
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb6e446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ea31446011d189700000e8322d00/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCDWBDIC/BCDWBDIC.pdf
<b>ABAP objects</b>
Please check this online document (starting page 1291).
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Also check this links as well.
http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.futureobjects.de/content/intro_oo_e.html
http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
/people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
<b>
SAPScripts</b>
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
SAP SCRIPT FIELDS
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
scripts easy material
http://www.allsaplinks.com/sap_script_made_easy.html
Check these step-by-step links
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
<b>Smartforms material</b>
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
<b>
BAPI</b>
http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
<b>List of all BAPIs</b>
http://www.planetsap.com/LIST_ALL_BAPIs.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
http://www.sapdevelopment.co.uk/
http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
<b>ALV programs.</b>
http://www.geocities.com/mpioud/Abap_programs.html
. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
<b>ALV</b>
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
<b>Top-of-page in ALV</b>
selection-screen and top-of-page in ALV
<b>ALV Group Heading</b>
http://www.sap-img.com/fu037.htm
<b>ALV</b>
http://www.geocities.com/mpioud/Abap_programs.html
<b>
RFC Destination</b>
Re: SM59
<b>
ALE/ IDOC</b>http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
<b>Table Control</b>
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/table%20control%20in%20abap.pdf
<b>
ABAP transactions</b>
http://www.easymarketplace.de/transactions-a-e.php?Area=4soi&name=volker&pw=vg&
Regards,
Priyanka. -
Why we need crm middleware for material replication?
Hi Experts,
Why we need CRM middleware for material replication from ECC to SRM when we can do the vendor replication from ECC to SRM with ABAP report? IS there any technical limitation?
Thanks and regards,
RanjanHello,
Vendors and locations, for example, you can replicate from ECC to SRM using ABAP reports.
However, if you want to replicate the following information, you should use the middleware:
- DNL-CUST-BASIS3 - Basis CRM online
- DNL-CUST-PROD0 - Material number conversions
- DNL-CUST-PROD1 - Product : categories
- DNL_CUST_SRVMAS - Customizing: Service Master
- MATERIAL - R/3 Material Master
- SERVICE_MASTER - R/3 Service Master
Check note 872533. It provides more information.
Regards,
Ricardo -
I need hr abap programs and syntax?
i need hr abap programs and syntax?
Check with below one example :
REPORT ZPETROL_EXCLUDE .
TABLES SSCRFIELDS.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECTION-SCREEN SKIP 9.
PARAMETERS NUMBER(200) TYPE C.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN:
BEGIN OF LINE,
PUSHBUTTON 2(10) TEXT-001 USER-COMMAND PROC,
END OF LINE.
SELECTION-SCREEN END OF SCREEN 100.
CALL SCREEN 100.
AT SELECTION-SCREEN.
CASE SSCRFIELDS.
WHEN 'PROC'.
SET PARAMETER ID: 'NUM' FIELD NUMBER.
CALL TRANSACTION 'ZP_PALLOWANCE'.
LEAVE TO SCREEN 0.
ENDCASE.
SECOND PRG
REPORT ZPR_PETROL_ALLOWANCE NO STANDARD PAGE
HEADING .
*-- Infotypes
INFOTYPES : 0000, "Actions
0002, "Personal Data
0008. "Basic pay details
*-- Tables
TABLES : PERNR, "Standard Selections for HR Master Data Reporting
PC207, "Payroll Results: Results Table
PCL1, "HR Cluster 1
PCL2, "HR Cluster 2
T510, "Pay scales
T549A, "Payroll areas
T549Q, "Payroll Periods
PA0002. "Personal details
*-- Internal Tables
*-- Internal Table Declaration For Holding The Data
DATA: BEGIN OF INT_PETROL OCCURS 0,
PERNR LIKE PA0008-PERNR, "Personnel Number
TRFST LIKE PA0008-TRFST, "Pay Scale Level
NAME(40), "Name of Employee
PALLOWANCE TYPE P DECIMALS 2, "Petrol Allowance Amount
END OF INT_PETROL.
DATA: BEGIN OF PA0015_DATA OCCURS 0,
PERNR LIKE PA0015-PERNR,
BETRG LIKE PA0015-BETRG,
END OF PA0015_DATA.
DATA:BEGIN OF INT_PETROL2 OCCURS 0,
PERNR LIKE PA0008-PERNR, "Personnel Number
VORNA LIKE PA0002-VORNA, "First Name
NACHN LIKE PA0002-NACHN, "Last Name
TRFST LIKE PA0008-TRFST, "Pay Scale Level
NAME(40), "Name of Employee
PALLOWANCE TYPE P DECIMALS 2, "Petrol Allowance Amount
END OF INT_PETROL2.
DATA : TITLE TYPE LVC_TITLE.
DATA: BEGIN OF PER_NO OCCURS 0,
PERNR LIKE PA0008-PERNR,
TRFST LIKE PA0008-TRFST,
END OF PER_NO.
DATA: BEGIN OF MSG OCCURS 0,
MSG1(100) TYPE C,
END OF MSG.
DATA: FLAG TYPE I VALUE '0',
DIS_FLAG TYPE I VALUE '0'.
DATA: INT_PETROL3 LIKE STANDARD TABLE OF INT_PETROL2 INITIAL SIZE 0
WITH HEADER LINE.
DATA: INT_PETROL1 LIKE STANDARD TABLE OF INT_PETROL INITIAL SIZE 0 WITH
HEADER LINE.
DATA: WA_PET_ALLOWANCE TYPE ZBPETROL_ALL. "WORKAREA FOR INSERTING
VALUES.
*DATA: P_LGART1 LIKE T512T-LGART VALUE '0010'. "CHANGE WAGE TYPE HERE
DATA: P_LGART1 LIKE T512T-LGART VALUE '0077'. "CHANGE WAGE TYPE HERE
DATA: BEGIN OF INT_0015 OCCURS 0,
PERNR(038),
BEGDA(010),
BETRG(018),
END OF INT_0015.
*-- Internal Table To Store Error Records.
DATA: E_INT_0015 LIKE INT_0015 OCCURS 0 WITH HEADER LINE.
*-- Batch Input Data of Single Transaction
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*-- Internal Table For Export and Import Payroll Results
DATA: INT_RGDIR LIKE PC261 OCCURS 0 WITH HEADER LINE,
LGTXT LIKE T512T-LGTXT.
DATA: BEGIN OF EMP_NO OCCURS 0,
PERNR(4) TYPE C,
END OF EMP_NO.
DATA: BEGIN OF EMP_NO1 OCCURS 0,
PERNR TYPE I,
END OF EMP_NO1.
DATA EMPNO LIKE STANDARD TABLE OF EMP_NO INITIAL SIZE 0.
DATA EMPNO1 LIKE STANDARD TABLE OF EMP_NO1 INITIAL SIZE 0 WITH HEADER
LINE.
DATA LEN1 TYPE I.
DATA: ERR LIKE MESSAGE.
DATA TEMP_NUM(200) TYPE C.
*-- Includes
*-- International Include
INCLUDE RPC2CD09. "Cluster CD data definition
INCLUDE RPC2CA00. "Cluster CA Data-Definition
INCLUDE RPPPXD00. "Data Definition buffer PCL1/PCL2 Buffer INCLUDE RPPPXD10.
"Common part buffer PCL1/PCL2 INCLUDE RPPPXM00. "Buffer Handling routine
*-- Country Specific Include
INCLUDE PC2RXIN0. "Cluster IN data definition
INCLUDE RPC2RX09.
*-- ALV Declaration
TYPE-POOLS : SLIS.
DATA: INT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
INT_EVENTS TYPE SLIS_T_EVENT,
INT_LAYOUT TYPE SLIS_LAYOUT_ALV,
WS_EVENTS TYPE SLIS_ALV_EVENT,
WS_REPID LIKE SY-REPID.
*-- Initialization
INITIALIZATION.
WS_REPID = SY-REPID.
*-- At Selection-Screen
START-OF-SELECTION.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) TEXT-002.
SELECTION-SCREEN POSITION 33.
PARAMETERS: P_RATE TYPE P DECIMALS 2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-003.
SELECTION-SCREEN BEGIN OF BLOCK B3.
PARAMETERS: P_UPLOAD AS CHECKBOX,
P_FG RADIOBUTTON GROUP G1,
P_BG RADIOBUTTON GROUP G1.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN BEGIN OF BLOCK B4.
PARAMETERS: P_DI AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK B4.
SELECTION-SCREEN END OF BLOCK B2.
AT SELECTION-SCREEN.
*-- Wate Type Text
SELECT SINGLE LGTXT INTO LGTXT FROM T512T WHERE SPRSL = 'E' AND
MOLGA = '40' AND LGART = P_LGART1 .
*-- Data Retrieval From Logical Database PNP
GET PERNR.
PROVIDE PERNR FROM P0000 VORNA NACHN FROM P0002 BETWEEN PN-BEGDA AND
PN-ENDDA.
INT_PETROL1-PERNR = P0000-PERNR.
CONCATENATE P0002-VORNA P0002-NACHN INTO INT_PETROL1-NAME SEPARATED
BY SPACE.
ENDPROVIDE.
*-- Clear Data
CLEAR: RGDIR, INT_RGDIR.
REFRESH: RGDIR, INT_RGDIR.
*-- Read All The Payroll Runs For An Employee
CD-KEY-PERNR = PERNR-PERNR.
RP-IMP-C2-CU.
CHECK RP-IMP-CD-SUBRC EQ 0.
*-- Clear Data
REFRESH: RT.
Read IN Cluster.
LOOP AT RGDIR WHERE FPBEG >= PN-BEGDA AND FPEND <= PN-ENDDA.
MOVE-CORRESPONDING RGDIR TO INT_RGDIR.
APPEND INT_RGDIR.
CLEAR INT_RGDIR.
ENDLOOP.
Read the last record.
SORT INT_RGDIR BY SEQNR DESCENDING.
READ TABLE INT_RGDIR INDEX 1.
RX-KEY-SEQNO = INT_RGDIR-SEQNR.
RX-KEY-PERNR = PERNR-PERNR.
RP-IMP-C2-IN.
CHECK RP-IMP-IN-SUBRC EQ 0.
READ TABLE RT WITH KEY LGART = P_LGART1.
IF SY-SUBRC = 0.
INT_PETROL1-PALLOWANCE = RT-BETRG.
ENDIF.
APPEND INT_PETROL1.
CLEAR INT_PETROL1.
SELECT TRFST PERNR
INTO CORRESPONDING FIELDS OF TABLE PER_NO
FROM PA0008
WHERE TRFST LIKE 'L%'
AND BET01 > 0.
SORT PER_NO.
DELETE ADJACENT DUPLICATES FROM PER_NO.
*-- END-OF-SELECTION.
END-OF-SELECTION.
LOOP AT INT_PETROL1.
READ TABLE PER_NO WITH KEY PERNR = INT_PETROL1-PERNR.
IF SY-SUBRC = 0.
INT_PETROL-TRFST = PER_NO-TRFST.
MODIFY INT_PETROL1 FROM INT_PETROL TRANSPORTING TRFST.
ENDIF.
ENDLOOP.
SORT INT_PETROL1.
DELETE ADJACENT DUPLICATES FROM INT_PETROL1.
CONCATENATE 'From' ' : ' PN-BEGDA6(2) '.' PN-BEGDA4(2) '.' PN-
BEGDA+0(4)
' To' ' : ' PN-ENDDA6(2) '.' PN-ENDDA4(2) '.' PN-ENDDA+0(4)
INTO TITLE.
IF P_DI = 'X'. "TO DISPLAY PETROL ALLOWANCE ONLY
IF PNPTIMRA = 'X'. "CHECK OTHER PERIOD CHECKED
DIS_FLAG = 1.
ENDIF.
IF PNPTIMR9 = 'X'. "CHECK TO SEE CURRENT PERIOD SELECTED
CASES - NO RATE GIVEN, RATE GIVEN
CURRENT PERIOD UPLOADED BUT PAYROLL NOT WRITTEN SO NO RESULT FROM LDB
SELECT RATE INTO P_RATE FROM ZBPETROL_ALL WHERE BEGDA = PN- BEGDA AND ENDDA = PN-ENDDA.
ENDSELECT.
IF SY-DBCNT = 0.
MESSAGE I455(0) WITH 'NO PETROL RATE EXSISTS'.
ELSE.
FLAG = 1.
ENDIF. "OF SY-DBCNT
IF P_RATE > 0 AND FLAG = 1. " PETROL RATE EXSISTS.
SELECT PERNR SUM( BETRG ) INTO TABLE PA0015_DATA
FROM PA0015
WHERE BEGDA BETWEEN PN-BEGDA AND PN-ENDDA
GROUP BY PERNR.
SELECT APERNR ATRFST BVORNA BNACHN
INTO CORRESPONDING FIELDS OF TABLE INT_PETROL3
FROM PA0008 AS A
INNER JOIN PA0002 AS B ON BPERNR = APERNR
WHERE A~TRFST LIKE 'L%'
AND A~BET01 > 0.
SORT INT_PETROL3.
DELETE ADJACENT DUPLICATES FROM INT_PETROL3.
REFRESH INT_PETROL1.
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
employee name
CONCATENATE INT_PETROL2-VORNA INT_PETROL2-NACHN INTO
INT_PETROL2-NAME SEPARATED BY SPACE.
MODIFY INT_PETROL3 FROM INT_PETROL2 TRANSPORTING NAME.
ENDLOOP.
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
one
table to another table
READ TABLE PA0015_DATA WITH KEY PERNR = INT_PETROL2-PERNR.
IF SY-SUBRC = 0.
INT_PETROL-PERNR = INT_PETROL2-PERNR.
INT_PETROL-TRFST = INT_PETROL2-TRFST.
INT_PETROL-NAME = INT_PETROL2-NAME.
INT_PETROL-PALLOWANCE = PA0015_DATA-BETRG.
APPEND INT_PETROL TO INT_PETROL1.
ENDIF.
ENDLOOP.
DIS_FLAG = 1.
ENDIF. "P_RATE > 0 AND FLAG = 1.
IF P_RATE > 0 AND FLAG = 0. "CURRENT PERIOD AND DATA NOT UPLOADED
SELECT APERNR ATRFST BVORNA BNACHN
INTO CORRESPONDING FIELDS OF TABLE INT_PETROL3
FROM PA0008 AS A
INNER JOIN PA0002 AS B ON BPERNR = APERNR
WHERE A~TRFST LIKE 'L%'
AND A~BET01 > 0.
SORT INT_PETROL3.
DELETE ADJACENT DUPLICATES FROM INT_PETROL3.
REFRESH INT_PETROL1.
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
employee name
CONCATENATE INT_PETROL2-VORNA INT_PETROL2-NACHN INTO
INT_PETROL2-NAME SEPARATED BY SPACE.
MODIFY INT_PETROL3 FROM INT_PETROL2 TRANSPORTING NAME.
ENDLOOP.
PERFORM GET_VALUE. "TO CONVERT THE FIRST SCREEN PERNR INTO
NUMBER FORMATE
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
one
table to another table
READ TABLE EMPNO1 WITH KEY PERNR = INT_PETROL2-PERNR.
IF SY-SUBRC <> 0.
INT_PETROL-PERNR = INT_PETROL2-PERNR.
INT_PETROL-TRFST = INT_PETROL2-TRFST.
INT_PETROL-NAME = INT_PETROL2-NAME.
APPEND INT_PETROL TO INT_PETROL1.
ENDIF.
ENDLOOP.
PERFORM CAL_ALLOWANCE.
ENDIF. " OF P_RATE > 0
DIS_FLAG = 1.
ENDIF. " OF CURRENT PERIOD CHECK.
ENDIF. " OF CHECK DISPLAY.
*----BDC
IF P_UPLOAD = 'X'.
IF PNPTIMRA = 'X'. "CHECK OTHER PERIOD CHECKED
MESSAGE I455(0) WITH 'Petrol Allowance cannot be uploaded'.
LEAVE SCREEN.
ENDIF.
IF P_RATE > 0.
IF P_RATE > 0 OR P_RATE = 0.
IF PNPTIMR9 = 'X'. "CHECK TO SEE CURRENT PERIOD SELECTED
WA_PET_ALLOWANCE-BEGDA = PN-BEGDA.
WA_PET_ALLOWANCE-ENDDA = PN-ENDDA.
WA_PET_ALLOWANCE-RATE = P_RATE.
WA_PET_ALLOWANCE-CURR = 'INR'.
INSERT INTO ZBPETROL_ALL VALUES WA_PET_ALLOWANCE.
SELECT A~PERNR A~TRFST B~VORNA B~NACHN
INTO CORRESPONDING FIELDS OF TABLE INT_PETROL3
FROM PA0008 AS A
INNER JOIN PA0002 AS B ON B~PERNR = A~PERNR
WHERE A~TRFST IN ('L1' , 'L2' , 'L3')
AND A~BET01 > 0.
SORT INT_PETROL3.
DELETE ADJACENT DUPLICATES FROM INT_PETROL3.
REFRESH INT_PETROL1.
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
employee name
CONCATENATE INT_PETROL2-VORNA INT_PETROL2-NACHN INTO
INT_PETROL2-NAME SEPARATED BY SPACE.
MODIFY INT_PETROL3 FROM INT_PETROL2 TRANSPORTING NAME.
ENDLOOP.
PERFORM GET_VALUE. "TO CONVERT THE FIRST SCREEN PERNR INTO
NUMBER FORMATE
LOOP AT INT_PETROL3 INTO INT_PETROL2. "loop to transport
one
table to another table
READ TABLE EMPNO1 WITH KEY PERNR = INT_PETROL2-PERNR.
IF SY-SUBRC <> 0.
INT_PETROL-PERNR = INT_PETROL2-PERNR.
INT_PETROL-TRFST = INT_PETROL2-TRFST.
INT_PETROL-NAME = INT_PETROL2-NAME.
APPEND INT_PETROL TO INT_PETROL1.
ENDIF.
ENDLOOP.
PERFORM CAL_ALLOWANCE.
DIS_FLAG = 1.
SORT INT_PETROL1.
LOOP AT INT_PETROL1.
MOVE: INT_PETROL1-PERNR TO INT_0015-PERNR,
INT_PETROL1-PALLOWANCE TO INT_0015-BETRG.
CONCATENATE PN-ENDDA6(2) PN-ENDDA4(2) PN-ENDDA+0(4) INTO
INT_0015-BEGDA SEPARATED BY '.'.
APPEND INT_0015.
CLEAR INT_0015.
ENDLOOP.
LOOP AT INT_0015.
PERFORM F_BDCDATA.
IF P_FG = 'X'.
CALL TRANSACTION 'PA30' USING BDCDATA MODE 'A' UPDATE 'S'.
ELSE.
CALL TRANSACTION 'PA30' USING BDCDATA MODE 'N' UPDATE 'S'.
ENDIF.
*-- Handling Error records.
IF SY-SUBRC <> 0.
*-- Handling Error Messages
PERFORM ERROR_MSG.
MOVE-CORRESPONDING INT_0015 TO E_INT_0015.
APPEND E_INT_0015.
CLEAR E_INT_0015.
ENDIF.
REFRESH BDCDATA.
ENDLOOP.
*-- Downloading Error Records.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:\Errors.Txt'
FILETYPE = 'ASC'
TABLES
DATA_TAB = E_INT_0015.
*-- Downloading Error Messages.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:\Err_Msg.Txt'
FILETYPE = 'ASC'
TABLES
DATA_TAB = MSG.
ENDIF. " FOR CURRENT PERIOD
ENDIF.
ELSE.
MESSAGE I455(0) WITH 'Enter Petrol Rate'.
LEAVE TO SCREEN 0.
ENDIF. " FOR PETROL RATE
ENDIF. " FOR UPLOAD
IF DIS_FLAG = 1.
INT_LAYOUT-SUBTOTALS_TEXT = TEXT-004.
INT_LAYOUT-TOTALS_TEXT = TEXT-004.
INT_LAYOUT-ZEBRA = 'X'.
PERFORM FILL_FIELDCAT.
PERFORM GET_EVENTS_ALV.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = WS_REPID
IS_LAYOUT = INT_LAYOUT
IT_FIELDCAT = INT_FIELDCAT[]
I_DEFAULT = 'X'
I_SAVE = 'X'
IT_EVENTS = INT_EVENTS
TABLES
T_OUTTAB = INT_PETROL1
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
*& Form GET_VALUE
text
FORM GET_VALUE.
GET PARAMETER ID: 'NUM' FIELD TEMP_NUM.
IF TEMP_NUM <> ''.
LEN1 = STRLEN( TEMP_NUM ).
PERFORM GET_PERNR.
APPEND TEMP_NUM TO EMPNO.
LOOP AT EMPNO INTO EMP_NO.
CALL FUNCTION 'CHECK_AND_CONVERT_NUMERICS'
EXPORTING
DFELD = ' '
DMZEI = ','
DTYPE = 'STRING'
DYPNO = ' '
EFELD = EMP_NO-PERNR
FNAME = ' '
PROGR = ' '
IMP_DECIMALS = '0'
IMPORTING
ERROR =
IFELD = EMP_NO1-PERNR
MESSG = ERR
MSGLN =
IF ( ERR-MSGID = '' ).
APPEND EMP_NO1 TO EMPNO1.
CLEAR EMP_NO1-PERNR.
ELSE.
MESSAGE I455(0) WITH 'Could not convert employee number'.
LEAVE TO SCREEN 0.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. "GET_VALUE
*& Form GET_PERNR
text
FORM GET_PERNR.
SPLIT TEMP_NUM AT ',' INTO EMP_NO TEMP_NUM.
APPEND EMP_NO TO EMPNO.
CLEAR EMP_NO.
SEARCH TEMP_NUM FOR ','.
IF SY-SUBRC = 0.
PERFORM GET_PERNR.
ENDIF.
ENDFORM. "GET_PERNR
*& Form ERROR_MSG
text
--> p1 text
<-- p2 text
FORM ERROR_MSG.
IF SY-SUBRC <> 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
LANG = SY-LANGU
IMPORTING
MSG = MSG-MSG1.
APPEND MSG.
CLEAR MSG.
ENDIF.
ENDFORM. "ERROR_MSG
*& Form F_BDCDATA
text
FORM F_BDCDATA.
PERFORM BDC_DYNPRO USING 'SAPMP50A' '1000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=INS'.
PERFORM BDC_FIELD USING 'RP50G-PERNR'
INT_0015-PERNR.
PERFORM BDC_FIELD USING 'RP50G-TIMR6'
'X'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RP50G-CHOIC'.
PERFORM BDC_FIELD USING 'RP50G-CHOIC'
'0015'.
PERFORM BDC_DYNPRO USING 'MP001500' '2000'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'Q0015-BETRG'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'P0015-LGART'
'0077'. "CHANGE WAGE TYPE HERE
ALSO
PERFORM BDC_FIELD USING 'Q0015-BETRG'
INT_0015-BETRG.
PERFORM BDC_FIELD USING 'P0015-WAERS'
'INR'.
PERFORM BDC_FIELD USING 'P0015-BEGDA'
INT_0015-BEGDA.
PERFORM BDC_DYNPRO USING 'MP001500' '2000'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'P0015-LGART'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=UPD'.
PERFORM BDC_FIELD USING 'P0015-LGART'
'0077'. "CHANGE WAGE TYPE HERE
ALSO
PERFORM BDC_FIELD USING 'Q0015-BETRG'
INT_0015-BETRG.
PERFORM BDC_FIELD USING 'P0015-WAERS'
'INR'.
PERFORM BDC_FIELD USING 'P0015-BEGDA'
INT_0015-BEGDA.
ENDFORM. "F_BDCDATA
*& Form BDC_DYNPRO
text
-->P_0732 text
-->P_0733 text
FORM BDC_DYNPRO USING VALUE(P_0732) TYPE C
VALUE(P_0733) TYPE C.
CLEAR BDCDATA.
BDCDATA-PROGRAM = P_0732.
BDCDATA-DYNPRO = P_0733.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
text
-->P_0755 text
-->P_0756 text
FORM BDC_FIELD USING VALUE(P_0755) TYPE C
VALUE(P_0756) TYPE C.
CLEAR BDCDATA.
BDCDATA-FNAM = P_0755.
BDCDATA-FVAL = P_0756.
APPEND BDCDATA.
ENDFORM. " BDC_FIELD
*& Form CAL_ALLOWANCE
text
FORM CAL_ALLOWANCE.
LOOP AT INT_PETROL1 INTO INT_PETROL.
IF INT_PETROL-TRFST = 'L1'.
INT_PETROL-PALLOWANCE = P_RATE * 100. "CHANGE TO SELECT WHEN
DISPLAY
ELSEIF INT_PETROL-TRFST = 'L2'.
INT_PETROL-PALLOWANCE = P_RATE * 150.
ELSEIF INT_PETROL-TRFST = 'L3'.
INT_PETROL-PALLOWANCE = P_RATE * 150.
ELSEIF INT_PETROL-TRFST = 'L4'.
INT_PETROL-PALLOWANCE = P_RATE * 200.
ELSEIF INT_PETROL-TRFST = 'L5'.
INT_PETROL-PALLOWANCE = P_RATE * 250.
ENDIF.
MODIFY INT_PETROL1 FROM INT_PETROL TRANSPORTING PALLOWANCE.
ENDLOOP.
ENDFORM. "CAL_ALLOWANCE
*& Form FILL_FIELDCAT
text
--> p1 text
<-- p2 text
FORM FILL_FIELDCAT.
INT_FIELDCAT-COL_POS = 1.
INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
INT_FIELDCAT-FIELDNAME = 'PERNR'.
INT_FIELDCAT-SELTEXT_L = TEXT-005.
INT_FIELDCAT-OUTPUTLEN = 10.
INT_FIELDCAT-KEY = 'X'.
APPEND INT_FIELDCAT.
CLEAR INT_FIELDCAT.
INT_FIELDCAT-COL_POS = 2.
INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
INT_FIELDCAT-FIELDNAME = 'NAME'.
INT_FIELDCAT-SELTEXT_L = TEXT-006.
INT_FIELDCAT-OUTPUTLEN = 25.
INT_FIELDCAT-KEY = 'X'.
APPEND INT_FIELDCAT.
CLEAR INT_FIELDCAT.
INT_FIELDCAT-COL_POS = 3.
INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
INT_FIELDCAT-FIELDNAME = 'TRFST'.
INT_FIELDCAT-SELTEXT_L = TEXT-007.
INT_FIELDCAT-OUTPUTLEN = 5.
INT_FIELDCAT-KEY = 'X'.
APPEND INT_FIELDCAT.
CLEAR INT_FIELDCAT.
INT_FIELDCAT-COL_POS = 4.
INT_FIELDCAT-TABNAME = 'INT_PETROL1'.
INT_FIELDCAT-FIELDNAME = 'PALLOWANCE'.
INT_FIELDCAT-SELTEXT_L = TEXT-008.
INT_FIELDCAT-OUTPUTLEN = 16.
INT_FIELDCAT-KEY = 'X'.
APPEND INT_FIELDCAT.
CLEAR INT_FIELDCAT.
ENDFORM. " FILL_FIELDCAT
*& Form GET_EVENTS_ALV
text
--> p1 text
<-- p2 text
FORM GET_EVENTS_ALV.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 1
IMPORTING
ET_EVENTS = INT_EVENTS[]
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE INT_EVENTS INTO WS_EVENTS WITH KEY NAME =
SLIS_EV_TOP_OF_PAGE.
IF SY-SUBRC = 0.
WS_EVENTS-FORM = 'TOP'.
MODIFY INT_EVENTS FROM WS_EVENTS INDEX SY-TABIX.
ENDIF.
ENDFORM. " GET_EVENTS_ALV
*& Form TOP-OF-PAGE
text
FORM TOP.
*-- ALV Declarations
DATA: WS_HEADER TYPE SLIS_T_LISTHEADER,
WA_HEADER TYPE SLIS_LISTHEADER.
*-- Title
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = TEXT-009.
APPEND WA_HEADER TO WS_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = TITLE.
APPEND WA_HEADER TO WS_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = ' '.
APPEND WA_HEADER TO WS_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = ' '.
APPEND WA_HEADER TO WS_HEADER.
CLEAR WA_HEADER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = WS_HEADER
I_LOGO = 'LOGO'.
ENDFORM. "TOP-OF-PAGE
HR deals with the INFOTYPES which are similar to Tables in General ABAP.
There are different ways of fetching data from these infotypes.
There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
Infotypes for these areas are different from one another area.
storing of records data in each type of area is different
LDBS like PNP are used in HR programing.
Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
On the whole Normal ABAP is different from HR abap.
For Personal Admn the Infotypes start with PA0000 to PA1999
Time Related Infotypes start with PA2000 to PA2999.
Orgn related Infotypes start with HRP1000 to HRP1999.
All custom developed infotypes stsrat with PA9000 onwards.
In payroll processing we use Clusters like PCL1,2,3 and 4.
Instead of Select query we use PROVIDE and ENDPROVIDE..
You have to assign a Logical Database in the attributes PNP.
Go through the SAp doc for HR programming and start doing.
http://www.sapdevelopment.co.uk/hr/hrhome.htm
See:
http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
sites regarding hr-abap:
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
You can see some Standard Program examples in this one ...
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
http://www.erpgenie.com/faq/hr.htm.
http://www.planetsap.com/hr_abap_main_page.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
These are the FAQ's that might helps you as well.
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm
http://www.planetsap.com/hr_abap_main_page.htm
http://www.atomhr.com/library_full.htm
HR Long texts Upload
Look at the below link
BDC - hr maintain text
Please refer to the following sample program for accessing PCH LDB.
For concept to start with refer url:
http://www.sap-press.de/download/dateien/860/sappress_mysap_hr_technical_principles2.pdf
It contains info regarding PCH Reporting.
REPORT zhsol010.
TABLES: objec, gdstr.
INFOTYPES: 0002, 0006, 1003.
DATA: stabs LIKE p1003-stabs,
name LIKE p0001-ename.
INITIALIZATION.
pchotype = 'O'.
pchwegid = 'O-S-P'.
GET objec.
IF objec-otype = 'S'.
CLEAR stabs.
LOOP AT p1003 WHERE begda LE pc-endda
AND endda GE pc-begda.
IF p1003-stabs = 'X'.
stabs = 'X'.
WRITE : / objec-objid, objec-short, objec-stext.
ENDIF.
ENDLOOP.
ENDIF.
IF objec-otype = 'P' AND stabs = 'X'.
PROVIDE vorna nachn FROM p0002
subty telnr FROM p0006
BETWEEN pc-begda and pc-endda
WHERE p0006-subty = '1'.
IF p0006_valid = 'X'.
CONCATENATE p0002-vorna p0002-nachn INTO name
SEPARATED BY space.
WRITE: / name, p0006-telnr.
SKIP.
ENDIF.
ENDPROVIDE.
ENDIF.
sample code:
REPORT zpwtest .
TABLES : t001 .
TYPE-POOLS slis .
DATA : t_t001 TYPE TABLE OF t001 ,
t_abaplist TYPE TABLE OF abaplist .
DATA : w_abaplist TYPE abaplist .
SELECT-OPTIONS : s_bukrs FOR t001-bukrs OBLIGATORY .
PARAMETERS : p_list TYPE c NO-DISPLAY .
START-OF-SELECTION .
IF sy-batch = 'X' AND p_list IS INITIAL .
Submit report and get list in memory
SUBMIT zpwtest EXPORTING LIST TO MEMORY
WITH s_bukrs IN s_bukrs
WITH p_list = 'X'
AND RETURN.
Get the list from memory.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = t_abaplist
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Send report to mail receipent
PERFORM send_mail .
ELSE.
PERFORM select_data .
PERFORM display_data .
ENDIF.
*SO_NEW_DOCUMENT_SEND_API1
*& Form select_data
FORM select_data.
SELECT *
INTO TABLE t_t001
FROM t001
WHERE bukrs IN s_bukrs .
ENDFORM. " select_data
*& Form display_data
FORM display_data.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_structure_name = 'T001'
TABLES
t_outtab = t_t001
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " display_data
*& Form send_mail
FORM send_mail.
DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
listobject LIKE abaplist OCCURS 10,
compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
w_object_hd_change LIKE sood1,
compressed_size LIKE sy-index.
Fot external email id
receiver_list-recextnam = '[email protected]'.
receiver_list-recesc = 'E'.
receiver_list-sndart = 'INT'.
receiver_list-sndpri = '1'.
FOr internal email id
receiver_list-recnam = sy-uname .
receiver_list-esc_des = 'B'.
APPEND receiver_list.
General data
w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Object name'.
w_object_hd_change-objsns = 'P'.
Mail subject
w_object_hd_change-objdes = 'Message subject'.
Mail body
APPEND 'Message content' TO message_content.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
compressed_size = compressed_size
TABLES
in = t_abaplist
out = compressed_attachment.
DESCRIBE TABLE compressed_attachment.
CLEAR packing_list.
packing_list-transf_bin = 'X'.
packing_list-head_start = 0.
packing_list-head_num = 0.
packing_list-body_start = 1.
packing_list-body_num = sy-tfill.
packing_list-objtp = 'ALI'.
packing_list-objnam = 'Object name'.
packing_list-objdes = 'Attachment description'.
packing_list-objlen = compressed_size.
APPEND packing_list.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = w_object_hd_change
object_type = 'RAW'
owner = sy-uname
TABLES
objcont = message_content
receivers = receiver_list
packing_list = packing_list
att_cont = compressed_attachment.
ENDFORM. " send_mail
Check this links,
https://forums.sdn.sap.com/click.jspa?searchID=4564732&messageID=3009173
https://forums.sdn.sap.com/click.jspa?searchID=4564732&messageID=2198920
https://forums.sdn.sap.com/click.jspa?searchID=4564732&messageID=1714842
https://forums.sdn.sap.com/click.jspa?searchID=4564732&messageID=2232979
Regards
vasu -
Hi All,Please send me abap-hr material .Its urgent please.
Hi All,Please send me abap-hr material .Its urgent please.
These are the FAQ's that might helps you
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm
http://www.sapgenie.com/sapfunc/index.htm
http://www.sap-img.com/abap/sample-hr-reports-allocate-petrol-allowance.htm
http://www.sap-img.com/hr021.htm
http://www.sap-img.com/human/hr-faq.htm
http://www.sap-img.com/human/finding-the-list-of-hr-module-tables.htm
additional info......
Download the ABAP e-book for HR in the below link under the section 'Free ABAP eBook Download'
http://www.sap-img.com
Also have a look at the following links-
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://planetsap.com/index.htm
http://www.atomhr.com/library_full.htm
http://www.sap-basis-abap.com/saphr.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/60/d8d8c7576311d189270000e8322f96/frameset.htm
http://www.sapfriends.com/sapstuff.html
http://www.atomhr.com/know_preview/Reading_Payroll_Results_with_ABAP.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Payroll
http://www.sap-press.com/product.cfm?account=&product=H967
http://www.sapdevelopment.co.uk/hr/payres_abap.htm
http://www.sapdevelopment.co.uk/hr/payres_tcode.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
you can see some Standard Program examples in this one..
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification -
I need a bapi for material management advance shipping notifications
i need a bapi for material management advance shipping notifications for developing powls which includes below fields and some more fields.
Inbound delivery number
Due date (GR date)
Vendor delivery number
Material
Name of material
Quantity
Vendor
Name of vendor
thanks and regards,
jameer.pHi Jameer,
This is a hard one, my friend. I understand what you are trying to do.. Try BAPI_DELIVERYPROCESSING_EXEC. It is tricky though.
Moreover you might want to use a FM to fill the IDOC data. something like IDOC_INPUT_**. this might be a better option.
cheers,
Hema. -
Need code for Sales order creation in oops using xi as integration server
Need code for Sales order creation in oops using xi as integration server.
hi rocky,
could you pls give a bit explanation on what you are expecting.
regards,
Pavan -
ABAP programing material related to BW.
Hi Experts,
Im new to BW/BI. Can anyone please tell me where I can find ABAP programing material related to BW.
Thank in advance.I can also recommend my book [http://www.sap-hefte.de/katalog/hefte/titel/gp/titelID-1273]. It contains all the often used exits with practical examples, a long sample of the transformation and I received a lot of positive feedback. A second reworked edition that also contains the BPS and Integrated Planning is currently in work and will probably appear this fall.
Best regards
Dirk
Edited by: Dirk Herzog on Jul 20, 2008 8:38 PM -
Hello All,
I want ABAP-HR Material and FAQs.
Could you please send it to my mail id: [email protected]
Points will be rewarded.
Thanks in Advance.
Regards
Sasidhar Reddy Matli.hi,
see the doc for HR:
HR deals with the INFOTYPES which are similar to Tables in General ABAP.
There are different ways of fetching data from these infotypes.
There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
Infotypes for these areas are different from one another area.
storing of records data in each type of area is different
LDBS like PNP are used in HR programing.
Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
On the whole Normal ABAP is different from HR abap.
For Personal Admn the Infotypes start with PA0000 to PA1999
Time Related Infotypes start with PA2000 to PA2999.
Orgn related Infotypes start with HRP1000 to HRP1999.
All custom developed infotypes stsrat with PA9000 onwards.
In payroll processing we use Clusters like PCL1,2,3 and 4.
Instead of Select query we use PROVIDE and ENDPROVIDE..
You have to assign a Logical Database in the attributes PNP.
Go through the SAp doc for HR programming and start doing.
http://www.sapdevelopment.co.uk/hr/hrhome.htm
See:
http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
sites regarding hr-abap:
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
You can see some Standard Program examples in this one ...
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
http://www.erpgenie.com/faq/hr.htm.
http://www.planetsap.com/hr_abap_main_page.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
These are the FAQ's that might helps you as well.
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm
http://www.planetsap.com/hr_abap_main_page.htm
http://www.atomhr.com/library_full.htm
Maybe you are looking for
-
Fonts don't work correctly when opening illustrator 5 eps in illustrator 6
When I open an eps file in illustrator 6, which I received from our graphic designer (who is using 5), the fonts don't work correctly. We have purchased VistaSans and when I try to open file, it says fonts not found so they have been substituted, but
-
How we can upload multiple images in particular id in sharepoint
WE have some legacy systems in that we have multiple images for perticuler patient. How can i migrate that all related images into perticuler patient while uploading to share point site...can you help for the same another issue is which task(compone
-
Corner options for line in InDesign CS5 js
Hi, with CS5 update I am getting an error message the 'object doesn't support property of the method cornerOptions' when I use code from CS4: myRoundCornerLeftBottomVerticalWhite = myDoc.graphicLines.add (myDoc.layers.item ("Die")); var myPathPoint
-
I just can't do anything that needs adobe reader
-
App Store Issues After Mavericks Update
Hi. I upgraded from Mountain Lion to Mavericks yesterday. When I run the App Store app, it shows that IMovie is available for an update. When I click the update button, I get a message saying my IMac (bought in late 2007) doesn't have the video card