Code: Alles auswählen.
LOOP AT p0002 WHERE endda GE pn-begda AND begda LE pn-endda.
gs_x-pernr = p0002-pernr.
gs_x-nachname = p0002-nachn.
gs_x-vorname = p0002-vorna.
ENDLOOP.
CONCATENATE gs_x-vorname gs_x-nachname
INTO gs_x-coname SEPARATED BY '.'.
CONCATENATE pn-begda+6(02) pn-begda+4(02) pn-begda+0(04)
INTO gs_x-xdate Separated by '.'.
"Write gs_x-xdate.
APPEND gs_x TO gt_x.
IF p_xan = 'X'.
PERFORM open_group.
PERFORM bdc_dynpro USING 'SAPMP50A' '1000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=INS'.
PERFORM bdc_field USING 'RP50G-PERNR'
gs_x-pernr.
PERFORM bdc_field USING 'RP50G-TIMR6'
'X'.
PERFORM bdc_field USING 'RP50G-BEGDA'
gs_x-xdate.
PERFORM bdc_field USING 'RP50G-ENDDA'
'31.12.9999'.
PERFORM bdc_field USING 'RP50G-CHOIC'
'0105'.
PERFORM bdc_field USING 'RP50G-SUBTY'
'0010'.
PERFORM bdc_dynpro USING 'MP010500' '2000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=UPD'.
PERFORM bdc_field USING 'P0105-BEGDA'
gs_x-alvdate.
PERFORM bdc_field USING 'P0105-ENDDA'
'31.12.9999'.
PERFORM bdc_field USING 'P0105-USRID_LONG'
gs_x-x.
PERFORM bdc_transaction USING 'PA30'.
PERFORM close_group.
ENDIF.
End-of-SELECTION.
PERFORM build_field_catalog.
PERFORM display_alv.