lunes, 25 de febrero de 2013
Problemas con decimales en el extractor 0HR_PT_2
Nota 1617680
Botanita, Botana, SAP, BW, Ponte Carreira
HHRR
martes, 5 de febrero de 2013
2 last characters of a string
DATA: int TYPE I, PEP TYPE C,
AUX_PEP TYPE /BI0/OIWBS_ELEMT.
CLEAR: INT, AUX_PEP.
PEP = COMM_STRUCTURE-WBS_ELEMT.
DESCRIBE FIELD PEp LENGTH INT IN CHARACTER MODE.
INT = INT - 2.
* result value of the routine
AUX_PEP = COMM_STRUCTURE-WBS_ELEMT+INT(2).
IF AUX_PEP ca SY-ABCDE.
RESULT = AUX_PEP.
ELSE.
RESULT = 99.
ENDIF.
Botanita, Botana, SAP, BW, Ponte Carreira
ABAP
lunes, 4 de febrero de 2013
Reset a selector like combo box or radio button
1. Bind labels of the selector (eg. B2:B5)
2. Set Insertion type and destination (eg. C2)
3. Set the selected item type on Dynamic on the behaviour tab of the selector
4. Bind the item to a cell (eg F2)
5. Bind source cell of Push button (eg. E2)
6. Bind destination cell of Push button (eg. F2, same as selected item of combo!)
7. Add formula in source cell push =if(F2=”x”,B2,”x”)
8. Add “x” value in destion cell F2
Comes in handy when you want to reset only certain parts of the dashboard and not resetting it to its initial state (as you do with the reset button).
2. Set Insertion type and destination (eg. C2)
3. Set the selected item type on Dynamic on the behaviour tab of the selector
4. Bind the item to a cell (eg F2)
5. Bind source cell of Push button (eg. E2)
6. Bind destination cell of Push button (eg. F2, same as selected item of combo!)
7. Add formula in source cell push =if(F2=”x”,B2,”x”)
8. Add “x” value in destion cell F2
Comes in handy when you want to reset only certain parts of the dashboard and not resetting it to its initial state (as you do with the reset button).
Botanita, Botana, SAP, BW, Ponte Carreira
Truquis BO,
Xcelsius
ABAP HR
Edad
PERFORM CALCULATE_ULTIMO " last day of month
using SOURCE_FIELDS-CALMONTH
RECORD_NO
RECORD_ALL
SOURCE_SYSTEM
CHANGING ULTIMO
RETURNCODE.
CLEAR: EMPLOYEE_MD, PERSON_MD.
CLEAR: EMPLOYEE_WA, PERSON_WA.
PERFORM READ_MD_PERSON
using SOURCE_FIELDS-employee
SOURCE_FIELDS-calmonth
RECORD_NO
RECORD_ALL
SOURCE_SYSTEM
CHANGING EMPLOYEE_WA
PERSON_WA
RETURNCODE.
EMPLOYEE_MD = EMPLOYEE_WA.
PERSON_MD = PERSON_WA.
IF NOT PERSON_MD-DATEBIRTH IS INITIAL.
RESULT = ULTIMO+0(4) - PERSON_MD-DATEBIRTH+0(4).
IF ULTIMO+4(4) LT PERSON_MD-DATEBIRTH+4(4).
RESULT = RESULT - 1.
ENDIF.
ENDIF.
%% Ocupação
if g_RECORD_NO <> RECORD_NO.
g_RECORD_NO = RECORD_NO.
clear: employee_md, person_md.
clear: employee_wa, person_wa.
endif.
perform read_md_employee
using SOURCE_FIELDS-employee
SOURCE_FIELDS-calmonth
RECORD_NO
RECORD_ALL
SOURCE_SYSTEM
changing employee_wa
RETURNCODE.
employee_md = employee_wa.
RESULT = EMPLOYEE_MD-PAYPCT.
if g_RECORD_NO <> RECORD_NO.
g_RECORD_NO = RECORD_NO.
clear: employee_md, person_md.
clear: employee_wa, person_wa.
endif.
perform read_md_employee
using SOURCE_FIELDS-employee
SOURCE_FIELDS-calmonth
RECORD_NO
RECORD_ALL
SOURCE_SYSTEM
changing employee_wa
RETURNCODE.
employee_md = employee_wa.
* fill the internal table "MONITOR", to make monitor entries
* result value of the routine
RESULT = EMPLOYEE_MD-PAYPCT / 100.
data: ultimo like sy-datum.
if g_RECORD_NO <> RECORD_NO.
g_RECORD_NO = RECORD_NO.
clear: employee_md, person_md.
clear: employee_wa, person_wa.
endif.
perform read_md_employee
using SOURCE_FIELDS-employee
SOURCE_FIELDS-calmonth
RECORD_NO
RECORD_ALL
SOURCE_SYSTEM
changing employee_wa
RETURNCODE.
employee_md = employee_wa.
perform calculate_ultimo
using SOURCE_FIELDS-calmonth
RECORD_NO
RECORD_ALL
SOURCE_SYSTEM
changing ultimo
RETURNCODE.
IF NOT EMPLOYEE_WA-ENTRYDATE IS INITIAL.
RESULT = ULTIMO+0(4) - EMPLOYEE_WA-ENTRYDATE+0(4).
IF ULTIMO+4(4) LT EMPLOYEE_WA-ENTRYDATE+4(4).
RESULT = RESULT - 1.
endif.
ENDIF.
DATA: TMP_PAYPCT TYPE I.
if g_RECORD_NO <> RECORD_NO.
g_RECORD_NO = RECORD_NO.
clear: employee_md, person_md.
clear: employee_wa, person_wa.
endif.
perform read_md_employee
using SOURCE_FIELDS-employee
SOURCE_FIELDS-calmonth
RECORD_NO
RECORD_ALL
SOURCE_SYSTEM
changing employee_wa
RETURNCODE.
employee_md = employee_wa.
* fill the internal table "MONITOR", to make monitor entries
* result value of the routine
* rounded
TMP_PAYPCT = EMPLOYEE_MD-PAYPCT.
RESULT = TMP_PAYPCT.
viernes, 18 de enero de 2013
BDLS
se37 - RSAP_BIW_DISCONNECT
Botanita, Botana, SAP, BW, Ponte Carreira
ABAP: Módulos de funciones,
BDLS
lunes, 13 de febrero de 2012
Edad con dos decimales, como texto
DATA: aux_date type sy-datum,
aux_year type numc4,
aux_age(200) type c.
DATA: aux_age_num type p DECIMALS 2.
Data: valor type numc5.
clear: aux_year, aux_date, aux_age, aux_age_num ,valor.
aux_year = sy-datum(4).
CONCATENATE aux_year '05' '30' into aux_date.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
I_DATUM_BIS = TRAN_STRUCTURE-GBDAT
I_DATUM_VON = aux_date
IMPORTING
E_TAGE = aux_age.
CALL FUNCTION 'CHAR_NUMC_CONVERSION'
EXPORTING
INPUT = aux_age
IMPORTING
NUMCSTR = aux_age_num.
valor = 100 * ( aux_age_num ) / ( 365 + ( 25 / 100 ) ) .
*RESULT = valor.
CONCATENATE valor+1(2) ',' valor+3(2) into RESULT .
aux_year type numc4,
aux_age(200) type c.
DATA: aux_age_num type p DECIMALS 2.
Data: valor type numc5.
clear: aux_year, aux_date, aux_age, aux_age_num ,valor.
aux_year = sy-datum(4).
CONCATENATE aux_year '05' '30' into aux_date.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
I_DATUM_BIS = TRAN_STRUCTURE-GBDAT
I_DATUM_VON = aux_date
IMPORTING
E_TAGE = aux_age.
CALL FUNCTION 'CHAR_NUMC_CONVERSION'
EXPORTING
INPUT = aux_age
IMPORTING
NUMCSTR = aux_age_num.
valor = 100 * ( aux_age_num ) / ( 365 + ( 25 / 100 ) ) .
*RESULT = valor.
CONCATENATE valor+1(2) ',' valor+3(2) into RESULT .
Botanita, Botana, SAP, BW, Ponte Carreira
ABAP
Suscribirse a:
Entradas (Atom)

