Table name for WBS element deleted

If a  WBS element is deleted , the corresponding object id which is internally created by the system is also deleted from the PRPS table,
Is there a way to find all the deleted WBS elements and what is the table name for the same.

Hello
1. Goto table PRPS with PSPNR = WBS number. Get field OBJNR.
2. With PRPS-OBJNR goto table JEST. You will have all status for this WBS element.
3. Text for status - table TJ02T

Similar Messages

  • Table name for WBS Element & Purchase Order Conditions

    Dear All,
    I need a table which stores WBS Elemnt No. & Purchase Order Conditions ( Like Excise Duty, Sales Tax, Packing & Forwarding etc.)
    Thanks & Regards,
    Sandeep N.Theurkar

    Hi ,
    It is not possible to get all this information from one table. But you can get the data by writing ABAP , or by creating a query.
    As Amit posted WBS table is PRPS.
    You can get the account assignment of a purchase order (whether it is network or WBS element) from table :EKKN.
    Pass PO number into EKKN and get the following:
    WBS No - PS PSP PNR
    Network -NPLNR
    Activity - AUFPL
    Hope all the postings together will provide an integrated picture.
    Regards
    Muraleedharan.R

  • Does any one know table names for Payroll Elements that can be used in WF

    How can one get the table names for ORACLE Payroll Elements and how can one use those table names in order to create a workflow that will automatically update the payroll balances.
    I have created 3 elements for LOAN:-
    One being Direct Payment as its Primary Classification---------------->Loan Amount
    Two being Voluntary Deductions as its Primary Classification------->Recovery Amount
    Three being Information as its Primary Classification--------------------->Reducing Balance.
    Would like to create a work flow that will do automatic updation of the DB items in the Balances. So i want to know what all tables get updated once the transaction is made in Payroll. I am not sure if it really can happend.
    Please PEOPLE i need some 1 to help me.
    Thanking you all in advance,
    Chetan

    Theoretical and acual speeds for all types data connections can differ due to several variables.  I cannot tell you if my eSata connection has ever achieved the theoretical maximum speed because I have never measured it.  However I have compared transfer times against Firewire with large files and it is noticeably faster (at least by 50%+).  Therefore I highly recommend having it if you need to transfer large files from one HDD to another.
    If you have a recent MBP, you already have a Thunderbolt connection.  I do not believe that there will be a Thunderbolt Express Card for older MBPs because they are not configured to accept that technology.
    Ciao.

  • How to fetch the data from the table COEP for WBS element,cost center,,,,,?

    Hi,
    I would like to retrive the data from the table COEP ,based on KOKRS,BELNR fields.
    I need the output for Cost centre, cost element, wbs element,net work ,activity.
    These values are storing OBJNR ,OBJNAR_1,OBJNR_2,OBJNR_N3.
    But here always these field are not giving the correct values.
    for example : for one record COST CENTRE vlaue is storing in OBJNR_1 field,
                        for one record COST CENTRE vlaue is storing in OBJNR_2 field,
                       for one record  COST CENTRE vlaue is storing in OBJNR_3 field.
    Here SAP has used a generic approach for this.
    How can I dispaly the values in this case ?
    Thanks and Regards
    Srinivas.N

    Hi,
    I am asking, how can we say OBJNR_1 value alwyas belongs to cost center ?
    USPOB is not filling always.

  • Re: Budget table for wbs element

    Is there any table that stores  WBS elements budgets?

    Thank You very much for you quick replies....I am awarding the  points.....I have nt checked the tables yet....looks like i got the correct table names........
    One more question Can you guys tell me the table names for the Status of the WBS element....like where i can see whether a WBS element is locked or released...some thing like that.
    Thanks a lot

  • Table name for asset deletion record

    Hi,
    Please tell me the table name for asset deletion record.
    Thanks...

    Hi,
    Find Asset deletion tables below.
    CDHDR     Table for find the list of Retired / deleted assets (use SE16 for the same and put T. Code ABAVN / AS06)         
    CDPOS
    Regards,
    JA
    Edited by: javeed ahmed on Jan 14, 2010 12:10 PM

  • Filed & Table name for Balances against cost element

    Dear experts,
    Please tell me the Filed & Table name for Balances against cost element.
    Jyoshna

    I guess
    Table Name is : COSP
    Field Name for Cost Element : KSTAR
    Field Name for Transaction Cost against the cost element:WTG011
    Thanks
    Jyoshna

  • Table name for Cost Center Group/Profit Center Group/Cost Element Group

    Hi,
    Kindly let me know the table names for cost center group, cost element group and profit center groups.
    Thanks.
    Suresh

    Hi,
    The tables for storing groups in SAP are SETNODE and SETLEAF. The codes in the previous message posted by my fellow SAP consultant are transactions and not tables.
    The classes are:
    Cost centres - 0101
    Cost elements - 0102
    Profit centres - 0106
    Regards,
    Eli

  • Very  urgent- find parent-child relationship for wbs element

    Hi,
    There is a certain parent child heirachy in WBS elements.My requiremnet is to delete WBS element depending on certain field , say depending on some ""status"".If the status is active in some or any of the child then I am not suppose to delete its respective parent too. This parent-child relation can have say 5 levels.
    For this I require a logic /program which shall maintain the parent reference for that particular child whih I want/ dont want to delete.
    I am maintaining bottom- to -top approach.
    That is I shall be checking for the status of the lowest level of WBS and then  going to the highest.
    Please Help!
    Kshitija

    hi you can use following code....
    REPORT  zpmgmt_rpt_projinfo NO STANDARD PAGE HEADING LINE-SIZE  160.
    *& Includes
    INCLUDE <icon>.
    INCLUDE zdata_declare_n.  " include for data declaration
    INCLUDE zsubr_n.          " include for both subroutines
    DATA: gv_index LIKE sy-tabix,
          lv_index LIKE sy-tabix,
          date_index TYPE sy-tabix.
    *& Start of Selection ( Get Data )
    START-OF-SELECTION.
    For initial display cnt is set to X
      IF cnt EQ 'X'.
        PERFORM getdata.
        CLEAR it_final.
        PERFORM hierarchy.
        cnt = ''.
      ENDIF.
    *&      Form  GETDATA
    Fetches the data and logic for T1 and T2
    -->  p1        text
    <--  p2        text
    FORM getdata.
    Getting project header data
      SELECT * FROM proj
        INTO CORRESPONDING FIELDS OF TABLE it_proj
        WHERE pspid IN so_posid
        AND werks IN so_plant
        AND stort IN so_loc
        AND erdat IN so_date.
      IF sy-subrc <> 0.
        MESSAGE 'Enter the valid entry' TYPE 'I'.
        STOP.
      ENDIF.
      LOOP AT it_proj.
        PROJECT = it_proj-pspid.
    Get project & WBS element details
    BAPI used gives the output in some specific format
    which is used for roll-up logic.
        CALL FUNCTION 'BAPI_PROJECT_GETINFO'
         EXPORTING
            project_definition           = project
            with_activities              = 'X'
         IMPORTING
            e_project_definition         = e_project_definition
         TABLES
            e_wbs_hierarchie_table       = e_wbs_hierarchie_table.
    Appending all the projects in the e_wbs.
            LOOP AT e_wbs_hierarchie_table.
              MOVE-CORRESPONDING e_wbs_hierarchie_table TO e_wbs.
              APPEND e_wbs.
              CLEAR e_wbs.
            ENDLOOP.
        CLEAR PROJECT.
      ENDLOOP.
      SET COUNTRY 'US'.
      i_repid = sy-repid.
    Getting data into internal tables
    Getting project WBS element
      SELECT * FROM prps
        INTO CORRESPONDING FIELDS OF TABLE it_prps
        FOR ALL ENTRIES IN it_proj
        WHERE psphi = it_proj-pspnr.
    Getting project activities
      SELECT * FROM afvc
        INTO CORRESPONDING FIELDS OF TABLE it_afvc
        FOR ALL ENTRIES IN it_prps
        WHERE projn = it_prps-pspnr.
      SORT it_afvc BY vornr.
    Getting activities start & end dates from AFVV
      SELECT * FROM afvv
       INTO CORRESPONDING FIELDS OF TABLE it_afvv
       FOR ALL ENTRIES IN it_afvc
       WHERE aufpl = it_afvc-aufpl
       AND aplzl = it_afvc-aplzl.
    Getting plant name
      SELECT * FROM t001w
        INTO CORRESPONDING FIELDS OF TABLE it_t001w
        FOR ALL ENTRIES IN it_proj
        WHERE werks = it_proj-werks.
    Logic for passing data to final internal table
    Passing Project master data
      READ TABLE it_proj INDEX 1.
      IF sy-subrc EQ 0.
        CALL FUNCTION 'CONVERSION_EXIT_ABPSN_OUTPUT'
          EXPORTING
            input  = it_proj-pspid
          IMPORTING
            output = it_proj-pspid.
        it_final-posid = it_proj-pspid.
        it_final-post1 = it_proj-post1.
        APPEND it_final.
        CLEAR it_final.
      ENDIF.
    Passing WBS element to the final internal table IT_FINAL
      LOOP AT it_prps.
        CALL FUNCTION 'CONVERSION_EXIT_ABPSN_OUTPUT'
          EXPORTING
            input  = it_prps-posid
          IMPORTING
            output = it_prps-posid.
         CLEAR color.
    Get WBS element status ans color(T2)from OBJNR
        CALL FUNCTION 'ZGET_STATUS_N'
          EXPORTING
            objnr    = it_prps-objnr
          IMPORTING
            color    = color
          TABLES
            t_status = it_tj30t.
        IF     color = 'RED'.
          it_final-t2 = '@0A@'.
        ELSEIF color = 'YELLOW'.
          it_final-t2 = '@09@'.
        ELSEIF color = 'GREEN'.
          it_final-t2 = '@08@'.
        ENDIF.
        SORT it_tj30t DESCENDING.
    Getting User statuses of WBS element at component level.
        READ TABLE it_tj30t INDEX 1.
        IF sy-subrc EQ 0.
          CONCATENATE it_tj30t-txt04 '' INTO it_final-txt04 SEPARATED BY  space.
        ENDIF.
        READ TABLE it_tj30t INDEX 2.
        IF sy-subrc EQ 0.
          CONCATENATE it_tj30t-txt04 it_final-txt04 INTO it_final-txt04  SEPARATED BY space.
        ENDIF.
        MOVE-CORRESPONDING it_prps TO it_final.
        READ TABLE it_proj WITH KEY pspid = it_prps-posid.
        IF sy-subrc EQ 0.
          it_final-werks = it_proj-werks.
        ENDIF.
        APPEND it_final.
        CLEAR  it_final-txt04.
    Passing activity to the final internal table IT_FINAL
        LOOP AT it_afvc WHERE projn EQ it_prps-pspnr.
          CLEAR color.
    Getting user status and color(T2) for Activity from OBJNR
          CALL FUNCTION 'ZGET_STATUS_N'
            EXPORTING
              objnr    = it_afvc-objnr
            IMPORTING
              color    = color
            TABLES
              t_status = it_tj30t.
          IF     color = 'RED'.
            it_final-t2 = '@0A@'.
          ELSEIF color = 'YELLOW'.
            it_final-t2 = '@09@'.
          ELSEIF color = 'GREEN'.
            it_final-t2 = '@08@'.
          ENDIF.
          CLEAR: it_final-fsavd,
                 it_final-fssad.
          MOVE-CORRESPONDING it_afvc TO it_final.
    Getting User statuses of WBS element at activity level.
          SORT it_tj30t DESCENDING.
          READ TABLE it_tj30t INDEX 1.
          IF sy-subrc EQ 0.
            CONCATENATE it_tj30t-txt04 '' INTO it_final-txt04 SEPARATED  BY space.
          ENDIF.
          READ TABLE it_tj30t INDEX 2.
          IF sy-subrc EQ 0.
            CONCATENATE it_tj30t-txt04 it_final-txt04 INTO it_final-txt04  SEPARATED BY space.
          ENDIF.
          APPEND it_final.
          lv_index = sy-tabix.
          CLEAR it_final-txt04.
          CLEAR it_final-ltxa1.
          CLEAR it_tj30t.
          REFRESH it_tj30t.
    Start Date and End Date fetched from AFVV.
          LOOP AT it_afvv  WHERE   aufpl  EQ it_afvc-aufpl
                              AND   aplzl EQ it_afvc-aplzl.
            MOVE-CORRESPONDING it_afvv TO it_final.
            MODIFY it_final INDEX lv_index TRANSPORTING fsavd fssad.
          ENDLOOP.
          CLEAR it_afvc.
          CLEAR lv_index.
        ENDLOOP.
      ENDLOOP.
    Logic for T1.
    T1 is based on T2 and start date and end date of activities.
      LOOP AT it_final WHERE stufe = 3
                       AND ltxa1 IS NOT INITIAL.
        gv_index = sy-tabix.
        PERFORM date_difference.
        CASE it_final-t2.
          WHEN '@0A@'.     "  If Red
            IF sy-datum GT it_final-fssad.
              it_final-t1 = '@0A@'.
            ELSEIF sy-datum LE it_final-fssad AND
                   sy-datum GE it_final-fsavd.
              IF gv_diff > 1.
                PERFORM date_monitor.
              ENDIF.
              it_final-t1 = '@09@'.
            ELSEIF
              sy-datum LT it_final-fsavd.
              it_final-t1 = '@08@'.
            ENDIF.
          WHEN '@09@'.     " If Yellow
            IF sy-datum GT it_final-fssad.
              it_final-t1 = '@0A@'.
            ELSEIF sy-datum LE it_final-fssad AND
                   sy-datum GE it_final-fsavd.
              IF gv_diff > 1.
                PERFORM date_monitor.
              ENDIF.
              it_final-t1 = '@09@'.
            ELSEIF
              sy-datum LT it_final-fsavd.
              it_final-t1 = '@08@'.
            ENDIF.
          WHEN '@08@'.     " If Green
            it_final-t1 = '@08@'.
        ENDCASE.
        MODIFY it_final INDEX gv_index TRANSPORTING t1.
        CLEAR gv_index.
      ENDLOOP.
    ENDFORM.                    " GETDATA
    *&      Form  hierarchy
    Displays the data in ALV hierarchical manner.
    In coding 3 tables are used for roll-up functionality.
    FORM hierarchy .
      DATA: it_final1 LIKE it_final OCCURS 0 WITH HEADER LINE.
      DATA: it_final2 LIKE it_final OCCURS 0 WITH HEADER LINE.
      DATA: it_final3 LIKE it_final OCCURS 0 WITH HEADER LINE.
      DATA: count TYPE i VALUE 1.
      DATA: posid LIKE prps-posid.
      DATA: change,
            date_mask  TYPE c LENGTH 10,
            lv_index2 LIKE sy-tabix.
      DATA: index TYPE sy-tabix.
      DATA: up LIKE prps-posid.
    Deleting duplicate entries from the it_final.*****************
      DELETE ADJACENT DUPLICATES FROM it_final.
      LOOP AT it_final WHERE stufe EQ 2.
        IF posid NE it_final-posid.
          posid = it_final-posid.
        ELSE.
          DELETE it_final INDEX sy-tabix.
        ENDIF.
      ENDLOOP.
      CLEAR posid.
      LOOP AT it_final  WHERE stufe EQ 3
                        AND ltxa1 EQ space.
        IF posid NE it_final-posid.
          posid = it_final-posid.
        ELSE.
          DELETE it_final INDEX sy-tabix.
        ENDIF.
      ENDLOOP.
    Updating a new intrnal table for roll up functionality. ********
      it_final1[] = it_final[].
      CLEAR: lv_index2.
      LOOP AT it_final1 WHERE stufe =  3
                        AND ltxa1 IS NOT INITIAL.
        READ TABLE it_final WITH KEY  stufe = 3
                                      posid = it_final1-posid
                                      post1 = it_final1-post1.
       clear change.
        IF sy-subrc = 0.
          lv_index = sy-tabix.
          IF lv_index2 <> lv_index.
            CLEAR: change.
            lv_index2 = lv_index.
          ENDIF.
          IF it_final1-t1 = '@0A@'.
            it_final-t1 =  '@0A@' .
            MODIFY it_final INDEX lv_index TRANSPORTING t1.
            DELETE it_final1 WHERE posid = it_final-posid.
            CONTINUE.
          ENDIF.
          IF  it_final1-t1 = '@09@'.
            it_final-t1 = '@09@'.
            change = 'Y'.
            MODIFY it_final INDEX lv_index TRANSPORTING t1.
            CONTINUE.
          ENDIF.
          IF it_final1-t1 = '@08@'.
            it_final-t1 =  '@08@' .
            IF change IS INITIAL.
              MODIFY it_final INDEX lv_index TRANSPORTING t1.
            ENDIF.
            CONTINUE.
          ENDIF.
        ENDIF.
      ENDLOOP.
      it_final2[] = it_final[].
      CLEAR: lv_index2.
      LOOP AT it_final2 WHERE stufe = 3
                        AND ltxa1 IS INITIAL.
        READ TABLE e_wbs WITH KEY wbs_element = it_final2-posid.
        IF sy-subrc = 0.
          READ TABLE it_final WITH KEY stufe = 2
                                       posid = e_wbs-up.
          IF sy-subrc = 0.
            CHECK it_final-t1 <> '@0A@'.
            lv_index = sy-tabix.
            IF lv_index2 <> lv_index.
              CLEAR: change.
              lv_index2 = lv_index.
            ENDIF.
            IF   it_final2-t1 = '@0A@'.
              it_final-t1 =  '@0A@' .
              MODIFY it_final INDEX lv_index TRANSPORTING t1.
              CONTINUE.
            ENDIF.
            IF  it_final2-t1 = '@09@'.
              it_final-t1 = '@09@'.
              MODIFY it_final INDEX lv_index TRANSPORTING t1.
              change = 'Y'.
              CONTINUE.
            ENDIF.
            IF it_final2-t1 = '@08@'.
              it_final-t1 =  '@08@' .
              IF change IS INITIAL.
                MODIFY it_final INDEX lv_index TRANSPORTING t1.
              ENDIF.
              CONTINUE.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
      it_final3[] = it_final[].
      CLEAR: lv_index2.
      CLEAR change.
      LOOP AT it_final3 WHERE stufe = 2.
        READ TABLE e_wbs WITH KEY wbs_element = it_final3-posid.
        CHECK sy-subrc = 0.
        READ TABLE it_final WITH KEY stufe = 1
                                     posid = e_wbs-up.
        IF sy-subrc = 0.
          CHECK it_final-t1 <> '@0A@'.
          lv_index = sy-tabix.
          IF lv_index2 <> lv_index.
            CLEAR: change.
            lv_index2 = lv_index.
          ENDIF.
          IF   it_final3-t1 = '@0A@'.
            it_final-t1 =  '@0A@' .
            MODIFY it_final INDEX lv_index TRANSPORTING t1.
            DELETE it_final3.   " WHERE stufe = 2.
            CONTINUE.
          ENDIF.
          IF  it_final3-t1 = '@09@'.
            it_final-t1 = '@09@'.
            MODIFY it_final INDEX lv_index TRANSPORTING t1.
            change = 'Y'.
            CONTINUE.
          ENDIF.
          IF it_final3-t1 = '@08@'.
            it_final-t1 =  '@08@' .
            IF change IS INITIAL.
              MODIFY it_final INDEX lv_index TRANSPORTING t1.
            ENDIF.
            CONTINUE.
          ENDIF.
        ENDIF.
      ENDLOOP.
    Building hierarchy table ***************
      LOOP AT it_final.
        IF it_final-stufe = '0'.
          node_tab-type = 'T'.
          node_tab-name = 'Project'.
          node_tab-tlevel = '01'.
          node_tab-nlength = '8'.
          node_tab-color = '4'.
          node_tab-text = it_final-post1.
          node_tab-tlength ='20'.
          node_tab-tcolor = 5.
          APPEND node_tab.
          it_final_hsk-node = node_tab.
          APPEND it_final_hsk. CLEAR it_final_hsk.
          CLEAR node_tab.
        ELSEIF it_final-stufe = '1'.
          node_tab-type = 'P'.
          node_tab-name = 'Project'.
          node_tab-tlevel = '02'.
          node_tab-nlength = '10'.
          node_tab-color = '1'.
          node_tab-kind2 = 'I'.
          node_tab-text3+0(4) = it_final-t1.
          node_tab-tlength3 = '5'.
          node_tab-tcolor3 = 1.
          node_tab-kind3 = ' '.
          node_tab-text4 = it_final-posid.
          node_tab-tlength4 ='20'.
          node_tab-tcolor4 = 3.
    Code added for plant name
          CALL FUNCTION 'CONVERSION_EXIT_ABPSN_INPUT'
            EXPORTING
              input  = it_final-posid
            IMPORTING
              output = it_final-posid.
          READ TABLE it_proj WITH KEY pspid = it_final-posid.
          CHECK sy-subrc = 0.
          READ TABLE it_t001w WITH KEY werks = it_proj-werks.
          CHECK sy-subrc = 0.
    Code End.
          node_tab-kind4 = ' '.
          node_tab-text5 = it_t001w-name1.   " Plant Name
          node_tab-tlength5 ='25'.
          node_tab-tcolor5 = 4.
          node_tab-kind5 = ' '.
          node_tab-text6 = it_proj-stort.
          node_tab-tlength6 ='15'.
          node_tab-tcolor6 = 4.
          node_tab-kind6 = ' '.
          node_tab-text7 = it_final-post1.
          node_tab-tlength7 ='25'.
          node_tab-tcolor7 = 4.
          APPEND node_tab.
          it_final_hsk-node = node_tab.
          APPEND it_final_hsk. CLEAR it_final.
          CLEAR node_tab.
        ELSEIF it_final-stufe = '2'.
          node_tab-type = 'P'.
          node_tab-name = 'Gate Id'.
          node_tab-tlevel = '03'.
          node_tab-nlength = '10'.
          node_tab-color = '1'.
          node_tab-kind2 = 'I'.
          node_tab-text3+0(4) = it_final-t1.
          node_tab-tlength3 = '5'.
          node_tab-tcolor3 = 1.
          node_tab-kind3 = ' '.
          node_tab-text4 = it_final-posid.
          node_tab-tlength4 ='20'.
          node_tab-tcolor4 = 3.
          node_tab-kind4 = ' '.
          node_tab-text5 = it_final-post1.
          node_tab-tlength5 ='25'.
          node_tab-tcolor5 = 4.
          APPEND node_tab.
          it_final_hsk-node = node_tab.
          APPEND it_final_hsk.
          CLEAR it_final.
          CLEAR node_tab.
        ELSEIF it_final-stufe = '3' AND it_final-ltxa1 EQ space.
          node_tab-type = 'P'.
          node_tab-name = 'Component'.
          node_tab-tlevel = '04'.
          node_tab-nlength = '11'.
          node_tab-color = '1'.
          node_tab-kind2 = 'I'.
          node_tab-text3+0(4) = it_final-t1.
          node_tab-tlength3 = '5'.
          node_tab-tcolor3 = 1.
          node_tab-kind3 = ' '.
          node_tab-text4 = it_final-posid.
          node_tab-tlength4 ='25'.
          node_tab-tcolor4 = 3.
          node_tab-kind4 = ' '.
          node_tab-text5 = it_final-post1.
          node_tab-tlength5 ='25'.
          node_tab-tcolor5 = 4.
    Code added for start date and end date for component level.
          SELECT SINGLE pstrm petrf INTO (v_pstrm, v_petrf)
               FROM prte WHERE posnr = it_final-pspnr.
          it_final-fsavd = v_pstrm.
          it_final-fssad = v_petrf.
          MODIFY it_final INDEX sy-tabix.
          WRITE it_final-fsavd TO date_mask MM/DD/YYYY.
          node_tab-tpos1 = '0'.
          node_tab-kind5 = ' '.
          node_tab-text6 = date_mask.
          node_tab-tlength6 ='10'.
          node_tab-tcolor6 = 3.
          CLEAR date_mask.
          WRITE it_final-fssad TO date_mask MM/DD/YYYY.
          node_tab-tpos1 = '0'.
          node_tab-kind6 = ' '.
          node_tab-text7 = date_mask.
          node_tab-tlength7 ='10'.
          node_tab-tcolor7 = 3.
          CLEAR date_mask.
          APPEND node_tab.
          it_final_hsk-node = node_tab.
          APPEND it_final_hsk.
          CLEAR it_final_hsk.
          CLEAR node_tab.
        ELSEIF it_final-ltxa1 IS NOT INITIAL.
          node_tab-type = 'P'.
          node_tab-name = 'Element'.
          node_tab-tlevel = '05'.
          node_tab-nlength = '11'.
          node_tab-color = '1'.
          node_tab-kind = 'I'.
          node_tab-text1+0(4) = it_final-t1.
          node_tab-tlength1 = '5'.
          node_tab-tcolor1 = 1.
          node_tab-kind2 = 'I'.
          node_tab-text3+0(4) = it_final-t2.
          node_tab-tlength3 = '5'.
          node_tab-tcolor3 = 1.
          node_tab-kind3 = ' '.
          node_tab-text4 = it_final-ltxa1.
          node_tab-tlength4 ='45'.
          node_tab-tcolor4 = 3.
          node_tab-kind4 = ' '.
          node_tab-text5 = it_final-txt04.
          node_tab-tlength5 ='10'.
          node_tab-tcolor5 = 3.
          WRITE it_final-fsavd TO date_mask .
          node_tab-kind5 = ' '.
          node_tab-text6 = date_mask.
          node_tab-tlength6 ='10'.
          node_tab-tcolor6 = 3.
          CLEAR date_mask.
          WRITE it_final-fssad TO date_mask.
          node_tab-tpos1 = '0'.
          node_tab-kind6 = ' '.
          node_tab-text7 = date_mask.
          node_tab-tlength7 ='10'.
          node_tab-tcolor7 = 3.
          CLEAR date_mask.
          APPEND node_tab.
          it_final_hsk-node = node_tab.
          APPEND it_final_hsk.
          CLEAR it_final_hsk.
          CLEAR node_tab.
        ENDIF.
      ENDLOOP.
      CALL FUNCTION 'RS_TREE_CONSTRUCT'
        TABLES
          nodetab = it_final_hsk.
      CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
        EXPORTING
          callback_program      = i_repid
          callback_user_command = 'USER_COMMAND'
          callback_gui_status   = 'ZLD_TREE_N'
          screen_start_column   = 0
          use_control           = 'L'.
    ENDFORM.                    " hierarchy
    *&      Form  MYGUI
          text
         -->EX_TAB     text
    FORM zld_tree_n.
      SET PF-STATUS 'ZLD_TREE_N'.
    ENDFORM.                    "zld_tree.
    **&      Form  user_command
        Code for REFRESH button
    FORM user_command TABLES   node STRUCTURE seucomm
                               USING ucomm CHANGING exit
                                        list_refresh.
      CASE ucomm.
        WHEN 'REFR' .
          CLEAR it_final.
          REFRESH it_final_hsk.
          REFRESH it_final.
          PERFORM getdata.
          CLEAR it_final.
          PERFORM hierarchy.
        WHEN 'BACK1'.
          LEAVE TO TRANSACTION 'ZCN41_N'.
      ENDCASE.
    ENDFORM.                    "user_command
    include.....
    *&  Include           ZDATA_DECLARE
    *& Tables used for the report
    TABLES: proj, prps, aufk, afvc, jest, tj30t, afvv, prte.
    *& Type Pools used
    TYPE-POOLS: slis, icon, fibs, stree.
    *& Class & Data defination
    CLASS DEFINATION
    CLASS cl_gui_resources DEFINITION LOAD.
    DATA DECLARATION
    DATA: g_lights_name TYPE lvc_cifnm VALUE 'LIGHT',
          pspid LIKE proj-pspid,
          l_pos TYPE i VALUE 1,
          gs_layout TYPE slis_layout_alv,
          color TYPE zcn41_color_n-color.
    DATA : cnt VALUE 'X'.
    DATA : i_repid TYPE sy-repid.
    DATA : t_node TYPE snodetext.
    DATA : node_tab LIKE t_node OCCURS 0 WITH HEADER LINE.
    DATA : gv_diff TYPE p, stort LIKE proj-stort.
    CONSTANTS: st_formname_top_of_page TYPE slis_formname
                                  VALUE 'TOP_OF_PAGE-ALV'.
    *& Internal Table Declarations
    DATA it_proj   TYPE STANDARD TABLE OF proj WITH HEADER LINE.
    DATA it_prps   TYPE STANDARD TABLE OF prps WITH HEADER LINE.
    DATA it_afvc   TYPE STANDARD TABLE OF afvc WITH HEADER LINE.
    DATA it_tj30t  TYPE STANDARD TABLE OF tj30t WITH HEADER LINE.
    DATA it_afvv   TYPE STANDARD TABLE OF afvv WITH HEADER LINE.
    DATA it_jcds   TYPE STANDARD TABLE OF jcds WITH HEADER LINE.
    DATA it_t001w  TYPE STANDARD TABLE OF t001w WITH HEADER LINE.
    DATA: BEGIN OF it_final OCCURS 0,
              stufe  LIKE prps-stufe,
              pspnr  LIKE prps-pspnr,
              t1      TYPE icon-id,
              t2      TYPE icon-id,
              node    LIKE node_tab,
              posid  LIKE prps-posid,
              post1  LIKE prps-post1,
              ltxa1  LIKE afvc-ltxa1,
              txt04(20),
              objnr  LIKE afvc-objnr,
              vornr  LIKE afvc-vornr,
              aufpl  LIKE afvc-aufpl,
              aplzl  LIKE afvc-aplzl,
              fsavd  LIKE afvv-fsavd,  "Ear. Start date
              fssad  LIKE afvv-fssad,  "Ear. finish date
              werks  LIKE t001w-name1,     " added after update
              stort  LIKE proj-stort,     " added after update
         END OF it_final.
    DATA: BEGIN OF it_hsk OCCURS 0,
            t2      TYPE icon-id,
            t1      TYPE icon-id,
            posid  LIKE prps-posid,
            post1  LIKE prps-post1,
            objnr  LIKE afvc-objnr,
            stufe  LIKE prps-stufe,
          END OF it_hsk.
    DATA: BEGIN OF it_new OCCURS 0,
            objnr LIKE afvc-objnr,
            fsavd LIKE afvv-fsavd,
            fssad LIKE afvv-fssad,
            udate LIKE jcds-udate,
            t2(10),
          END OF it_new.
    CLEAR : node_tab, node_tab[].
    DATA  : entval TYPE prps-posid.
    DATA  : ct_fieldcat TYPE  slis_t_fieldcat_alv.
    DATA  : BEGIN OF it_final_hsk OCCURS 0,
              node LIKE node_tab,
            END OF it_final_hsk.
    DATA  : project LIKE bapipr-project_definition,
            e_project_definition LIKE bapi_project_definition_ex.
    DATA  : e_wbs_hierarchie_table TYPE STANDARD TABLE OF bapi_wbs_hierarchie
            WITH HEADER LINE.
    DATA  : e_wbs LIKE e_wbs_hierarchie_table OCCURS 0 WITH HEADER LINE.
    DATA:  v_pstrm LIKE prte-pstrm, v_petrf LIKE prte-petrf,
           v_posnr LIKE prps-pspnr.
    *& Selection Screen of the report
    SELECTION-SCREEN BEGIN OF BLOCK pms WITH FRAME TITLE text-001.
    SELECT-OPTIONS so_posid FOR proj-pspid OBLIGATORY.
    SELECT-OPTIONS so_plant FOR proj-werks.
    SELECT-OPTIONS so_loc FOR proj-stort.
    SELECT-OPTIONS so_date FOR sy-datum.
    SELECTION-SCREEN END OF BLOCK pms.
    *AT SELECTION-SCREEN .
    READ TABLE it_proj WITH KEY pspid = so_posid.
    IF sy-subrc <> 0.
       MESSAGE 'Project Name dose not exist' TYPE 'E.
    ENDIF.
    include..
    *&  Include           ZSUBR
    *&      Form  date_difference
          text
    -->  p1        text
    <--  p2        text
    FORM date_difference .
      CALL FUNCTION 'ZDATETIME_DIFFERENCE_N'
        EXPORTING
          date1                  = it_final-fsavd
          time1                  = '000000'
          date2                  = it_final-fssad
          time2                  = '000000'
       IMPORTING
         datediff               = gv_diff
       EXCEPTIONS
         INVALID_DATETIME       = 1
         OTHERS                 = 2
      IF sy-subrc <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " date_difference
    *&      Form  date_monitor
          text
    -->  p1        text
    <--  p2        text
    T1 for more than 1 days activities
    Subroutines result out the T1 on basis of 80% of activity ( Green )
    or if 20 % reamined. ( Yellow )
    FORM date_monitor .
      DATA: date TYPE string,
            temp_date TYPE string,
            lv_date LIKE afvv-fsavd,
            lv_date_final LIKE afvv-fsavd,
            lv_days LIKE  bseg-dtws1 VALUE 0.
      CONSTANTS: con TYPE f VALUE '0.8'.
    *lv_date = it_new-fsavd.
      IF gv_diff EQ 2.
        lv_days = 1.
        CALL FUNCTION 'ZCALC_DATE_N'
          EXPORTING
            date      = it_final-fsavd
            days      = lv_days
            months    = '00'
            sign      = '+'
            years     = '00'
          IMPORTING
            calc_date = lv_date_final.
        IF sy-datum LE lv_date_final.
          it_final-t1 = '@08@'.
        ELSEIF sy-datum GT lv_date_final AND
               sy-datum EQ it_final-fssad.
          it_final-t1 = '@09@'.
        ENDIF.
      ELSEIF gv_diff > 2.
        lv_days = con * gv_diff.
        CALL FUNCTION 'ZCALC_DATE_N'
          EXPORTING
            date      = lv_date
            days      = lv_days
            months    = '00'
            sign      = '+'
            years     = '00'
          IMPORTING
            calc_date = lv_date_final.
        IF sy-datum LE lv_date_final.
          it_final-t1 = '@08@'.
        ELSEIF sy-datum GT lv_date_final AND
               sy-datum EQ it_final-fssad.
          it_final-t1 = '@09@'.
        ENDIF.
      ENDIF.
    ENDFORM.                    " date_monitor
    this code will give you exact out put as you required from bootom to top functinality....with status....

  • BTE Failing for WBS Element

    Hi,
    I need to modify the document created using FB01 / MIRO for WBS Element. I could not find any user exit or BADI to do the same. So I tried the BTE 1120... I added a structure to BSEGSUBT to add the WBS Elements... And in the FM for 1120, I am passing the WBS Element to BSEGSUBT-PROJK.
    But this data is not getting updated in the document. On further investigation, i discovered that the Internal Table T_ACCIT has the field PS_PSP_PNR and not PROJK and its because of these differences in the name of the fields, i am not able to add the data to ACCIT...
    How do i get my data in the document?
    Appreciate your help.
    Kind Regards,
    Tanuja

    Helll T ,
    i think in that case ,...make use of Substitutions in Controlling area , in FI area system wont allow to change field values which are not part of its substittion fields.
    try GGB1(tcode)--->Cost Account ->line item->create Step -->and make use of Exit Module in order to change value of COBL-PS_PSPNR or something like that.
    regards
    Prabhu

  • Search help for user field for WBS element

    Hi,
    how can I add a search help to one of the user fields for WBS elements without modification? Is there an exit which I can use? I want to have a search help for field PRPS-USR02.
    Thanks for your help.

    Hi
    Create an elementary serach help using the Table USR01 or USR03
    see the steps
    1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
    2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    3)An elementary search help defines the standard flow of an input help.
    4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
    5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
    6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
    CREATION:
    Go to SE11  Tcode
    select search help
    give the 'z' search help name and create
    select the selection method ur table name eg : 'mara'
    dialog module 'display value immediately'.
    add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
    where left position when displaying and spos = search position
    and then save and activate ..
    See the links:
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
    https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485
    https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619
    pls go through this for search help creation
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    Search Help Exits:
    Re: dynamic values for search help
    Re: Dynamic search  help
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee52446011d189700000e8322d00/content.htm
    http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_exit.htm
    https://forums.sdn.sap.com/click.jspa?searchID=4390517&messageID=1712818
    Regards
    Anji

  • Segment for WBS element in Inbound Sales Order Idoc

    Hi gurus,
    I am trying to create an inbound idoc for sales order ' VA01'. I need to populate WBS element in the item level under Account Assignment Tab. I am using ORDERS05 basic type. Please help to find which segment to use for WBS element. Waiting for your reply. Please help.
    Regards,
    Satyajit

    Hello,
            As far as I know, there is no Segment / Field definition in ORDERS05 for WBS Element as it is not mandatory information to be filled in order for the Sales Order to be Complete. So, you need to create an Extension of the IDoc Type ORDERS05. For your requirement, here is the Approach I have.
    1. Create an extension for IDoc Type ORDERS05 to ZORDER05 with a Custom Segment Z1EDP01 in which you'll have the Custom Field Name VBAP-PS_PSP_PNR which is the WBS Element field in VBAP Table.
    2. Now, use the Customer Exit EXIT_SAPLVEDA_001 in the Enhancement VEDA0001 in which you can actually populate the Field WBS Element that would be already available in the Inbound IDoc to store it in a Work Area. As you are aware, you'll need to create a Project in CMOD for the same.
    3. Export the same to some MEMORY ID 'XXX'.
    4. Come back to the Selection Program for ORDER05 which is IDOC_INPUT_ORDERS in which you'll find the below CASE Statement.
        CASE xaprau.
              WHEN ' '.
                PERFORM call_va01_new_orders USING ok.
              WHEN 'Q'.
    Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Angebot
    call transaction Order Entry VA01 with refer to quote number.
                PERFORM call_va01_new_orders_angbt USING ok.
              WHEN 'C'.
    Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Kontrakt
    call transaction Order Entry VA01 with refer to contract number
                PERFORM call_va01_new_orders_contk USING ok.
              WHEN 'L'.
    5. Now, since our Standard Order Type (VBAK-VBTYP) is 'C',
        we'll have to choose the Subroutine for the 'C' Option.
    6. In this Subroutine, there is another Subroutine va01_dynpro_kopf_kaufmann_kde2 which is for populating Custom Dynpro Fields for the Sales Order. So, we need to choose the same Subroutine inside which we have to Create an Enhancement Implementation.
    7. In this Enhancement Implementation (Implicit), we have to IMPORT the value of the WBS Element which was exported in the Customer Exit.
    8. Check if it is initial. If it is not, then Call the Perform as below.
         IF NOT WA_Z1EDP01 IS INITIAL. "Checking if the Segment
                                                           " is Empty
       PERFORM DYNPRO_SETZEN USING 'COBL-PS_POSID' WA_Z1EDP01-ZZWBSELEMENT.
    ENDIF.
    9. Since the Sales Orders are posting using BDC here, by calling the above Subroutine DYNPRO_xxx, we are appending our Custom Segment / Field value to the BDC_DATA table.
    10. In Step 8, I've given the Notation for Work Area. It will also be applicable when there are multiple Line Items. All you have to do is to EXPORT an Internal Table instead of Work Area and use the same here for each Line Item.
    11. I've given you above procedure because I've worked on similar requirement in which I had to populate the Special Processing Indicator instead of WBS Element.
    Hope it would be helpful for you.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • Relationship between tables milestone and wbs element

    Hi  Guys,
    1.I have taken two tables in my source code retieving milestone number(mlst_zaehl), usage(mlstn),and wbs element(pspsnr)
    from TABLE MLST and the other table is PRPS(WBS ELEMENT TABLE, and the fields are psphi(project) , and pspnr(wbs elemrnt,
    The problem is i am not getting the project (psphi)  FROM PRPS TABLE and the link field is PRPS-PSPNR = MLST-PSPNR.
    2.Other requiremnt is  in the same program, iam getting reservation quantity and also DELIVERY QUANTITY
    if delivery qty equal to reservation quantity then exit  and if the reservation qty is NOT equal to delivery qty,
    i need to UPDATE the corressponding USAGE , MILESTONE TEXT, AND QTY in milestone table MLST.
    please let me know any function to update milestone or BAPI or i sahll use BDC.
    Reagrds
    subbara

    Hi
    I think you want to link MLST and PRPS tables to get the milestone fields...
    From Table MLST - Mile stone number - MLST_ZAEHL and WBS element - PSPNR, link the WBS elements with PRPS table - WBS element - PSPNR and for project - PSPHI (Current Project Number).
    For project number you can take from PRPS - PSPHI or from PROJ table
    - Pithan

  • Logic for WBS ELEMENT

    hi
    i have an issue in the report, the problem is
    in the selection screen i have an WBS ELEMENT as an select option(there is no belnr in selection scrren)
    for eg- if i enter
    COMP CODE = 0010
    WBS ELEMNT = 23456
    YEAR = 2008.
    For the above details there are 2 line items in table for that particular belnr as
    BUKRS BELNR YEAR BUZEI WBSELT SHKZG
    0010 40000050 2008 001 23456 S
    0010 40000050 2008 002 00000 H
    there is only one line item for WBS ELEMENT IN BSEG TABLE.
    So i am getting debit(SHKZG-S) value but i am not getting credit value if i write the select query as below.
    SELECT bukrs
    belnr
    gjahr
    buzei
    sgtxt
    kostl
    aufnr
    lifnr
    ebeln
    projk
    FROM bseg
    into table gt_bseg
    for all entries in i_get
    where bukrs eq i_get-bukrs
    and belnr eq i_get-belnr
    and gjahr eq i_get-ryear
    and buzei eq i_get-buzei
    and projk in s_projk.
    please help how to get both values.help with code
    thanks in advance,
    one of the friend from SDN gave the following solution to my problem
    but here he kept KOART = D, WHEREAS FOR MY CODE OTHERLINEITEM MISSED WOULD BE CREDIT OR DEBIT ONCE IT MAY BE MISSED THE CREDIT LINEITEM OR DEBIT ONE.
    LOOP AT GT_BSEG.
    select single BELNR KOART WRBTR PROJK FROM BSEG INTO wa_bseg WHERE BELNR = BSEG-BELNR AND KOART = 'D'.
    append the values of wa_bseg to it_bseg.
    endloop.
    i have faced same problem if u observe the table BSEG if KOART value is D , in that line item you cant get the PROJK value so
    from above select statemnt u can retrieve that value
    finally in it_bseg u can get the lineitems which are emitted by your select query
    PLEASE HELP ME

    >
    sai latha wrote:
    > hi
    >
    > i have an issue in the report, the problem is
    > in the selection screen i have an WBS ELEMENT as an select option(there is no belnr in selection scrren)
    > for eg- if i enter
    > COMP CODE = 0010
    > WBS ELEMNT = 23456
    > YEAR = 2008.
    >
    If you're trying to select from BSEG using only these selection criteria, then your query is likely to be very, very slow.  Since BSEG is a cluster table and therefore only the key is used for the query, you need to specifiy at least BUKRS and BELNR to get any sort of decent performance. 
    If I wanted to select using WBS element (or any controlling object) my starting point would be the Controlling tables COEP and COBK, or COVP which is a view of the two; after all, the Controlling tables were set up specifically to deal with this sort of query.
    Once you've picked up the line you want with your WBS element selection, you can get any of the other lines on the document by selecting from BSEG using the reference document fields held in the Controlling tables.

  • WBS ELEMENT DELETED EVEN AFTER EXPENDITURE BOOKED

    Hi Dear
    I am facing a problem please help me out
    the pb is one of my End user created a WBS element then budgeted & Parked an Invoice through FV50 screen using the Cost Center as well.
    1)After parking the Document through FV50 screen the Wbs element deleted,
    2)now deleting the park document is not possible ,
    3)that require Wbs elem when i try to create the same wbs the system gives the message "  WBS ELEMENT IS ALREADY EXIST "
    4) WHEN I want to display the WBS THE SYSTEM message is wbs element is not Exist"
    please help me out in this problem ........ in the following way
    a) either to delete the wbs element
    b) or to create the deleted wbs ,

    Hi sridhar,
    Thanks you for your replay,
    If the Project is locked we can pass transfer enteries or we have to unlock it and pass entries and again lock it.
    Can you please advice me
    Thanks
    jaya

Maybe you are looking for

  • How do I get the subsidized price for a new phone when I already have a plan?

    I have been a Verizon customer since September. I have a dumb phone, and I'm really having trouble keeping up with my life. Now that the Droid 4 is coming out in February I've decided that it's time to upgrade. The Droid is coming out at $199 with a

  • IPhoto '09 buggy?

    From my perspective this is the most buggy release of this software to date. Hopefully someone can shed some light on the main problem I need to get resolved. In prior versions of iPhoto I've been able to burn a CD or DVD to transfer photos to anothe

  • Planning on editing two 1080p Cams on Mac Pro

    I've decided I want to invest in a Mac Pro to edit HD for a short film. I don't have much money to spend and am wondering if a Mac Pro (1 X 2.8GHz Quad-Core Intel Xeon) would be able to handle two camcorders with 1080p24 through firewire with 8GB RAM

  • Recording User Events (such as pauses) during Quicktime video watching?

    Hi everyone, There's likely to be some way to do this but I spent 1 hour googling and couldn't find anything useful so I thought I'd give this a shot in case any of you have any hints or advice! I'm interested in embedding a Quicktime video in a webp

  • I have an Apple account but i can't install the free Applications?

    I have an Apple account but i can't install the free Applications always asking about the billing payment?so what shall i do?