MM Princing Update User Exit
Hello Friends,
I am in need of a great help from you all in the pricing conditions. The user wants the below requirement
the PO has 2 items ..for eg
000010 Material1 10car 10 SGD
000020 Material2 10 car 5 SGD
Now the user wants 3 SGD to be distributed to the 2 items.
User dont want to create any new conditions but to add the value in the net value.
User dont want to create header conditions also. How to do this without creating new conditions
The end result should be
000010 Material1 10car 10 SGD + 2 SGD
000020 Material2 10 car 5 SGD + 1 SGD
The 3 dollar would be hard coded in any available User Exit.
Can anyone of you explain how this can be achieved and which Include to be used for this purpose.
I have a rough Idea MM06E005 can be used but how to update the net value with the extra 3 SGD value.
Thanks in advance for all Gurus
Regards
Raj
Hi,
One suggestion. Define your condition in M/06 as a group condition and define your own VOFM subroutine where you define de basis of condition.
Note 166952 - Rounding when distributing header conditions will help you to understand better and avoid problems of rounding.
I hope this help you.
Regards
Similar Messages
-
User Exit for Updating Delivery Plant at Item Level in Sales Order
Hello Experts
There is a requirement to determine the delivery plant for each item level and than update the items with newly determined plant. There is a user exit MV45AFZZ routine FORM USEREXIT_MOVE_FIELD_TO_VBAP. to update the item level entries in Sales Order in VA01 or VA02. Is this the right place to do this?, if yes , do i need to perform any other standard logic (like re determine Shipping points , schedule lines ) for newly determined plant? If not , can you please suggest any other place , BADI or user exit to change the delivery plant of sales order.
Thanks a lot....
-HarkamalBest place is MV45AFZZ-USEREXIT_SAVE_DOCUMENT_PREPARE. Populates the values just before saving the document. You can have your own deriving logic. Make sure that peice of code is trigger only for Sales Order create or change (VA01/VA02).
Are you kidding??? You do realize that this is AFTER all validations against configuration, ATP, pricing, etc. have been performed??!!! Never, ever change a critical value like plant in the SAVE user exits... -
How do I SUBMIT from a user exit which is called in an update task?
I want to send an idoc each time there is a goods movement. So, in the user exit of MB_POST_DOCUMENT I am calling IDOC_OUTBOUND_WRITE_TO_DB. This creates an idoc of status 30. However, in order to send the idoc I want to SUBMIT RSEOUT00. I get an ABAP dump on the SUBMIT because MB_POST_DOCUMENT is called in the update task, where SUBMIT is not allowed. Do you know any other way I can execute RSEOUT00 at this moment without having to call it later in batch?
Thanks!!
JoyHi Naren,
Your reply is VERY helpful!! Thank you so much.
I added CALL FUNCTION 'RSAP_IDOC_EINBUCHEN_VOM_BIW_4' IN BACKGROUND TASK. I am no longer getting the dump, but my idoc is still a status 03 and not a status 30. Should I expect to see it turn to a status 30? I ran this function directly in SE37 -> Test with the same parameters and it ran perfectly and turned the idoc to a status 03. Is there anything else I need to do in the code?
Thanks again,
Joy -
User Exit to update user status at VA01/VA02
Hi Expert
Please help identify any User Exit to update User Status stored in tables (JSTO/JEST), at time of sales order (Business Object 2032) creation / change.
Requirement is to set check mark on a specific user status in case of a material master is missing HTS code.
Regards-AamirHi,
If your requirement is to set the check the HTS field in the material master, you can make the field as Mandatory without which the Material cant be saved
You can make this field mandatory in OMS9 transaction code with field status as 89 and the field is MARC-STAWN
Please revert if you need more details
regards,
santosh -
Updating custom field in table EKKO within user exit when PO is saved
I am trying to update a custom field in table EKKO when a PO is saved. I am using FM EXIT_SAPMM06E_013, within enhancement MM06E005. Since EKKO is not a table that can be updated with this user exit, I am using a technic that I read about on SDN where I assign a field symbol to the calling program variable and then am able to access data within EKKO table. But when I pass this data back into the field symbol, for some reason this field is not getting saved when the PO is saved. In debug mode, it looks like this field is getting updated, but when I look in the table after the PO is saved, it is not there. My code sample is below. What I am doing wrong?
data:
CHAR(50) VALUE '(SAPLMEPO)EKKO-ZHDRCSTCENTER',
g_zhdrcstcenter like ekko-zhdrcstcenter,
FIELD-SYMBOLS <F1> type any.
if i_ekko-ekorg = '5401'.
ASSIGN (char) to <F1>.
g_zhdrcstcenter = <F1>.
move '0000113322' to g_zhdrcstcenter.
<F1> = g_zhdrcstcenter.
endif.
Thanks!
Sarah Smyth.Firstly, have you investigated using EXIT_SAPMM06E_008 to set any custom fields you have added in the EKKO_CI / CI_EKKODB structure?.. that might work more easily.
In terms of doing an assign back into a calling program's memory, it can work but it's probably worth setting a break point in your code then stepping through watching the values in EKKO - sometimes you can find subsequent code that re-writes an earlier copy of values back into the structure, thereby preventing you doing your change... SAP does warn this method is for "internal use". Also check in your debugger that it's SAPLMEPO and not SAPMM06E you need. -
Ztable not updating in sales order user exit
Hi Genius Abapers.
We want to take text ID data of sales order into Ztable. For taking the data we have used user exit in sales order. Now the problem is if we go through debug mode then the Ztable is updating but if we remove the break point Ztable is not getting updated.
Please give solution for this problem
Regards
NarayanaHi Gurus,
I am basically from SD and we used commit statements in the programme and this is the code we used
Include name --- MV45AF0B_BELEG_INITIALISIEREN
**********************************Code Addd by paresh 8.10.2007 starts *******************************
DATA : BEGIN OF itab_so OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
spras LIKE t002t-spras,
END OF itab_so.
DATA : BEGIN OF itab_so1 OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
spras LIKE t002t-spras,
END OF itab_so1.
DATA : BEGIN OF it_tabid OCCURS 0,
tdid LIKE stxh-tdid,
tdspras like stxh-tdspras,
END OF it_tabid.
DATA : is_stxh TYPE stxh.
DATA g_header TYPE string .
DATA wa_plain_text TYPE zplain_text.
DATA t_lines LIKE tline OCCURS 0 WITH HEADER LINE.
DATA g_item(16)." type i.
data :it_ztable type table of ZPLAIN_TEXT .
data wa_ztable type zplain_text.
data flag.
*****************************Read Header text***************************************
*loop at vbak.
itab_so1-vbeln = vbak-vbeln.
itab_so1-posnr = vbak-posnr.
itab_so1-spras = vbak-wklnd.
APPEND itab_so1.
CLEAR itab_so1.
ENDLOOP.
refresh it_tabid.
clear it_tabid.
refresh it_ztable.
clear it_ztable.
LOOP AT xvbap.
itab_so-vbeln = vbak-vbeln.
itab_so-posnr = xvbap-posnr.
itab_so-spras = xvbap-wklnd.
APPEND itab_so.
CLEAR itab_so.
ENDLOOP.
LOOP AT itab_so.
SELECT tdid tdspras FROM stxh INTO TABLE it_tabid WHERE tdobject = 'VBBK' AND tdname = vbak-vbeln .
ENDLOOP.
*loop at it_ztable into wa_ztable.
LOOP AT itab_so.
LOOP AT it_tabid.
is_stxh-tdobject = 'VBBK'.
is_stxh-tdname = vbak-vbeln.
is_stxh-tdid = it_tabid-tdid.
is_stxh-tdspras = it_tabid-tdspras.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = is_stxh-tdid
language = is_stxh-tdspras
name = is_stxh-tdname
object = is_stxh-tdobject
TABLES
lines = t_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc = 0.
LOOP AT t_lines.
CONCATENATE g_header t_lines-tdline INTO g_header SEPARATED BY space.
ENDLOOP.
wa_plain_text-application = 'SO'.
wa_plain_text-key1 = itab_so-vbeln.
wa_plain_text-key1 = vbak-vbeln.
wa_plain_text-key2 = 'HDR'.
wa_plain_text-sub_application = it_tabid-tdid.
wa_plain_text-text = g_header.
wa_plain_text-last_date = sy-datum.
MODIFY zplain_text FROM wa_plain_text .
wait up to 60 seconds.
commit work.
CLEAR: wa_plain_text.
CLEAR : g_header,t_lines.
refresh t_lines.
ENDIF.
if sy-subrc <> 0.
delete from zplain_text where key1 = vbak-vbeln and
key2 = itab_so-posnr and
SUB_APPLICATION = it_tabid-tdid.
commit work.
endif.
ENDLOOP.
ENDLOOP.
*endloop.
Please do me the needfull
Regards
Manam.Narayana -
User exit to update the incompletion log in sales order for pricing error
Hi experts,
I have to check the some mandotory pricing conditions in sales order, if that conditions are not exist in sales order then i need to show the information message as well as i need to update it in incompletion log of sales order. (incopletion log we can see on menu bar 'EDIT' or ctrl+F8 on main screen of VA01). So that user can save the sales order but it will be in incomplete status.
I have completed it upto showing the information message using user exit 'MV45AFZZ', but after this i don't know how to update it in incompletion log of sales order for pricing. I tried to update in tables VBUK-UVPRS, but i am not getting the desired result.
Please anyone can tell me how to update it. In which user exit i can update the incompletion log.
Thanks and Regards,
Vicky.Hi Vinod,
I am sending you my code please check it,
if TKOMK-SPART = 10.
if XKOMV is not INITIAL.
clear v_JEXP.
READ TABLE XKOMV with key kschl = 'JEXP'.
if sy-subrc = 0.
check XKOMV-kwert = 0.
message i003(ZT) with 'Value should not be 0 for conditioin type JEXP'.
v_JEXP = 'X'.
else.
message i003(ZT) with 'Maintain the mandatory Conditioin type JEXP'.
v_JEXP = 'X'.
endif.
if v_JEXP = 'X'.
XVBUV-MANDT = sy-mandt.
XVBUV-POSNR = '000010'.
XVBUV-TBNAM = 'VBAP'.
XVBUV-FDNAM = 'PRSOK'.
XVBUV-FEHGR = 20.
XVBUV-STATG = '06'.
XVBUV-FCODE = 'PKON'.
XVBUV-SORTF = 9999.
XVBUV-LFDNR = 0000.
XVBUV-UPDKZ = 'I'.
append XVBUV.
endif.
endif.
endif.
Please suggest something to solve this.
Thanks and Regards,
Vicky. -
User exit to update characteristic attributes in sales order
Hi all,
I am having one queer requirement.
We are having variant configuration. We are manufactiuring a material which is having lenght as one of the characteristic.
While creating the sales order the user will enter the value against length. This we have to pull in the inspection lot with range.
For ex. if the length required by customer is 1000 mm then depending upon the tolerance limit say +/-1.5 %, another characteristic should get updated with the allowed range (here in this example the lower range 985 and upper range 1015) against another characteristic.
This characteristis will sever as class characteristic for QM master inspection characteristic.
Here the problem is the functionality can't be mapped with object dependency in satandard SAP (you can't derive range with object dependency), so I am looking for user exit to update the second characteristic depending upon the value of first characteristic and allowed percentage.
The user exit should be effective for sales order creation as well as sales order change.
Please help.Hello Nikhil,
I am looking for the tolerance limit to upadte against one char only and not two separate chars.
If the range is against only one char (and that too again in numeric format and not characteristic format) same shall can be pulled against master inspection characteristic in inspection lot.
Looking forward for the soution.
Mimiri -
Need a badi or user exit to update numbers at level of Goods Receipt level
Hi I need to update serial number based on combination of plant, company code and fiscal year while generating a Goods Receipt by using MIGO transaction code.
Step1) once run the MIGO transaction, here enter values of Purchase Order, Quantity, and delivery note and check the item ok check box for goods receipt.
Step2) Then check for any warnings and errors by clicking the check button/tabular
Step3) Finally post the goods receipt for the purchase order by clicking Post button/tabular.
Result:
Then system will provides the Material of Document number for the goods receipt of purchase order. That number like 5000000342.
Here client wants to put his number like V500000001.for one combination of plant, company code and fiscal year.
Example
Z TABLE AS LIKE BELOW COMBINATION
Plant company code first no end no current no FISCAL YR
7800/7801 2000 V500000001 V599999999
7802/7803 3000 F500000001 F599999999
7804 4000 D500000001 D599999999
Whenever end user generates a GR then System should display one of above number instead of systems generate value.
I have used to fix the issue badi> mb_badi_migo document_badi_update and user exit-> mb_cf001, mbcf0002 but not found the solution.
Please provide me needful information.
Thanks,
RajHi
<b>Here is the sample code...</b>
method if_ex_mb_migo_badi~post_document .
data: ls_migo_badi_example type migo_badi_exampl,
lt_migo_badi_example type table of migo_badi_exampl,
ls_extdata type migo_badi_example_screen_field,
ls_xmseg type mseg.
field-symbols: <gt_extdata> type migo_badi_example_screen_field.
* Transaction MIGO will now post a material document.
* Any errors here MUST be issued as A-message (better: X-message)
* Copy data from material document into internal table
loop at gt_extdata into ls_extdata.
if g_cancel is initial.
read table it_mseg into ls_xmseg
with key line_id = ls_extdata-line_id.
else.
read table it_mseg into ls_xmseg
with key smbln = ls_extdata-mblnr
smblp = ls_extdata-zeile
sjahr = ls_extdata-mjahr.
endif.
if sy-subrc is initial.
move-corresponding ls_extdata to ls_migo_badi_example.
move-corresponding ls_xmseg to ls_migo_badi_example.
append ls_migo_badi_example to lt_migo_badi_example.
endif.
endloop.
* The data from external detail screen can be saved now:
check gt_extdata is not initial.
call function 'MIGO_BADI_EXAMPLE_UPATE_DATA' in update task
tables
it_migo_badi_example = lt_migo_badi_example.
* The data from external header screen can be saved now:
move-corresponding is_mkpf to gs_exdata_header.
call function 'MIGO_BADI_EXAMPLE_UPDATE_HEAD' in update task
exporting
is_migo_badi_header_fields = gs_exdata_header.
endmethod. "IF_EX_MB_MIGO_BADI~POST_DOCUMENT
Hope this will help.
Please reward suitable points.
Regards
- Atul -
User exit/BADI for updating custom table in MB1B transaction-
Dear All,
When performing a material to material conversion in MB1B transaction for batch managed materials,system is creating a new batch by copying the characteristics of issuing material/batch.The details of the new batch created are updated in standard batch tables(MCH1,MCHA,MCHA).
The requirement is when the new batch is created,the batch details and characteristics has to be stamped in a custom table.
Kindly suggest a user exit/BAIi available for updating the same in the custom table.
Regards,
DeepakDeepak, Exits for MB1B are
MBCF0002 Customer function exit: Segment text in material doc. item
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0011 Read from RESB and RKPF for print list in MB26
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc. -
User exit or BAdi for field update in ECC system for SUS supplier
Dear Guru's,
I am configuring MM-SUS scenario in our srm 7.01 scenario. Not all vendors of our client are going to be SUS vendors. For SUS vendors, the client will be using Purchase Order Acknowledgement and Advanced Shipping Notification key. I am thinking of configuring a confirmation control key which will incoporate requirement of PO acknowledgement and Inbound delivery document. The assignment of confirmation control key and PO Acknowledgement Required checkbox in the vendor master record will default it in the purchase order.
Now, the question is how to update the existing vendor master data record which will be SUS vendor. I am looking at a solution like user exit or BAdi which updates the confirmation control key and purchase order acknowledgement required check box when the client manually assigns the class 'Z_CRED_SUSMM' to the ERMS vendor master.
Could you please help me to find the required exit or BAdi?
Thanks and regards,
Ranjan
Ranjan SutradharEXIT_SAPMF02K_001 definitely wont work as this is for custom checks. this does not update data in vendor master.
you can try using below method of VENDOR_ADD_DATA badi.
IF_EX_VENDOR_ADD_DATA~PRESET_VALUES_PORG
but you need to read the screen field for classification and then according to that i think you can change the LFM1 data inside this badi -
User Exit or BADI to update the service order in R/3
Hi,
When creating a service order the following fields need to be populated automatically using an user exit or badi.
1. Planner Group
2. PMActType Plant maintenance activity type
3. Cost/Profit Centre
4. WBS element
5. Work center
so my requirement is there any function module or Badi or user exit to update the service order details when service order is created / changed.
Pls do the needful.
Reg
RamanaHi Ramana,
Go to SPRO Transaction and follow the below path
Customer relationship management>Transactions>Settings for Service Processes>Business Add-Ins and you will find 8 BADI's.
Check these BADI's useful for you.
Regards,
Lijo Joseph -
BADI/User Exit for custom table update from Delivery
Hi
Our requirement is to update a custom table with the delivery number and other related details when the picking status is changed to "C". Kindly suggest BADI/User exit for this requirement .
Thanks in Advance for your immediate help .Hi Joseph,
See SAP Note 415716 - User exits in delivery processing. It says when you have the document number available, what is permitted, what not, ....
I hope this helps you
Regards
Eduardo -
Badi/ User Exit - to update item data on Post GR in MIGO
Guyz,
I have a requirement to update the value in ALAN1 , ALAN2 fields while posting GR in MIGO. And also I need to access the value of realted PO (ebeln) and line item(ebelp) and equipment number(or serial number) EQUNR filed ,while doing the coding for this enhanemnet.
I was looking for Badi or User exit to meet the need. I have found a Badi MB_MIGO_ITEM_BADI, which I have implemented. I have put a break in the method and found that I can access all the value in the above mentioned field (IS_GOITEM, is the sturcture in the Badi signature) but one problem still persists.
I can see only the last line item(ebelp), in IS_GOITEM, where I need to see all the line item, so that I can relate which Equnr is assigned to which Lineitem.
Please tell me if you know any badi or user exit for this purpose.
Regd,
Anid
Points Guranteed
Message was edited by:
AnidHi,
we have checked above BADI;s but will not suffice the requirement;
The requiement is
While Creating PO(ME21N) and Changing PO(ME22N):
When the user tries to Save the PO:
All the line items should be accessible and can be editable.
If the validation fails, error message should be displayed on
the screen and user should be able to edit at that location.
Please let me know if there is any other way or enhancement point for the same...
Regards
Shiva -
User Exit / BADI for F-02 during SAVE to update BSEG Line Items.
Hi Experts,
I need a User Exit / BADI for Transaction code F-02 which triggers during save to update BSEG-SGTXT with Vendor / Customer
name in the Tax Line Item.This is to update table BSEG .
Thanks in Advance,
NithyHi,
Do it with the BTE 00001120 (tcode FIBF).
I hope this helps you
Regards,
Eduardo
PD: I forgot, check this link. It will tell you how to do it
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/207835fb-0a01-0010-34b4-fef1240ba9b7
Edited by: Eduardo Hinojosa on Jul 15, 2009 6:38 PM
Maybe you are looking for
-
.txt files in db folder in Essbase apps
Hello, I am loading the data in to Essbase and I though it would be a good idea to sent the files in the app->appfolder->dbfolder and load it from there. But unfortunately I am not able to see large files of about 52mb in EAS when I am trying to load
-
Display Currency key on the column header
Dear Gurus, Can i display the currency key on the header of the column instead of showing it next to value Thank you BR
-
Where can I download free premiere pro trial version with analyse function
where can I download free premiere pro trial version with analyse function
-
Got my phone from Taiwan, here's my phone details. V2.0628.0.0.1 10-07-2006 RM-133 Nokia N73(90.01) Product Code:0539682 As you can see, I'm still on one of the oldest firmwares out there. When are you guys going to update my firmware? I want new fir
-
I have created a reserved Ip and wanted to create a VM using the reserved IP. I had also created aimage of existing Vm to create the new VM and I have used command on Windows Powershell as mentioned below. New-AzureVMConfig -Name "Amazon-10eBay-1" -