How to get the profit center nodes descriptions
Hi Experts,
i have value of profit center 17007236. but i need to get the hierarchy above this profit center and their descriptions. previously i have done similar kind of problem, but i that case i have top level node from which i have extracted bottom level descriptions and profit center values. this can be referred in the below link.
Re: Profit Center Groups
but now i have profit center values but i need to get the above hierarchy value and descriptions. which are shown in bold letters.
any suggestions or any function module available please kindly reply me. point will be rewarder for all answers.
<b> 5 SOI_STREAM Downstream PPS
5 SOI5000007 DOWNSTREAM NON-OPERATING BU'S
5 SOI6IS0001 INTEGRATED SUPPLY TRADING
5 SOI7IS0091 IST EAST COAST
5 SOI7IS0092 CHICAGO PRICING BASIS
5 SOI7IS0100 (CHG) CHICAGO BASIS GAS BOOK
5 SOI7IS0126 MARKETING CHICAGO BASIS GAS </b>
17007236 CHG 4022 GRAFTON OH (LTAZ)
17007326 CHG 4022 GRAFTON OH (LTAZ)
Thanks & Regards,
Poorna.
Hello Poorna
The following sample report may be useful to you. The sample cost center was taken from the cost center group 'H1' on our IDES ECC 5.0.
*& Report ZUS_SDN_COST_CENTER_BOTTOM_UP
REPORT zus_sdn_cost_center_bottom_up.
TYPE-POOLS: abap.
DATA:
gd_setid TYPE setid,
gt_supersets TYPE STANDARD TABLE OF setlist,
gs_setlist TYPE setlist,
gs_setinfo TYPE setinfo,
gt_setinfo TYPE STANDARD TABLE OF setinfo,
gs_costcenterdetail TYPE bapi0012_ccoutputlist,
gt_return TYPE bapirettab.
DATA:
gs_layout TYPE lvc_s_layo.
PARAMETERS:
p_kokrs TYPE kokrs DEFAULT '1000',
p_kostl TYPE kostl DEFAULT '2-1110'.
START-OF-SELECTION.
CALL FUNCTION 'BAPI_COSTCENTER_GETDETAIL1'
EXPORTING
controllingarea = p_kokrs
costcenter = p_kostl
* KEYDATE = SY-DATLO
* MASTER_DATA_INACTIVE = ' '
IMPORTING
costcenterdetail = gs_costcenterdetail
TABLES
return = gt_return
* EXTENSIONIN =
* EXTENSIONOUT =
CALL FUNCTION 'G_SET_ENCRYPT_SETID'
EXPORTING
setclass = '0101' " cost center group
shortname = gs_costcenterdetail-costctr_hier_grp
kokrs = p_kokrs
IMPORTING
setid = gd_setid
EXCEPTIONS
no_co_area_specified = 1
illegal_setclass = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'G_SET_GET_ALL_SUPERSETS'
EXPORTING
* CLIENT =
setname = gd_setid
TABLES
supersets = gt_supersets.
CLEAR: gs_layout.
gs_layout-cwidth_opt = abap_true.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'SETLIST'
i_grid_title = 'Supersets'
is_layout_lvc = gs_layout
TABLES
t_outtab = gt_supersets
EXCEPTIONS
program_error = 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.
REFRESH: gt_setinfo.
LOOP AT gt_supersets INTO gs_setlist.
CLEAR: gs_setinfo.
CALL FUNCTION 'G_SET_GET_INFO'
EXPORTING
class = '0101' " Cost Center Group
* NO_SET_TITLE = ' '
setname = gs_setlist-setname+4
* TABLE = ' '
* FIELDNAME = ' '
* USE_TABLE_BUFFER = 'X'
* CLIENT =
IMPORTING
info = gs_setinfo
EXCEPTIONS
set_not_found = 1
illegal_field_replacement = 2
OTHERS = 3. .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
APPEND gs_setinfo TO gt_setinfo.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'SETINFO'
i_grid_title = 'Setinfos'
is_layout_lvc = gs_layout
TABLES
t_outtab = gt_setinfo
EXCEPTIONS
program_error = 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.
END-OF-SELECTION.
Regards
Uwe
Similar Messages
-
How to find the profit center group for a profit center?
How to find the profit center group for a profit center?
Hi,
try this also
In order to pass the setid parameter of the FM, you have to concatenate the following things
Setid + KOKRS (Controlling area) + Profit Center Group into one variable.
In my example below, I have declared as constants and concatenating to gv_setid.
gc_01016 is the set id for profit centers
gc_kokrs is the controlling area
gp_pprct is the Profit Center group entered in the selection screen.
You will get KOKRS value from the cepc-kokrs.
data : gc_0106(4) TYPE c VALUE '0106',
gc_kokrs LIKE cepc-kokrs VALUE 'ABCD'.
gv_setid LIKE sethier-setid,
gt_set_values_1 LIKE setvalues OCCURS 0 WITH HEADER LINE.
CONCATENATE gc_0106 gc_kokrs gp_pprct INTO gv_setid.
CONDENSE gv_setid.
CALL FUNCTION 'G_SET_TREE_IMPORT'
EXPORTING
client = sy-mandt
fieldname = 'RPRCTR'
langu = sy-langu
setid = gv_setid
tabname = 'GLPCT'
no_table_buffering = 'X'
TABLES
set_values = gt_set_values_1
EXCEPTIONS
set_not_found = 1
illegal_field_replacement = 2
illegal_table_replacement = 3
OTHERS = 4.
By using the above FM you will get the values into gt_set_values1 once sys-subrc value eq 0, it is internal table which consists of all the profit centers for the proft center group.
Regards,
Venkatesh -
How to change the Profit Center in Sales Order
Hi Gurus,
Previously they setted the profit center (YB999) in sales order, now i want to change the profit center and need to give the amount into this profit center 100500.
So, could you guide me how to change the profit center in sales order.
Thank you for your replies.....
Thanks & Regards,
Chandrababu.B
Edited by: Chandrababu Naidu on May 25, 2011 12:44 PMHi
If this SO is processed partially - i.e. transactions happened - You cant change it
You can use ABAP and change it in Debug mode, but not advisable... Better to short close the SO and open a new SO for Balance qty
br, Ajay M
Edited by: Ajay Maheshwari on May 25, 2011 5:10 PM -
How to make the Profit Center Field Mandatory in Cost center Master Data
Dear All,
Please let me know how to make the Profit Center Field mandatory in Cost Center Master Data as well as my Internal Order Master Data?
Thanks in advance!
Regards,
Rajeswari Shankar.Hi Rajeswari,
You can modify message number KS096 to "Error" via OBA5. Thus, the users would no be able to save a cost center without entering a profit center. (Depending on your release you can make KS096 modifiable by implementing note 486781.)
Concerning the internal orders (transaction KO01), you can run KOT2 and set Profit center field as required entry in "change field selection" section.
Regards,
Greta -
How to add the Profit center Group in the PA report KE33.
Hi Frnds,
How to add the Profit center Group in the PA report KE33.Iam not able to find PC group in the list to add to the Charateristics already added.Hi
PC group is not available as a Char in COPA..
if you want to do that, either create a Char Hierarchy in KES3 for the Char Profit Center
OR
Create a WW char in KEa5 and write a derivation rule using the method "Enhancement" .. Write ABAP Code in COPA0001 exit
bt, Ajay M -
How to Check the Profit Center - Sales Group - Sales District for a BP
Hi,
How to Check the Profit Center - Sales Group - Sales District for a Business Partner?
I am not able to identify which Profit center - Sales Group- Sales District was assigned to a Business Partner. Please provide me some inputs to check this.
thanks
YadayyaHi
Pls check these tables for data or prepare a z report with abapers.
GLPCA u2013 PCA line items
VBKD u2013 sales district
TVKGR u2013 Sales group
BUT000 u2013 Business Partner
Regards
Sridhara Rao D -
How to get the profit centres determined in automatic payment run - F110
Hi,
In F110 - Automatic payment run, is it possible to get the profit centres determined ?
While doing manual payment, system gives the option to enter the related profit centres.
But in F110 how can I get the profit centre (cost obect) selected ?
Could anyone help ?Hi
I assume you are referring to the PC for the Bank account?
You can define the default PC in 3KEH.
Rgds
Nadini -
How to get the following-sibling nodes until a specific node
XSL people,
I need to get all the following-sibling nodes for every <h> node until the next <h> node.
Example:
<body>
<h>Header1</h>
<a>Line 11</a>
<b>Line 12</b>
<c>Line 13</c>
<a>Line 14</a>
<h>Header2</h>
<a>Line 21</a>
<c>Line 22</c>
<a>Line 23</a>
<b>Line 24</b>
</body>
So I need to get this strings:
from the first <h> node: Line 11Line 12Line 13Line 14
from the second <h> node: Line 21Line 22Line 23
When using following-sibling
<xsl:value-of select="following-sibling::a"/>
<xsl:value-of select="following-sibling::b"/>
<xsl:value-of select="following-sibling::c"/>
I am not getting the second <a> node (of course!), so for the first <h> node I am only getting
Line 11Line 12Line 13
and not
Line 11Line 12Line 13Line 14
and I don't know how to get it.
Thank you.
Anatoliy SmirnovThanks Sudipto for trying to help. I did try that, and as I mentioned in the previous posting, it doesn't work for the tree nodes (multiple RowSetIterator). the following is my code, where the treeVO is the vo instance for the firstLevel tree nodes and it has view link to its children. I am not sure how to sort all children for each level. Even for the first level where I did the explicit sorting in memory, it still not sorting at all.
treeVO.setSortBy("code");
treeVO.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS|ViewObject..QUERY_MODE_SCAN_DATABASE_TABLES);
treeVO.executeQuery(); -
How to get the cost center for the retro balance.
Hi All
I have this report that gives the retro balance. I get the information from RT and BAL. The problem is it doesn't show the Cost Center for the retro amounts. C1 holds the current periods payments not the retro ones.
Does any one know how can i get the Cost Center of the the amounts that wage type /552 is showing in the RT?
Please Help!!!Hi
I am not sure on the requirement. You are developing a FI report and accessing VA03 which is sales transaction. Anyway for getting cost center you can go to table VBAK,VBAP for line items.
Hope solves ur problem
Thiru -
How to get the cost center of production order
hi guys
please tell me how i can get the cost center of the production order.
thanks.You need AUFK-KOSTL ?
Pole -
JTree: How to get the currently selected node
How do I get the currently selected node in JTree?
getLastSelectedPathComponent() this method always return the last selected node and not the current one.
Thanks in advance
SachinUse
TreePath selectedPath = tree.getSelectionPath()If your tree allows multiple selections, use
TreePath [] selectedPaths = tree.getSelectionPaths() this will return an array of all selected tree paths.
Once you get the tree path, call the treePath.getLastPathComponent(). this should tell you the currently selected node.
Hope this helps
Sai Pullabhotla -
How to overwrite the profit center derived
Hi,
I am posting sd document which is creating the accounting doc. In this the profit center is derived for all the line item . Now for certain accounts I want to attach fixed profit center & not the profit center derived from earlier line item. When I am creating substitution or derivation for this it is not overwritting the derived profit center.
How can i overwrite the derived profit center.
Please help us to resolve the issue.
CHEERSHi,
The Profit center is derived either from Master data or from the configuration.
The master datas are
1) Material Master
2) Cost centers
The configuration it copied from the OKB9 for default profit center for the Cost element.
So when you post the SD document this will be related to the Material only,so check in material master.
Regards,
Raj -
How to add the Profit Center (Distribution Rule) at AR Invoice
Hi All,
At SAP 2007 B PL10, Is it possible to assign the Profit Center at AR Invoice Document Line via DI API, because when I changed the Item's warehouse the profit center value is disappeared.
Please give me any suggestion.
Thanks,
LeiHi,
When adding new invoice document, can I call the document & document line object? At SAP 2007B PL10, the profit center field is combined with product group, product family, market, department and service fields
Example : At profit center field will show (G&A; Audio; SG) when Default values of product group is "G&A" , product family is "Audio", market is "SG"
Thanks,
Lei -
How to manipulate the profit center in the prod order within an mto-flow
Hello,
It is allowed in the sales order to change the profit center. I want to copy the entered profit center from my sales order to the profit center of my linked production order which has been created automatically.
I tried already some user-exits (enhancements PPCO000?) but it doesn't work. Who can help me solving this problem?
Many thanks for helping,
BartDear,
Maintain the Profit Centre in Costing 1 View of Material Master.
Then it will be defaulted into the Production Order.
Profit center can be entered at the item level in the sales order T.Code: VA01, in the Account Assignment Section.
If Profit Centre is maintained in Material Master Data, in Sales: General / Plant data, then the same will default in sales order.
Regards,
R.Brahmankar -
How to get the cost center and division for a given FI vendor document...
Hello Experts,
I am currently developing a report wherein I have to show the cost center and division used in the given FI document.
These documents are vendor related transactions.
In the file that was given to me by the user, she indicated the cost centers used by the FI documents
but when I view it via VA03 I cannot theere are no cost centers used in all the line items.So are there
any FM, BAPIs and/or tables that I can use for my requirement?
Hope you can help me guys. Thank you and take care!Hi
I am not sure on the requirement. You are developing a FI report and accessing VA03 which is sales transaction. Anyway for getting cost center you can go to table VBAK,VBAP for line items.
Hope solves ur problem
Thiru
Maybe you are looking for
-
Dear All, I have maintained condition record for cess ,And i open the sales order in change mode and update the pricing procedure still in the analysis tab condition record is missing coming ,Please provide the solution.
-
Crytal Report is not able to connect to BW
Dear Colleagues, CR 2011 doesn't work, i.e. CR terminates, if we try to create a report from a query. We use - SAP Crystal Reports 2011 Version 14.0.0.760 RTM - Windows 7 Version 6.1 (Build 7600) - SAP BW 7.3 SAPKW73004 - SAPGUI 7.20 Version 7200.2.4
-
Cell formatting problem with formula
I have a table in my spreadsheet document, which contains working time details of my job. Column B is time of beginning, column D is time of stop. Both B and C columns are formatted as "date and time". In column E, there is a formula "=C2-B2", and so
-
Hi all. I ordered the gd65 with the B3 stepping. My questions are as follows: 1. Will this come with the most up to date BIOS? 2. Is it true that you can only update the BIOS if it is set for IDE? (I have an Intel 510 SSD coming too) 3. If it is true
-
when I email pictures from within iPhoto the email does NOT show up in my sent email folder, WHY?