BAPI for updation of Profit center in table VBRP
Hello Friends,
I have to Update the Field 'PRCTR' in the table VBRP. Is there some BAPI available for updating VBRP .
I tried FM 'RV_INVOICE_ITEM_MAINTAIN'.
FM RV_INVOICE_DOCUMENT_UPDATE
But fields are not getting updated
Could you please help me, It is urgent.
Thanks & Regards,
Anju N
RV_INVOICE_DOCUMENT_UPDATE is used to buffer header updates, i don't think you need this. what you most likely need is RV_INVOICE_DOCUMENT_ADD to process the buffered item updates. but its highly recommended to have complete sequence 1. RV_INVOICE_REFRESH 2. RV_INVOICE_DOCUMENT_READ 3. series of RV_INVOICE_ITEM_MAINTAIN, if multiple line update 4. RV_INVOICE_DOCUMENT_ADD
Similar Messages
-
Sales order change BAPI not updating items Profit center
Dear ,
I am facing the problem in using the BAPI for Item 's profit centre in blank space.
I write down the below code <but it's not at all updating the profite centre .
please ccorrect the code if any required'
TYPES: BEGIN OF file_data ,
vbeln TYPE vbap-vbeln, " order numner
posnr TYPE vbap-posnr, " orderitem
profit_ctr TYPE vbap-prctr, " [profite centre
END OF file_data.
DATA: t_data TYPE STANDARD TABLE OF file_data .
DATA : wa_data LIKE LINE OF t_data.
DATA: t_data_item TYPE STANDARD TABLE OF file_data .
DATA : wa_data_item LIKE LINE OF t_data_item.
**DATA: t_data_item TYPE file_data OCCURS 0.
*DATA: return TYPE STANDARD TABLE OF bapiret2.
*DATA: wa_return LIKE LINE OF return.
DATA: wait LIKE bapita-wait VALUE 'X'.
DATA: s_order_header_in LIKE bapisdh1.
DATA: s_order_header_inx LIKE bapisdh1x.
DATA: BEGIN OF i_order_item_in OCCURS 0.
INCLUDE STRUCTURE bapisditm.
DATA: END OF i_order_item_in.
DATA: BEGIN OF i_order_item_inx OCCURS 0.
INCLUDE STRUCTURE bapisditmx.
DATA: END OF i_order_item_inx.
DATA: BEGIN OF it_return OCCURS 0.
INCLUDE STRUCTURE bapiret2.
DATA: END OF it_return.
***********************selection
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS : file LIKE rlgrap-filename OBLIGATORY.
"ctu_mode TYPE ctu_mode DEFAULT 'N'.
SELECTION-SCREEN END OF BLOCK b1.
*********assign file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
CLEAR file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = file
EXCEPTIONS
OTHERS = 1.
DATA: it_text TYPE truxs_t_text_data .
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
i_line_header = 'X'
i_tab_raw_data = it_text
i_filename = file
TABLES
i_tab_converted_data = t_data[] " Your internal table of structure of Excel sheet
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
t_data_item[] = t_data[].
DELETE ADJACENT DUPLICATES FROM t_data COMPARING vbeln.
Header update indicator
s_order_header_inx-updateflag = 'U'.
Line items
REFRESH: i_order_item_in, i_order_item_inx.
LOOP AT t_data INTO wa_data.
LOOP AT t_data_item INTO wa_data_item WHERE vbeln = wa_data-vbeln. .
i_order_item_in-itm_number = wa_data_item-posnr.
i_order_item_in-profit_ctr = wa_data_item-profit_ctr.
i_order_item_inx-itm_number = wa_data_item-posnr.
i_order_item_inx-updateflag = 'U'.
i_order_item_inx-profit_ctr = 'X'.
APPEND: i_order_item_in, i_order_item_inx.
ENDLOOP.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_data-vbeln
IMPORTING
output = wa_data-vbeln.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = wa_data-vbeln
order_header_in = s_order_header_in
order_header_inx = s_order_header_inx
behave_when_error = 'P'
TABLES
return = it_return
order_item_in = i_order_item_in
order_item_inx = i_order_item_inx.i already used same But it's not working
s_order_header_inx-updateflag = 'U'.
Line items
REFRESH: i_order_item_in, i_order_item_inx.
LOOP AT t_data INTO wa_data.
LOOP AT t_data_item INTO wa_data_item WHERE vbeln = wa_data-vbeln. .
BAPISDITM
i_order_item_in-itm_number = wa_data_item-posnr.
i_order_item_in-profit_ctr = wa_data_item-profit_ctr.
BAPISDITMX
i_order_item_inx-itm_number = wa_data_item-posnr.
i_order_item_inx-updateflag = 'U'.
i_order_item_inx-profit_ctr = 'X'.
APPEND: i_order_item_in, i_order_item_inx.
ENDLOOP.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_data-vbeln
IMPORTING
output = wa_data-vbeln.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = wa_data-vbeln
order_header_in = s_order_header_in
order_header_inx = s_order_header_inx
behave_when_error = 'P'
TABLES
return = it_return
order_item_in = i_order_item_in
order_item_inx = i_order_item_inx. -
Update the correct profit center in tables BSEG / BSAS / BSIS / BSIK / BSAK
Hi FI Gurus,
I am looking after a Support Project in SAP IS-Retail. I am from the FI functional and possess very limited knowledge in FI.
My client has done the sales posting in SAP using IDOC's. During the postings, it was found that wrong Profit Centers were assigned. Due to this, the sales reports based on Profit Center are coming wrong. It was suggested to the client to reverse the IDOCs, do necessary changes in Profit Centers and re-post the IDOCs. The client wanted a short method to get the reports right. A senior consultant (Non FI) in the Company and the Management are forcing me to write a ABAP program to update certain (not all) FI tables. According to me, it will have some negative impact on the system for which reason I am not ready to take the call as a Project Manager. The management wants me to do the following (I am quoting the same mail which I received from the consultant ) :
We need to update the correct profit center in tables BSEG / BSAS / BSIS / BSIK / BSAK / BSID / BSAD, wherever the records exists against billing document numbers provided.
BAPI for updating profit center in Accounting documents: BAPI_ACC_DOCUMENT_POST
Function Module : 'BAPI_DOCUMENT_CHANGE'
Also look at SAP Note: Note 966428 - FB02: Functional area (FKBER) can be changed on coding block
Based on the above, the ABAPer has written the program, the program will update the tables BSEG, BSIS, BSIK, according to the selection criteria of document number, company code and line item number with the new profit centers.
Please clarify me about the following :
1. This program is updating profit center in just the FI tables (BSEG, BSIS, BSIK etc.), but the New GL tables (faglflexa and faglflext) which have approx. 65 lakh entries in PRD do not get updated with the correct profit center.
2. The Controlling tables also do not get updated with this program yet. Also since the previoius updation of Profit centers did not happen correctly, most of the times the controlling document has not been generated at all. Since we will be updating the profit center in just the FI tables, the controlling document will not be created still. Though there are SAP notes suggesting re-creation of the Controlling documents, which is still an option you can choose. Please confirm.
3. The Special GL also does not get updated because of this.
This is a very critical and hot issue. My job is at Stake as the Management has threatened me of sacking if I do not follow their directives as they are only concerned with their money.
Is the consultant who suggested this change RIGHT ?
Your early replies will help me take the decision.
RegardsHi,
There is no standard program or BAPI that would update profit centre in a posted document. You should either develop your own process for it,which is not recommended, but sometimes is essential, or reverse the existing documents and post them with the correct profit centre.
Regards,
Eli -
Error Message-- For Balancing field "Profit Center" is not filled
Hi All,
When I do Shipment Start get Error-Message for Balancing field "Profit Center" is not filled!
A PGI for the DNXXXXXXXX is not possible!
Can u please help me how to resolve this issue ?
WM BabyHi,
AS per configuration , there is prifit centre assignment .Enter the profit centre in the field of profit centre by the help opf F4.
Regards,
Andra -
Hi
Does somebody knows some FM or BAPI for update a document BELNR in BKDF ? (i need to change the XDELT field).
Thanks for your help.
FrankHello,
Make use of the function in ' UPDATE TASK' below this should help you out
BELEG_WRITE_DOCUMENT
Regards
Suresh Niar -
I am using a bapi for getting data into infotype BAPI_EMPLOYEE_GETDATA.
Is there any BAPI for updating data ?
regards
Balajithese links might be useful...
http://help.sap.com/saphelp_nw70/helpdata/EN/44/b78765378b56a5e10000000a1553f6/content.htm -
No result line for hierarchy on Profit Center in query
Dear Colleagues!
Question regarding BW 3.5!
I want to have an overall result line for a hierarchy based on profit center in my report, but I can't make it work.
The Profit Center infoobject is in the rows. I use the setting for the infoobject Profit Center to set Result settings but the line does not appear.
I have a very similar report where Costcenter hierarchy is in my row, and here I get the overall result line at the top. Why does it not appear in my Profit Center query?
I have compeared settings for the two hierarchies in RSA1, the settings for the two queries, the settings for the Web Template, and the settings for the infoobjects, but I can't find any difference. Can anyone out there help me?
Regards
SiljeSilje,
Have you a Node at the top of the Cost Centre Hierarchy which is being summed within the hierarchy and then perhaps all your Profit Centre nodes are at the same top level?
Also - are there other characteristics in your Cost Centre report that are actually the ones being summed?
Regards
Gill -
Function Module to Update the Profit Center in Profit Segment of SO?
Hi,
I am updating the profit center with help of user exit in the sales order at the time of saving it. But my problem is it doesnt appear in the Profit Segment in the Account Assignment.
So if i go to the change mode of a Sales Order do some change and save it, the profit center get determined automatically. Now if one goes into the display mode of the same order and goes into Account Assignment of a particular item we can see that the Profit Center in the Profit Segment pop-up is not updated.
My question here is, is there a function module to derive/update the profit segment so all the details get updated in the user exit used to update the profit center?Hi Deepika,
Did you find any way to update the discount pricing in camapign.
Thanks,
Satya -
Any bapi for update MCJ4 report(SAP performance reports)
Hi,
Any bapi for update MCJ4 report(SAP performance reports)
or
how to update MCJ4 report from my webdynpro application.
Regards,
Deepak SinghHi,
Have you gone through this ,We already have the discussion on this .
[http://forums.sdn.sap.com/thread.jspa?threadID=1162642]
BTW , As you say, you are going to create the Milsetsone what is your reference is it WBS element and project definition or network , How are you planning to bring the reference data from the legacy system [ As example the WBS element against which the Milestone s are craeted] into SAP . Becuase as far as i know milestones area attached with project definition and then further down to WBS element so you need to bring the Project definition + WBS element to change create the milsetone .
Thanks,
Anjaneya . -
Bapi for Updating the confirmation table(EKES)
Hi,
Could anyone let me know the BAPI to update the Vendor confirmation table EKES. And also the parameters to be passed to it.
Thanks.Suman:
After your call to FM ME_UPDATE_DOCUMENT is successful, please perform a explicit COMMIT.
Umair:
Use the FM ME_CONFIRMATION_UPDATE to update EKES table.
CALL FUNCTION 'ME_CONFIRMATION_UPDATE'
EXPORTING
i_ebeln = ekko-ebeln
TABLES
xekes = xekes
yekes = yekes.
"yekes contains the EKES table in DB
"xekes contains the changed values for EKES table
Hope this helps. Reward points if helpful.
Thanks
Balaji
Edited by: Balaji Ganapathiraman on Mar 20, 2008 1:10 PM -
Bapi for updation of table VBRP
Hi,
I have to Update the Field 'KONDM' in the table VBRP. Is there some BAPI available for updating VBRP or we can have to go with the direct Update to the table. I have to Update this field by a stand alone report program.
Thanks and regards,
Pankaj Bist.Might be use this Function module
CALL FUNCTION 'RV_INVOICE_ITEM_MAINTAIN'
EXPORTING
VBRP_I = VBRP
IMPORTING
VBRP_E = VBRP
TABLES
XKOMFK = XKOMFK
XTHEAD = XTHEAD
XVBFS = XVBFS
XVBSS = XVBSS
XVBRK = XVBRK
XVBRP = XVBRP
XVBPA = XVBPA
XKOMV = XKOMV.
Matintain the value in the VBRP table & pass rest as is... u get the value using the FM RV_INVOICE_DOCUMENT_READ -
Sales Order account assignment profit center change - Table?
Hello,
I am working on a project where it is necessary to convert the profit center on any open sales orders. There are a huge number of line items to change(contracts mostly ), and the BDC process we have is taking too long (around 24 hours) for comfort, so I've been asked to develop a contingency solution utilizing direct table updates. For the sales orders themselves, I am updating field PRCTR in table VBAP. However, in the sales order item detail, on the tab for account assignment there is an input area for profitability segment (we are using CO-PA). There is a field there, profit center, and I need to update that field as well. Does anyone know what table this data item lives on?
Your help is very much appreciated!
Thanks,
GregHi,
You should <b><u> NEVER EVER </b></u> update the tables directly. This will lead to the inconsistency of the database and the integrity of the same is lost.
In your case If BDC is not a option take a look at this BAPI for changing the sales order - BAPI_PO_CHANGE.
You can find the sample code here for the same.
http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
Regards,
Ravi
Note :Please mark the helpful answers and close the thread if this resolves the issue. -
Valuation field not updated in Profit Center view
Good morning Gurus,
I am facing a big problem in KE24 report. As I've checked here, one of my valuation fields related to Raw Materials (VVM01) is only being updated in Legal View from CO. Even I check it in CE1SA01 table (my table for CO documents), the value is not updated there for Profit Center view. I've check all exits that we have here, but the problem is not there. Derivation rules for the field are not customized, so I don't know where is the problem.
Anyone have already faced this problem? Could you please help me? Points will be awarded.
Many thanks in advance,
Diogo Patriota.Issue has been resolved.1
Issue has been resolved -
Restricting Creation/Update of Profit Center Master Data through KE51/KE52
Hi,
I have a scenario where profit center master data is maintained in MDM which acts as central repository and the master data is syndicated from MDM to ECC through PRCMAS IDoc. Business requirement is that since MDM is acting as central repository creation/update for profit center through transactions KE51/KE52 should be restricted in ECC. I know that through roles we can restrict user to create profit centers but is there any way/configuration steps which we can perform to restrict user to create profit centers through transaction and I also want to know if that process would affect the creation/updation of master data through PRCMAS IDoc.
Thanks,
AmitHi,
As I told you can go forward using SetID but for that you have to create the SET than assign it to a table and also have to cutomize a standard FM.
Meanwhile I will tell you a easy way you can opt for Transaction Variant usinh SHD0 where dont give the option to save so that no user can create any Profit Centre and than assign that Tcode to the users.
Its a simple way hope it helps you.
Thanks
Arbind -
Asset acquisition value is not updated in Profit center as well as segment
Dear All,
I procured an asset through MM, (MIGO and MIRO). the acquisition value is updated in the asset master as well as GL account. but no value is updated in the profit center and related segment.
I did the following (using ECC 6, document spiltting activated)
1. Asset master data created and cost center assigned. Profit center is assigned in the Cost center and Segment is assigned in the profit center master data.
1. me21n - po created
2. MIGO - done
3. MIRO - done.
Can any one help me to solve this issue
Looking forward your valuable reply
Thanks in advance
regards
GovanHi
Please check whether cost center is suppressed field for the respective GL Account. Also it seems that you have not made profit cneter as mandatory field. Goto IMG> Financial Accounting (New) > General Ledger Accounting (New) > Business Transactions > Document Splitting > Define Document Splitting Characteristics for General Ledger Accounting . Here you can make the mandatory field as per requirement.
Warm Regards
Maybe you are looking for
-
How can I transfer some photos from PE11 to be saved on my new IPad?
How can I transfer some photos from PE11 to be saved on my new IPad? I know I can use Adobe Revel but that relies on an Internet connection. The person I wish to show the photos do not have internet connection.
-
How do I delete email hyperlinks in a Numbers Table doc??
I'm using Numbers' Tables for a membership list and would like to have the email hyperlinks removed from this doc. When I highlight and rt. click, the menu gives me the options to follow or copy the link but not delete it. =\
-
Attach Style Sheet not doing anything in CC
I switched from DW CS6 to CC and found what appears to be a bug: Start a new HTML document or open an existing one. Click Class and select Attach Style Sheet.. from the Properties tab and nothing happens. Has anyone else encountered this?
-
How to synchronize the system time/date of a PXI controller with a GPS or time server?
Using a PXI system with a NI-PXI 8196 controller and LabVIEW RTOS, I am searching for a solution to set or reset the on board timeclock of the controller trough a external signal like a GPS or a time server (ntp). Do an easy way exist to do this? An
-
Unanswered Questions a request and a suggestion
I, like others, have an inaccessible unanswered question. It has been deleted but still shows up as unanswered and there is no way for me to mark it as answered. I would appreciate it if the mods would mark it answered. I would like to suggest that w