CLEAR : gs_pa0001.
SELECT SINGLE * FROM pa0001 INTO gs_pa0001 WHERE pernr = gs_final1-g1
AND begda <= so_date-low AND endda >= so_date-high.
FREE : gt_str[] .
CALL FUNCTION 'RH_PM_GET_STRUCTURE'
EXPORTING
plvar = '01'
otype = 'O'
objid = gs_pa0001-orgeh
begda = '18000101'
endda = '99991231'
status = '1'
wegid = 'O-O'
authy = 'X'
activ = 'X'
TABLES
objec_tab = gt_str
EXCEPTIONS
not_found = 1
ppway_not_found = 2
OTHERS = 3.
IF gt_str[] IS NOT INITIAL .
LOOP AT gt_str .
IF sy-tabix EQ 1 .
gs_final1-g30 = gt_str-stext .
ELSEIF sy-tabix EQ 2 .
gs_final1-g29 = gt_str-stext .
ELSEIF sy-tabix EQ 3 .
gs_final1-g28 = gt_str-stext .
ELSEIF sy-tabix EQ 4 .
gs_final1-g27 = gt_str-stext .
ENDIF .
CLEAR :gt_str .
ENDLOOP .
ENDIF .
********
No comments:
Post a Comment