on 04-24-2017 2:56 PM
Hi,
i need to write a Report that includes costs of PM orders. I need to see all line items for a specific ordernr (e.g from posting confirmations). I can see the line items in table COEP. But as I do not know the number of the FI document (belnr) performance is pretty bad. Is there a fuba or bapi that can determine the line items? When i run KOB1 it is fast. But in Debugging I did not find the way how KOB1 selects the data from DB. Any Ideas?
KOB1 doesn't read FI document, it read CO documents (COBK/COEP, often view COVP) with OBJNR criteria (and a harcoded LEDNR = '00' for performance) then navigation is available to CO or original document (look at FM K_DOCUMENT_ACTUAL/COMMITMENT_CALL, set i_flg_sender to navigate to original document)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Andreas,
Our ABAPers did it this way by calling the program, then grabing the data from memory before its displayed :
SUBMIT rkaep000
USING SELECTION-SCREEN 0100
WITH p_kokrs =
WITH kostl =
WITH r_budat =
WITH p_fixvar = abap_false
WITH p_usegrd = abap_true
WITH p_maxsel = '99999999'
WITH p_disvar =
WITH p_tcode = 'KSB1N' <<<<<----- Try KOB1 instead
WITH p_hana = abap_true
WITH p_tree = abap_false
WITH p_imout = abap_true
WITH p_grobj = abap_true
EXPORTING LIST TO MEMORY
AND RETURN.
Then grab the data from the class:
TRY.
cl_salv_bs_runtime_info=>get_data_ref(
IMPORTING r_data = lr_data ).
ASSIGN lr_data->* TO <lfs_data>.
IF <lfs_data> IS ASSIGNED.
et_cost_table = <lfs_data>.
ENDIF.
CATCH cx_salv_bs_sc_runtime_info.
RAISE EXCEPTION TYPE zi_pmcosts
EXPORTING
textid = zcx_pmcosts=>fetch_co_data_failed.
ENDTRY.
-------------------------
If you are using HANA, then you could also look at the following Calculation Views:
https://help.sap.com/saphelp_hba/helpdata/en/27/580c16d28147f081c9af4d3e524b50/frameset.htm
PeteA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please check FM "K_LINE_ITEMS_SELECT" which is called in trx."KOB1". Set up Debugging when executing the transaction ...
Kind regards
Nic T.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.