cancel
Showing results for 
Search instead for 
Did you mean: 

which table has auc to wbs element relationship stored

Former Member
0 Kudos

Hello everyone,

I have to write a report on costs for AUC. I have following scenario:

auc1-----wbs2--internal order4

............... |----


internal order3

............... wbs1----internal order1

............... |------internal order2

............... |

auc2-----wbs3 -


internal order1

I tried my best to depict the scenario in the picture.....so basically i want auc1 cost.....now client does not want to see wbs3 element...since it is settling to auc2.....if i put in the project def in the following bapi(BAPI_PROJECT_GETINFO)...i get all the wbs elements..since there is a settlement from wbs1 to wbs3..is there any table which can give me relationship...or which can tell me that which wbs is settling for which auc....

Thanks...i hope i was able to explain my question....

appreciate the help....

AS.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This message was moderated.

virendra_pal
Active Contributor
0 Kudos

also check the following programs for asset origin - if these programs are not in your system then you may have ot apply some note - just search in OSS with the program name

Program Name Report title

RAHERK01 List of Origins of Asset Charges

RAHERK02 List of Origins by Cost Elements

RAHERK02_NACC List of Origins by Cost Elements

Former Member
0 Kudos

Hi all, thanks for all the help and support on this...I found a way to get all the CO settlement doc numbers for a project and their relationship as sender and receiver..... first i went to anla and anek to get the AUC and the wbs settling to this AUC relatiionship...once i got my main wbs element...i found all the wbses for this project. I need to use the table AUAK, AUFK, and AUAA to get all that information. I got all my wbses for a project first....than I went to table AUAK with all these wbses...and found the belnr(settlement doc numbers)....this table does not give out complete settlement doc numbers for wbses....we need to go back to AUAK with the internal orders to get the belnrs for them as well....so to get all the internal orders for a project i went to AUFK....than i took these orders and went back AUAK with these orders and got my missing belnrs.... now I had all my belnrs for a project....so i went to table AUAA and did the select with these belnr...and since now i have the primary key the access is lighting fast....by doing that select i got all my relationship, i mean which settlement is goind where... mind you that I used AUAS to get the sender/receiver relationship with the amount....this is as well a cluster table but we have the primary key belnr(co settlement doc. numbers)...so no worries to get the data here as well.... here are my selects for AUAK, AUFK and AUAA....

TYPES: BEGIN OF prps_ty, psphi TYPE prps-psphi, END OF prps_ty. DATA all_proj TYPE STANDARD TABLE OF prps_ty. DATA wa_all_proj TYPE prps_ty. TYPES: BEGIN OF objnr_ty, objnr TYPE auak-objnr, END OF objnr_ty. DATA lo_p_psp TYPE STANDARD TABLE OF objnr_ty. IF all_proj IS NOT INITIAL. SELECT objnr FROM prps INTO TABLE lo_p_psp FOR ALL ENTRIES IN all_proj WHERE psphi = all_proj-psphi. ENDIF. IF lo_p_psp IS NOT INITIAL. SELECT belnr objnr FROM auak INTO TABLE tab_auak FOR ALL ENTRIES IN lo_p_psp WHERE kokrs IN p_kokrs AND gjahr IN p_gjahr AND objnr = lo_p_psp-objnr * AND objnr LIKE 'PR%'. SORT tab_auak BY belnr. DELETE ADJACENT DUPLICATES FROM tab_auak COMPARING belnr. SELECT aufnr objnr pspel FROM aufk INTO TABLE tab_aufk FOR ALL ENTRIES IN lo_p_psp WHERE bukrs IN p_bukrs AND kokrs IN p_kokrs AND pspel = lo_p_psp-objnr. ENDIF. *get the belnrs for orders---this part is very important or we miss out all the belnrs for I/O... IF tab_aufk IS NOT INITIAL. SELECT belnr objnr FROM auak INTO TABLE tab_auak2 FOR ALL ENTRIES IN tab_aufk WHERE kokrs IN p_kokrs AND gjahr IN p_gjahr AND objnr = tab_aufk-objnr. ENDIF. *append these new belnrs to tab_auak LOOP AT tab_auak2 INTO wa_tab_auak2. * CONCATENATE 'PR' wa_tab_aufk-pspel INTO wa_tab_auak2-objnr. APPEND wa_tab_auak2 TO tab_auak. ENDLOOP. SORT tab_auak. "by belnr. DELETE ADJACENT DUPLICATES FROM tab_auak. *now get all the belnrs for this project...complete list.... IF tab_auak IS NOT INITIAL. SELECT belnr aufnr pspnr anln1 coobjnr FROM auaa INTO TABLE tab_auaa FOR ALL ENTRIES IN tab_auak * WHERE pspnr = wa_wbs-posnr WHERE belnr = tab_auak-belnr AND emtyp = 'PR' AND bukrs IN p_bukrs AND kokrs IN p_kokrs. ENDIF. SORT tab_auaa BY pspnr belnr.

I used our own indexes for all the transparent table accesses.... to speed up the process...you might want to create your own indexes depending on the where clauses for transparent tables..... well thanks again..and hope all this will help someone else too.... AS...

Answers (0)