on 08-13-2010 11:58 AM
Hi Friends,
We are having requirement of assigning 20000 materials to single Inspection Plan ( since same characteristics need to be checked for each material). I have initially made Inspection plan with out assigning any material, now to the group already created i want to assign 20000 materials (using T code QP02).
My problem is assigning of these 20 k materials to a single group. Manually at a time only 14 materials cab be assigned, tried to make LSMW but the process is very slow as you need to do page down many times (20000/ 14).
Can anybody suggest the faster way of assigning these materials?
Thanks and Regards,
Shekhar
I have gone th' the similar requirement earlier & I used a BDC program to assign the materials in inspection plan.
Record the transaction in SHD0, provide sample master data to ABAP consultant & then develop a BDC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just an addition to the thread.
I got the exact requirement recently where user uploads an excel as input and we have to update Material assignments to Inspection plants for all combinations present in the excel sheet.
There is a 'Not Released' FM "CPCC_S_TASK_LIST_MAINTAIN" which can be used to achieve the requirement. I understand if some people would want to refrain from using this as the FM is not released but I think it's still better than BDC approach.
Regards,
Sheel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works just great! Thanks for the tip!
Here is the full code for you all.
METHOD add_material_to_plan.
DATA: exref TYPE REF TO cx_root.
TRY.
DATA: material_task_allocations TYPE TABLE OF cps_task_list_maint_mtk.
APPEND VALUE #( maintain_mode = 'C' material = rec-matnr plant = rec-werks )
TO material_task_allocations.
CALL FUNCTION 'CPCC_S_TASK_LIST_MAINTAIN'
EXPORTING
key_date = sy-datum
task_list_type = 'Q'
task_list_group = rec-plnnr
group_counter = rec-plnal
plant = rec-werks
task_maintain_mode = 'M'
TABLES
material_task_allocations = material_task_allocations
return = return.
DATA(stat) = zutils_cl_gu=>bapiret_to_status( bapiret = return ).
IF stat-status EQ zutils_cl_defs=>c_stat_success.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF.
rec-status = stat-status.
rec-status_text = stat-status_text.
CATCH cx_root INTO exref.
rec-status = zutils_cl_defs=>c_stat_error.
rec-status_text = exref->get_text( ).
ENDTRY.
ENDMETHOD.
Are you not using LSMW with object 0240? I would expect that you do not have these limits then.
Regards
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
When creating the LSMW, on the Assignment screen, do a Last PAge (ShiftF12) and Next Page (ShiftF11). Enter your new value in second line (maybe do originally first line manually). This way recording will always go to second line of last page and your data will be read 1 entry at a time.
LSMW is then much easier, as well as setting up data.
Corne
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Remember one thing that appending SQL or database is harmful which during batch run may delete or append wrong data.
Best way is o create BDC with some code from SHDB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Friends,
Any better solution ? assigning 20000 materials manually 14 every times seem to be difficult task. My ABAPER is trying to develop the BDC but finding it difficult.
Best Regards,
Shekhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sujit is very correct in what he says. I very rarely ever recommend a table update such as above. I only do so here because the table is a relatively simple table, there are no internal counters involved and your load is very large. You must make sure your data is VERY, VERY clean and with no typos or mistakes.
FF
HI,
I also came acrros with a similar situation, I developed a BDC with page down entry since this will assign the details in the inspection plan.
Further if you are using a LSMW, give a try to pass the record to 14 or 15 item. This might work because I did something similar long time back for routing material assignment.
Thanks & Best Regards
Charith
There is no other way for mass material assignment to inspection plan. You can assign 14 materials at a time & you need to do page down for next 14 materials.
Thanks!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
8 | |
7 | |
4 | |
4 | |
3 | |
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.