on 12-09-2011 11:04 AM
Hi ,
I am creating inspection plan (QP01) using bapi BAPI_INSPECTIONPLAN_CREATE.
I am able to pass data to DB, but it is not storing upper limit and lower limit vales. kindly can some one help me. its urgent requirement for me
Regards,
Sankar Gelivi
hi,
first u check ur MIC control indicators, the ticks on particualr indicators are there or not. if it is not their than properly tick them and if it there than check ur program.
check ur excel sheet and field enteries are proper or not when u upload ur data, unit of measurements, decimal place and MIC indicators.
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
it is very simple u have set the following Decimal palces either at the time of Creation of MIC's or when u assigned ur MIC's in quality plans.
In quality plan, select the MIC's and click on quantitative Data button just above of those MIC's and set the decimal places according to ur req.
Regards
Hi,
I need solution from the coding side. In the standard transaction data is posting fine. my problem is from the coding side.
Please find the logic below and do need ful
IF v_plant IS NOT INITIAL.
LOOP AT it_copied INTO wa_copied.
* Moving Corresponding fields to task internal table
t_task-valid_from = sy-datum.
t_task-description = wa_copied-operation_text.
t_task-task_list_usage = 'ZRA'.
t_task-task_list_status = '4' . "wa_copied-task_list_status. " Status
t_task-lot_size_from = '000'.
t_task-lot_size_to = '999'.
t_task-planning_work_center = wa_copied-lab.
t_task-plant = wa_copied-plant.
t_task-task_measure_unit = wa_copied-uom.
t_task-object_change_type = '000'.
APPEND t_task TO it_task.
* Moving Corresponding fields to Operation internal table
t_operation-valid_from = sy-datum.
t_operation-activity = wa_copied-operation.
t_operation-plant = wa_copied-plant.
t_operation-control_key = 'ZQME'.
t_operation-work_cntr = wa_copied-lab.
t_operation-obj_id = '00000000'.
t_operation-description = wa_copied-operation_text.
t_operation-operation_measure_unit = wa_copied-uom.
t_operation-denominator = '1'.
t_operation-nominator = '0'.
t_operation-base_quantity = '1.000'.
APPEND t_operation TO it_operation.
* Moving Corresponding fields to Inspection Characteristics internal table
t_inspcharacteristic-activity = wa_copied-operation.
t_inspcharacteristic-inspchar = wa_copied-test_no.
t_inspcharacteristic-valid_from = sy-datum.
t_inspcharacteristic-mstr_char = wa_copied-test_id.
If Not wa_copied-uom is initial.
t_inspcharacteristic-meas_unit = wa_copied-uom.
* t_inspcharacteristic-QUANTITATIVE_IND = 'X'.
* t_inspcharacteristic-PRESET_CTRL_INDS_KEY = 'X'.
* t_inspcharacteristic-UP_TOL_LMT_IND = 'X'.
* t_inspcharacteristic-lw_TOL_LMT_IND = 'X'.
* Else.
* t_inspcharacteristic- = 'X'
ENDIF.
t_inspcharacteristic-pmstr_char = v_plant.
t_inspcharacteristic-cha_master_import_modus = 'C'.
t_inspcharacteristic-method = wa_copied-method.
t_inspcharacteristic-pmethod = v_plant.
t_inspcharacteristic-dec_places = wa_copied-stellen.
t_inspcharacteristic-char_descr = wa_copied-test.
* t_inspcharacteristic-target_val = wa_copied-upper_limit.
Move wa_copied-upper_limit TO lv_tem. "DECIMALS wa_copied-stellen.
move wa_copied-lower_limit TO lv_tem1. "DECIMALS wa_copied-stellen.
Move lv_tem TO lv_upper_limit. "DECIMALS wa_copied-stellen.
move lv_tem1 TO lv_lower_limit. "DECIMALS wa_copied-stellen.
t_inspcharacteristic-up_tol_lmt = lv_upper_limit.
t_inspcharacteristic-lw_tol_lmt = lv_lower_limit.
APPEND t_inspcharacteristic TO it_inspcharacteristic.
ENDLOOP.
ENDIF.
CALL FUNCTION 'BAPI_INSPECTIONPLAN_CREATE'
IMPORTING
group = v_group
groupcounter = v_grpcounter
TABLES
task = it_task
operation = it_operation
inspcharacteristic = it_inspcharacteristic
return = it_return.
CLEAR : it_task, it_operation, it_inspcharacteristic.
READ TABLE it_return WITH KEY type = 'S'
TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
* report message
LOOP AT it_return INTO ls_result.
CALL METHOD lo_message_manager->report_success
EXPORTING
message_text = ls_result-message.
ENDLOOP.
Upper limit and lower limit value, not getting saved in DB.
Regards,
Sankar
Check the decimal places in MIC .
Try to run it in foreground or else try to put these values manualy in change mode,If it allows then check the code with abaper.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.