Home > Default > Settlement doc number & wbs element relationship table

Settlement doc number & wbs element relationship table

November 30Hits:0
Advertisement
Hello,
I am trying to find any tables which can help me get the settlement doc number and wbs element relationship.  Presently I am using table AUAA and here is my select for that:
SELECT belnr aufnr pspnr anln1 coobjnr FROM auaa INTO TABLE tab_auaa
                    WHERE emtyp = 'PR'
                    AND bukrs IN p_bukrs
                    AND kokrs IN p_kokrs.
since I do not have "belnr"(the primary key) it is taking too long to get this info.....any one has any idea of any other tables to get this information or a bapi?
appreciate the help
AS

Answers

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...
Edited by: J Are on Oct 31, 2009 1:19 PM

Read other 12 answers

Tags:

Related Articles

  • Settlement doc number & wbs element relationship tableNovember 30

    Hello, I am trying to find any tables which can help me get the settlement doc number and wbs element relationship.  Presently I am using table AUAA and here is my select for that: SELECT belnr aufnr pspnr anln1 coobjnr FROM auaa INTO TABLE tab_auaa

  • Creation of settlement rules for WBS elementOctober 11

    Hi, Iam having problem when creating the settlement rules for WBS elements. The business goes like this. We have XI interface which creates the Idocs and an inbound program(customized) to process the Idocs. When the Inbound program is run the WBS ele

  • BAPI for settlement rules in WBS ElementsNovember 30

    Hi, Is there any standard bapi, method, or whatever... to create / modify settlement rules for WBS Elements?. Rgds, JoseLook at BAPI/FM of FG CJ2054 BAPI_BUS2054_CHANGE_MULTI     Change WBS Elements by BAPI BAPI_BUS2054_CREATE_MULTI     Create WBS El

  • How to settle previous period WBS element which was closed.November 30

    Hi all, Please let me know, how to settle previous period WBS element which was closed. Thanks and kind regards, Padmaja.actually the wbs element was  related to 2005 and it must be cleared in 2005 itself.but due to some problem it had been not clear

  • Which table has auc to wbs element relationship storedOctober 11

    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 ...............

  • Settlement rule in WBS elementNovember 30

    Hi Team we are assigning General ledger accounts for settlement WBS element cost. system gives the below warning message. but we have three company codes we fallow the same steps for all company codes. but we are facing in one company code only why i

  • Settlement of order -WBS ElementOctober 11

    Dear Experts, Can any one tell me what is meant by WBS element and in what scenario,PM orders settlement rule created with category as WBS.If possible tell me with any practical example. regards KRISHNANDear, Dear, Budget: Amount of resources allocat

  • Report on Settlement - Project wise/ WBS element wiseOctober 11

    Hello Friends, I am looking for a report on settlement which will include the senders - Projects or WBS elements and Settlement receivers and the amount settled in the any period for a particular fiscal year. Your response will be rewarded. Vishal.Hi

  • Settlement profile for WBS elementNovember 30

    Hi All, While providing the settlement profile and rule to a wbs element and saving i getting one error Rule 3Z000001072 not found" and indetail Diagnosis A subrule has been specified which does not exist. System Response None Procedure Check the nam

  • Serial Number&WBS ElementNovember 30

    Hi experts, 1-) I can not deliver sales orders because it requires serial numbers. Can anybody tell me how to cancel asking serial numbers? 2-)If it is not available how can I create serial numbers? I created serial numbers by trcode IQ01 but again I

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.700 s.