on 2011 Jun 27 3:27 PM
Hi Guys,
i have a problem regarding changing a purchase order if a custom flag is set on purchase order header level.
When i want to use BBP_DOC_CHANGE_BADI i can't change the items because nothing of the items was changed.
I only got the information from the header that for a PO the custom flag was changed an no item information.
How i can change the items if something has changed on the PO Header?
Thanks for you contribution...
Request clarification before answering.
If your items are not changed, the importing parameter IT_ITEM would be empty. However, you could use the PO header information to call BBP_PD_PO_GETDETAIL so that you get the item information and change them accordingly. Then copy all of your updated item information to ET_ITEM of the BADI interface.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Subtype is a field that is determined by the system based on the characteristic of the item and the technical scenario your SRM is running. It is not something that you can or should be able to easily manipulate. In another word, the item needs to be qualified in order to the a Direct Material. On the other hand, if you create an item of a backend product with a proper product ID, the "Order as Direct Material" checkbox would show up for you to check it if you would want it to be DP. I hope this makes sense to you.
...when all items in the PO are Direct material relevant
How do you plan to validate this in your PO process? I'd assume you create items one by one manually. If they are "Direct Material Relevant", you could already check the "Order as Direct Material" checkbox on item level. You'd have to explain the flow of your process more clearly in order for me to understand your requirement.
You can validate that the item can be ordered as Direct Material if product_type eq '01' ( Material ) and ordered_prod is not INITIAL.Thats what someone said to me, i can't say that this is really the right approach but if this constraints are fullfilled the Button is enabled.
If now all Items of the PO can be ordered as Direct material, i want a custom Flag on PO Header which the user can activate and then all items where ordered as Direct material.
Do you understand the problem ?
So if all items can be ordered as Direct Material in the PO Header Screen a Flag field appears which the user can mark.
You have only on /SAPSRM/WDC_PO_DOFC_OV_HD - Purchase Order Overview Header data, this new Flag Field.
If he mark it, in backround all items where changed in order all items as Direct material (DP) (in stock). The User don't see any changes or screen effects, exept that he marks the Flag field on the PO header screen.
If he mark it, in backround all items where changed in order all items as Direct material (DP) (in stock). The User don't see any changes or screen effects,
You neglect to mention that all the items would have been created before you marked the new header field. If items are created first, all this requirement would have saved you is the one click (to mark DP) on each item which you would probably spend several minutes to create. And you would have to replicate the codes to validate that indeed all items CAN BE ordered as direct material. To me, the effort to alter the standard behavior is more than the benefit you would get from it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.