Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select single logsys from yihm_desti
- into lv_sys_gta
- where bukrs = cv_rte_bukrs.
- if sy-subrc <> 0.
- write 'Destination externe pour RFC non paramétrée'(t02).
- return.
- endif.
- " Clause WHERE PA2012
- ls_db_opt-text = |( SUBTY = '{ cv_subty_pn }'|.
- append ls_db_opt to lt_db_opt.
- ls_db_opt-text = |OR SUBTY = '{ cv_subty_pa }' )|.
- append ls_db_opt to lt_db_opt.
- ls_db_opt-text = |AND PERNR = '{ ls_entete-nni }'|.
- append ls_db_opt to lt_db_opt.
- " Lecture de la table PA2012 pour PA/PN sur GTA
- call function 'RFC_READ_TABLE'
- destination lv_sys_gta
- exporting
- query_table = cv_table_pa2012
- * DELIMITER = ' '
- * NO_DATA = ' '
- * ROWSKIPS = 0
- * ROWCOUNT = 0
- tables
- options = lt_db_opt
- fields = lt_db_fld
- data = lt_pa2012
- exceptions
- table_not_available = 1
- table_without_data = 2
- option_not_valid = 3
- field_not_valid = 4
- not_authorized = 5
- data_buffer_exceeded = 6
- others = 7.
- if sy-subrc <> 0.
- write |{ sy-msgid }({ sy-msgty }) { sy-msgv1 } { sy-msgv2 } { sy-msgv3 } { sy-msgv4 }|.
- return.
- endif.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement