on ‎2023 Jan 06 11:35 AM
Requirement: To assign single material to an existing inspection plan.
I had referred several threads and posting it here since I did not get any concrete solution. Some threads suggest direct update of MAPL table. Hope a better method exists.
BAPI
BAPI_INSPECTIONPLAN_CHANGE is unavailable in our system.

BDC
I tried BDC but the problem is that there is no facility for new row addition to insert a material assignment. I have to do multiple page downs to get a blank row for insertion. This will increase response time when the records are more. I could write a logic for the number of page downs required based on MAPL total count divided by count of visible rows in material assignment screen of QP02 tcode.
FM
I checked ROUTING_MAINTAIN but it did not contain any input for passing task list type.
If you had done this requirement using any FM/BAPI, kindly provide the FM detail or idea in BDC to quickly get to the table control empty row in order to assign a material to an inspection plan?
Request clarification before answering.
FM CPCC_S_TASK_LIST_MAINTAIN met my requirement.
https://answers.sap.com/questions/13786417/routing-maintain-entry-p-is-not-in-table-tca41-err.html
* BEGIN-INSPECTION PLAN ASSIGNMENT
imatl-maintain_mode = 'C'.
imatl-material = matl.
imatl-plant = plant.
append imatl.
CALL FUNCTION 'CPCC_S_TASK_LIST_MAINTAIN'
EXPORTING
key_date = sy-datum
task_list_type = 'Q'
task_list_group = 'INSPPLAN'
group_counter = plnal
TABLES
material_task_allocations = imatl
return = iret.
READ TABLE iret with key type = 'E'.
if sy-subrc <> 0.
COMMIT WORK.
endif.
* END-INSPECTION PLAN ASSIGNMENT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 39 | |
| 22 | |
| 21 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.