cancel
Showing results for 
Search instead for 
Did you mean: 

BOPF

Former Member
0 Kudos

Hello Expertu2019s u2013

I am working in TM 8.0 and we have BOPF which is very new to me. I need to develop report that should provide handling resource capacity utilization report like how much capacity consumed and how much capacity remaining, and have another requirements aligned with transportation cost linked to Freight Agreement, Calculation sheet & Rate Table. Based Source Loc, Destination Loc, MTr and Carrier we want to collect the rate in the report. For all the above requirement in TM 8.0 there is business object (BOPF) which are available - My question is how technically we make use of BOPF to generate above such a report?

Any technical suggestion or direction highly appreciable.

Thanks,

Moorthi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi All,

Do you have any documnet ,to upload data using BOPF?

I want to uplaod data from excel , and want to use BOPF.

Wht are te various Std Reports available ,which uses the BOPF concept?

Please send me some info

Thanks

former_member583456
Active Participant
0 Kudos

Hi Moorthi,

this report shows how to read business object data in TM via BOPF: It reads all freight orders starting in locations with ID T*:


REPORT  ZBOPF_TM.

DATA:
  lo_srvmgr      TYPE REF TO /bobf/if_tra_service_manager,
  lt_sel_opt     TYPE /bobf/t_frw_query_selparam,
  ls_sel_opt     TYPE /bobf/s_frw_query_selparam,
  lt_tor_key     TYPE /bobf/t_frw_key,
  lt_tor         TYPE /scmtms/t_tor_root_k,
  lt_tor_item    TYPE /scmtms/t_tor_item_tr_k,
  lt_tor_stop    TYPE /scmtms/t_tor_stop_k,
  lt_tor_succ    TYPE /scmtms/t_tor_stop_succ_k,
  lt_tor_summary TYPE /scmtms/t_tor_root_transient_k.

* get service manager
lo_srvmgr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( /scmtms/if_tor_c=>sc_bo_key ).

* prepare selection options
ls_sel_opt-attribute_name = /scmtms/if_tor_c=>sc_query_attribute-root-planning_attributes-locfr.
ls_sel_opt-sign   = 'I'.
ls_sel_opt-option = 'CP'.
ls_sel_opt-low    = 'T*'.
ls_sel_opt-high   = ''.
INSERT ls_sel_opt INTO TABLE lt_sel_opt.

* query business object keys
CALL METHOD lo_srvmgr->query
  EXPORTING
    iv_query_key            = /scmtms/if_tor_c=>sc_query-root-planning_attributes
    it_selection_parameters = lt_sel_opt
  IMPORTING
    et_key                  = lt_tor_key.

* retrieve business object data
CALL METHOD /scmtms/cl_pln_bo_data=>get_tor_data
  EXPORTING
    it_key           = lt_tor_key
  CHANGING
    ct_tor_root      = lt_tor
    ct_tor_summary   = lt_tor_summary
    ct_tor_item      = lt_tor_item
    ct_tor_stop      = lt_tor_stop
    ct_tor_stop_succ = lt_tor_succ.

If you want to see how to retrieve BO data directly via BOPF then please debug into the method get_tor_data.

Data from other BOs can be read accordingly.

Hope this helps to get started using BOPF in TM.

Best regards

Thomas

jane_cruz
Explorer
0 Kudos

Hi Thomas,

I tried your code and it was very useful to me .


Regards