on ‎2017 Sep 20 2:52 PM
Hi guys
I'm creating a FWO by bopf with bussiness partner .
this is my code.
SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }
TRY.
zo_svc_mngr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager(
/scmtms/if_trq_c=>sc_bo_key ).
zo_txn_mngr = /bobf/cl_tra_trans_mgr_factory=>get_transaction_manager( ).
CREATE DATA zo_trq_root.
zo_trq_root->key = /bobf/cl_frw_factory=>get_new_key( ).
zo_trq_root->trq_type = 'ZTMO'.
zo_trq_root->base_btd_id = 'ID_ROADNET'."so para teste enquanto não tenho dados para...
zo_trq_root->inc_class_code = 'CIF'.
* zo_trq_root->src_loc_id = 'SP3073'.
* zo_trq_root->src_loc_key = 'SP3073'.
* zo_trq_root->des_loc_id = 'CU0440001734'.
* zo_trq_root->des_loc_key = 'CU0440001734'.
**---------------------------------------------------------------------------------------------
APPEND INITIAL LINE TO tg_mod ASSIGNING <fg_mod>.
<fg_mod>-node = /scmtms/if_trq_c=>sc_node-root.
<fg_mod>-change_mode = /bobf/if_frw_c=>sc_modify_create.
<fg_mod>-key = zo_trq_root->key.
<fg_mod>-data = zo_trq_root.
*---------------------------------------------------------------------------------------------
CREATE DATA zo_trq_bupa.
zo_trq_bupa->key = /bobf/cl_frw_factory=>get_new_key( ).
zo_trq_bupa->parent_key = zo_trq_root->key.
zo_trq_bupa->PARTY_RCO = 'TM002'.
* zo_trq_bupa->payterm = '0001'.
zo_trq_bupa->PARTY_ID = '9999999262'.
* zo_trq_bupa->PARTY_UUID = '9999999262'.
APPEND INITIAL LINE TO tg_mod ASSIGNING <fg_mod>.
<fg_mod>-node = /scmtms/if_trq_c=>sc_node-party.
<fg_mod>-change_mode = /bobf/if_frw_c=>sc_modify_create.
<fg_mod>-source_node = /scmtms/if_trq_c=>sc_node-root.
<fg_mod>-data = zo_trq_bupa.
<fg_mod>-association = /scmtms/if_trq_c=>sc_association-root-party.
<fg_mod>-source_key = zo_trq_bupa->parent_key.
<fg_mod>-key = zo_trq_bupa->key.
CALL METHOD zo_svc_mngr->modify
EXPORTING
it_modification = tg_mod
IMPORTING
eo_change = zo_change
eo_message = zo_message.
"Sanity check:
CHECK zo_message IS BOUND.
"Output each of the messages in the collection:
zo_message->get_messages( IMPORTING et_message = tg_messages ).
LOOP AT tg_messages ASSIGNING <fg_message>.
vg_msg_text = <fg_message>-message->get_text( ).
ENDLOOP.
"Apply the transactional changes:
CALL METHOD zo_txn_mngr->save
IMPORTING
eo_message = zo_message
ev_rejected = vg_rejected.
"Output each of the messages in the collection:
zo_message->get_messages( IMPORTING et_message = tg_messages ).
LOOP AT tg_messages ASSIGNING <fg_message>.
vg_msg_text = <fg_message>-message->get_text( ).
ENDLOOP.
*---------------------------------------------------------------------------------------------
ENDTRY.
I'm receiving message:
Business partners determined based on FWO type ZTMO
what i need fill more?
thanks
Request clarification before answering.
| User | Count |
|---|---|
| 14 | |
| 9 | |
| 7 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.