Updating amount in VK12
Hi Guys,
I am trying to update 'amount' against a specific material in VK12.
I am using BAPI : BAPI_PRICES_CONDITIONS
I am not able to update it successfully and getting stuck at the following points :-
Amount field in VK12 is KBETR. In the above mentioned BAPI i am not able to find where i should pass value of 'amount' so as to update KBETR in VK12.
For changing/updating do i need to pass value of BAPICONDHD-OPERATION = 004 (Change: Message contains changes) and BAPICONDIT-OPERATION = 004 or some thing else?
***Since there are a number of optionals parameters to be passed, is there any special one to be kept in mind without which the BAPI won't work properly? If not, what all parameters are required ?
Kindly help me out ASAP
Best Regards.
hi ,
This functionality already exists in VK12. After you pull up all the records please use the little calculator button at the bottom of the screen . When you click that you can change all the records using a set % or an absolute amount.
-Thanks
Saurabh Goel
Similar Messages
-
Problem in CRM_ORDER_MAINTAIN for updating amount in line items
Hi abapers,
I have a scenario as follows: i want to update amount for line items in a transaction. i use the bapi crm_order_maintain followed by CRM_ORDER_SAVE and bapi transaction _commit . The problem is i loop the itab by passing the trnstn id , prdct code and new amount.
i applied the logic as given by rita tan (thread no 4)
link:[Re: Update Pricing Document with CRM_ORDER_MAINTAIN]
as per the logic i delete the existing value and insert the new amount . this works fine in the first loop and in second loop it deletes the existing record but does not insert the new value . It doesn't even give error too. what may be the problem.
here's a snapshot of the code i have written:
loop at itab.
SELECT SINGLE * FROM CRMD_ORDERADM_H
WHERE OBJECT_ID = WA_ZCMR_UPDATE-Z_OBJECTID
AND PROCESS_TYPE = P_TYPE.
SELECT SINGLE * FROM CRMD_ORDERADM_I
WHERE HEADER = CRMD_ORDERADM_H-GUID
AND ORDERED_PROD = WA_ZCMR_UPDATE-PRODUCT_CODE.
SELECT SINGLE * FROM CRMD_LINK
WHERE GUID_HI = CRMD_ORDERADM_H-GUID
AND OBJTYPE_SET = '18'.
SELECT * FROM PRCD_COND
INTO CORRESPONDING FIELDS OF TABLE IT_PRCD_COND
WHERE KNUMV = CRMD_LINK-GUID_SET
AND KPOSN = CRMD_ORDERADM_I-GUID
AND KSCHL = 'ZR12'.
READ TABLE IT_PRCD_COND
INTO WA_PRCD_COND INDEX 1.
DELETE FROM PRCD_COND
WHERE KNUMV = WA_PRCD_COND-KNUMV
AND KPOSN = WA_PRCD_COND-KPOSN
AND KSCHL = 'ZR12'.
COMMIT WORK.
WA_PRIDOC-REF_HANDLE = '0000000001'.
WA_PRIDOC-REF_GUID = CRMD_ORDERADM_I-GUID.
WA_PRIDOC-REF_KIND = 'B' .
WA_COND_ADD-KSCHL = 'ZR12'.
WA_COND_ADD-KBETR = WA_ZCMR_UPDATE-NET_VALUE.
WA_COND_ADD-KPEIN = '1'.
WA_COND_ADD-WAERS = 'INR'.
INSERT WA_COND_ADD INTO TABLE IT_COND_ADD.
CLEAR WA_COND_ADD.
WA_PRIDOC-COND_ADD = IT_COND_ADD.
CLEAR IT_COND_ADD[].
INSERT WA_PRIDOC INTO TABLE IT_PRIDOC .
CLEAR WA_PRIDOC .
WA_CT_INPUT_FIELDS1-REF_HANDLE = '0000000001'.
WA_CT_INPUT_FIELDS1-REF_GUID = CRMD_ORDERADM_I-GUID.
WA_CT_INPUT_FIELDS1-REF_KIND = 'B' .
WA_CT_INPUT_FIELDS1-OBJECTNAME = 'PRIDOC'.
INSERT WA_CT_INPUT_FIELDS1 INTO TABLE IT_CT_INPUT_FIELDS1.
CLEAR WA_CT_INPUT_FIELDS1.
AT END OF Z_OBJECTID.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
IT_PRIDOC = IT_PRIDOC
CHANGING
CT_INPUT_FIELDS = IT_CT_INPUT_FIELDS1
EXCEPTIONS
ERROR_OCCURRED = 1
DOCUMENT_LOCKED = 2
NO_CHANGE_ALLOWED = 3
NO_AUTHORITY = 4
OTHERS = 5.
CALL FUNCTION 'CRM_ORDER_SAVE'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
endat.
endloop.
Please help out.
Regards,
Navin
Edited by: navin.c on Jan 7, 2010 10:09 AMCheck the link below. This should help
Re: Change Order Quantity in CRM Sales Order -
Function module for updating amount in VL02N transaction
Hi All,
I have a requirement , to update Amount in Conditions tab of the header (VL02N transaction) beside parcel tracking .
I have to update condition type 'ZF01' & the amount here ..
I will get file from a third party system to update the amount & tracking no..
i have successfully updated tracking no.. by using FM XSI_TRACKING_DATA_SAVE.., unable to find FM for amount & condition type update..
I have tried searching in FM 'WS_DELIVERY_UPDATE', didnt find anything related.
If anyone has done any similar update in VL02N transaction, can you please suggest me appropriate FM?
Regards
Chaithanyafm SPELL_AMOUNT
-
Update amount when quantity has changed in MIRO
For INVOICE in MIRO tansaction, i supply PO number in PO reference..
When i change the quantity in item level for PO , Amount corrresponding should get updated before saving .
Amount = quantity * Price.
I have gone through uer exits and BADIS
Kindly suggest proper user exit or BADI implementation or Method.Hi,
I checked further this is what I found :
According to SAP Note 1156325 - BAdIs in the Logistics Invoice Verification environment:
Definition name: INVOICE_UPDATE
Usage
The BAdI 'INVOICE_UPDATE' was only designed to execute checks during
document entry or document posting in transaction MIRO.
According to SAP Note 392342 - MIRO: No data change through Bussiness Add In
Symptom
In the logistics invoice verification MIRO, you cannot change data using
Business Add In 'INVOICE_UPDATE'.
Additional key words
BAdI, SE18, MRM_BADI_INVOICE_CHECK,
Cause and prerequisites
This system behavior is correct.
BAdI 'INVOICE_UPDATE' was only designed to execute checks during the
document entry or document posting in Transaction MIRO. Therefore, it has
only import parameters. There are no export parameters. This means that the
data changed in the BAdI is not processed further in standard program MIRO.
So When you are using transaction MIRO 'SIMULATE' it goes the break-point .The badi is called in FM 'MRM_BADI_INVOICE_CHECK'
THanks and Regards,
P.Bharadwaj -
Updating Amount in DFKKCOHI through FPCOPARA
Hello Experts,
I understand that when transaction FPCOPARA is run for a correspondence (say account statement priniting), it updates the amount field
DFKKCOHI-SALBE. I observed that this amount is pulled from open account balance through standard FM FKK_ACCOUNT_BALANCE_COMPUTE.
Having said that, do we have an option while running FPCOPARA that will allow us to update a separately calculated amount in DFKKCOHI-SABLE rather than the amount calculated through FKK_ACCOUNT_BALANCE_COMPUTE?
The objective here is, I want to filter out some amount which standard system has calculated and update the filtered amount in DFKKCOHI-SALBE.
Is there any event/exit which allows us to do that?
Thanks,
DhirajOk. Have got answer to this. This can be achieved in event 702 by replacing standard FMs within it by Z-Function modules and changing the amount within that.
-
MIRO, automatic update Amount when quantity was changed
Deal all,
How to make automatic update in line item MIRO, when i change the Quantity then the Amount must update by automaticly, in current system i always change by manualy
thanks
imronDear Krishna
I know that the price may change and hence the amount field is kept open for changes, but i want the amount can update automaticlly when i change qty because when we create invoice (MIRO) the quantity not always same with total PO qty (partial invoice), maybe you can look this my illustration :
1 . PO number = 4500000001
Qty = 5
Price = 10
Net Price = 50
2. GR number = 5000000001
Qty = 2
Amount in local currency = 20
3. GR number = 5000000002
Qty = 3
Amount in local currency = 30
4. create Invoice (MIRO)
Qty =5 -->this default by system, (now we want to change to 2, for invoicing PO number one)
Amount = 50 --> this default by system (we want this amount automatclly to become 20)
5. create second invoice
Regrads
imron
Edited by: Muhammad Nur Imron on Jan 24, 2008 3:17 AM -
How update amount of charge line for a sales order line id
I have a modifier which are qualified for a order line id, i want to update the amount of charges if the Shipping date is > 1 day than resquest date, as I do not have the advances pricing module so i have to do a customization for this condicion.
I want to now how to update these, Does exist a API in order to do that ? or Can i go directly to oe_price_adjustments table and modify the data ??
Thanks
FernandoHi Fernando,
I'd probably do this in Adv. Pricing using a dynamic formula + factor list (two diff charge levels dependent on schedule ship date minus request date) against a booking event modifier. Obviously, you don't have dynamic formulas in Basic Pricing but could you handle this via creating a new pricing attribute? The charge levels could be maintained on a lookup rather than hardcoded and used in the calculation by your new pricing attribute.
Whatever approach you go for would also need to cope with the scenarios that you either rescheduled the order or manually amended the request date because obviously the gap between request date and SSD would change.
Your first suggestion is feasible, the second not a good move - I'm not sure how much it costs to licence Adv. Pricing but you could always offset the cost against the cost of developing and maintaining a custom update routine.
Regards,
Jon -
BADI used for updation of Amount fields for transaction CL24N
Hi All,
Badi's used for the transaction CL24N . Since need to update amount field ZPO_AMOUNT , ZPO_AMOUNT_GBP in the trsaction for a particular Realease strategy
Thanks,
Narasimha.Hi,
There are 4 User-Exits and 2 Badis present for that transaction. Check whether it is useful.
Enhancement/ Business Add-in Description
Enhancement
CLCLRS01 Additional Fields on the Result Screen
CLCLRS02 Fill the Additional Fields on the Result Screen
CLFM0003 Call Up After Check of Assigned Characteristic Values
CLMMD001 Selection of Objects for Mass Processing
Business Add-in
CACL_CHARACTER_INPUT Value Assgmt Screen: Set Ready-For-Input Status for Chars
CACL_VALUE_CHANGE Change/Check User Input Before Syntax Check
Hope this will help.
Regards,
Swarna Munukoti. -
Difference between local amount and document amount in the same currency
Dear All,
Why different between local amount and document amount with the same currency in some FI document line items? Both currency is 'TWD' and update currecy(BSEG-PSWSL) is 'USD'.
What is the purpose of update currency(BSEG-PSWSL) and update amount(BSEG-PSWBT) ?
Does update curreny cause the difference mentioned above?
Thanks all in advance.
Best regards,
SAP userDear Sir,
Thanks for your kindly response!
These fields of the FI document header are following:
Local currency 1(BKPF-HWAER) : TWD
Local currency 2(BKPF-HWAE2) : null
Local currency 3(BKPF-HWAE3) : null
Document currency (BKPF-WAERS) : TWD
Transcation currency means which field ?
Transaction code (BKPF-TCODE) : FB1S
The line items as following :
Itm PK Account Account short text Amount
1 40 21302500 A/E-Maintenance 1,119,350
2 50 21302500 A/E-Maintenance 1,119,350-
Amount in document currency is 1,119,350(TWD) but amount in local currency is 1,087,998(TWD).
The line item's additional data :
Amount for Updating in General Ledger : 33,894.02(USD)
Thanks a lot !!
Best regards,
SAP user -
Close Open Amount on A/P Down Payment Invoice
Hi,
I have the following scenario:
I have created an A/P down payment invoice for 1000$
Create an Outgoing Payment for this A/P Down Payment Invoice for 1000$
This payment is closing the A/P Down Payment invoice
Create an A/P Invoice for 800$ - apply this amount from the A/P Down Payment invoice (updating Amount to draw to 800$). The A/P invoice will close.
The issue is how to get the money back from the supplier closing also the open amount of 200$ from the AP Down Payment Invoice.
I have tried to apply an A/P credit memo to the A/P Down Payment Invoice but the system does not display the open amount from Down Payment invoice.
Another way I have tried to create a manual A/P Credit Memo to BP and manually closing the open amount on A/P Down Payment Invoice but the system would not allowed me to cancel or remove the open amount on the Down payment.
Do you have any other ideas?
I am working with SAP B1 2007 PL42.
Thank you,
AlexHi Alex
please create a message for SAP Business One Support with high priority and all the details.
regards
Rui Pereira
SAP Business One Forums Team -
Error in MIRO for amount split
Hi All,
When I try to post invoice in MIRO with amount split I am getting error: Account assignment not completed for all required fields (PayT) Message no. F5A034. And in payment tab payment terms fields are missing. I have ticked 'Enable amount split' in OBY6. and have updated amount split tab.
Pleas tell me where the problem is.
Thanks,
PushkarHi All,
Thank you for support. But my problem is not getting solved. Situation is as below
Entry is generated
GR/IR Dr. 100
Tax Dr. 25.50
Vendor Cr. 101.25 (90% split on total amount)
Vendor Cr. 11.25 (10% split on total amount)
Items are split based on installment payment term correctly. however since tax need to be paid immediately it should split like this:
GR/IR Dr. 100
Tax Dr. 25.50
Vendor Cr. 115.50 (90% split of 100 GR/IR value + 25.5 of tax )
Vendor Cr. 10 (10% split)
Then in OBY6 I enabled amount split. When I try to post invoice in MIRO with amount split I am getting error: Account assignment not completed for all required fields (PayT) Message no. F5A034. And in payment tab payment terms fields are missing. I have ticked 'Enable amount split' in OBY6. and have updated amount split tab.
How to do this in system?
Thanks,
Pushkar
Edited by: Pushkar Marathe on Sep 3, 2011 7:23 AM -
We recently updated our Extended WH Tax config to report from Vendor Payments rather than cleared invoices and to report on GRoss Amounts rather than Net. However, when I run the standard 1099 report (S_P00_07000134) all documents (invoices / payments) prior to the config change show a WH Tax Base amount (1099 reported amount) NET of sales tax while the post update amounts show correctly at Gross. I've run the ZRFWT0020 but still no luck. Would really appreciate any insight / suggestions?
ThanksHi
I have already done that in VKOA, accounting document showing tax code, tax amount, GL account except Base amount.
Best Regards
Swami -
Amount split in MIRO without tax amount
Hi All,
I had posted this in different thread and felt its better to open separate thread instead.
I am facing a problem to use amount split on net amount instead on gross amount so that taxes can be paid in first installment.
Situation is as below
Entry is generated
GR/IR Dr. 100
Tax Dr. 25.50
Vendor Cr. 101.25 (90% split on total amount)
Vendor Cr. 11.25 (10% split on total amount)
Items are split based on installment payment term correctly. however since tax need to be paid immediately it should split like this:
GR/IR Dr. 100
Tax Dr. 25.50
Vendor Cr. 115.50 (90% split of 100 GR/IR value + 25.5 of tax )
Vendor Cr. 10 (10% split)
Then in OBY6 I enabled amount split. When I try to post invoice in MIRO with amount split I am getting error: Account assignment not completed for all required fields (PayT) Message no. F5A034. And in payment tab payment terms fields are hidden. I have ticked 'Enable amount split' in OBY6. and have updated amount split tab.
Please let me know where the error is?
Thanks,
PushkarThe problem was in posting key I had maintained payment term as required entry. I changed that into optional and it is working now.
Edited by: Pushkar Marathe on Sep 8, 2011 6:23 AM -
How to select a row for update values, Using CTEs or suitable method
HI All,
I have a table as claim_data as below.
claim_id
amount change_monthkey
created_monthkey
ord
54511
300 201304
201304
1
54511
0 201305
201304
2
120301
250 201502
201502
1
120624
150 201502
201502
1
120624
0 201503
201502
2
I want to isolate rows which appear in the table and do a update using below query ( This query is already in a procedure, so I just looking for a suitable way to modify it to support my task )
In the above e.g. ONLY row containing claim_id = 120301 needs to update (amount as updated_amount)
I use following query, but it update other rows as well, I want a suitable query only to capture rows of nature claim_id = 120301 and do this update? Is there any functions that I could use to facilitate my task??
select
a.claim_id
, a.Created_MonthKey
, a.Change_MonthKey
, a.amount - ISNULL(b.amount,0.00) as amount_movement
,a.amount as updated_amount --- >> I need help here??
FROM claim_data a
LEFT JOIN claim_data b
ON a.claim_id = b.claim_id
AND b.Ord = a.Ord - 1
Thanks
MiraPlease follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your datC1. You should follow ISO-11179 rules for naming data elements. You do not know this IT standard.
You should follow ISO-8601 rules for displaying temporal datC1. We need to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL.
And you need to read and download the PDF for:
https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
>> I have a table AS claim_data AS below. <<
Thanks to your lack of netiquette, we have no name, no DDL, no keys and have to re-type the raw data into SQL, guess at everything! Does your boss treat you with the same contempt?
Think about how silly “_data” is AS an attribute property! What tables do you have without an data in them? You had to give this meta-data in 1970's operating systems, FORTRAN compilers, etc. but we do not do this today. I see you use “A”, “B”, etc for table
aliases This is the name of the disk or tape drive in a 1970 computer! In SQL we use helpful, meaningful table aliases so code is easier to maintain. I see you also use the old punch card trick of putting a comma at the front of each line of code.
The column named “ord” is a mathematical fiction for ordinal sets. I think you meant to use it as a non-relational sequential number to let you keep writing 1970's COBOL is T-SQL. We have not used the old Sybase ISNULL() since we got COALESCE() in SQL-92. They
are actually different.
First, let's post what you should have posted if you followed forum rules:
CREATE TABLE Claims
(claim_id CHAR(5) NOT NULL,
claim_amount DECIMAL (8,2) NOT NULL
CHECK (claim_amount >= 0.00),
change_month_name CHAR(10) NOT NULL
REFERENCES Month_Period(month_name),
creation_month_name CHAR(10) NOT NULL
REFERENCES Month_Period(month_name),
ord INTEGER NOT NULL, -- NO!! Awful design!
PRIMARY KEY (claim_id, ord)); --required by definition
Since SQL is a database language, we prefer to do look ups and not calculations. They can be optimized while temporal math messes up optimization. A useful idiom is a report period calendar that everyone uses so there is no way to get disagreements in the DML.
The report period table gives a name to a range of dates that is common to the entire enterprise.
CREATE TABLE Month_Periods
(month_name CHAR(10) NOT NULL PRIMARY KEY
CHECK (month_name LIKE '[12][0-9][0-9][0-9]-[01][0-9]-00'),
month_start_date DATE NOT NULL,
month_end_date DATE NOT NULL,
CONSTRAINT date_ordering
CHECK (month_start_date <= month_end_date),
etc);
These report periods can overlap or have gaps. I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the ISO-8601
data format required by Standard SQL and it is language independent. It has been proposed for the Standard, but is not yet part of it. The regular expression pattern for validation is simple.
INSERT INTO Claims -- a mess!
VALUES
('054511', 300.00, '2013-04-00', '2013-04-00', 1)
('054511', 0.00, '2013-05-00', '2013-04-00', 2),
('120301', 250.00, '2015-02-00', '2015-02-00', 1),
('120624', 150.00, '2015-02-00', '2015-02-00', 1),
('120624', 0.00, '2015-03-00', '2015-02-00', 2);
Now, throw this mess out. It looks like your repeat the claim creation date over and over and over. It looks like you crammed a claim creation and a claim history together in one table.
>> I want to isolate rows which appear in the table and do a update using below query (This query is already in a procedure, so I just looking for a suitable way to modify it to support my task).
In the above e.g. ONLY row containing claim_id = '120301' needs to update (amount AS updated_amount)
>> I use following query, but it update other rows as well, I want a suitable query only to capture rows of nature claim_id = '120301' and do this update? <<
No. SQL is set oriented so an update applies to the whole table. You can filter out rows in a WHERE clause.
CREATE TABLE Claims
(claim_id CHAR(5) NOT NULL PRIMARY KEY,
claim_amount DECIMAL (8,2) NOT NULL
CHECK (claim_amount >= 0.00),
claim_creation_month_name CHAR(10) NOT NULL
REFERENCES Month_Period(month_name));
See how this works?
INSERT INTO Claims -- a mess!
VALUES
('054511', 300.00, '2013-04-00'),
('120301', 250.00, '2015-02-00'),
('120624', 150.00, '2015-02-00');
Normalize the table:
CREATE TABLE Claim_Changes
(claim_id CHAR(5) NOT NULL
REFERENCES Claims(claim_id)
ON DELETE CASCADE,
change_month_name CHAR(10) NOT NULL
REFERENCES Month_Period(month_name),
PRIMARY KEY (claim_id, change_month_name),
change_amount DECIMAL (8,2) NOT NULL
CHECK (change_amount >= 0.00)
INSERT INTO Claims_Changes
VALUES
('054511', 0.00, '2013-05-00'),
('120624', 0.00, '2015-03-00');
Now you just add another change row to the history. There is no update. If you want to the delta and so forth, use LAG() and other window functions.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
How To Add Freight Amount in Invoice Before the Invoice is Posted Through SDK
Dear All,
I have a requirement in SAP B1 9.0 where the user want to add the freight amount in the freight window based on an udf value automatically .
So if there is an possibility of adding the freight amount based on an udf calculated value though SDK before the Invoice get added in the Database.
Please suggest if this is possible through SDK or any work around for this scenario in SAP.
Thanks & Regards,
AmitHi Amit,
Here is a way to do it via UIAPI:
Setting a Freight by the UI API ?
If you need to do it via DIAPI, have a look here:
How to update amount in freight column(INV3) of A|RInvoice through SDK
DI Copy AP(AP Invoice) from PO(Purchase Order)
Populating Freight Charges on Sales Order
Freight in A/R Invoice
Hope it helps.
Thanks & Regards
Ankit Chauhan
Maybe you are looking for
-
Anyone know how to make an "Index Transparent" gif
I have successfully made transparent PNGs and GIFusing an Alpha transparency but now I need to make images which would be the same as ueing fireworks / Photoshop to make a colour transparent. i.e. indexed transparency. Does anyone know how to do this
-
Balance Carry Forward & Break Down Category
Dear collegues, When we run Balance Carry Forward task system uses movement type default value (defined in WORKBENCH > MASTER DATA > SUBASSIGNMENTS > DEFAULT VALUES) in items to which the movement type is required in accordance with the Breakdown Cat
-
How to move ringtones to new phone?
I recently got an iPhone 5S, but did not move my ringtones at the time of purchase. I still have them on my Windows laptop, but cannot figure out a way to get them on the new phone. I pushed them up to the iCloud, I added them to iTunes (on my laptop
-
Does iPod Nano has a dock connection? I am still using iPod mini, wish I can use all my other accessories. Thanks Alex
-
The most recent patch to Sun ONE Studio 7 C++, 111715-08, changed the standard string class. The diff between the previous <string> header and the new one is: 32a33,34 #pragma disable_warn 798c800 < static const __null_ref_type __nullref; static __SU