2009 Jun 12 5:09 AM
Hi Everybody,
Who had used the BOM Allocation Deletion Function Module: CSAP_MAT_BOM_ALLOC_DELETE ?
I use this FM to delete the BOM Allocation of plant: 0498 and BOM: '98-000122'
code:as below :
REFRESH: T_PLANT.
CLEAR:T_PLANT.
T_PLANT-PLANT = '0498'.
APPEND T_PLANT.
CALL FUNCTION 'CSAP_MAT_BOM_ALLOC_DELETE'
EXPORTING
MATERIAL = '98-000122'
PLANT = '0498'
BOM_USAGE = '8'
ALTERNATIVE = '01'
FL_NO_CHANGE_DOC = ' '
FL_COMMIT_AND_WAIT = 'X'
IMPORTING
FL_WARNING =
BOM_NO =
TABLES
T_PLANT = T_PLANT
EXCEPTIONS
ERROR = 1
OTHERS = 2
.
when I run the programme, the result is the system variant sy-subrc is 0 . but when I used Tcode: cs08 to display the Bom allocation , the alloction of plant: 0498 and bom: '98-000122' is also exist. I don't konw where the problem is.
Anyone who can help me ?
2009 Jun 12 5:31 AM
Hi,
Try passing the Material in Internal Format. Use Conversion Routine Funtion Module and then pass to FM.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
EXPORTING
INPUT = GV_IT_S600-MATNR
IMPORTING
OUTPUT = GV_IT_S600-MATNR.
CALL FUNCTION 'CSAP_MAT_BOM_ALLOC_DELETE'
EXPORTING
MATERIAL = GV_IT_S600-MATNR
PLANT = '0498'
BOM_USAGE = '8'
ALTERNATIVE = '01'
FL_NO_CHANGE_DOC = ' '
FL_COMMIT_AND_WAIT = 'X'
IMPORTING
FL_WARNING =
BOM_NO =
TABLES
T_PLANT = T_PLANT
EXCEPTIONS
ERROR = 1
OTHERS = 2
.
If still it doesnt work, try to convert all the values to internal format and use in FM...
Hope it helps!!
Rgds,
Pavan
Hi Everybody,
Who had used the BOM Allocation Deletion Function Module: CSAP_MAT_BOM_ALLOC_DELETE ?
I use this FM to delete the BOM Allocation of plant: 0498 and BOM: '98-000122'
code:as below :
REFRESH: T_PLANT.
CLEAR:T_PLANT.
T_PLANT-PLANT = '0498'.
APPEND T_PLANT.
CALL FUNCTION 'CSAP_MAT_BOM_ALLOC_DELETE'
EXPORTING
MATERIAL = '98-000122'
PLANT = '0498'
BOM_USAGE = '8'
ALTERNATIVE = '01'
FL_NO_CHANGE_DOC = ' '
FL_COMMIT_AND_WAIT = 'X'
IMPORTING
FL_WARNING =
BOM_NO =
TABLES
T_PLANT = T_PLANT
EXCEPTIONS
ERROR = 1
OTHERS = 2
.
when I run the programme, the result is the system variant sy-subrc is 0 . but when I used Tcode: cs08 to display the Bom allocation , the alloction of plant: 0498 and bom: '98-000122' is also exist. I don't konw where the problem is.
Anyone who can help me ?
2009 Jun 12 5:31 AM
Hi,
Try passing the Material in Internal Format. Use Conversion Routine Funtion Module and then pass to FM.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
EXPORTING
INPUT = GV_IT_S600-MATNR
IMPORTING
OUTPUT = GV_IT_S600-MATNR.
CALL FUNCTION 'CSAP_MAT_BOM_ALLOC_DELETE'
EXPORTING
MATERIAL = GV_IT_S600-MATNR
PLANT = '0498'
BOM_USAGE = '8'
ALTERNATIVE = '01'
FL_NO_CHANGE_DOC = ' '
FL_COMMIT_AND_WAIT = 'X'
IMPORTING
FL_WARNING =
BOM_NO =
TABLES
T_PLANT = T_PLANT
EXCEPTIONS
ERROR = 1
OTHERS = 2
.
If still it doesnt work, try to convert all the values to internal format and use in FM...
Hope it helps!!
Rgds,
Pavan
2009 Jun 12 6:19 AM
Dear Pavan ,
Thanks for your answer. But there some question in your answer.
first, if you want to convert the external material no to internal material no maybe the FM: CONVERSION_EXIT_MATN1_INPUT will be better.
second. when I convert the material to internal material no the FM return the error message: Data is incomplete.
so I think maybe this is not the piont. But I also want to thanks for your answer .
2009 Jun 18 8:25 AM
My problem is solved. The problem is caused by the BOM material releated other material. When I create a new BOM and allocation the plant to this new BOM and then I use this FM to delete the BOM allocation . that's successful.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |