HR_FEATURE_BACKFIELD
Der Funktionsbaustein HR_FEATURE_BACKFIELD list die Feldrückgabe eines Mekrmals.
DATA structure LIKE pme02.
DATA feature LIKE t549b-namen.
DATA back LIKE t5csw-abreinheit.
DATA status(1).
*structure-molga = '01'.
structure-werks = p0001-werks.
structure-btrtl = p0001-btrtl.
feature = 'CHFIW'.
CALL FUNCTION 'HR_FEATURE_BACKFIELD'
EXPORTING
feature = feature
struc_content = structure
kind_of_error = space
IMPORTING
back = back
CHANGING
status = status
EXCEPTIONS
dummy = 1
error_operation = 2
no_backvalue = 3
feature_not_generated = 4
invalid_sign_in_funid = 5
field_in_report_tab_in_pe03 = 6
OTHERS = 7.
*case sy-subrc.
*when 2. ... .
*when 3. ... .
*when 4. ... .
*when 5. ... .
*when 6. ... .
*endcase.
gs_data_1-abreinh = back.
SELECT SINGLE pstlz FROM t5csw INTO gs_data_1-pstlz
WHERE abreinheit = gs_data_1-abreinh
AND endda = '99991231'.
Tabelle als Rückgabe
SELECT SINGLE bukrs, werks, btrtl, persg, persk INTO @DATA(gs_0001) FROM pa0001
WHERE pernr = @pernr AND
begda <= @begda AND
endda >= @begda.
DATA gs_structure TYPE pme07.
DATA gf_feature TYPE t549b-namen.
DATA gt_back TYPE TABLE OF text10.
DATA gf_status(1).
gs_structure-molga = '02'.
gs_structure-infty = '0008'.
* structure-SUBTY = ''.
* structure-TCLAS = ''.
gs_structure-bukrs = gs_0001-bukrs.
gs_structure-werks = gs_0001-werks.
gs_structure-btrtl = gs_0001-btrtl.
gs_structure-persg = gs_0001-persg.
gs_structure-persk = gs_0001-persk.
* structure-LGART = LGART.
* structure-ANSVH = ''.
gf_feature = 'PFREQ'.
CALL FUNCTION 'HR_FEATURE_BACKTABLE'
EXPORTING
feature = gf_feature
struc_content = gs_structure
kind_of_error = space
TABLES
back = gt_back
CHANGING
status = gf_status
EXCEPTIONS
dummy = 1
error_operation = 2
no_backvalue = 3
feature_not_generated = 4
invalid_sign_in_funid = 5
tab_in_report_field_in_pe03 = 6
OTHERS = 7.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.