Help needed in Abap
Hi all;
I am trying to delete the request from cube except the last load of the month(we have daily load now so assume that last day of the month) of the fiscal period. I am writing the following code in the delete routine, but can't figure out how to avoid the lastday of the month in fiscal period.
Could anyone help me!
TABLES: RSMONICDP.
DATA: request LIKE RSMONICDP-RNR,
ts LIKE RSMONICDP-TIMESTAMP.
loop at l_t_request_to_delete.
SELECT DISTINCT RNR INTO request FROM RSMONICDP
WHERE ICUBE = 'Zdis_c01'.
SELECT TIMESTAMP INTO ts FROM RSMONICDP
WHERE RNR = request.
ENDSELECT.
(how do I avoid the last day of the month here ?)
CALL FUNCTION 'RSSM_DELETE_REQUEST'
EXPORTING REQUEST = request
INFOCUBE = 'Zdis_c01'.
ENDSELECT.
endloop.
clear p_subrc.
Thank you.
Krishma.
Hi Krishma,
Table RSMONICDP has field TIMESTAMP. I think you can use this time stamp, convert it into a date, and from there you can use an IF statement to avoid executing the CALL FUNCTION MODULE unless day of obtained date is not month's last day (I would use a CASE statement by month for example). Here you are how the routine would look like:
STATICS: l_time TYPE sy-uzeit,
l_date TYPE sy-datum,
l_month(2) TYPE N,
l_day(2) TYPE N.
loop at l_t_request_to_delete.
SELECT DISTINCT .....
CONVERT TIME STAMP RSMONICDP-TIMESTAMP
TIME ZONE 'UTC+12' "your time zone
INTO DATE l_date
TIME l_time.
L_MONTH = L_DATE+4(2).
L_DAY = L_DATE+6(2).
clear l_delete.
CASE l_month.
WHEN 1.
IF l_day < 31. l_delete = 1. ENDIF.
WHEN 2.
implement something for leap year here
IF l_day < 29. l_delete = 1. ENDIF.
WHEN 12.
IF l_day < 31. l_delete = 1. ENDIF.
ENDCASE.
IF l_delete = 1.
CALL FUNCTION ....
ENDIF.
ENDLOOP.
Hope it helps!
Mario.
Similar Messages
-
Help Needed in ABAP Webservice
Hi Friends
We have created a webservice in ABAP,but we can't able to access it from outside network.
I want to access my webservice page like"google", what I need to do..we can't open the port as a public.. because confidentitial data is there..initailly SAP provides UDDI registry or something to achieve this functionality.. I am not able to access the site now... anybody have idea about how to access my webservice through public network..let me expalin.. it will helpful to me ..
Thanks in Advance..
Regards
GowrishankarMaximum question reached, so closing this.
-
Help needed on abap heap area parameters
Hi Gurus ,
I need your help in regards with abap heap area parameters , we are facing a lot of system no roll memory issues on one of our instance.
As for my understanding :
1)abap/heap_area_dialog : heap memory limit for dialog process.
2).abap/heap_area_nondialog: heap memory limit for non-dialog process.
3).abap/heap_area_total : what this implies ?
In my production instance the parameters are as follows :
Actuals
abap/heap_area_dialog -
2GB (Recommended : 2GB for an application server with max 50 users )
abap/heap_area_nondialog:-- 2GB (Recommended : 2GB or an application server with max 50 users )
abap/heap_area_total --- 1GB (Recommended and default value: 2GB)
My doubt is "abap/heap_area_total of 1GB " might creating problems .
What is the recommended value for abap/heap_area_total on Solaris 10 ?
your valuable inputs required :!Hello Sandy
Have a look at this link for UNIX
http://help.sap.com/saphelp_nw04/helpdata/en/02/96257b538111d1891b0000e8322f96/content.htm
For more in memory management in below link
http://help.sap.com/saphelp_nw04/helpdata/en/02/96253c538111d1891b0000e8322f96/frameset.htm
Regards
Vivek -
Urgent Help need for ABAP Custom Process Types
Hi Gurus,
I have created a Custom Process Type for ABAP program which returns status (Success or Failure).
I followed the below procedure to create a custom ABAP process type.
In RSPC, I went to Settings -> Maintain process types
I selected the ABAP process type and then selected the EDIT -> COPY AS and then in the process chain configuration screen, I gave a new name to the process type, changed the POSSIBLE EVENTS settings to "2 process ends "successful" or "failure" and saved the settings to confirm changes.
Now I can see the new process type for ABAP program which returns the success or failure for the successors.
Now, my question is, where do i write the logic for ABAP program ? how does the ABAP program returns the success or failure. Do I have to change the code in the method IF_RSPC_EXECUTE~EXECUTE to return success or failure. Please make me clear where I can write the code? For example in my ABAP program, I am searching a table to find a specific value. If the value is not found, then the ABAP process type should return failure, if found should return success. How can I do this?
Thanks in advance,
Regards,
aarthi
[email protected]Hi,
We have a similar problem. We have an ABAP program in a process chain that
uses a custom process type with on success and on failure.
If the program is successful there is no problem. it will run the next process step.
The problem is when the ABAP Program fails and even though the message class is E in our ABAP program it has a confirm popup message with a status change and asks "Save Status and Trigger Events if Appropriate".
Once you enter Yes to continue it then continues to the next step in the program and is fine.I traced in debug where this status message is appearing. It is in CL_RSPC_LOG. There is a popup_to_confirm_step where it checks the e_status that is value J ( Framework Error upon completion). Then it submits the rspc_process_finish program to complete and call the on error process step.
Has anyone else experienced this and is there any other documents out there to help me?
Apologies if this is not very clear.
Any assistance would be appreciated.
Thanks
Monica Mandia -
Help needed on ABAP coding - put restricted kf as abap coding in update rle
All,
I have to change resticted keyfigures from query level into the update rules but don't know the correct abap coding.
The field trade sales <b>(0G_AVVTRS</b>) must be limited by Type of Sales (<b>0G_CWWTSN</b>) range (# ; 350) and (600 ; 999).
In other words: keyfigure <b>0G_AVVTRS</b> may only show it's value when characteristic <b>0G_CWWTSN</b> value is between the ranges (# ; 350) or (600 ; 999). Wen the value is outside this range the it must be empty.
Please advise how to handle this with abap code (release 3.1).
Many thanks,
TomIn the update rules for mapping 0G_AVVTRS try this :
[code]$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
result value of the routine
if COMM_STRUCTURE-(Type of Sales) le '350' or
(COMM_STRUCTURE-(Type of Sales) ge '600'
and COMM_STRUCTURE-(Type of Sales) le '999').
RESULT = COMM_STRUCTURE-(Field Trade Sales).
else.
RESULT = 0.
endif.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -[/code]
Hope this helps. -
Check code ( urgent help needed from ABAP guys working on FI/CO)
hi all,
check my code & give me solution for getting only offsetting acounts depending on particular HKONT.
plz i need its solution urgently.
REPORT zglaccline NO STANDARD PAGE HEADING
LINE-SIZE 300
LINE-COUNT 65(3).
TABLES : bkpf, bseg.
DATA : BEGIN OF it_bkpf OCCURS 0,
bukrs LIKE bkpf-bukrs,
belnr LIKE bkpf-belnr,
gjahr LIKE bkpf-gjahr,
monat LIKE bkpf-monat,
budat LIKE bkpf-budat,
brnch LIKE bkpf-brnch,
xblnr LIKE bkpf-xblnr,
waers LIKE bkpf-waers,
END OF it_bkpf.
DATA : BEGIN OF it_bseg OCCURS 0,
gsber LIKE bseg-gsber,
hkont LIKE bseg-hkont,
kunnr LIKE bseg-kunnr,
sgtxt LIKE bseg-sgtxt,
bschl LIKE bseg-bschl,
wrbtr LIKE bseg-wrbtr,
dmbtr LIKE bseg-dmbtr,
pswsl LIKE bseg-pswsl,
kostl LIKE bseg-kostl,
prctr LIKE bseg-prctr,
aufnr LIKE bseg-aufnr,
shkzg LIKE bseg-shkzg,
augbl LIKE bseg-augbl,
END OF it_bseg.
DATA : BEGIN OF it_res OCCURS 0,
bukrs LIKE bkpf-bukrs,
gjahr LIKE bkpf-gjahr,
monat LIKE bkpf-monat,
belnr LIKE bkpf-belnr,
budat LIKE bkpf-budat,
brnch LIKE bkpf-brnch,
gsber LIKE bseg-gsber,
hkont LIKE bseg-hkont,
kunnr LIKE bseg-kunnr,
bschl LIKE bseg-bschl,
prctr LIKE bseg-prctr,
kostl LIKE bseg-kostl,
aufnr LIKE bseg-aufnr,
pswsl LIKE bseg-pswsl,
wrbtr LIKE bseg-wrbtr,
waers LIKE bkpf-waers,
dmbtr LIKE bseg-dmbtr,
xblnr LIKE bkpf-xblnr,
txt50 LIKE skat-txt50,
sgtxt LIKE bseg-sgtxt,
shkzg LIKE bseg-shkzg,
END OF it_res.
DATA : BEGIN OF itab_head OCCURS 0,
name1(20) TYPE c,
END OF itab_head.
SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-002.
PARAMETERS : p_sel1 RADIOBUTTON GROUP sel,
p_sel2 RADIOBUTTON GROUP sel,
p_sel3 RADIOBUTTON GROUP sel.
SELECTION-SCREEN END OF BLOCK b_2.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-001.
PARAMETER p_bukrs LIKE bkpf-bukrs DEFAULT 'ML' OBLIGATORY.
SELECT-OPTIONS : s_belnr FOR bkpf-belnr.
SELECT-OPTIONS : s_gjahr FOR bkpf-gjahr OBLIGATORY.
SELECT-OPTIONS : s_monat FOR bkpf-monat.
SELECT-OPTIONS : s_blart FOR bkpf-blart.
SELECT-OPTIONS : s_budat FOR bkpf-budat.
SELECT-OPTIONS : s_waers FOR bkpf-waers.
SELECT-OPTIONS : s_hkont FOR bseg-hkont.
SELECT-OPTIONS : s_bldat FOR bkpf-bldat.
SELECTION-SCREEN END OF BLOCK b_1.
SELECT bukrs belnr gjahr monat budat brnch xblnr waers
INTO CORRESPONDING FIELDS OF TABLE it_bkpf
FROM bkpf
WHERE bukrs = p_bukrs
AND belnr IN s_belnr
AND gjahr IN s_gjahr
AND monat IN s_monat
AND blart IN s_blart
AND budat IN s_budat
AND bldat IN s_bldat
AND waers IN s_waers.
IF NOT it_bkpf[] IS INITIAL.
LOOP AT it_bkpf.
IF p_sel1 = 'X'.
SELECT gsber hkont kunnr sgtxt bschl wrbtr pswsl kostl shkzg
dmbtr prctr aufnr augdt augbl
INTO CORRESPONDING FIELDS OF TABLE it_bseg
FROM bseg
WHERE bukrs = it_bkpf-bukrs
AND belnr = it_bkpf-belnr
AND gjahr = it_bkpf-gjahr
AND pswsl = it_bkpf-waers
AND hkont IN s_hkont.
ELSEIF p_sel2 = 'X'.
SELECT gsber hkont kunnr sgtxt bschl wrbtr pswsl kostl shkzg
dmbtr prctr aufnr augdt augbl
INTO CORRESPONDING FIELDS OF TABLE it_bseg
FROM bseg
WHERE bukrs = it_bkpf-bukrs
AND belnr = it_bkpf-belnr
AND gjahr = it_bkpf-gjahr
AND pswsl = it_bkpf-waers.
AND koart <> 'S'.
ENDIF.
IF sy-subrc EQ 0.
LOOP AT it_bseg.
SELECT SINGLE txt50 INTO it_res-txt50
FROM skat
WHERE spras = 'EN'
AND ktopl = 'PCA'
AND saknr = it_bseg-hkont.
it_res-bukrs = it_bkpf-bukrs.
it_res-gjahr = it_bkpf-gjahr.
it_res-monat = it_bkpf-monat.
it_res-gsber = it_bseg-gsber.
it_res-belnr = it_bkpf-belnr.
it_res-budat = it_bkpf-budat.
it_res-brnch = it_bkpf-brnch.
it_res-kunnr = it_bseg-kunnr.
it_res-hkont = it_bseg-hkont.
it_res-sgtxt = it_bseg-sgtxt.
it_res-bschl = it_bseg-bschl.
it_res-wrbtr = it_bseg-wrbtr.
it_res-pswsl = it_bseg-pswsl.
it_res-waers = it_bkpf-waers.
it_res-dmbtr = it_bseg-dmbtr.
it_res-kostl = it_bseg-kostl.
it_res-prctr = it_bseg-prctr.
it_res-aufnr = it_bseg-aufnr.
it_res-shkzg = it_bseg-shkzg.
it_res-augbl = it_bseg-augbl.
it_res-xblnr = it_bkpf-xblnr.
APPEND it_res.
CLEAR it_res.
ENDLOOP.
CLEAR it_bkpf.
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT it_res.
IF it_res-shkzg EQ 'H'.
it_res-wrbtr = it_res-wrbtr * -1.
it_res-dmbtr = it_res-dmbtr * -1.
ENDIF.
WRITE : /2(4) it_res-bukrs,
13(4) it_res-gjahr,
21(2) it_res-monat,
31(10) it_res-belnr,
44(10) it_res-budat,
55(4) it_res-brnch,
60(4) it_res-gsber,
70(10) it_res-hkont,
82(10) it_res-kunnr,
94(2) it_res-bschl,
104(10) it_res-prctr,
116(10) it_res-kostl,
128(12) it_res-aufnr,
142(5) it_res-pswsl,
148(13) it_res-wrbtr,
164(5) it_res-waers,
170(13) it_res-dmbtr,
187(16) it_res-xblnr,
205(50) it_res-sgtxt.
MODIFY it_res.
CLEAR it_res.
ENDLOOP.
plz give soltuion i am looking for it.
i will aslo reward all ur precious effort.
otherwise if anyone have any code on my reqirement then plz send it to me in my id- [email protected]
thanks
Message was edited by: sanjeev singhHi
You should a selection in BSIS and BSAS table instead of BKPF and BSEG:
DATA : BEGIN OF it_res OCCURS 0,
bukrs LIKE bkpf-bukrs,
gjahr LIKE bkpf-gjahr,
monat LIKE bkpf-monat,
belnr LIKE bkpf-belnr,
budat LIKE bkpf-budat,
brnch LIKE bkpf-brnch,
gsber LIKE bseg-gsber,
hkont LIKE bseg-hkont,
kunnr LIKE bseg-kunnr,
bschl LIKE bseg-bschl,
prctr LIKE bseg-prctr,
kostl LIKE bseg-kostl,
aufnr LIKE bseg-aufnr,
pswsl LIKE bseg-pswsl,
wrbtr LIKE bseg-wrbtr,
waers LIKE bkpf-waers,
dmbtr LIKE bseg-dmbtr,
xblnr LIKE bkpf-xblnr,
txt50 LIKE skat-txt50,
sgtxt LIKE bseg-sgtxt,
shkzg LIKE bseg-shkzg,
END OF it_res.
Open Item
SELECT *
INTO CORRESPONDING FIELDS OF TABLE it_res
FROM <b>BSIS</b>
WHERE bukrs = p_bukrs
<b>AND HKONT IN S_HKONT</b>
AND belnr IN s_belnr
AND gjahr IN s_gjahr
AND monat IN s_monat
AND blart IN s_blart
AND budat IN s_budat
AND bldat IN s_bldat
AND waers IN s_waers.
Cleared Item
SELECT *
APPENDING CORRESPONDING FIELDS OF TABLE it_res
FROM <b>BSAS</b>
WHERE bukrs = p_bukrs
<b>AND HKONT IN S_HKONT</b>
AND belnr IN s_belnr
AND gjahr IN s_gjahr
AND monat IN s_monat
AND blart IN s_blart
AND budat IN s_budat
AND bldat IN s_bldat
AND waers IN s_waers.
Max
Message was edited by: max bianchi -
Asset aquisition report (urgent help needed from abap guys working on FI m)
hi all,
i have to develop Asset Aquisition report.so i have developed it.
but in this i am not getting logic for the following---
if i enter a date like -19.12.2006
then the output of this report should show all the asset aquisition of the
company from 01.04.2006 to 19.12.2006 only.
bcoz in indian scenario fiscal year starts from 1st of april only.
but in my output it is showing all the asset aquisition from the day comapny was
started having its asset aquisition.
so plz if anyone has logic for above sceanario then plz share with me.
or any one has previously worked on this report can send the code to me
satisfying the above scenario. its very very urgent guys.
my id - [email protected]
i am looking for the replyhi srinivas thanks for ur reply but it is not clear to me .
so if u will send me the code the it will be better for me .
my id- [email protected]
i am waiting for ur reply. if u have code for this then plz send me.
thanks yaar in advance -
Need one abap program.....pls help
Hi all,
i have need one ABAP program , which can dispaly how many same number of charecter are there.
ex : my input is suresh.
output is,,,
2 - s
1 - u
1 - r
just like that..
pls help me..
thanks in advance.
induHello
Try this:
data: string(100),
length type i.
data: begin of itab occurs 0,
chart,
count type i,
end of itab.
string = 'suresh'.
length = strlen( string ).
do length times.
length = length - 1.
clear itab.
itab-chart = string+length(1).
itab-count = 1.
collect itab.
enddo.
loop at itab.
write: itab-chart, itab-count. new-line.
endloop. -
I need help to master ABAP.
Please email me....if u can help me : [email protected]
I am looking for help with IDOC, ALE, RFC and BAPI.
Please send me mail. We can talk more.Jeff, please ask specific questions here. The answer will come. Try to not ask for material to be sent directly to you. This is not in the community spirit as it will only benefit you. Also you might want to try the search functionality on this site. There is plenty of info out there.
Regards,
RIch HEilman -
Organizational Structure Search Help in Webdynpro ABAP
Hi,
I need an organizational structure search help in webdynpro abap.
It should list the organizational structure in tree view like RH_OBJID_REQUEST lists.
I tried to use RH_OBJID_REQUEST function in webdynpro but I got " A RAISE statement in the program
"CL_GUI_CUSTOM_CONTAINER=======CP" raised theexception condition "CNTL_ERROR" short dump.
Is there such a function for webdynpro abap and how can I achive this with select options?
Thanks in advance..
MERALGreat article. I also had this probelm a year ago. My problems questions are:
Is it possible to select more then one entry in the tree?
What about selecting all childrens with one click?
In my solution I inserted this tree, into a table and the table had a checkbox, row, so the user can check the required org units, (more then one) and there was a separate button, for "select all children" -
Need HR- ABAP documentation plz provide the links
Need HR- ABAP documentation plz provid the links
Hi,
/people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports
Take a look over these links....
http://www.sap-basis-abap.com/saphr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Transactions
http://help.sap.com/saphelp_47x200/helpdata/en/4f/d5275f575e11d189270000e8322f96/content.htm
http://help.sap.com/saphelp_47x200/helpdata/en/4f/d5275f575e11d189270000e8322f96/content.htm
http://www.saptips.com/Previews/SAPtipsAugust-September2004TableOfContents.pdf
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Transactions
http://help.sap.com/saphelp_46c/helpdata/en/4f/d528be575e11d189270000e8322f96/frameset.htm.
http://www.sap-basis-abap.com/saphr.htm.
http://www.sapgenie.com/faq/hr.htm
http://www.sapgenie.com/workflow/scenarios.htm
http://www.sap-img.com/human/hr-faq.htm
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://www.sapgenie.com/mysap/mysap_hr.htm
Re: remunaration statement
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
HR
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
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.erpgenie.com/faq/hr.htm.
www.sap-img.com
http://www.planetsap.com/hr_abap_main_page.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
http://www.sapfans.com/forums/viewtopic.php?p=498530&sid=d7ec5866e3fb26880da129de45ce79de
http://www.sapcookbook.com/preview_hr_questions.htm
http://www.atomhr.com/library_full.htm
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://www.planetsap.com/hr_abap_main_page.htm
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci983590,00.html
http://www.allsaplinks.com/HRmaterial.html
http://www.allsaplinks.com/timemanagement.html
http://www.allsaplinks.com/payrollcompletefunctional.html
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/HRINF/HRINF.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYXXFORM/PYINT_FORMBUILDER.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPA/BCBMTWFMPA.pdfhttp://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_HR.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
Re: New to ABAP HR Programming
http://www.planetsap.com/hr_abap_main_page.htm
http://www.saptips.com/Previews/SAPtipsAugust-September2004TableOfContents.pdf
http://www.sapgenie.com/faq/hr.htm
http://www.sapgenie.com/workflow/scenarios.htm
http://www.sapgenie.com/mysap/mysap_hr.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
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
These are the FAQ's that might helps you
http://www.sap-img.com/human/hr-faq.htm
Regards,
Chandru -
User Creation in EP 7 - Help Needed.
Hi Guys,
We have installed an EP 7, I would like create users in EP 7 Database. My Data Source configuration file dataSourceConfiguration_abap.xml. I have installed a WAS 6.40 JAVA + ABAP
This means I have to create the user in ABAP, I would like to know how I can create a User in EP 7 Only and not in ABAP System, I have seen other posts where they mention that you have to create the User in ABAP First, is there a way where I can create users in EP 7 so that they remain in the EP System only.
Please do let me know.
Thanks,
John.
Message was edited by: John BrayHi John,
See my last answer in this thread: Changing DataSource Configuration using ConfigTool - Help Needed.
The xml I have referred to probably doesn't exist on EP7 any more?! Anyhow, the change from your to another xml isn't supported in general. Check out the corresponding notes.
Hope it helps
Detlev -
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 -
Report creation - help needed urgent
Hi all,
My client is asking for certain information in terms of Area Budget, Amount spent at any point of time , breakup of expenditures among different activities which should be accessible to the sales team.
I think i need to create a report for that. But i dont have much idea about the report.
Please help me in this regard.
If anyone has any other idea to how to approach this issue, please do let me know.
Thanks in advance,
SouravHi Sourav,
Initially you should have clarity about the client's requirement. What are all the fields required in that report i.e., the output (shape of the report) required by the client. Then search for the availability of the standard report which is similar to your requirement and if required take the help of the ABAPer to make the report.Use Tcode SARP to look for the standard reports provided by SAP. SAP has provided around 1600 standard reports.
Thanks,
Ravi -
Changing DataSource Configuration using ConfigTool - Help Needed.
Hello Everyones,
I have an EP 7 which I have installed on a WAS ABAP + JAVA. The Data Soruce configuraion is in dataSourceConfiguration_abap.xml because of this I cannot create any new users in the Portal, can someone tell me how I can change this Config file using the ConfigTool and what procedure is to be used.
Thanks for your help,
John.
Message was edited by: John BraySee Changing DataSource Configuration using ConfigTool - Help Needed.
Maybe you are looking for
-
After Update to windows 8.1 update 1 going to problem ? help me ?
Hi there dev I installed windows 8.1 on my hardware and enabled hyper-v and installed 8.1 on hyper-v after I update both windows to 8.1 update 1 my virtual windows 8.1 going to this problem : now my right click ( context menu ) works on desktop but c
-
I would like to have the ending times shown on my monthly calendar. As of now, it only shows the start time. The end times show up on the weekly calendar, but I don't want to print from the weekly view.
-
G41M-P26 shutting down, hanging w/ DDR3-1600 RAM. Not compatible?
Hello, I am having problems with this board shutting down or hanging after some time, then refusing to post, sometime later it will POST and allow getting to setup, then it may shut down suddenly. Sometimes it may boot and go through Memtest for aco
-
Want to remove duplicates listed under 'STORE'
Hi, this has been going on for some time now and is not just limited to iTunes 10.0.1 and is affecting my iMac which holds my music library. I have the following listed:- STORE - iTunes Store - Ping - Purchased - Purchased on Apple TV - Purchased on
-
Move cs5 license onto new computer?
can I move my cs5 student cs5 license from my old computer onto my new computer? If so please outline the process