Profit Center at Invoice level
Hi Experts,
Our client wants to clear vendor open items in FBL1N profit centerwise. In payment line item, we can see profit center but in invoice line item, profit center not visible. can anyone tell me possible solution for this.
Regards
Sanjay_FICO
Hello,
Possible solution:
In invoice line item use Assignment field for mentioning the profit center. Even a sustitution rule could be use to auto populate Profit Center in Assignment Field.
With the basis of that you could clear the vendor profit center wise.
Regards,
Jaymin R. Bhatt
Similar Messages
-
Report Needed to show WBS and Profit Center on Invoices
I need a report of open and cleared invoices that show the WBS and Profit Center.
I have tried the FBL5N and it doesn't populate it. Any other reports out there???You dont have to join them. Keep both profit center and cost centre in the cube. While defining the update rules, derive profit center from cot centre.
In the report , keep profit center and cost centre as free char.
The users can dynamically drill down and view the report for cost centre or profit centre or both.
Another idea is to keep profit centre as a nav attribute in the cube and in that case, you dont have to derive profit centre from cost centre in the update rules.
Ravi Thotahdri -
Import Profit center in invoice by DTW
Dear experts,
I have to import the "Profit center" in an invoice by the DTW but I don't find the column, in the templates, where to insert this data.
Thanks.Hi Paolo,
You could set the required value in the field 'CostingCode' in the lines template.
Regards,
Vijay Kumar
SAP Business One Forums Team -
Profit Center Vendor Invoice through IDoc
We have a requirement to post the Profit Center through Inter Company Vendor Invoice. Can we meet this requirement simply by adding the required segment in the Idoc Structure ? or does this need a separate coding ?
Edited by: PRASAD VULISETTY on Oct 28, 2008 7:00 PMHi,
Maintain the profit center in the T.code : OBCC(Additional account assignment), when the invoice posted in the Intercompany A/P vendor it will trigger the profit center maintained in OBCC. Hope, you using the IDoc...INVOIC01.
Thanks and Regards
Gopinath -
Profit Center at header level in sales order
Hi Friends,
Is it possible to have profit center entered at header level in a sales order. If yes then where.
Regards,
Wasim.No, profit center is always assigned at item level.
One of the reason could be, items in a sales order can have different profit centers, hence assigning at header level will impact all the items.
Regards -
Can we limit the profit center at plant level?
Hi Experts,
I need to limit a profit center for certain plant, is this possible?
Example:
Profit center should be inactive for plant P100.
Thanks,
KumarHi Kumar
This will have larger implications
1. You need to ensure that Mat Masters are updated with right PC.. You can use a BADI to substitute the PC automatically at the time of Mat master creation
2. In Cost centers, that you make per plant, you will have to ensure this manually or using Exit COOMKS02
3. Similarly, for Int orders and other Cost objects
4. you can also write a substituion in FI to check Plant and PC combination.. But if master data is ensured, you dont need substitution
Br. Ajay M -
Default profit center when posting vendor invoices thru MIRO, FB60 and FB65
Hi,
My requirement is to default profit center at item level while posting vendor invoices using transactions MIRO, FB60 and FB65.
can anyone please provide some inputs on this.
Thanks for your help.
LuckyHi,you need to customize doc splitting.
1.You need to clasify all accounts from future document in Document Splitting-Classify G/L Accounts for Document Splitting(e.g. all accounts 2000) 03000-VENDOR.
2.in IMG: Classify Document Types for Document Splitting check for Document type transaction and Variant (e.g. Doc=KR, Trans.=1010, Variant= 0001)
3.In IMG: Activate Document Splitting check assigned method(e.g. 000012)
4. in IMG- Document Splitting-Extended Document Splitting-Define Document Splitting Rule
For find your method and transaction(e.g. Method=00012, trans.=1010) and double click on Item categories(on left of the top of screen)
There'd be record with category from first step (e.g. Cat.=0300), select one and double click on Base item cat. - there'd be Category 0300 and with check box Automatically split.
I hope it'd be helpful -
Profit center wise vendor / customer invoices
hi experts,
i believe profit center wise balance sheet is a possible but i am not sure how. but one thing that beats me is how can i make profit center wise invoices on vendor and customer. if its a question of some customization do explain me
regards
sayeedProfit center is maintained in the material master, When multiple materials are selected in an invoice, accounting documents create entries crediting sales account for each material sale value under associated profit centers.
In the pre-ECC scenario, there is a t-code 1KEK which is run at period end to segregate the balance sheet receivables and payables by profit centers. Under new-GL scenario, with document splitting this can be achieved as and when the sale is recorded. -
SAP DBM: Shop type level profit center
Hi SAP DBM Experts,
At our client there is business process of various shop types within each plant such as small service, large service & Body / paint repair.
There is a requirement to determine the profit center at the level of Shop type level.
As per standard DBM the profit center can be set up at below level:
Plant
Distribution channel
Division
DBM order reason
Material group
Profit center
We are implementing SAP DBM 8.0, please guide whether this can be achieved by any standard configuration.
Regards,
Sachin BalmikiHi Sachin,
For DBM the profit center is determined for each internal order created at header level and split level which is passed to accounting document...I am not aware if in DBM 8.0 profit center is determined at item level..if this is the case then it should be from Material master.
what you can suggest is to group the items by internal department for example for bodyshop 2 items, paint - 3item for the same customer and determine the profit center by order type / customer combination.
But structure of DBM CO value flow is such that , i think you need to search for SAP note for profit center at item level ..else you will not be able to use profitability analysis since you end up one profit center at internal order of split billing and actual accounting document with difference profit centers at line item level -
Balance sheet at profit center level
hi
client requirement is balance sheet at profit center level
we are useing TC: S_ALR_87013340
In this TC, In balance sheet system show the expenses GL A/c's.
in Company code level balance sheet it is show right GL A/c's
but profit center wise it show the wrong GL A/c's
Note: we are not active the document spliting & segment for existing system.
thank youHi,
Then it will not work as document splitting will split document on the basis of profit center or segment & corresponding debit & credit is posted to zero balance account.If you have not activated document splitting you can not have balance tallied at profit center or segment level so it will not matched .
System will not show financial statements on profit center or segment basis ,if document splitting is not active. -
New GL - Profit Center Accounting.
Hello,
My Client have implementaed New GL and Profit Center Accounting Scenario is activated. Document Splitting also activated and PC is made a zero balance and mendatory field.
My query is: how the distribution for the reconciliation account will work; for example, a vendor invoice is posted so the vendor line item will get the PC from the other line item. Here the PC is general Plant level PC now I want to distribute this posting to the vendor account to the other PC. How this can be done?
the same query for Asset and material reconcilition posting.
Please let me knwo if more information is required.
Regards,Hello,
Thanks for the reply.
in my company Plant and Profit center is mapped on one to one basis. now we are reengineering the profit center hierarchy as Plant and product group combination.
now come to the example the material purchase entry. Here the material is updated with the common profit center at plant level which we need to distrubute to the other profit center (which is created as product group and plant combination) in period end closing activities with the decided allocation %. This we are doing for generating Balance Sheet at Profit Center Level (which is now a combination Plant and Product Group)
Now I am not able to run Distribution with FAGLGA3*. Please guide how to run distribution for Reconciliation account like Vendor, Asset and Material.?
Please let me know if more information is requried.
Regards, -
Hi Experts,
For this design only profit centers under the following level 4 nodes will need to be extracted and sent to PROS SOI7CR0326 , SOI7FU0763 , SOI7FU0764 , SOI7FU0765. All profit centers under these nodes will need to be sent although only level 4, level 6, and level 7 descriptions should be sent for each profit center. I used transaction KCH3 to view the hierarchy below.
I need descriptions for all the profit centers for the above mentioned nodes, please see the code and give me some solution.
5 SOI_STREAM Downstream
4 SOI4000011 DOWNSTREAM (OIL)
4 SOI5000001 DOWNSTREAM REFINING 1 PEER GRP
4 SOI5000002 DOWNSTREAM REFINING 2 PEER GRP
4 SOI5000003 DOWNSTREAM COMMERCIAL PEER GRP
5 SOI5000004 DOWNSTREAM RETAIL PEER GROUP
4 SOI6AC0001 ACCELERATOR BUSINESS UNIT
4 SOI6CR0001 US CONVENIENCE OPERATIONS
5 SOI6FU0001 US FUELS OPERATING UNIT
5 SOI7FU0692 SECONDARY TRANS / PIPELINE
5 SOI7FU0762 RESTRUCTURING HIERARCHY
5 <b> SOI7FU0763</b> US FUELS MARKETING - EAST/GULF COAST <-- Level 4 Description
5 SOI7FU0766 EGC FUELS SUPPLY GEOGRAPHY
5 SOI7FU0017 NORTHEAST GEOGRAPHY <-- Level 6 Description
18026650 EAST S&H OPPORTUNITY PROJECTS EXPENSE <-- Level 7 Description
5 SOI7FU0033 NEW YORK HARBOR - SUPPLY ENVELOPE
5 SOI7FU0034 TERMINALS&SUPPLYPLANTS -NEW YORK HARBOR
5 SOI7FU0174 GASOLINE - NEW YORK HARBOR
18000063 MA FIELD DISTRIBUTION
18000070 WASHINGTON DC-20003 (LPOB)
18000361 WILMINGTON DE-19801 (LPOB)
18000371 CORAOPOLIS PA-15108 (LPOB)
18000396 PHILADELPHIA PA-EXXON (LTOZ)
18004753 BROOKLYN TERMINAL
* This program can be used to export profit center hierarchies or other groups in a level table (format used by RGSIMPH1)
* To actively use this program:
* - copy it to a local object
* - adapt DATA_TAB to the data structure in your foreign system
* (change positions, length of fields, remove TOVALUE if
* hierarchies contain single values only, ...)
* - write an export routine for DATA_TAB if you don't want to
* download it to the presentation server
* Example hierarchy that will be exported by this program
* HIER-TOP Top node
* |
* |---- HIER-010 Node 10
* | |
* | |---- HIER-011 Node 11
* | | - CC 1 Profit center 1
* | | - CC 2 Profit center 2
* | |
* | ---- HIER-012 Node 12
* | - CC 3 Profit center 3
* | - CC 4 Profit center 4
* |
* ---- HIER-020 Node 20
* - CC 5 Profit center 5
* The level table DATA_TAB will look like this:
* Level Groupname Fromvalue Tovalue Descript
* 0001 HIER-TOP Top node
* 0002 HIER-010 Node 10
* 0003 HIER-011 Node 11
* 0004 CC 1 CC 1
* 0004 CC 2 CC 2
* 0003 HIER-012 Node 12
* 0004 CC 3 CC 3
* 0004 CC 4 CC 4
* 0002 HIER-020 Node 20
* 0003 CC 5 CC 5
* Standard Architecture Data Structures
INCLUDE: zbiod001,
zbiud002,
zbiud007.
DATA: c_text_write(5) TYPE c VALUE 'Write'.
TABLES: CEPC,
CEPCT.
*------------------------ Data ---------------------------------*
DATA: I_CEPCT LIKE CEPCT OCCURS 0 WITH HEADER LINE,
WA_CEPCT LIKE CEPCT,
I_CEPC LIKE CEPC OCCURS 0 WITH HEADER LINE,
WA_CEPC LIKE CEPC.
DATA: W_OBJECTID LIKE CDHDR-OBJECTID,
W_LEVEL_CODE(30) TYPE C,
W_LEVEL_NAME(50) TYPE C,
W_LEVEL_CODE1(30) TYPE C,
W_LEVEL_NAME1(50) TYPE C.
DATA: BEGIN OF I_PROFIT OCCURS 10,
ID(15) TYPE C,
CODE(10) TYPE C,
NAME(20) TYPE C,
DESC(40) TYPE C,
HIER_LVL1_CODE(30) TYPE C,
HIER_LVL1_NAME(50) TYPE C,
HIER_LVL2_CODE(30) TYPE C,
HIER_LVL2_NAME(50) TYPE C,
HIER_LVL3_CODE(30) TYPE C,
HIER_LVL3_NAME(50) TYPE C,
HIER_LVL4_CODE(30) TYPE C,
HIER_LVL4_NAME(50) TYPE C,
HIER_LVL5_CODE(30) TYPE C,
HIER_LVL5_NAME(50) TYPE C,
HIER_LVL6_CODE(30) TYPE C,
HIER_LVL6_NAME(50) TYPE C,
HIER_LVL7_CODE(30) TYPE C,
HIER_LVL7_NAME(50) TYPE C,
HIER_LVL8_CODE(30) TYPE C,
HIER_LVL8_NAME(50) TYPE C,
HIER_LVL9_CODE(30) TYPE C,
HIER_LVL9_NAME(50) TYPE C,
HIER_LVL10_CODE(30) TYPE C,
HIER_LVL10_NAME(50) TYPE C,
HIER_LVL11_CODE(30) TYPE C,
HIER_LVL11_NAME(50) TYPE C,
CREATED_BY(15) TYPE C,
CREATED_DATE(10) TYPE C,
LAST_UPDATED_BY(15) TYPE C,
LAST_UPDATED_DATE(10) TYPE C,
BATCH_ID(15) TYPE C,
STAGE2_DIM_ID(15) TYPE C,
SOURCE_SYSTEM_ID(20) TYPE C,
ALT_ACCOUNT_SET_HIERARCHY_IND(1) TYPE C,
END OF I_PROFIT.
*Structure required by Essbase. Str_PC1.TXT
DATA: BEGIN OF I_STR_PC1 OCCURS 10,
HIER_LVL1_CODE(30) TYPE C,
FILLER1(1) TYPE C VALUE '|',
HIER_LVL1_NAME(50) TYPE C,
FILLER2(1) TYPE C VALUE '|',
HIER_LVL2_CODE(30) TYPE C,
FILLER3(1) TYPE C VALUE '|',
HIER_LVL2_NAME(50) TYPE C,
FILLER4(1) TYPE C VALUE '|',
HIER_LVL3_CODE(30) TYPE C,
FILLER5(1) TYPE C VALUE '|',
HIER_LVL3_NAME(50) TYPE C,
FILLER6(1) TYPE C VALUE '|',
HIER_LVL4_CODE(30) TYPE C,
FILLER7(1) TYPE C VALUE '|',
HIER_LVL4_NAME(50) TYPE C,
FILLER8(1) TYPE C VALUE '|',
HIER_LVL5_CODE(30) TYPE C,
FILLER9(1) TYPE C VALUE '|',
HIER_LVL5_NAME(50) TYPE C,
FILLER10(1) TYPE C VALUE '|',
HIER_LVL6_CODE(30) TYPE C,
FILLER11(1) TYPE C VALUE '|',
HIER_LVL6_NAME(50) TYPE C,
FILLER12(1) TYPE C VALUE '|',
HIER_LVL7_CODE(30) TYPE C,
FILLER13(1) TYPE C VALUE '|',
HIER_LVL7_NAME(50) TYPE C,
FILLER14(1) TYPE C VALUE '|',
HIER_LVL8_CODE(30) TYPE C,
FILLER15(1) TYPE C VALUE '|',
HIER_LVL8_NAME(50) TYPE C,
FILLER16(1) TYPE C VALUE '|',
HIER_LVL9_CODE(30) TYPE C,
FILLER17(1) TYPE C VALUE '|',
HIER_LVL9_NAME(50) TYPE C,
FILLER18(1) TYPE C VALUE '|',
HIER_LVL10_CODE(30) TYPE C,
FILLER19(1) TYPE C VALUE '|',
HIER_LVL10_NAME(50) TYPE C,
FILLER20(1) TYPE C VALUE '|',
HIER_LVL11_CODE(30) TYPE C,
FILLER21(1) TYPE C VALUE '|',
HIER_LVL11_NAME(50) TYPE C,
FILLER22(1) TYPE C VALUE '|',
CODE(10) TYPE C,
FILLER23(1) TYPE C VALUE '|',
DESC(40) TYPE C,
FILLER24(1) TYPE C VALUE '|',
NAME(20) TYPE C,
FILLER25(1) TYPE C VALUE '|',
END OF I_STR_PC1.
*Variable declaration
DATA: CTR(2) TYPE C,
INC TYPE I,
W_CTR1(2) TYPE C,
W_INC1 TYPE I.
DATA: w_file_prft LIKE w_prc_files.
*Field symbols.
FIELD-SYMBOLS: <CD1>,
<NM1>.
* External level table will be using the following structure
DATA: BEGIN OF data_tab OCCURS 0,
level(4) TYPE n, "level in hierarchy
groupname LIKE grpdynp-name_coall, "name of node
fromvalue LIKE setvalues-from, "From-Value of interval
tovalue LIKE setvalues-to, "To-Value of interval
descript LIKE sethier-descript,"description of this entry
END OF data_tab.
*Constants
CONSTANTS: c_setclass LIKE sethier-setclass VALUE '01++'.
*------------------------ SelectionScreen--------------------------*
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
* Parameters
PARAMETERS: g_setid LIKE sethier-setid OBLIGATORY MEMORY ID gse.
SELECTION-SCREEN END OF BLOCK B1.
* Tables to read sets
DATA: sethier LIKE sethier OCCURS 0 WITH HEADER LINE, "hierar. nodes
setvalues LIKE setvalues OCCURS 0 WITH HEADER LINE, "hier. values
g_setval_index LIKE sy-tabix, "index for setvalues,
g_int TYPE i,
g_rc TYPE c,
g_old_file LIKE lgrwo-exp_file.
*------------------------ AT Selection screen----------------------*
AT SELECTION-SCREEN.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR g_setid.
* Value request for group name
CALL FUNCTION 'G_RW_SET_SELECT'
EXPORTING
class = c_setclass
set = g_setid
typelist = 'BS'
show_field_name = ' '
show_table_name = ' '
IMPORTING
setid = g_setid
set_name = g_setid.
*peform to read profit center hierarchy
PERFORM READ_SETHIER.
*perform to change the output format to flat file format
PERFORM PROFIT_CENTER_HIER.
*Fill remaining details from profit center master tables
PERFORM FILL_PRCTR_DETAILS.
*perform to download the details
PERFORM F_WRITE_TO_FILE.
FORM READ_SETHIER.
* Preparations: check authority to read sets
CALL FUNCTION 'G_SET_OR_GROUP_AUTHORITY'
EXPORTING
i_setid = g_setid
i_actvt = '03'.
* Read set
REFRESH: sethier, setvalues.
CALL FUNCTION 'G_SET_TREE_IMPORT'
EXPORTING
no_rw_info = 'X'
setid = g_setid
TABLES
set_hierarchy = sethier
set_values = setvalues.
* Copy set into DATA_TAB
REFRESH data_tab.
g_setval_index = 1.
LOOP AT sethier.
CLEAR data_tab.
data_tab-level = sethier-level.
data_tab-groupname = sethier-shortname.
data_tab-descript = sethier-descript.
APPEND data_tab.
CHECK sethier-vcount > 0.
CLEAR data_tab.
data_tab-level = sethier-level + 1.
g_int = g_setval_index + sethier-vcount - 1.
LOOP AT setvalues FROM g_setval_index TO g_int.
data_tab-fromvalue = setvalues-from.
data_tab-tovalue = setvalues-to.
data_tab-descript = setvalues-descript.
APPEND data_tab.
ENDLOOP.
g_setval_index = g_int + 1.
ENDLOOP.
ENDFORM.
FORM PROFIT_CENTER_HIER.
* Use DATA_TAB table here to get to the heirarchies.
LOOP AT DATA_TAB.
W_INC1 = DATA_TAB-LEVEL.
W_CTR1 = W_INC1.
IF DATA_TAB-LEVEL = '0000' .
CONTINUE.
ENDIF.
IF NOT DATA_TAB-GROUPNAME IS INITIAL.
CONCATENATE 'I_PROFIT-HIER_LVL' W_CTR1 '_CODE' INTO W_LEVEL_CODE1.
ASSIGN (W_LEVEL_CODE1) TO <CD1>.
<CD1> = DATA_TAB-GROUPNAME.
CONCATENATE 'I_PROFIT-HIER_LVL' W_CTR1 '_NAME' INTO W_LEVEL_NAME1.
ASSIGN (W_LEVEL_NAME1) TO <NM1>.
<NM1> = DATA_TAB-DESCRIPT.
ELSEIF NOT ( DATA_TAB-FROMVALUE IS INITIAL OR
DATA_TAB-TOVALUE IS INITIAL ) AND
DATA_TAB-LEVEL NE '0001' .
MOVE DATA_TAB-FROMVALUE TO I_PROFIT-CODE.
PERFORM CLEAR_ABOVE_LEVEL USING W_CTR1.
APPEND I_PROFIT.
CONTINUE.
ENDIF.
ENDLOOP.
ENDFORM.
* FORM GET_FILE_NAME *
* Value help for export/import file name *
FORM get_file_name CHANGING p_outfile LIKE lgrwo-exp_file.
DATA: path LIKE lgrwo-exp_file,
len TYPE i,
separator(1) TYPE c,
window_system(4) TYPE c.
FIELD-SYMBOLS <last_char>.
* get presentation server operating system for file name separator
CALL FUNCTION 'WS_QUERY'
EXPORTING
query = 'WS'
IMPORTING
return = window_system.
IF window_system = 'MC'. "Mac OS
separator = ':'.
ELSE. "Windoze
separator = ''.
ENDIF.
* get path name
path = p_outfile.
SHIFT path RIGHT DELETING TRAILING space.
DESCRIBE FIELD path LENGTH len.
len = len - 1.
ASSIGN path+len(1) TO <last_char>.
WHILE <last_char> <> separator AND
path <> space.
SHIFT path RIGHT.
ENDWHILE.
SHIFT path LEFT DELETING LEADING space.
* get file name
WHILE p_outfile CS separator.
SHIFT p_outfile UP TO separator.
SHIFT p_outfile.
ENDWHILE.
* get file name
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = p_outfile
def_path = path
mask = ',*.*,*.*.'
mode = 'S'
IMPORTING
filename = p_outfile
EXCEPTIONS
OTHERS = 0.
ENDFORM.
*& Form CLEAR_ABOVE_LEVEL
FORM CLEAR_ABOVE_LEVEL USING P_LEVEL.
*Field symbols.
FIELD-SYMBOLS: <CD>,
<NM>.
*Clear code and name from upper level hierarchies when profit center
* is found in the lower level hierarchies.
WHILE P_LEVEL <= 10.
CONCATENATE 'I_PROFIT-HIER_LVL' P_LEVEL '_CODE' INTO W_LEVEL_CODE.
ASSIGN (W_LEVEL_CODE) TO <CD>.
CLEAR <CD>.
CONCATENATE 'I_PROFIT-HIER_LVL' P_LEVEL '_NAME' INTO W_LEVEL_NAME.
ASSIGN (W_LEVEL_NAME) TO <NM>.
CLEAR <NM>.
P_LEVEL = P_LEVEL + 1.
ENDWHILE.
CLEAR: P_LEVEL,
W_LEVEL_CODE,
W_LEVEL_NAME.
ENDFORM. " CLEAR_ABOVE_LEVEL
*& Form FILL_PRCTR_DETAILS
FORM FILL_PRCTR_DETAILS.
DATA: CTR TYPE I.
*Select description from CEPCT table
SELECT * FROM CEPCT INTO TABLE I_CEPCT WHERE SPRAS EQ 'EN'.
SELECT * FROM CEPC INTO TABLE I_CEPC.
SORT I_CEPC DESCENDING BY PRCTR DATBI.
DELETE ADJACENT DUPLICATES FROM I_CEPC COMPARING PRCTR.
SORT I_CEPC.
SORT I_PROFIT BY CODE.
LOOP AT I_PROFIT.
CLEAR: WA_CEPC,
WA_CEPCT,
W_OBJECTID.
CTR = CTR + 1.
READ TABLE I_CEPC INTO WA_CEPC WITH KEY PRCTR = I_PROFIT-CODE.
READ TABLE I_CEPCT INTO WA_CEPCT WITH KEY PRCTR = WA_CEPC-PRCTR
DATBI = WA_CEPC-DATBI.
MOVE: CTR TO I_PROFIT-ID,
WA_CEPCT-KTEXT TO I_PROFIT-NAME,
WA_CEPCT-LTEXT TO I_PROFIT-DESC.
CONCATENATE '0002' I_PROFIT-CODE INTO W_OBJECTID.
MOVE-CORRESPONDING I_PROFIT TO I_STR_PC1.
APPEND I_STR_PC1.
ENDLOOP.
FREE I_PROFIT.
ENDFORM. " FILL_PRCTR_DETAILS
*& Form F_DOWNLOAD
FORM F_DOWNLOAD.
ENDFORM.
*& Form F_WRITE_TO_FILE
FORM F_WRITE_TO_FILE.
LOOP AT I_STR_PC1.
PERFORM WRITE_FILE USING I_STR_PC1
w_file_prft-PRC_FILE..
ENDLOOP.
ENDFORM. " F_WRITE_TO_FILE
FORM WRITE_FILE USING W_RECORD W_PRC_FILE.
DATA: W_RECORD_LEN TYPE I.
* Retreive the actual length of the record to be written
DESCRIBE FIELD W_RECORD LENGTH W_RECORD_LEN.
TRANSFER W_RECORD TO W_PRC_FILE LENGTH W_RECORD_LEN.
IF SY-SUBRC NE 0.
MESSAGE ID 'ZZ' TYPE 'A' NUMBER '001'
WITH C_TEXT_WRITE W_PRC_FILE.
ENDIF.
CLEAR W_RECORD.
ENDFORM.
Thanks & Regards,
Poorna.hi all,
here is the solution:
**------------------------ Data ---------------------------------*
DATA: i_cepct LIKE cepct OCCURS 0 WITH HEADER LINE,
wa_cepct LIKE cepct,
i_cepc LIKE cepc OCCURS 0 WITH HEADER LINE,
wa_cepc LIKE cepc.
*Variable declaration
DATA: w_ctr1(2) TYPE c,
w_inc1 TYPE i.
DATA: w_level_code(30) TYPE c,
w_level_name(50) TYPE c,
w_level_code1(30) TYPE c,
w_level_name1(50) TYPE c.
*Field symbols.
FIELD-SYMBOLS: <cd1>,
<nm1>.
* External level table will be using the following structure
DATA: BEGIN OF data_tab OCCURS 0,
level(4) TYPE n, "level in hierarchy
groupname LIKE grpdynp-name_coall, "name of node
fromvalue LIKE setvalues-from, "From-Value of interval
tovalue LIKE setvalues-to, "To-Value of interval
descript LIKE sethier-descript,"description of this entry
END OF data_tab.
* Tables to read sets
DATA: sethier LIKE sethier OCCURS 0 WITH HEADER LINE, "hier-nodes
setvalues LIKE setvalues OCCURS 0 WITH HEADER LINE, "hier-values
g_setval_index LIKE sy-tabix, "index for setvalues,
g_int TYPE i.
DATA: BEGIN OF i_profit OCCURS 10,
id(15) TYPE c,
code(10) TYPE c,
name(20) TYPE c,
desc(40) TYPE c,
hier_lvl1_code(30) TYPE c,
hier_lvl1_name(50) TYPE c,
hier_lvl2_code(30) TYPE c,
hier_lvl2_name(50) TYPE c,
hier_lvl3_code(30) TYPE c,
hier_lvl3_name(50) TYPE c,
hier_lvl4_code(30) TYPE c,
hier_lvl4_name(50) TYPE c,
hier_lvl5_code(30) TYPE c,
hier_lvl5_name(50) TYPE c,
hier_lvl6_code(30) TYPE c,
hier_lvl6_name(50) TYPE c,
hier_lvl7_code(30) TYPE c,
hier_lvl7_name(50) TYPE c,
hier_lvl8_code(30) TYPE c,
hier_lvl8_name(50) TYPE c,
hier_lvl9_code(30) TYPE c,
hier_lvl9_name(50) TYPE c,
hier_lvl10_code(30) TYPE c,
hier_lvl10_name(50) TYPE c,
hier_lvl11_code(30) TYPE c,
hier_lvl11_name(50) TYPE c,
created_by(15) TYPE c,
created_date(10) TYPE c,
last_updated_by(15) TYPE c,
last_updated_date(10) TYPE c,
batch_id(15) TYPE c,
stage2_dim_id(15) TYPE c,
source_system_id(20) TYPE c,
alt_account_set_hierarchy_ind(1) TYPE c,
END OF i_profit.
DATA: BEGIN OF i_str_pc2 OCCURS 10,
code(10) TYPE c,
desc(50) TYPE c,
hier_lvl1_name(50) TYPE c,
hier_lvl3_name(50) TYPE c,
hier_lvl4_name(50) TYPE c,
extradatetime(20) TYPE c,
END OF i_str_pc2,
BEGIN OF i_setid OCCURS 4,
g_setid LIKE sethier-setid,
v_kokrs LIKE sethier-kokrs,
END OF i_setid.
DATA : wa_str_pc2 LIKE i_str_pc2,
wa_setid LIKE i_setid,
v_datetim(20) TYPE c,
v_tim(8) TYPE c,
v_level_dec(50) TYPE c,
v_profit_desc(50) TYPE c.
*"*"Local interface:
*" TABLES
*" IPROFIT STRUCTURE ZPCT
* Append all the major nodes to I_setid
* SOI7CR0326 Profit Center node1( under this Hier will be available, and the end you will have profit centers),
* SOI7FU0763 Profit Center node2,
* SOI7FU0764 Profit Center node3,
* SOI7FU0765 Profit Center node4.
wa_setid-g_setid = text-009.
wa_setid-v_kokrs = text-004.
APPEND wa_setid TO i_setid.
wa_setid-g_setid = text-010.
wa_setid-v_kokrs = text-004.
APPEND wa_setid TO i_setid.
wa_setid-g_setid = text-011.
wa_setid-v_kokrs = text-004.
APPEND wa_setid TO i_setid.
wa_setid-g_setid = text-012.
wa_setid-v_kokrs = text-004.
APPEND wa_setid TO i_setid.
* Loop at earch major nodes from i_setid.
LOOP AT i_setid INTO wa_setid.
REFRESH: i_profit.
* Preparations: check authority to read sets
CALL FUNCTION 'G_SET_OR_GROUP_AUTHORITY'
EXPORTING
i_setid = wa_setid-g_setid
i_actvt = '03'.
* Funtion module to import the set hierarchy and nodes values.
REFRESH: sethier, setvalues.
CALL FUNCTION 'G_SET_TREE_IMPORT'
EXPORTING
no_rw_info = 'X'
setid = wa_setid-g_setid
TABLES
set_hierarchy = sethier
set_values = setvalues.
* Copy set into DATA_TAB
REFRESH data_tab.
g_setval_index = 1.
LOOP AT sethier.
CLEAR data_tab.
data_tab-level = sethier-level.
data_tab-groupname = sethier-shortname.
data_tab-descript = sethier-descript.
APPEND data_tab.
CHECK sethier-vcount > 0.
CLEAR data_tab.
data_tab-level = sethier-level + 1.
g_int = g_setval_index + sethier-vcount - 1.
LOOP AT setvalues FROM g_setval_index TO g_int.
data_tab-fromvalue = setvalues-from.
data_tab-tovalue = setvalues-to.
data_tab-descript = setvalues-descript.
APPEND data_tab.
ENDLOOP.
g_setval_index = g_int + 1.
ENDLOOP.
* Loop at the data_tab to move all the Profit center nodes to i_profit.
LOOP AT data_tab.
w_inc1 = data_tab-level.
w_ctr1 = w_inc1.
IF data_tab-level = text-002 .
v_level_dec = data_tab-descript. "Description of level 4 node
CONTINUE.
ENDIF.
IF NOT data_tab-groupname IS INITIAL.
CONCATENATE text-001 w_ctr1 text-007 INTO w_level_code1.
ASSIGN (w_level_code1) TO <cd1>.
<cd1> = data_tab-groupname.
CONCATENATE text-001 w_ctr1 text-008 INTO w_level_name1.
ASSIGN (w_level_name1) TO <nm1>.
<nm1> = data_tab-descript.
ELSEIF NOT ( data_tab-fromvalue IS INITIAL OR
data_tab-tovalue IS INITIAL ) AND
data_tab-level NE text-003 .
MOVE data_tab-fromvalue TO i_profit-code.
PERFORM clear_above_level USING w_ctr1.
APPEND i_profit.
CONTINUE.
ENDIF.
ENDLOOP.
*Select description from CEPCT table
SELECT * FROM cepct
INTO TABLE i_cepct
WHERE spras EQ text-006.
SELECT * FROM cepc
INTO TABLE i_cepc.
SORT i_cepc DESCENDING BY prctr datbi.
DELETE ADJACENT DUPLICATES FROM i_cepc COMPARING prctr.
SORT i_cepc.
SORT i_profit BY code.
* Date and Times for each record.
CONCATENATE sy-uzeit+0(2) text-005 sy-uzeit+2(2) text-005
sy-uzeit+4(2) INTO v_tim.
CONCATENATE sy-datum v_tim INTO v_datetim SEPARATED BY space.
LOOP AT i_profit .
CLEAR: wa_cepc,
wa_cepct.
IF ( i_profit-code <> space
AND i_profit-hier_lvl2_name <> space
AND i_profit-hier_lvl3_name <> space ).
READ TABLE i_cepc INTO wa_cepc WITH KEY prctr = i_profit-code.
IF sy-subrc = 0.
READ TABLE i_cepct INTO wa_cepct WITH KEY prctr = wa_cepc-prctr
datbi = wa_cepc-datbi.
IF sy-subrc = 0.
*v_level_dec ( Description of level 4 node )
*i_profit-hier_lvl2_name ( Descri Level 6 )
*i_profit-hier_lvl3_name ( Descri Level 6 )
*i_profit-code ( Profit Center code )
*v_profit_desc ( Profit Center description )
CONCATENATE wa_cepct-ltext text-013 i_profit-code INTO v_profit_desc.
wa_str_pc2-hier_lvl1_name = v_level_dec.
wa_str_pc2-hier_lvl3_name = i_profit-hier_lvl2_name.
wa_str_pc2-hier_lvl4_name = i_profit-hier_lvl3_name.
wa_str_pc2-code = i_profit-code.
wa_str_pc2-desc = v_profit_desc.
wa_str_pc2-extradatetime = v_datetim.
APPEND wa_str_pc2 TO iprofit.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
CLEAR: v_level_dec.
ENDLOOP.
CLEAR: wa_setid.
ENDFUNCTION. -
SD Billing document without Profit center
Hello All,
Just have a problem on VF03, normally once sales order saved, the Invoice (VF03) will display Profit center directly.
But don't understand why, user said that they can't find Profit center in invoice. It cannot be automatically promote up for user.
Is that related to Account assignment for SD? or another other reason?
thanks
Marcohi
if you are using the WBS in your project,
1.please check the profitcenter and WBS element assignment in CJ03 transaction code.
2. And if it is maintained check if Profitcentre automatically coming into material master ( mm01) or not.
make the settings for automatic determination of profitcentre in material master:
Entreprise controlling-> Profit center accounting-> Assignments to
ProfitCenters--->Material>Perform fast assignment.
3. Now it should automatically come into sales order- account assignment tab--> profitcenter feild
4. check the bellow description of www.sapscene.com
The sales order default is taken from the profit centre on the delivering plant / material master combination. If you do not want this, you can define substitutions to override this. A substitution is basically where the system allows you to specify your own piece of conditional logic to determine which profit centre to post to. You can base your conditions on a variety of fields available on the Sales Order. Usually used if you want to base your mapping on Sales elements rather than on products.
Thanks
Arshad -
ERP Sales Order with Profit Center value mandatory in ECC side!
Hi Experts,
I'm working with a scenario using SAP CRM 7.0 and ECC 6.0 EHP4, using ERP Sales Order and ERP Quotation.
The sales order transaction type in ECC side is set up to use profit center at item level as mandatory and I can't find this attribute at Item Details in CRM Webclient. I can't save my order, because this error and the AB Incompletion Log always shows this error.
Any ideas? Is it possible set profit center value in CRM?
Best Regards
Heber OlivarHi Heber!,
I hope you are doing well.
We have the same issue, please could you share us how did you resolve this issue?
We have SAP CRM 7.0 EHP2 and SAP ECC 6.0 and for the creation to ERP Orders correctly in SAP CRM is necessary the profit center value.
Thanks in advance.
Best Regards! -
RECON A/C DOES NOT CONTAIN PROFIT CENTER Error
I am posting the doc in *'R3*' Bank receipts-NORTH the entry depiting bank and crediting customer but system giving error this Reconcill G/L A/c does not contain Profit center, But if i posting in RV Billing doc.transfer system accepting I dont know wht is the exact error Plz solve my queries....
When you are performing traction Customer Receipts against invoice, system takes profit center from invoice line item, i.e for reconciliation line item, and in other line item which is a bank a/c, system defaults it by the rule of inheritance in doc. splitting (if active in your case).
and if you do not want to clear with any line item and still want to do a receipt then that has to be treated as ' Down Payment '. use special G/L to do such transactions, where you will not face this issue. also, check your document splitting setup and ensure G/L Account classification is correct.
Regards,
Sayujya
Maybe you are looking for
-
Can't add groups or users to the wiki
I've found a few threads on this, but none of them have presented a solution. Setup: XServe with Leopard 10.5.4 on it. Advanced mode. Problem: Under the Server Admin panel, if I add a user or group to have Wiki and Blog permissions, if I click save,
-
mail with multiple gmail accounts sending messages from wrong email, other than the one i select: i'm using mail on osx 10.7 with multiple gmail accounts. when i create an email, i check to be sure i'm sending/replying from the correct account. after
-
Can't drag or drop in Itunes?
Itunes (11.2.2 for Macbook Pro 2012) I can drag and drop in finder and other applications. However, I can't select and then drag and drop individual (or groups) of songs, or playlists in Itunes. For example, when I want to drag a song from one playl
-
Enhancing Function Module Extractor
Is it possible to enhance an extract structure which is using a function module as an extractor. Basically I want to extract some more fields which the function module is not extracting. Can someone let me know how to do this. Best Regards, James.
-
Set audio input level manually on t5i
First post here. I've just started workig with my new t5i, which I'm using to work on my ongoing video tutorial series. In the manual I see how it is possible to set the audio input level maually for an external mic but I can't figure out how to navi