注意事项:会跟标准的一样创建完毕会跳出来框框
DATA iv_new_request_type TYPE e070-trfunction.
DATA es_new_request TYPE trwbo_request_header.
DATA et_new_tasks TYPE trwbo_request_headers.
DATA ev_request_changed LIKE trpari-w_valid.
DATA es_request TYPE trwbo_request_header.
DATA ev_attributes_filled TYPE c.
DATA et_attributes TYPE trwbo_t_e070a.
DATA: ls_user TYPE trwbo_user,
lt_users TYPE trwbo_users.
"K 选择工作台请求 W 选择定制请求 T 选择副本传输
PARAMETERS:p_type TYPE char01 OBLIGATORY.
iv_new_request_type = p_type.
ls_user-user = sy-uname.
APPEND ls_user TO lt_users.
CALL FUNCTION 'TR_REQUEST_MODIFY'
EXPORTING
iv_action = 'CREA'
iv_new_request = ' '
iv_new_request_type = iv_new_request_type
it_users = lt_users
iv_start_column = 1
iv_start_row = 4
IMPORTING
es_new_request = es_new_request
et_new_tasks = et_new_tasks
ev_request_changed = ev_request_changed
es_request = es_request
ev_attributes_filled = ev_attributes_filled
et_attributes = et_attributes.
IF sy-subrc <> 0.
PERFORM send_current_message USING 'S'.
EXIT.
ENDIF.
CALL FUNCTION 'TR_PRESENT_REQUEST'
EXPORTING
iv_trkorr = es_new_request-trkorr.
*&---------------------------------------------------------------------*
*& Form SEND_CURRENT_MESSAGE
*&---------------------------------------------------------------------*
FORM send_current_message USING VALUE(pv_mstyp) LIKE sy-msgty.
MESSAGE ID sy-msgid
TYPE pv_mstyp
NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDFORM.