2012 Nov 22 12:13 PM
Hi All,
I have a requirement in Idoc.
I want to generate Idocs for selected plant only using MATMAS. here I am doin for change pointer also. I used filter in bd64 for single plant. when i run BD21 transaction it will generate idocs for all plants. So i donot process to all the plants. Please tell me is there any user exit or enhancemet regarding this issue.
Thanks & regards,
Chandra Mohan
2012 Nov 22 12:18 PM
Badi IDOC_CREATION_CHECK
if idoc_control-mestyp = 'MATMAS'.
types:begin of ty_marc,
matnr type marc-matnr,
werks(70), "TYPE marc-werks,
mmsta type marc-mmsta,
end of ty_marc.
data: i_marc type table of ty_marc,
i_tbd05 type table of tbd05.
data: w_marc type table of ty_marc,
w_tbd05 type tbd05,
w_idoc_data type edidd,
w_idoc_cont type edidc.
data: lv_matnr type mara-matnr.
read table idoc_data into w_idoc_data with key segnam = 'Your segment having plant'.
Clear:create_idoc. based on your plant.
Badi IDOC_CREATION_CHECK
if idoc_control-mestyp = 'MATMAS'.
types:begin of ty_marc,
matnr type marc-matnr,
werks(70), "TYPE marc-werks,
mmsta type marc-mmsta,
end of ty_marc.
data: i_marc type table of ty_marc,
i_tbd05 type table of tbd05.
data: w_marc type table of ty_marc,
w_tbd05 type tbd05,
w_idoc_data type edidd,
w_idoc_cont type edidc.
data: lv_matnr type mara-matnr.
read table idoc_data into w_idoc_data with key segnam = 'Your segment having plant'.
Clear:create_idoc. based on your plant.
2012 Nov 22 12:18 PM
Badi IDOC_CREATION_CHECK
if idoc_control-mestyp = 'MATMAS'.
types:begin of ty_marc,
matnr type marc-matnr,
werks(70), "TYPE marc-werks,
mmsta type marc-mmsta,
end of ty_marc.
data: i_marc type table of ty_marc,
i_tbd05 type table of tbd05.
data: w_marc type table of ty_marc,
w_tbd05 type tbd05,
w_idoc_data type edidd,
w_idoc_cont type edidc.
data: lv_matnr type mara-matnr.
read table idoc_data into w_idoc_data with key segnam = 'Your segment having plant'.
Clear:create_idoc. based on your plant.
2012 Nov 22 12:38 PM
Please let know, do i need to implement in IDOC_CREATION_CHECK. if i do so, when i run BD21, is it trigger this??
2012 Nov 22 12:40 PM
2012 Nov 22 12:47 PM
there is one method IDOC_DATA_CHECK, can we do coding in this or we can create new implemention method..?Please
2012 Nov 22 12:51 PM
Inside the BADI Interface you can Implement the method.
Call with Interface method as
Interface_name~Method with data you can check or block what you want to do.
2012 Nov 22 12:55 PM
Create new implementation and write you code in IDOC_DATA_CHECK method.
2012 Nov 22 2:24 PM
in method IDOC_DATA_CHECK , CREATE_IDOC parameter set to X, do i need to set it as blank..??
2012 Nov 22 2:27 PM
CREATE_IDOC will be X for the plant you want to create Idoc for rest of plants make it blank.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |