Internal order creation for wbs element
hi
I want to settle internal order for wbs element ,but while creating internal order in KO01,required Order type type not appearing mean in my company wbs element required for order type PS01,Category -20(network),so for this 20 cat. where should i create internal order.please advise me
thanks
chandu
Hi,
you can't use the order type related to category is 20, because it will use full only PS. you can create the internal order with category 10 and maintain the settlement rule said that to be settled at WBS element.
Thanks and Regards
Nagaraju SSV
Similar Messages
-
BAPI for Production order creation against wbs element
dear all,
I am using BAPI (BAPI_PRODORD_CREATE) for Production order creation against wbs element.I am putting following input paramters in this
material no,
order type
plant
qty
basic start dt & end dt
wbs
But during GRN it is not taking the account assignment as project stock i.e. its picking movement type 101 but it should be 101Q.
For this what changes are required.
regards
ravi aroraHi,
2 options i can think of:
1. Create a BDC program by recording co10
2. Create a planned order with order type PR using BAPI_PLANNEDORDER_CREATE, specify the WBS element & other details. Now use BAPI_PRODORD_CREATE_FROM_PLORD to create a production order with reference to the planned order created earlier.
I believe option 2 should meet your need. Check & revert.
Regards,
Vivek -
Sales Order creation with WBS Element
Hi Friends,
I tried to create a sales order with each line item being associated with a WBS Element based on the material. But when i try to save the document its throwing an error saying that 'WBS element <elt_name> is not a billing element'. What does this mean?
Prompt replies would be rewarded.
Thanks in advance.
Tamilarasan.Hi Tamilarasan,
You must select the checkbox of "Billing element" in the frame "Operative indicators". If you don't see this check box, you must display it from SPRO PS customizing => Define field selection for WBS structures.
Regards -
Internal Order Configuration for a new company
Dear Experts,
Hi! I need help on the Internal Order creation for a new company which previously not maintained the Internal Order. Can Experts can provide me the T-code for the configuration. Any guidance given is very much appreciated. Thank you! _Hi,
What figures do you have in mind? I/O is a cost collector, thus, if you have a cost which is to be posted on the I/O you should mention when creating a FI/MM document. For example, if you have FI doucment which is posted, let's say, via FB50, you enter your relevant I/O in the document line.
Regards,
Eli -
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,
SatyajitHello,
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 -
Multiple milestone creation issue for WBS element 'BAPI_PROJECT_MAINTAIN'?
Hi all,
I am using 'BAPI_PROJECT_MAINTAIN' to create Project definition,WBS element & milestone for WBS at once.
The program is working fine if one wbs element have one milestone.
But If any of the WBS elements have more than one milestone, the milestones are not creating properly.
The bottom level WBS milestones are creating for some higher level WBS. some milestones are not at all
creating. I am not getting any error message.
Code for mile stone section is :
**fill milsestone data for WBS in BAPI structures
lv_mlstno = lv_mlstno + 1.
it_wbsmilestone-milestone_number = lv_mlstno.
it_wbsmilestone-wbs_element = it_wbsdata-ID.
it_wbsmilestone-milestone_usage = it_wbsdata-mlstn.
concatenate it_wbsdata-edatu+6(4) it_wbsdata-edatu+3(2) it_wbsdata-edatu(2) into it_wbsmilestone-FIXED_MILESTONE_DATE_BASIC.
it_wbsmilestone-SALES_DOC_DATE_INIDICATOR = it_wbsdata-faktp.
it_wbsmilestone-INVOICE_PERCENTAGE = it_wbsdata-fproz.
append it_wbsmilestone.
clear it_wbsmilestone.
**fill milsestone data for WBS in BAPI update structures
it_wbsmilestoneupd-milestone_number = cs_x.
it_wbsmilestoneupd-wbs_element = cs_x.
it_wbsmilestoneupd-wbs_element = cs_x.
it_wbsmilestoneupd-milestone_usage = cs_x.
it_wbsmilestoneUPD-FIXED_MILESTONE_DATE_BASIC = cs_x.
it_wbsmilestoneupd-SALES_DOC_DATE_INIDICATOR = cs_x.
it_wbsmilestoneupd-INVOICE_PERCENTAGE = cs_x.
append it_wbsmilestoneUPD.
clear it_wbsmilestoneUPD.
**Fill bapi table method project1 for the creation of WBS milestone
**milestone will be created only after the creation of WBS elements first
**lv_refnum is the link to wbs element, which is already appened to it_methodproject
it_methodproject-refnumber = lv_refnum.
it_methodproject-objecttype = 'WBS Milestone'.
it_methodproject-method = 'Create'.
append it_methodproject.
clear it_methodproject.
endif.
How to resolve the issue?
Please help.
Thanks,
vamshiHi Ravi,
Thanks for your continuous reply.
The problem is solved.
I have passed the, reference number of WBS element creation to milestone creation in the 'Method' table.
Thatswhy it is picking wrongly.
I have corrected this by passing different reference numbers to WBS and milestone creations
based on their tables.
Thanks,
Vamshi -
Creation of settlement rules for WBS element
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 elements are created and settlement rules are created for the WBS elements. The inbound program is run automatically thru batch job.
First time when the Idocs are processed about 95% of the WBS elements have settlement rules created and for other 5% settlement rules are not created. The Idoc is in status 64. I tried reprocessing the Idoc and then the settlement rules are getting created succussfully. The problem is Iam not able to find why the Inbound program is not processing succusfully when its run first time but works when reprocessed.
I appreciate if anyone can send their views.
Best Regards
SKHi!
You might set the processing to check not only once the relevant IDocs, but more times...
Check out these programs, and set them into a batch job periodically...
RBDMANI2
RBDAPP01
Regards
Tamá -
Internal Order Report - For the documnets when the cost ele. was not create
Hi,
We created internal orders for tracking capital expenditure relating to assets. At that time, we were not created asset GL's as cost element. Recently we created asset GL's as cost elements (category 90).
Now we are getting the internal order report after creation of cost element for the transactions done thereafter. We mentioned the internal order number in PO but not in accounting document earlier. Now we are maintaining internal order number in accounting document also.
So when we run OKBA we are getting CO document but, it is not tracking against internal order (since order number was not mentioned earlier). We executed one MM document in which internal order was mentioned through OKBB but there is no change in the internal order report.
Is there any possibility to get the internal order report for the transactions done before creation of cost element.
Please guide me
Best Regards
Madhusekhar Gupta GHi,
Thanks for your quick replies.
Can we get the report as follows.
1. Total Po's value for the internal Order (through Table EKKN) xxx
Less: Value already posted to Internal order after creation of cost elements (S_alr_87013019) xxx
Less: Total Value to be invoiced (Tcode -ME2N) xxx
Net amount to be posted to Internal Order manually xxx
Is it correct?
Regards
Madhusekhar Gupta G
Edited by: gms gupta on Feb 20, 2012 4:33 PM -
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,
TanujaHelll 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 -
Issue in BAPI_PS_PRECOMMIT in mass creation of WBS Elements
Hi,
I am facing a issue with BAPI_PS_PRECOMMIT.
we have the following WBS Hierarchy:
S - Proj, (level1)
S-XXX WBS Element (level2)
S-XXX-001 WBS Element (level3)
I have created a program for mass creation of WBS elements creation
which uses the following BAPI's
BAPI_PS_INITIALIZATION
BAPI_BUS2054_CREATE_MULTI
BAPI_PS_PRECOMMIT
BAPI_TRANSACTION_COMMIT
The proj: 'S' and the level2 WBS element: 'S-XXX' already exist in the system.
When I run the program for delta load, so as to create the following level3 WBS elements:
S-XXX-001
S-XXX-002
S-XXX-003
The system is throwing the following errors at the BAPI_PS_PRECOMMIT:
1. Final Check of the project definition and WBS elements: Error
2. Validation unsuccessful
Pls help me on this.
Thanks,
DeepakCheck the WBS elements doesn't exist already in your system.
Here is what I coded some days back for deletion of Network Activities, most of the things are same.
You are doing for WBS element.
* Call to initialization BAPI Before Delete
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
* Call to Network Activity Deletion BAPI
CALL FUNCTION 'BAPI_BUS2002_ACT_DELETE_MULTI'
EXPORTING
i_number = t_bapi_activity-network
TABLES
it_delete_activity = l_t_del_vornr
et_return = l_t_bapiret2.
DELETE l_t_bapiret2 WHERE type <> 'E'.
READ TABLE l_t_bapiret2 INDEX 1.
IF sy-subrc EQ 0. "If error in Deletion
MOVE: f_idoc_contrl-docnum TO t_idoc_status-docnum,
l_t_bapiret2-type TO t_idoc_status-msgty,
'CNIF_PI' TO t_idoc_status-msgid,
l_t_bapiret2-number TO t_idoc_status-msgno,
l_t_bapiret2-message TO t_idoc_status-msgv1.
MOVE c_idoc_status_error TO t_idoc_status-status.
APPEND t_idoc_status.
ROLLBACK WORK.
EXIT.
ELSE. "If Delete is successful COMMIT
* Call to PreCOMMIT BAPI
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
TABLES
ET_RETURN = l_t_bapiret3.
* Call COMMIT BAPI
* CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
The other solution is use BAPI_PROJECT_MAINTAIN. -
There is still a purchase order commitment for WBS
Hi All,
We need to close whole project while closing I am getting the attached error.
There is still a purchase order commitment for WBS
Additional Information or Comments: = I have checked and closed all purchases order commitment. But still the project shows the below error .
Edited by: nandhasapfi on Sep 22, 2011 10:52 AMHello,
This message is being output correctly as the AuC still has
values against it.
These values must be cleared before you can close the WBS element.
Please do a FUL settlement against the WBS element to clear
these values and then try to set the CLSD status again.
There are two ways to 'clean' the AuC, so that you can deactivate it
and close the wbs element:
1. Post a manual retirement of the AuC to clean it.
2. Create a new AuC and use it for all the differences in the final
settlement.
I hope this helps,
regards
Ray -
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.... -
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 -
FI posting not allowed for WBS Element
Hi All,
While doing down payment billing I'm getting error that FI posting is not allowed for WBS element. But FI periods are open for all months in 2008.
Please suggest how to resolve this issue.
Regards,
HarishHello
Account assignment
If you want to post actual costs and commitments to a WBS element, you have to indicate that the WBS element is an account assignment element in the WBS. All objects that can be assigned costs and commitments within a project (for example, orders, networks, or purchase orders) can only be assigned to a WBS element if you have set the account assignment indicator for the element.
In Customizing for the Project System, you can set an indicator to specify that costs are planned for all WBS elements or only for specific WBS elements.
Billing
If you want to post revenues to a WBS element, you have to indicate that the WBS element is a billing element in the WBS.
Reg
assign points if useful -
Hi,
I have a requirement in which I assign WBS element to sales order and later on when I run MRP for this materials it does not generate requirement for WBS element BUT generate requirement for general stock. could any body please suggest how to integrate the same. What are the setting need to be done in projects also to get this.
regards
RajHi,
Are you looking for the option like, when you are running the MRP for stock items, PR should generate wrt to Project WBS Element not for plant stock.
Regards
N.Raju
Maybe you are looking for
-
HELP!!! Errors on my iPod Hard Disk
When i'm updating the songs to my iPod this error appears: "Attempting to copy to the disk iPod failed. The disk could not be read from or written to." Can this be fixed??? Thanx.<br> iPod Mini 4GB Windows XP iPod Mini 4GB Windows XP
-
The scenario is file to RFC. The RFC is called via a BPM, which receives back the respond from the RFC as well. I am finding a red flag at the receiver end in the MONI. When I click on the PE in the MONI I find ,in the workflow diagram that the file
-
MRP issue. Extra stock suggested
Hi there , I have one material say ABC which is to be procured from outside. Now I have maintained the schedule line aggreement & source list for the same . The safety stock is maintained as zero & the lot sizing is weekly lot size.. I
-
Replacing the Acrobat logo in digital signatures
I am using Adobe Acrobat X Pro 10.1.8 on a Macintosh. When I create a digital signature, there is a checkbox option in the "Configure Signature Appearance" window (under Acrobat->Preferences->Security->Digital Signatures) which, when checked, displa
-
How do I display my iPad on my TV?
So I have a first gen iPad and I bought a VGA connector for the iPad but when I connect it the only thing that will display is a movie for a few seconds and the a message shows up on the iPad that says that my device has not been approved to display