User-exit to update material component in a production order with a batch
I am looking for a solution to update a production order material component with a batch number what is stored in the configuration of a sales order. The production order is defined for salesorder related production. How can I update the field RESBD-CHARG in the production order.
Tried already the exits PPCO0001, PPCO0008, PPCO0021. Also looked for a solutions with batch search stratgegies, but I have no idea kind of possiblities I have here. Other problem is that we are stil on release 4.7.
Hopefully some can help me with a solution.
Regards,
Peter Geurts
Dear
You have to update the batch in a production order component via RFC Call of BAPI_ALM_ORDER_MAINTAIN.You should also pass operation number to T_COMPONENT and T_COMPONENT_UP
T_COMPONENT-ACTIVITY = Operation Number
You need to pass the following tables
IT_METHODS should have 2 values
Refnum - '000002'
Objecttype - 'COMPONENT'
Method - 'CHANGE'
Objectkey - 300054 (Prefix the zero's)
Append IT_METHODS
Method - 'SAVE'
Append IT_METHODS
T_COMPONENT should have the following values
RESERV_NO - Reservation number ( you can see in production order)
RES_ITEM - Reservation item ( you can see in production order)
BATCH - populate the required value
APPEND T_COMPONENT
T_COMPONENT_UP should have the following values
BATCH - 'X'
APPEND T_COMPONENT_UP
Or else look at BAPI 'BAPI_MATERIAL_GETBATCHES'. This might help you.....
CALL FUNCTION 'BAPI_MATERIAL_GETBATCHES'
EXPORTING
material = MATERIAL
BATCHNUMBER =
plant = PLANT
expirydatefrom = DATE
Hope this will be useful
Regards
JH
Edited by: Jiaul Haque on Sep 12, 2010 11:14 PM
Similar Messages
-
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 for CO01/CO02 : How to check production order before saving ?
Hi all,
I try to check production order before saving.
if AFPO-LGORT or RESB-LGORT or some other field is initial, throw an error msg and stop saving process.
I try using badi WORKORDER_UPDATE and user exit PPCO0001 EXIT_SAPLCOBT_001, find out that i can check the data but can't stop the saving process.
Anyone knows some other user exits can do this?
Thanks a lot.Solved.
A wired solution from
http://abaplog.wordpress.com/2007/03/01/reading-other-programs-data-using-field-symbols-in-abap/ -
User Exit for the Settle rule of a Production Order
Hello all
i got a requirement to change the settlement rule of a production order to multiple receivers.
suppose i have the following rule
Categeory | Settlement Reciever | Receiver Short text | % | Settlement Type | No | Source Assignment
MAT ZMDT89 ZMDT88 100 FUL 1 left as blank
now my requirement is that i have to default the source assignment as 200 (Materials) so as to allow the other reciever entered with the same settlement type as FUL and also the No should be 2
i.e. my req is like this
Categeory | Settlement Reciever | Receiver Short text | % | Settlement Type | No | Source Assignment
MAT ZMDT89 ZMDT88 100 FUL 1 200
G/L G/L A/C no G/L shor text 100 FUL 2 100
the bold one is i have to ADD
the T-Code is CO02.
your help is highly appreciated...
thanks in advancehi,
check these exits in co02.
Transaction Code - CO02 Change Production Order
Enhancement/ Business Add-in Description
Enhancement
PPCO0010 Enhancement in make-to-order production - Unit of measure
PPCO0012 Production Order: Display/Change Order Header Data
PPCO0013 Change priorities of selection crit. for batch determination
PPCO0015 Additional check for document links from BOMs
PPCO0016 Additional check for document links from master data
PPCO0017 Additional check for online processing of document links
PPCO0018 Check for changes to production order header
PPCO0019 Checks for changes to order operations
PPCO0021 Release Control for Automatic Batch Determination
PPCO0022 Determination of Production Memo
PPCO0023 Checks Changes to Order Components
STATTEXT Modification exit for formatting status text lines
PPCO0009 Enhancement in goods movements for prod. process order
CCOWB001 Customer exit for modifying menu entries
COIB0001 Customer Exit for As-Built Assignment Tool
COZF0001 Change purchase req. for externally processed operation
COZF0002 Change purchase req. for externally procured component
PPCO0001 Application development: PP orders
PPCO0002 Check exit for setting delete mark / deletion indicator
PPCO0003 Check exit for order changes from sales order
PPCO0004 Sort and processing exit: Mass processing orders
PPCO0005 Storage location/backflushing when order is created
PPCO0006 Enhancement to specify defaults for fields in order header
PPCO0007 Exit when saving production order
PPCO0008 Enhancement in the adding and changing of components
reward points if hlpful. -
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 -
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 -
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 to find which are the user exits that updating z table.
There was a question posted by someone else which said:
I have a z table. my requirement is to find the user exits that update the value to this table?
but my requirement is to get only those user exits that update my z table.
Before that question was rejected, it got 5 replies which made me think that this tip is worth sharing.
So the steps are:
Do a where-used list search from SE11
Click on Search Range button at bottom
Type UPDATE (you can also add Insert, Delete etc to select-option) to ABAP Key Words field
Say No to the popup that asks whether to include Fields of the Table
Result will show relevant programs with code snippets doing static Update on that custom table.EWK1 would be too performance heavy in this case. It scans the source code to get the result.
You can however, download the list of programs given in where-used list, and give that as limiting condition in EWK1 or some other code scanning utility.
Using my method, where-used list of table is taken from database tables, and then code scanning is done only on the that list, not on entire Z* programs.
Try it yourself to notice the speed difference. -
User exit to update extended segment in idoc for va01
Hi Experts,
I am working on Outbound IDOC interface for VA02 and VA01
I am using ORDERS05 IDOC type
i want to create one custom segment
and i want to fill that custom segment
but i am not able to find user exit to update this custom segment
please help.Akshay,
I think you want to send order response for the orders created via Va01 or edited by Va02
To do this steps are:-
1) Use FM IDOC_OUTPUT_ORDRSP to send order response (ORDERS05)
2) Find the function exits in this Fm using search string as " Call Customer-function".
3) Use include in the exits to write code to append new segments to the IDOC. Look for the Tables parameter in the Exits which are of structure type EDIDD. Insert new Segment details in this table and your IDOC will be generated with required values.
Hope this helps!!
Harry -
User exit to update Vendor Confirmation in ME22N
Hi,
I am adding a subscreen at the header level using BADI ME_GUI_PO_CUST and ME_PROCESS_PO_CUST. This new sub screen at the header level will have fields like confirmation category, delivery date..etc., and a push buttom called 'CONFIRM'. When the user selects the line items to be confirmed and clicks the 'CONFIRM' button the data from the customer subscreen should be copied to the item details(in Confirmations tab).
The problem is with the confirmation tab. I need an user exit to update this. When the PO is saved confirmation should be created and EKES table should be updated.
Any useful information will surely be rewarded
Thanks in advance
Antony.Hi
Following enhancements are available....
Transaction Code - ME22N Change Purchase Order
Exit Name Description
AMPL0001 User subscreen for additional data on AMPL
LMEDR001 Enhancements to print program
LMELA002 Adopt batch no. from shipping notification when posting a GR
LMELA010 Inbound shipping notification: Transfer item data from IDOC
LMEQR001 User exit for source determination
LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt
LWSUS001 Customer-Specific Source Determination in Retail
M06B0001 Role determination for purchase requisition release
M06B0002 Changes to comm. structure for purchase requisition release
M06B0003 Number range and document number
M06B0004 Number range and document number
M06B0005 Changes to comm. structure for overall release of requisn.
M06E0004 Changes to communication structure for release purch. doc.
M06E0005 Role determination for release of purchasing documents
ME590001 Grouping of requsitions for PO split in ME59
MEETA001 Define schedule line type (backlog, immed. req., preview)
MEFLD004 Determine earliest delivery date f. check w. GR (only PO)
MELAB001 Gen. forecast delivery schedules: Transfer schedule implem.
MEQUERY1 Enhancement to Document Overview ME21N/ME51N
MEVME001 WE default quantity calc. and over/ underdelivery tolerance
MM06E001 User exits for EDI inbound and outbound purchasing documents
MM06E003 Number range and document number
MM06E004 Control import data screens in purchase order
MM06E005 Customer fields in purchasing document
MM06E007 Change document for requisitions upon conversion into PO
MM06E008 Monitoring of contr. target value in case of release orders
MM06E009 Relevant texts for "Texts exist" indicator
MM06E010 Field selection for vendor address
MM06E011 Activate PReq Block
MMAL0001 ALE source list distribution: Outbound processing
MMAL0002 ALE source list distribution: Inbound processing
MMAL0003 ALE purcasing info record distribution: Outbound processing
MMAL0004 ALE purchasing info record distribution: Inbound processing
MMDA0001 Default delivery addresses
MMFAB001 User exit for generation of release order
MRFLB001 Control Items for Contract Release Order
Hope this helps to solve ur problem....
<b>do reward if useful....</b>
regards
dinesh -
User exit for updating delivery block of Sales order before Delivery
Hi Folks,
Need to have an user exit for updating Delivery Block indicator for a Sales order Before creating its delivery
I have got an exit in Program SAPMV45A
MV50AFZ1
FORM USEREXIT_REFRESH_DOCUMENT.
that hits before processing the delivery block fro delivery (Correct me if i m wrong with this )
Now i want now how to change the Delivery Block indicator of Sales order in that exit
any FM available ?
Thanks n regards
Sonal...Hi ,
How did you solved this issue?
I am having similar scenario in which while pressing the save button delivery block should update if multiple schedule line exist.
Tried by two different approaches in various user exit without any success.
AFAIK we have two ways to achieve this functionality.
1) Count the no of rows in vbep. If greater than 1 then multiple schedule line exist and we can assign the value to VBAK-LIFSK(delivery block) as per our requirement.
This is not correct. If there are two line items both with single schedule line . This case total no lines in vbep will 2 and above condition will true which is incorrect.
2) There is a indicator for multiple schedule line (VBAPD-EPMEH , xvbap-epmeh ) if it is check then multiple schedule line exist and we can assign the value to VBAK-LIFSK(delivery block) as per our requirement.
If I write code in USEREXIT_SAVE_DOCUMENT_PREPARE.
Multiple schedule line indicator is not populate so can not use 2nd approach.
If I write code in USEREXIT_SAVE_DOCUMENT it of no use as vbak is updated before reaching this user exit.
If I write code in USEREXIT_MOVE_FIELD_TO_VBAK as this user exit is also called while pressing the enter key for this I have use
the condition of fcode but it also fails in some condition.
If fcode eq 'SICH'.
Read table xvbap with key epmeh = 'X'.
IF SY-SUBRC = 0.
VBAK-LIFSK = '03'.
Else.
VBAK-LIFSK = ' '.
Endif.
Endif.
Please help me to get the desired functionality working for all cases.
1) One line item with multiple schedule line
2) Two line item with multiple schedule line
3) One line item having one schedule line and second one having multiple
4)Two line item both with single schedule line. -
Re: User Exits on Updating and Integrating
Carl,
I sent this out to the list some time ago. But in case
you missed it here it is again.
Below is a zip file (UUencoded) containing instructions
on integrating Forte with Microsoft SourceSafe. It may
contain enough information for you to figure out how to
tap the repository callouts that happen on integrations.
-Fred
[email protected]
>
I was reading an old Forte v3.0 presentation on whats new in Forte v3.0.
One of the proposed features was a set of primitives for defining user exits
on updates and integrations.
I haven't seen any facility for this in Forte v3.0g though. Has this in fact been
done ? Does anyone have any information on this.
Thanks,
-Carl
Carl Schei
Technical Forte Consultant
South Africa
+27 31 3641765 (w)
email : [email protected]
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>------------------------------------------------------------------------
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
Reuters Ltd.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>Although not a direct answer to your question, this blog series will help you to understand the difference better :
/people/thomas.weiss/blog/2006/01/24/what-the-new-enhancement-framework-is-for-150-its-basic-structure-and-elements-for-beginners
/people/thomas.weiss/blog/2006/03/15/the-new-enhancement-framework-part-2--what-else-you-need-to-know-before-building-an-enhancement
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
/people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework -
User Exits on Updating and Integrating
I was reading an old Forte v3.0 presentation on whats new in Forte v3.0.
One of the proposed features was a set of primitives for defining user exits
on updates and integrations.
I haven't seen any facility for this in Forte v3.0g though. Has this in fact been
done ? Does anyone have any information on this.
Thanks,
-Carl
Carl Schei
Technical Forte Consultant
South Africa
+27 31 3641765 (w)
email : [email protected]
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>You can use the BADI:MB_MIGO_BADI. In this badi you could check the header by using the method status and header.
Hope this solves your problem.
Regards,
Narayani -
User exit for update rule of info structure
Hi gurus,
Can anybody tell me how to implement a user exit of update rule for LIS info structure, for ex,S140.
Thanks
Eric xuThere is no user exit and we are not allowed to modify the update rules of the standard SAP info structures. However, you can create your own info structure with the same or similar configuration and then apply a formula or a requirement in the update definitions (MC25 transaction), as you please.
After that you can just turn off the update of S140 (in OMO1 transaction) and use your own info structure instead in MCSI transaction. -
VA02 user exit - cannot update append structure field in XVBAP/VBAP
Hi Guys,
I am currently using one of the many user exits in updating XVBAP to update the VBAP sap table in VA02.
However I am encountering a problem when updating a customized append structure field. When I change the value of the append structure field only it doesnt update in VBAP upon save event. Only when I also change a sap standard field (ARKTX) the append structure gets updated.
Is there a way to resolve this wherein even if I just XVBAP-<append structure field> only ... the corresponding field in VBAP gets updated?
THanks guys and hope to hear from you soon.Hi,
Which userexit subroutine are you using to move the append structure field values to the XVBAP table? Are you having the user enter values on a screen during VA02 for the append structure fields, or are you setting those values within the code when the user saves? For the purposes of this response, I will assume you are not having the user enter the values, and that (from what you have described) you are using subroutine userexit_move_field_to_vbap.
While userexit_move_field_to_vbap sounds logical at first, you should be aware that this subroutine (which is called at the end of module vbap_fuellen) may only be called when one of the chain fields (in the flow logic of the VA02 screen) is changed. If you search for all the calls of module vbap_fuellen in screens of SAPMV45A, you will see that most of them have a list of chain fields with "on chain-request" logic. Since your append structure fields will not be listed in the flow logic of the standard VA02 screen, changing one of the append structure fields alone would not trigger the PAI module vbap_fuellen. Of course, changing a standard VBAP field (ARKTX was your example) could trigger the vbap_fuellen module (as long as it was one of the chain fields) which would consequently trigger the userexit_move_field_to_vbap subroutine.
You may want to consider trying USEREXIT_SAVE_DOCUMENT_PREPARE. Please explain further if I have misunderstood your question.
Anyone else out there have any ideas? Does my analysis make any sense?
Best Regards,
Jamie
Maybe you are looking for
-
When clicking on a picture or link that will automatically open up a 2nd window to view, the window will open up but it will just appear blank and says Type a Web address in the top bar.
-
Why are my edited pictures from bridge not saving when I automate batch files through PS?
When I edit my photos through adobe bridge (open camera raw, make adjustments to 1 picture), then automate (batch) my file folder in PS, the edits I have made don't save. Example, I crop an image & lighten it, I can view the adjusted image in bridge
-
Why can't I log in to https?
I have had my iPhone for a week or so now... I had been accessing secure websites (and still can, mostly) but one in particular won't let me in... I can enter my user name and password, but the "submit" button is 'grayed out'. I cleared my cookies an
-
IPad2 Safari crashed after iOS 5 update
After upgrading my iPad 2 to iOS 5, my Safari crashed, at first it worked OK, but once I closed all existing tabs, it freezed, then crashed. I clear all the cache, closed the app, and reboot my iPad2 (power + home for 10 seconds), and re-open the Saf
-
Number of connection to this computer limited and all connections are in use right now
I have Lenovo ThinkPad T520 (i7, NVIDIA 4200TM) with dock station and two monitors. Sometimes when I close notebook and undock it from dock station. Then I cannot login to my notebook because of error "Number of connection to this computer limited an