2007 May 24 10:46 AM
Transaction MD62 (planned independent requirement change - schedule line) - I need to Maintain Usage Probability functionality for the characteristics. I am trying to use BAPI_REUIREMENTS_CHANGE, but it is not updating the usage probabilities. If anyone has worked on this BAPI then please suggest me how to maintain usage probabilities.
Jigisha
Transaction MD62 (planned independent requirement change - schedule line) - I need to Maintain Usage Probability functionality for the characteristics. I am trying to use BAPI_REUIREMENTS_CHANGE, but it is not updating the usage probabilities. If anyone has worked on this BAPI then please suggest me how to maintain usage probabilities.
Jigisha
2007 May 24 10:49 AM
Hi,
use bapi_transaction_commit after your BAPI call.
just check FM docu,
from here i can see one thing...
you need delete old ones and cretae neew ones ,
new data to be passed to REQUIREMENTS_SCHEDULE_IN
Existing Schedule Lines/>
Existing schedule lines are deleted, and the system creates the schedule lines transferred in parameter REQUIREMENTS_SCHEDULE_IN again.
When parameter DELETE_OLD has initial value, the existing schedule lines are not changed if the transferred schedule lines with the same requirements date do not overwrite them.
Existing schedule lines must be deleted for the following items (DELETE_OLD = X'):
Items for which automatic splitting is carried out
Items for which configuration supporting points are created
Try to add BAPI_TRANSACTION_COMMIT or COMMIT WORK statement at the end of BAPI_REQUIREMENTS_CHANGE.
Perhaps it may help but you may not needed.
Hope this will help.
Regards
VAsanth
2007 May 24 11:12 AM
Hi Vasant,
I have selected the delete_old as 'X' and have also done a transaction commit but still the updates to the usuage probability are not happening.
Jigisha
2007 May 24 10:55 AM
2007 May 24 11:16 AM
Hi Naveen,
Here it is:
DATA: i_bapisshdin TYPE TABLE OF bapisshdin,
i_bapischarr TYPE TABLE OF bapischarr,
i_bapireturn1 TYPE TABLE OF bapireturn1.
DATA: wa_bapisshdin TYPE bapisshdin,
wa_bapischarr TYPE bapischarr,
wa_bapireturn1 TYPE bapireturn1.
wa_bapisshdin-date_type = '3'.
wa_bapisshdin-req_date = '05/01/2007'.
wa_bapisshdin-req_qty = '100.000'.
wa_bapisshdin-unit = 'EA'.
APPEND wa_bapisshdin TO i_bapisshdin.
wa_bapischarr-requ_date = '05/01/2007'.
wa_bapischarr-int_char = 'UNIT_SIZE'.
wa_bapischarr-char_value = '016'.
wa_bapischarr-ch_qty = '25'.
APPEND wa_bapischarr TO i_bapischarr.
CALL FUNCTION 'BAPI_REQUIREMENTS_CHANGE'
EXPORTING
material = '38AKS'
plant = '2000'
requirementstype = ' '
version = '00'
reqmtsplannumber = ' '
vers_activ = ' '
do_commit = 'X'
update_mode = 'X'
delete_old = 'X'
no_withdr = ' '
TABLES
requirements_schedule_in = i_bapisshdin
requirements_char_in = i_bapischarr
return = i_bapireturn1.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
Jigisha
2007 May 24 11:45 AM
Hi,
I have tried using same BAPI, It is returning a message
"No authorization for changing in plant ".
so i think in my dev server i dont have authorisation to change the plant and its showing that message.
wats the BAPI is returning in ur case?
Revert back .
Regards
Naveen
2007 May 24 11:54 AM
Hi Naveen,
The BAPI is deleting the schedule line instead of updating the usage probability.
Jigisha
2007 May 24 12:46 PM
Hi Jigisha ,
When parameter DELETE_OLD has initial value, the existing schedule lines are not changed if the transferred schedule lines with the same requirements date do not overwrite them.
so try using delete_old = ' ' .
As DELETE_OLD = X, will delete that record.
Iam not sure wheteher it will work or not, coz i dont have authorisation to change PLANT in my server.
Regards,
Naveen
Message was edited by:
Naveen Deva
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |