Header WBS for two WBS elements
Dear All,
Is it is possible to create a Header WBS for two WBS elements which were
triggered by Two different line items in a sales document.Please detail the process
if a possibilty for the same exists.
Award points are assured for valuable replies.
thanking you
Best regards,
R.Srinivasan
Dear Sunil,
I am using the Standard project with same structures only.I am not able to get the header WBS for Two WBS elements triggered from the same sales order.what are other possibilities for this problem.
Can you please elobrate your reply
Thankingyou,
Best regards,
R.Srinivasan
Similar Messages
-
Hi, can anyone why the header WBS element is not propagated into the line item WBS element when creating the line items?
Thanks
PPHi, This is refering to SO creation.
Thanks
PP -
How to display no data found for two different elements
i wanted to display report either by dept wise or supplier wise
so when I dont have deptno related data
It should say no data found
for that I'm using if condition
same for supplier too
instead of giving twice can I give it in the same if condition
if so howUse logical operator 'or'
like <?if:not(DEPT_GRP) or not(SUPPLIER_GRP)?>No data Found<?end if?> -
WBS element field mandatory for specific sales order
Hi Friends,
I want to make the WBS element field in sale order line item to be mandatory for a specific sales order type. I am not able to add this field in incompletion log also. So can anyone let me know the solution for this.
RatnaHi,
As solution suggest above is correct use VBAP table and Field is PS_PSP_PNR into ur incompletion log and assign this procedure to ur Item category. And If u want to WBS element check at header level the use VBAK table and field PS_PSP_PNR and assign this incompletion log to ur sales document type.
Once more setting is required to stop the order from saving if incompletion check is unsucessful, for that you need to check a checkbox named "Incomplete. Message" in VOV8 tcode, for ur perticular sales document types.
Hope this will resolve ur problem.
rgds
Dhiraj -
WBS element for collective order
Hello All,
I have a production order with 5 subordinate production orders .
For the order header there is a WBS element assigned .
But for the subordinate orders, WBS should be the same as that of order header WBS.
My problem here is , PO is created using CO10 . WBS is input at the time of creation and available in order header only.
But WBS field is empty for subordinate orders when displayed using CO03.
Regards,
JyothiHello All,
I got the solution.
There is a link between BOM header and items and WBS elements through table AFPO.
If we input the WBS element, then it displays all the orders (Both BOM hdr and items)
If the table entry is not maintained correctly, then there will be no WBS for that BOM items. -
How to set CRTD- REL for a project consist of more than 100 WBS elements
Dear Experts,
Now our clients is encounting such a problem:
There is a WBS structure consists of ONE Level 1 WBS code, serveral Level 2 WBS code and hundreds of Level 3 WBS code. All the Level 2 WBS are created automatically according to the data transferred from another system via interface. Level 1 and Level 3 WBS can be created mannually in project builder. And all the status of Level 2 WBS are set to CRTD once they are created automatically.
Level 1 WBS(Let's call it A) has already been set to REL. Only one Level 2 WBS (let's call it A-00) was still CRTD because *it was created after level 1 WBS A was set to REL.* And there are as much as 120 Level 3 WBS(let's call it from A-00-01 to A-00-120) was created under Level 2 WBS A-00 mannually. Now how can I set all the level 3 WBS status from "CRTD" to "REL"?
I have tried following two methods but both of them are failed.
A. Directly set Level 2 WBS A-00 or Level 3 WBS A-00-01to REL (in both CJ20n and CJ02) but the system show a Message No. BS013 falut:
Object A has system status REL, According to this status, transaction "Particially release project" is not allowed"
B. Set Level 1 WBS A to REL(in both CJ20n and CJ02) but the system runs extremly slow and finally the feedback comes to a ABAP error of "Run time error" after more than 30 minutes.
Did any of you face similar situation? Any suggestion for this issue are appreciated.
Regards,
Atom
Edited by: Atom2009 on Dec 4, 2009 1:36 PMCheck the settlement profile used in the WBS elements and project. The configuration could be such that the settlement rules are limited.
Maximum number of distribution rules
Maximum number of distribution rules for each settlement rule.
You cannot settle receivers for which there are no distribution rules.
The IMG path for this in PS is Project System -> Costs -> Automatic and Periodic Allocations -> Settlemennt -> Settlement Profile -> Create Settlement Profile.
Hope this helps.
Edited by: Paul Shrewsbury on Dec 8, 2009 12:49 PM -
Config for Cost & budgeting at activity level and WBS element level in PS
Dear GURU's,
please suggest me how to do the spro configuration for budgeting and costing, here my requirement is I need to do cost planning and budgeting at WBS element level and Activity level. We two deferent types of projects.
Regards,
BhaHi Bhanu,
Cost planning in projects can be done through two techinques:
I. Manual cost planning (at WBS level)
1. Overall planning (Struture-oreiented planning)
2. Detailed planning (Cost element planning)
3. Unit costing
4. Easy cost planning form
II. Automatic cost planning using networks and assigned orders
For customizing: Use transaction OPUV and enter the required entries for cost planning.
Budget can do only at WBS level. For configuration do the following steps:
1. Create Budget profile - OPS9
2. Assign Budget profile in Project profile - OPSA
3. Then allot budget to your project - CJ30
hope it will be very clear. Appreciate with point if it useful.
Thanks and Regards
vetrivelan -
BAPI's for creating of Project and WBS elements in SAP system.
Hi Guys,
I was able to use a Wrapper FM for creating the
We have a FM which combines 5 different BAPIs
FM/Wrapper: "Z_LEED_PROJ_WBSELEMT_CREATE"
1) BAPI_PS_INITIALIZATION
2) BAPI_BUS2001_CREATE
3) BAPI_BUS2054_CREATE_MULTI
4) BAPI_PS_PRECOMMIT
5) BAPI_TRANSACTION_COMMIT
Requirement: To automate the process of creation of Project and WBSE(Tasks) and create an entries in the PS tables based on the user inputs from the user interface in Visual Composer.
Basically user should be able to create the Projects and WBSE.
Issue: We were able to create the Project with the FM (BAPI_BUS2001_CREATE) but having the issue with the creation of WBSE(Tasks), the user will be entering the inputs for Project Definition, Project Profile and WBSE which are to be created in the UI.
The problem is we are not able to create the WBS elements using BAPI BAPI_BUS2054_CREATE_MULTI .i will send u the code below .Can anybody correct
CLEAR it_return.
CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
EXPORTING
I_PROJECT_DEFINITION = i_project_definition-project_definition
TABLES
IT_WBS_ELEMENT = it_wbs_element
ET_RETURN = it_return.
APPEND LINES OF it_return[] TO et_return[].
Thanks,
Gopi.Hi Ramiro,
This is the entire FM code which is below.
""Local Interface:
*" IMPORTING
*" VALUE(I_PROJECT_DEFINITION) LIKE BAPI_BUS2001_NEW STRUCTURE
*" BAPI_BUS2001_NEW
*" TABLES
*" IT_WBS_ELEMENT STRUCTURE BAPI_BUS2054_NEW
*" ET_RETURN STRUCTURE BAPIRET2 OPTIONAL
*" EXTENSIONIN STRUCTURE BAPIPAREX OPTIONAL
*" EXTENSIONOUT STRUCTURE BAPIPAREX OPTIONAL
DATA: it_return LIKE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE,
v_error TYPE boolean VALUE IS INITIAL.
CLEAR: et_return, it_return.
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
Do checks for creating project definition
CALL FUNCTION 'BAPI_BUS2001_CREATE'
EXPORTING
I_PROJECT_DEFINITION = i_project_definition
TABLES
ET_RETURN = it_return.
APPEND LINES OF it_return[] TO et_return[].
LOOP AT it_return.
IF it_return-type CA 'EAX'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
v_error = 'X'.
EXIT.
ENDIF.
ENDLOOP.
IF v_error = 'X'.
EXIT.
ENDIF.
Do checks for creating WBS elements
CLEAR it_return.
CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
EXPORTING
I_PROJECT_DEFINITION = i_project_definition-project_definition
TABLES
IT_WBS_ELEMENT = it_wbs_element
ET_RETURN = it_return.
APPEND LINES OF it_return[] TO et_return[].
LOOP AT it_return.
IF it_return-type CA 'EAX'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
v_error = 'X'.
EXIT.
ENDIF.
ENDLOOP.
IF v_error = 'X'.
EXIT.
ENDIF.
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
TABLES
ET_RETURN = it_return.
APPEND LINES OF it_return[] TO et_return[].
LOOP AT it_return.
IF it_return-type CA 'EAX'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
v_error = 'X'.
EXIT.
ENDIF.
ENDLOOP.
IF v_error = 'X'.
EXIT.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDFUNCTION.
can u please look at the code and let me know the changes?
Thanks,
Gopi. -
Vendor wise/Invoice wise consumption for each WBS element
Any standard report from SAP, which provide details of Vendor Purchase order / Contract, details of SES with WBS no. and details of Vendor invoice in columnar form.
SAP system can not generate standard reports giving vendor wise/Invoice wise consumption for each WBS element of particular asset.
Please help me to get this report.
Thanks in Advance.Hi
Your starting point should be CJI3 report or any PS report... Here you get the FI Doc no
If this FI Doc No is generated from MM, check the Header segment of the document.. It would have MM Doc NO + Fisc Yr populated in the ref key... This gives you the link between FI & MM
From here on, you can take it forward... You can look up this doc no in MSEG Table and find the PO no... Then go to EKBE table for other PO details....
br, Ajay M -
In-correct commitments for WBS elements
Hi
The Service order has got account assignement as either projects or aux accts assignment. Theis split into two accounts assignments with two WBS elements with a percentage distribution. (say 60and 40%) with the same G/L account. Now GR, IR and service entry sheet has been done for the both. I can see all the actual costs in CJI3 report. Now, the commitments have been reduced only for the first WBS element/accts assgnt. The value remains appearing in the report as open commitment for the second one although I have exhausted all the amount from PO. Can anybody explore the reasons for this behaviour.
Thanks in advance.
Basavaraj T.Hi
Thanks for your feedback. I did run program RKANBU01. But it did not correct the commitment.
Giving you some more details:
The Total service order value: 107030.00
1st acct assignment: 0.6 (60%)
2nd acct assignment: 0.4 (40%)
Both assigned to to two different WBS elements in service order.
GR/IR/Service entry done: 57796.00 and 38530.00 This comes total of: 96326.00
Balance as per above statistics: 10704.00
But in CJI5 report, it is showing up: 42812.00
This is exactly 40% of the order value. It seems while reducing the commitments, it has taken into consideration of first account assignment only. The second one remain as it is.
Any hint is most welcome.
Regards,
Basav -
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 ( Billing element ) assignment at sales order header level
HI,
There is provision of assign WBS Element at sales order header as well as item level , If Project WBS Element is assigned for each line item delivery and stock updating is happening from the project, But WBSE will assign at sales order Header system will not allowing to create project delivery( moment type 601Q), and stock updation ftom project.
Please let me know how this will happen ,
Regards,
Gangi
Edited by: Gangi Reddy Botchu on Jul 7, 2008 4:50 PMSPRO - SD - Billing - Billing Plan - the first 5 config nodes (Define Billing Plan types / Define Date descriptions / Assign Date categories / Maintain Date Proposals / Assign Billing Plan types to Sales Doc types) are applicable to you.
this is pretty tranparent for a reference.
What else is required? -
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!
Kshitijahi 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.... -
Auto Run Program not updating Settlement Rules for few WBS elements
Hi,
Addition of settlement rules for OPEX WBS.
In producion system, two jobs are running daily for generating settlement rules of WBS elements but, all WBS elements are not updating with Settlement rules.
It is becoming a problem in the Period end while doing the settlement. Currently we are updating the settlement rule manually.
We have investigated and found the following WBS element with Profile name are not updating Settlement rule.
H-U0DU0204DE-EX-J0 - HHDC01
H-N0U00ULD01-P1-D1-W2 - 000090
H-U0DU0204DE-EX-U0-T1-OB - HHDC01
H-U0DU0204DE-EX-U1-W1-ON - HHDC01
H-U0DU0204DE-EX-U2-W1-ON - HHDC01
H-U0DU0204DE-EX-I0-E1 - HHDC01
H-U0DU0204DE-EX-I0-B1 -HHDC01
H-U1DU0204DE-EX-U0-W1-ON - HHDC01
Job Names :
ZFPD_UK_SETTLEMENT_RULE_GEN
ZFPD_NO_SETTLEMENT_RULE_GEN
Please suggest on this issue
RegardsHi,
I suppose these are background jobs. Usually there is an issue with background jobs that are run for a custom developed program. Not sure why that happens. Even i faced this issue with a couple of jobs in my system. I have still not found out the reason as to why this happens. There might be a possibility that these projects were being processed in the foreground by some user and hence they were omitted from the run.
I would suggest you to consult your technical guys on this.
Regards,
Gokul -
Dear Experts,
This requirement is for an IT service project.
The process is - I have two company codes Comp code 1 & Comp code 2, In which Project is created in company code 1. Employees are assigned to project to onsite & offshore from company code 2. This means the employees are created in the company code 2. But working for the project in Comp.code 1. Comp code 2 get revenue thru intercompany billing based on number of hours/days the employee worked in the project created by the com. code 1. The employee books the timesheet in comp code 1 against the project id.
To acheive this
1) i need to maintain same project for two company codes?
2) Or same project, one wbs for one company code & other wbs for another company code?
Will the above two possible to work in SAP? or
anyother we i can workaround this
Please advise
Regards,
Deepu PillaiHi,
This is possible through Resouce Related billing in PS.
For e.g. Consider business scenario, where we have created T-10006 as a customer project.
Now this project is mapped using a work breakdown structure that contains activities.
The activities define the flow of the project and form a quantity structure for determining costs and payment data automatically.
The project cost plan is used to create quotations.
When the sales order is received, it is assigned to the project. This means that it can be used to plan revenue and then post this revenue.
Actual costs are entered when activities are confirmed, components are purchased and when invoices are assigned. Actual revenue is posted to the project by means of milestone billing.
Two companies are responsible for executing project T-10006.
Company 'A' is mapped using company code 1000 and performs all services except for those planned in WBS element T-10006.1.2.
Comapny 'B' is mapped using company code 2000 and performs some of the engineering services. (WBS element T-10006.1.2).
Here Comapny 'B' bills its services to Company 'A' on a resource-related basis.
A results analysis is carried out for the billing elements T-10006 und T-10006.1.2 in the project.
The results analysis values are settled to the profitability segment.
Regards
Tushar
Maybe you are looking for
-
Lightning to 30-pin Adapter for iPhone
I just got this and am disappointed to see that it doesn't work with Video. It does say this on the website, but I asked an apple person on the phone and she told me it might work. Anyways, it doesn't. I have an RCA cable that I could plug my old iph
-
Nokia 2330 Classic - no USB port
Hi, I noted that the above phone does not have a USB port. The user manual for it does not show a USB port but the page on the support web site lists the Nokia Suite Software which shows a USB port! I note that it is possible to use Blue tooth! Just
-
Z10 won't display text message
Hi, I upgraded the Z10 to the latest realse 10.2.1.2179 . After the upgrade i am not receiving the TEXT meaage under "Text Messages" . When i select the TEXT Mesages it always says "No entries in this view" , but the TEST messages are available
-
Error - '.' expected - while database insert thru JSP & javabeans & JDBC
I get the following error when i try to compile the below mentioned code in JDEVELOPER 10.1.2 Error : '.' expected =================== have error in my code. I am trying to do a simple database insert program using javabeans and jsp. I get a value to
-
My iphone 3gs battery drains very fast
my iphone 3gs battery drains very fast it won't last for whole day i just uses mail application and facebook for some time can u tell why the problem is or need to change battery