01-10-2014 12:20 PM
Hi All,
I have Created Production order of Type PP01.
Now i want change the quantities of all components In Production Order.
is there any BAPI or function Module to achieve this requirement.
Regards,
Hiriyappa
01-10-2014 12:52 PM
Hi Hiriyappa,
i think you have to use BDC for the same purpose.
i think you ahve to use bapi BAPI_PRODORD_GET_DETAIL, to get the current list of components,
and then please use BDC for achieving your goal.
01-10-2014 12:40 PM
Hi Hariyappa,
As per SAP Note 1694267 - BAPI_ALM_ORDER_MAINTAIN not for work orders you need to try with BAPI BAPI_PRODORD_CHANGE, CO_SE_PRODORD_CHANGE.
The corrections in SAP Note 1275923 check the order type data that is relevant
only for maintenance orders. Since this data is not available for work orders,
the use of BAPI BAPI_ALM_ORDER_MAINTAIN is not possible.
Thanks
Deependra
01-10-2014 1:31 PM
Hi Deependra,
i tried All these Possibilities. This bapis Will not Help In chnaging and Adding Components to the Production Order.
Regards,
Hiriyappa.
01-10-2014 12:42 PM
Check this :
BAPI_PLANNEDORDER_CHANGE.
For any bapi search you can check in T-Code BAPI.
Cheers,
Prakash
01-10-2014 12:52 PM
Hi Hiriyappa,
i think you have to use BDC for the same purpose.
i think you ahve to use bapi BAPI_PRODORD_GET_DETAIL, to get the current list of components,
and then please use BDC for achieving your goal.
01-10-2014 1:36 PM
Hi Sanjeevv,
Thanks for your Reply.
I also Searched Many Posts For Updating Components and Adding Components,there I got Same Reply Like You.
I am also thinking to BDC. Is there Any other way to do using BAPI and Function Modules
Regards,
Hiriyappa.
01-11-2014 5:30 AM
Hi Hiriyappa,
if you wants to do it through BAPI, please do these .
As i told you in previous post, use these function module
BAPI_RESERVATION_GETDETAIL1 and
BAPI_RESERVATION_GETDETAIL
from these function module, you will get the details (for your entries already in)
then use BAPI_RESERVATION_CHANGE
and when this will be used, after then use
call function 'BAPI_TRANSACTION_COMMIT'.
to make sure the commit of the changes you have done.
Hope it works for you.
01-11-2014 7:53 AM
You proposed wrong function modules, it's applicable to reservations not for Production Orders!
I guess he should have to use BAPI*PROD*CHANGE or similar! what do you think
Rg, Kiran
01-11-2014 8:43 AM
Hi kiran,
thanks a lot for your sujjestions, i may be wrong at this place,
i have just told him to get the details of components for that
material, may be its BAPI*PROD*CHANGE, as you have sujjested.
But the concern is that, the queries he has posted, i think the best solution is
the use of BDC, isn't it.
01-11-2014 9:12 AM
Sanjeev, if no solution found in this case! Better to go for BDC ( this is the last option of a developer to fulfill the business needs )
01-11-2014 7:19 AM
Hi,
Production order item will never get updated by their own BAPI. You have to play with corresponding reservation number. The BAPI to change reservation number is BAPI_RESERVATION_CREATE / BAPI_RESERVATION_CHANGE.
Cheers,
Prakash
01-11-2014 8:06 AM
Hi Prakash Jha,
I have six items in my reservation number . now i need to change the Quantity of that components .
Is it Possible from this BAPI BAPI_RESERVATION_CHANGE.
if yes Can you give one Example and what are the parameters i need to pass in this bapi .
Regards,
Hiriyappa
01-11-2014 8:54 AM
Hi Hiriyappa,
sorry for my previous post, the function module i have sujjested earlier was for
reservation purpose.
Now for production please see these function modules.
CO_XT_COMPONENT_CHANGE, it can be used to change about material quantity,
CO_XT_ORDER_PREPARE_COMMIT , to commit
CO_XT_COMPONENT_ADD , to add new components
if you didn't get how to do it, please see this link, here it is better briefed.
Please change is according to your use.
01-11-2014 9:47 AM
Hi Hiri,
you need to fetch all the reservation number of a process order. This can be retrieved as :
select rsnum "Reservation number
rspos "Item number matnr "Material Number
bdter "Requirement Date for the Component
meins "Base Unit of Measure
aufnr "Order number
bdmng "Requirement Quantity
vmeng "Confirmed quantity for availability
from resb into table t_resb
for all entries in t_order
where aufnr = t_order-aufnr
and xloek eq space.
if sy-subrc = 0
* each entry in t_resb will give you one line item of Process order
* Call BAPI here by passing entries in t_resb........
*BAPI Commit.
ENDIF.
Cheers,
Prakash
01-11-2014 11:55 AM
Hi Prakasha and Sanjeeva,
I want change the Quantity of Components Present in component overview of Production order .
I have Tried these BAPIS CO_XT_COMPONENT_ADD ,
CO_XT_COMPONENT_CHANGE.
But No Use its not modifying and adding the Component in this screen.
Regards,
Hiriyappa
01-11-2014 12:07 PM
Hi Hiriyappa,
ok let me see, actually the problem is this, my company is not working on
PP so not having such stuffs, to check its consistency.
But still let me explore, if i can help you in any way.
01-11-2014 12:17 PM
Hi Hiri,
My suggestion was to use BAPI to change the reservation. I have already implemented the same and its working. Even the code example I have given was for BAPI_RESERVATION_CHANGE only. try this it will work.
Cheers,
Prakash
01-11-2014 12:23 PM
Hi Hiriyappa,
as i have sujjested have you used
call function 'BAPI_TRANSACTION_COMMIT'.
so that the changes you have done, must get committed.
01-11-2014 12:30 PM
01-11-2014 12:42 PM
Hi Used this BAPI_Resrvation_Change and Getting this Error
Reservation created automatically. No manual changes possible
I Passed the values like this .
Import parameter :-
Reservation number -1968
tables:-
RESERVATIONITEMS_NEW-material = '302168'.
RESERVATIONITEMS_NEW-PLANT= '1000'.
RESERVATIONITEMS_NEW-ENTRY_QNT = '8'.
RESERVATIONITEMS_NEW-ENTRY_UOM = 'EA'.
BUT WHEN I CHECKED in table level the record is not present .
Regards,
Hiriyappa
01-11-2014 12:46 PM
Hi Sanjeev,
Each production order item linked with a reservation number. Please check the DB table RESB.
Also check the T-codes COR2 or COR3 with process order number. If you will analyse it at item level it will show you corresponding reservation number.
Also please check my previous post in this thread i have given how to fetch reservation number from a process order number.
Cheers,
Prakash
01-11-2014 12:47 PM
have you fixed the indicators in other ITEM table used in BAPI ?
Cheers,
Prakash
01-13-2014 9:08 AM
01-13-2014 9:15 AM
Hi Prakasha Jha,
Can give You Sample data to pass int his BAPI.
One More Thing Can u confirm this bapi is correctly updates Component over view of Production order.?
Regards,
Hiriyappa
01-13-2014 1:07 PM
Hi Hari,
I did it successfully in my last project. So currently I dont have that code. Can you check once in where used list of that BAPI ? You will get the proper code.
Sample:
In Bapi you have 2 item table. On ITEM and other ITEMX. In item you have to pass values and in ITEMX you have to put the corresponding FLAG = X , which value you want to update.
Cheers,
Prakash