Material origin
hi
i have makred material origin tick in material master costing view. but still material number is not showing in production order.
imdad
Hi Imdad,
Have u created PO before ticking origin in mat master or subsequently?
ROMY
Similar Messages
-
Material Origin in Material Master
Hi Guru,
I'd like to ask if there is any configor any way that Material Origin in Costing Tab 1 of Material Master has tick for all materials.
Thanks.
EllenDear Ellen,
In my understanding its not possible to make this field as a check box filled with a tick mark for material
origin while creating the material master.
Still if you need you can get some help from your ABAP consultant is it possible to make it possible
through some enhancements.
For the created one check in MM17 to do a mass change.
You can have a look on T Code OMS9 to create a new selection group by having only the field mateiral
origin - MBEW- HKMAT and try to make the option as required entry.
Check with this and revert back.
Regards
Mangalraj.S
Edited by: Mangalraj.S on May 4, 2009 10:52 AM -
How to update routing labour hours by material origin group?
Hi,
I have a requirement to update the routing labour hours by material origin groups to save time of updating each and every material. Is there a way to do this?
For example if 3 materials belong to origin group A then if all 3 materials use labour hours of 5 hours, then the user has to enter only the origin group and 5 hours once to update all 3 material routings. Is this possible?Dear Raja,
Can you let us what do you mean by origin Group ??
if you mean updating the results in Material master
then check T-code CA97
Regards
Madhu -
Material Origin update terminated
Hi All,
I tried to create a material using T-cdoe MM01. In the Costing 1 view tab, I ticked the Material Origin but cannot save as the error appear with "Transaction terminated".
Any advise any one?
Thanks.The solution is in Note. 673881. It is stated to run the attached program ZN673881.
When I click the correction intructions 602266, I can see the Object name ZN673881. If i click this, the text form is displayed.
How do I run this program?
Edited by: john tan on Mar 27, 2008 6:31 AM -
Executing Forecast for material - original and corrected forecast values
Hi,
When we execute a forecast for amaterial that has a corrected forecast value this info is then moved the the correcponding period to the historical value. There are two historical values, the original forcast value and the corrected one. I would expect my original and corrected values to be moved to the hostorical values indvidually but what happens is that both the original and corrected historical take their value from the original forcast and the corrected vale is lost.
Is this what should happen or can this be corrected?
ThanksI just forgot to execute forecast calculation in forecasting view, now problem gets solved, sorry, then I need to close it.
-
Country of origin Settings in Material Master?
Hi Guys:
we are procuring Materials from both domestic and international , how can the end user find out the country of origin for that Material?
1) If your are procuring (M1) from both US and India ?
or
2) M2 directly from China ?
3) M3 Directly from US?
Thanks
Sweth.Hi,
If the material is valuated seperately for seperate origin and you want to trace it for full lifecycle of supply chain
Then SAP Recommends to use Split Valuation, by activating split valuation for that material you can trace different material origins
as valuation types, please explore further on split valuation
http://help.sap.com/saphelp_46c/helpdata/en/47/61017149f011d1894c0000e829fbbd/content.htm
Thanks
Diwakar -
Recosting material after cost release - Follow-up re MBEW/HKMAT field
When we set standards this year, I did not know that this field should have had its value set before costing, and it is now not showing the material number in variance calculations for the ten or so items that did not have the flag set.
My question is on fixing the issue. I know I have to re-cost to fix it so the mnaterial shows on variance calculations.
Do I have to do another costing run up through the release stage, or can I do a cost run and take it only through the "marking" phase?Hi Michael,
when you speak of variance calculation I suppose you do that for production orders and want to see variances between target and actuals. In that case I fear setting the KKMAT field now will not help you for orders that were already created and have their actual costs posted. The target cost including the material origin might be recalculated, but the material origin of posted actual costs will stay empty, even if you set the flag now.
For production order variance analyis the flag will help you only for future orders. Whether you have to release the cost estimate depends on which version of variances you use. If you use the actuals against plan it uses the released standard costing, so you would have to release the new costing.
best regards,
Udo -
Cost estimate for material / plant is incorrect
Dear Gurus,
While creating material cost estimate with quantity structure the above error occurs.
Please let me know the solution for this?
Regards,
AjitDear,
Please check with your Accounting,Costing datas in the material master .
Please check with fields like material origin,With Quantity Structure,Variance
Key,Planned price 1 & date against it.
Valuation Class,Price control indicator,Origin group,Overhead group(if maintained
any),Profit center.
If not solved ,please send the screen shots.
Regards
Mangal -
Material to be packed is not copied into packing screen
Hi Gurus,
In delivery packing screen material to be packed area ( bellow screen) material ( original line item) is not automatically displayed.
so user unable to select the material to pack with packing material.
I checked material groups, material types, all assigned correctly.
Is i misssed any area to check, pls let me know how to solve this.
Thanks in advance
arshadHello Nisha Sarma,
I have checked all the above settings which you have mentioned.
All are perfectly maintained.
Still I am not getting material to be packed on the screen.
do I need to check any other thing? Please reply
Arshad -
Error during material determination for sales document item - RRB
Hi
Iam getting following error when trying to create a billing request using DP91.
Error during material determination for sales document item 40001560/000010
Message no. AD01155
Diagnosis
An error occured during material determination for a dynamic item.
System Response
The system cannot perform the function.
Procedure
Check in the profile being used whether its characteristic allows the assignment of a material to each dynamic item.
I have checked my DIP profile using ODP02 there are no errors in it, I have created a Setid and assigned it to costing element in selection criteria and material determination criteria.
Material origin is checked in costing tab in material master.
Appreciate help in resolving this.
thanks,
VaishnaviHi Vaishnavi
The error which you are getting is related to costing.So kindly reach your FI Consultant
please check the following links which may help you.Also check the link that has been provided my Lakshmipathi
ERROR AT DP90 TRANSACTION
Regards
Srinath -
Hi ,
I am developing the BI program for Material Master (MM01) and change MM02(Both create and change).
Can you let me know how do i select particular views before creating/changing the material .
Is there any specific function module available to do this ..
If you help me with any sample coding ,that would be great.
Thanks
Raj& Description : This program is used to create material
*& master (tcode MM01) . Material data is available in tab delimited *
*& flat file. *
*& The Following is the flat file Structure: *
MATNR(018) "Material Number
MBRSH(001) "Industry Sectory
MTART(004) "Material Type
WERKS(004) "Plant
LGORT(004) "Storage Location
MAKTX(040) "Material Text
MEINS(003) "Basic Unit of Measurement
MATKL(009) "Material Group
PRDHA(018), "Product Hierarchy
MTPOS_MARA(004), "General Item Categoy Group
ZEINR(022) "Document
ZEIVR(002) "Doc Version
SPART(002) "Division
DWERK(004) "Delivery Plant
TAXKM(001) "Tax
KTGRM(002) "Account Assignemnt Group
MTPOS_MARA(004), "General. Item Category Group
MTPOS(004), "Item Category Group
MTVFP(002) "Availability check
*/ Begin of changes by Anoop for Sales Text Date: 17 feb 2004
s_ltex1(40), "Sales Text line 1
s_ltex2(40), "Sales Text line 2
s_ltex3(40), "Sales Text line 3
s_ltex4(40), "Sales Text line 4
s_ltex5(40), "Sales Text line 5
s_ltex6(40), "Sales Text line 6
**/ End of changes by Anoop for Sales Text Date: 17 feb 2004
**/ Begin of changes by Anoop for Purchase Order Text Date: 17 feb 2004
po_ltex1(40), "Purchase Order Text line 1
po_ltex2(40), "Purchase Order Text line 2
po_ltex3(40), "Purchase Order Text line 3
po_ltex4(40), "Purchase Order Text line 4
po_ltex5(40), "Purchase Order Text line 5
po_ltex6(40), "Purchase Order Text line 6
MAKTX(040) "Sales text
EKGRP(003) "Purchasing Group
DISMM(002) "MRP Type
DISPO(003) "MRP Controller
DISLS(002) "Lot Size
EKGRP(003) "Purchasing group
BSTFE(017) "Fixed Lot Size
BESKZ(001) "Procurement Type
LGPRO(004) "Prod. Storage Location
DZEIT(003) "In house production
PLIFZ(003) "Planned Delivery Time
FHORI(003) "Sch. Margin Key
STRGR(002) "Planning Strategy Group
MTVFP(002) "Availabilty Check
SBDKZ(001) "Ind/Collective
SERNP(004) "Serial Number Profile
LGPBE(010) "Storage Bin
GROES(032) "Size and Dimension
WEBAZ(003) "GR Processing Time
BKLAS(004) "Valuation Class
VPRSV(001) "Price Control
VERPR(015) "Moving Average Price
STPRS(015) "Standard Price
MYPOL(004) "LIFO Pool
EKALR(001) "With Qty structure
HKMAT(001) "Material Origin
ZPLP1(014) "Planned Price 1
ZPLD1(010) "Planned Price Date 1
*Include
INCLUDE bdcrecx1.
*Variables
DATA : v_filename TYPE string,
v_flag(1) TYPE c,
v_counter(2) TYPE c,
v_lines TYPE i,
v_count TYPE i VALUE 0.
*Selection-screen
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
PARAMETER : filename LIKE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
PARAMETER : v_basic1 TYPE checkbox,
v_basic2 TYPE checkbox,
v_sales1 TYPE checkbox,
v_sales2 TYPE checkbox,
v_salesg TYPE checkbox,
v_salest TYPE checkbox,
v_purcha TYPE checkbox,
Begin of changes by Anoop Date: 18 feb 2004.
v_potext TYPE checkbox,
*End of changes by Anoop Date: 18 feb 2004
v_mrp1 TYPE checkbox,
v_mrp2 TYPE checkbox,
v_mrp3 TYPE checkbox,
v_mrp4 TYPE checkbox,
v_wrksch TYPE checkbox,
v_gplnt1 TYPE checkbox,
v_gplnt2 TYPE checkbox,
v_qality TYPE checkbox,
v_acct1 TYPE checkbox,
v_acct2 TYPE checkbox,
v_testi TYPE checkbox,
v_cost2 TYPE checkbox.
SELECTION-SCREEN END OF BLOCK blk2.
SELECTION-SCREEN END OF BLOCK blk1.
*/ Comments given are the view names that have been incorporated into
the BDC for the transaction MM01.
**Internal Tables
DATA: BEGIN OF record,
*/ Basic Data 1..
data element: MATNR
matnr_001(018), "Material Number
data element: MBRSH
mbrsh_002(001), "Industry Sectory
data element: MTART
mtart_003(004), "Material Type
data element: WERKS_D
werks_019(004), "Plant
data element: LGORT_D
lgort_020(004), "Storage Location
*DATA ELEMENT : vkorg
vkorg(004), "Sales Organisation
*DATA ELEMENT : VTWEG
vtweg(002), "Distribution channel
data element: MAKTX
maktx_021(040), "Material Text
data element: MEINS
meins_022(003), "Basic Unit of Measurement
data element: MATKL
matkl_023(009), "Material Group
data element: PRODH_D
prdha_015(018),
data element: MTPOS_MARA
mtpos_mara_016(004),
data element: MTPOS_MARA
MTPOS_MARA_024(004),
*/ Basic Data 2...
data element: DZEINR
zeinr_026(022), "Document
data element: DZEIVR
zeivr_027(002), "Doc Version
data element: MEINS
MEINS_029(003),
*/ Sales : Sales Org. Data 1
data element: SPART
spart_020(002),
data element: DWERK_EXT
dwerk_021(004),
data element: TAXKM
taxkm_01_024(001),
*/ Sales : Sales Org. Data 2
data element: KTGRM
ktgrm_033(002),
data element: MTPOS_MARA
mtpos_mara_034(004),
data element: MTPOS
mtpos_035(004),
*/ Sales : General Plant/Data
data element: MTVFP
mtvfp_040(002),
data element: PRCTR
prctr_041(007),
*/ Sales Text
*/commented by Anoop
data element: MAKTX
maktx_041(040),
*/commented up to here by Anoop
*/ Begin of changes by Anoop for Sales Text Date: 17 feb 2004
s_ltex1(40),
s_ltex2(40),
s_ltex3(40),
s_ltex4(40),
s_ltex5(40),
s_ltex6(40),
*/ End of changes by Anoop for Sales Text Date: 17 feb 2004
*/ Purchasing..
data element: EKGRP
ekgrp_030(003),
data element: MEINS
MEINS_033(003),
data element: EKGRP
EKGRP_034(003),
*/ Begin of changes by Anoop for Purchase Order Text Date: 17 feb 2004
*/ Purchase Order Text
po_ltex1(40),
po_ltex2(40),
po_ltex3(40),
po_ltex4(40),
po_ltex5(40),
po_ltex6(40),
*/ MRP1..
data element: DISMM
dismm_035(002), "MRP Type
data element: DISPO
dispo_036(003), "MRP Controller
data element: DISLS
disls_037(002), "Lot Size
data element : EKGRP
ekgrp(003),
data element: MEINS
MEINS_039(003),
data element: EKGRP
EKGRP_040(003),
data element: DISMM
DISMM_041(002),
data element: DISPO
DISPO_042(003),
data element: DISLS
DISLS_043(002), "Proc. Type
data element: BSTFE
bstfe_044(017),
*/ MRP2..
data element: BESKZ
beskz_046(001),
data element: LGPRO
lgpro_047(004),
data element: DZEIT
dzeit_048(003),
data element: PLIFZ
plifz_049(003),
data element: FHORI
fhori_050(003),
data element: PERKZ
PERKZ_052(001),
*/ MRP3..
data element: STRGR
strgr_053(002),
data element: MTVFP
mtvfp_054(002),
*/ MRP4
data element: SBDKZ
sbdkz_056(001),
data element: MEINS
MEINS_058(003),
data element: LGPRO
LGPRO_059(004),
*/ Work Scheduling
data element: SERAIL
sernp_060(004),
data element: DZEIT
DZEIT_061(003),
data element: MEINS
MEINS_063(003),
*/ Plant Data/Str1
data element: LGPBE
lgpbe_064(010),
data element: DATTP
IPRKZ_065(001),
*/ Plant Data/Str2
data element: GROES
groes_067(032),
data element: SERAIL
SERNP_068(004),
data element: MEINS
MEINS_070(003),
*/ Quality Management
data element: WEBAZ
webaz_071(003),
data element: MEINS
MEINS_073(003),
*/ Accounting 1
data element: BKLAS
bklas_074(004),
data element: VPRSV
vprsv_075(001),
data element: PEINH
PEINH_076(006),
data element: VERPR
verpr_077(015),
data element: STPRS
stprs_078(015),
*/ Accounting 2
data element: MYPOOL
mypol_080(004),
data element: MEINS
MEINS_082(003),
*/ Cost Estimate 1.
data element: CK_EKALREL
ekalr_083(001),
data element: HKMAT
hkmat_084(001),
data element: CK_LOSGR
LOSGR_085(017),
*/ Costing 2..
data element: DZPLP1
zplp1_087(014),
data element: DZPLD1
zpld1_088(010),
data element: BKLAS
BKLAS_089(004),
data element: VPRSV
VPRSV_090(001),
data element: PEINH
PEINH_091(006),
data element: VERPR
VERPR_092(015),
data element: STPRS
STPRS_093(015),
END OF record.
*/ Begin of changes by Anoop Date: 17 feb 2004
*/ intermediate internal table for Sales Text and Purchase Order Text
*DATA: BEGIN OF s_tab OCCURS 0,
matnr LIKE mara-matnr,
s_ltex1 LIKE makt-maktx,
s_ltex2 LIKE makt-maktx,
s_ltex3 LIKE makt-maktx,
s_ltex4 LIKE makt-maktx,
s_ltex5 LIKE makt-maktx,
s_ltex6 LIKE makt-maktx,
END OF s_tab.
*DATA: BEGIN OF po_tab OCCURS 0,
matnr LIKE mara-matnr,
po_ltex1 LIKE makt-maktx,
po_ltex2 LIKE makt-maktx,
po_ltex3 LIKE makt-maktx,
po_ltex4 LIKE makt-maktx,
po_ltex5 LIKE makt-maktx,
po_ltex6 LIKE makt-maktx,
END OF po_tab.
*/ End of changes by Anoop Date: 17 feb 2004
DATA : itab LIKE record OCCURS 0 WITH HEADER LINE.
DATA : ok_code(5) TYPE c.
*AT SELECTION-SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
field_name = filename
CHANGING
file_name = filename.
*START-OF-SELECTION
START-OF-SELECTION.
v_filename = filename.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_filename
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = itab.
*/ Begin of changes by Anoop Date: 17 feb 2004
LOOP AT itab.
move itab-s_ltext+0(40) to itab-s_ltex1.
move itab-s_ltext+40(40) to itab-s_ltex2.
move itab-s_ltext+80(40) to itab-s_ltex3.
move itab-s_ltext+120(40) to itab-s_ltex4.
move itab-s_ltext+160(40) to itab-s_ltex5.
move itab-s_ltext+200(40) to itab-s_ltex6.
move itab-po_ltext+0(40) to itab-po_ltex1.
move itab-po_ltext+40(40) to itab-po_ltex2.
move itab-po_ltext+80(40) to itab-po_ltex3.
move itab-po_ltext+120(40) to itab-po_ltex4.
move itab-po_ltext+160(40) to itab-po_ltex5.
move itab-po_ltext+200(40) to itab-po_ltex6.
modify itab.
ENDLOOP.
*/ End of changes by Anoop Date: 17 feb 2004
DELETE itab WHERE matnr_001 = ' '.
DESCRIBE TABLE itab LINES v_lines.
PERFORM open_group.
LOOP AT itab.
v_count = v_count + 1.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
IF v_count = v_lines.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
ENDIF.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-MATNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RMMG1-MATNR'
itab-matnr_001.
PERFORM bdc_field USING 'RMMG1-MBRSH'
itab-mbrsh_002.
PERFORM bdc_field USING 'RMMG1-MTART'
itab-mtart_003.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(17)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
TRANSLATE itab-mtart_003 TO UPPER CASE.
*/ IF the data to be uploaded is of Material type 'Trading Goods'
the following view selection
IF itab-mtart_003 = 'HAWA'.
PERFORM view_sel3.
ENDIF.
*/ IF the data to be uploaded is of Material type 'Finished Goods'
the following view selection
IF itab-mtart_003 = 'FERT'.
PERFORM view_sel1.
ENDIF.
*/ IF the data to be uploaded is of Material type 'Semi-Finished Goods'
the following view selection
IF itab-mtart_003 = 'HALB'.
PERFORM view_sel2.
ENDIF.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0080'.
PERFORM bdc_field USING 'BDC_CURSOR'
'T001L-LGOBE'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'RMMG1-WERKS'
itab-werks_019.
PERFORM bdc_field USING 'RMMG1-LGORT'
itab-lgort_020.
PERFORM bdc_field USING 'RMMG1-VKORG'
itab-vkorg.
PERFORM bdc_field USING 'RMMG1-VTWEG'
itab-vtweg.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
IF v_basic1 = 'X'.
*/ Basic Data 1
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARA-MATKL'.
PERFORM bdc_field USING 'MARA-MEINS'
itab-meins_022.
PERFORM bdc_field USING 'MARA-MATKL'
itab-matkl_023.
PERFORM bdc_field USING 'MARA-PRDHA'
itab-prdha_015.
PERFORM bdc_field USING 'MARA-MTPOS_MARA'
itab-mtpos_mara_016.
perform bdc_field using 'MARA-MTPOS_MARA'
itab-MTPOS_MARA_024.
ENDIF.
IF v_basic2 = 'X'.
*/ Basic Data 2
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARA-ZEIVR'.
PERFORM bdc_field USING 'MARA-ZEINR'
itab-zeinr_026.
PERFORM bdc_field USING 'MARA-ZEIVR'
itab-zeivr_027.
ENDIF.
IF itab-vkorg(004) <> ' '.
IF v_sales1 = 'X'.
*/ Sales : Sales Org. Data 1
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'MARA-MEINS'
itab-meins_022.
PERFORM bdc_field USING 'MARA-SPART'
itab-spart_020.
PERFORM bdc_field USING 'MVKE-DWERK'
itab-dwerk_021.
PERFORM bdc_field USING 'MARA-MATKL'
itab-matkl_023.
****perform bdc_field using 'MVKE-SKTOF'
record-SKTOF_023.
IF itab-taxkm_01_024 <> ' '.
PERFORM bdc_field USING 'BDC_CURSOR'
'MG03STEUER-TAXKM(01)'.
PERFORM bdc_field USING 'MG03STEUER-TAXKM(01)'
itab-taxkm_01_024.
*/ After entering tax another screen in which no data has to be *
populated
PERFORM bdc_dynpro USING 'SAPLMGMM' '4200'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.
PERFORM bdc_field USING 'MAKT-MAKTX'
record-maktx_021.
ENDIF.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'MARA-MEINS'
itab-meins_022.
PERFORM bdc_field USING 'MARA-SPART'
itab-spart_020.
PERFORM bdc_field USING 'MVKE-DWERK'
itab-dwerk_021.
PERFORM bdc_field USING 'MARA-MATKL'
itab-matkl_023.
ENDIF.
IF v_sales2 = 'X'.
*/ Sales : Sales Org. Data 2
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
*/commented by Anoop
*/ itab-maktx_041.
*/commented up to here by Anoop
*/ Begin of changes by Anoop Date: 17 feb 2004
itab-maktx_021.
*/ End of changes by Anoop Date: 17 feb 2004
PERFORM bdc_field USING 'BDC_CURSOR'
'MVKE-MTPOS'.
PERFORM bdc_field USING 'MVKE-KTGRM'
itab-ktgrm_033.
IF itab-mtpos_mara_034 <> ' '.
PERFORM bdc_field USING 'MARA-MTPOS_MARA'
itab-mtpos_mara_034.
ENDIF.
IF itab-mtpos_035 <> ' '.
PERFORM bdc_field USING 'MVKE-MTPOS'
itab-mtpos_035.
ENDIF.
ENDIF.
IF v_salesg = 'X'.
*/ Sales : General/Plant Data
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-MTVFP'.
PERFORM bdc_field USING 'MARA-MEINS'
itab-meins_022.
***perform bdc_field using 'MARA-GEWEI'
record-GEWEI_039.
PERFORM bdc_field USING 'MARC-MTVFP'
itab-mtvfp_040.
IF itab-prctr_041 <> ' '.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-PRCTR'.
PERFORM bdc_field USING 'MARC-PRCTR'
itab-prctr_041.
ENDIF.
ENDIF.
IF v_salest = 'X'.
*/ Sales Text
PERFORM bdc_dynpro USING 'SAPLMGMM' '4040'.
IF itab-mtart_003 = 'HAWA' OR itab-mtart_003 = 'HALB'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SP09'.
ok_code = '=SP09'.
ELSEIF itab-mtart_003 = 'FERT'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SP12'.
ok_code = '=SP12'.
ENDIF.
*/commented by Anoop
PERFORM bdc_field USING 'MAKT-MAKTX'
*/ itab-maktx_041.
*/commented up to here by Anoop
*/ Begin of changes by Anoop for Sales Text Date: 17 feb 2004
PERFORM bdc_field USING 'BDC_OKCODE' '=LTEX'.
PERFORM bdc_dynpro USING 'SAPLSTXX' '1100'.
PERFORM bdc_field USING 'BDC_CURSOR' 'RSTXT-TXLINE(02)' .
PERFORM bdc_field USING 'BDC_OKCODE' '=TXBA' .
PERFORM bdc_field USING 'RSTXT-TXLINE(02)' itab-s_ltex1.
perform bdc_field using 'RSTXT-TXLINE(03)' itab-s_ltex2.
perform bdc_field using 'RSTXT-TXLINE(04)' itab-s_ltex3.
perform bdc_field using 'RSTXT-TXLINE(05)' itab-s_ltex4.
perform bdc_field using 'RSTXT-TXLINE(06)' itab-s_ltex5.
perform bdc_field using 'RSTXT-TXLINE(07)' itab-s_ltex6.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE' '=YES' .
*/ End of changes by Anoop for Sales Text Date: 17 feb 2004
PERFORM bdc_dynpro USING 'SAPLMGMM' '4040'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
ENDIF.
ENDIF.
IF v_purcha = 'X' AND ok_code = '=SP09'.
CLEAR ok_code.
*/ Purchasing
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'SP11'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-EKGRP'.
PERFORM bdc_field USING 'MARA-MEINS'
itab-meins_022.
PERFORM bdc_field USING 'MARC-EKGRP'
itab-ekgrp_030.
PERFORM bdc_field USING 'MARA-MATKL'
itab-matkl_023.
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'ENTR'.
perform bdc_field using 'MAKT-MAKTX'
itab-maktx_021.
perform bdc_field using 'MARA-MEINS'
itab-meins_022.
perform bdc_field using 'MARC-EKGRP'
itab-ekgrp_030.
perform bdc_field using 'BDC_CURSOR'
'MARC-DISMM'.
perform bdc_field using 'MARC-DISMM'
itab-DISMM_035.
perform bdc_field using 'MARC-DISPO'
itab-DISPO_036.
perform bdc_field using 'MARC-DISLS'
itab-DISLS_037.
ENDIF.
*/ Begin of changes by Anoop for Purchase Order Text Date: 18 feb 2004
PERFORM bdc_dynpro USING 'SAPLMGMM' '4040'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
IF v_potext = 'X' .
CLEAR ok_code.
*Purchase Order Text
PERFORM bdc_dynpro USING 'SAPLMGMM' '4040'.
PERFORM bdc_field USING 'BDC_OKCODE' '=LTEX'.
PERFORM bdc_dynpro USING 'SAPLSTXX' '1100'.
PERFORM bdc_field USING 'BDC_CURSOR' 'RSTXT-TXLINE(02)' .
PERFORM bdc_field USING 'BDC_OKCODE' '=TXBA' .
PERFORM bdc_field USING 'RSTXT-TXLINE(02)' itab-po_ltex1.
perform bdc_field using 'RSTXT-TXLINE(03)' itab-po_ltex2.
perform bdc_field using 'RSTXT-TXLINE(04)' itab-po_ltex3.
perform bdc_field using 'RSTXT-TXLINE(05)' itab-po_ltex4.
perform bdc_field using 'RSTXT-TXLINE(06)' itab-po_ltex5.
perform bdc_field using 'RSTXT-TXLINE(07)' itab-po_ltex6.
PERFORM bdc_field USING 'RSTXT-TXLINE(02)' itab-po_ltex1 .
PERFORM bdc_field USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(03)'.
PERFORM bdc_field USING 'RSTXT-TXPARGRAPH(03)' '*'.
PERFORM bdc_field USING 'RSTXT-TXLINE(03)' itab-po_ltex2 .
PERFORM bdc_field USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(04)'.
PERFORM bdc_field USING 'RSTXT-TXPARGRAPH(04)' '*'.
PERFORM bdc_field USING 'RSTXT-TXLINE(04)' itab-po_ltex3 .
PERFORM bdc_field USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(05)'.
PERFORM bdc_field USING 'RSTXT-TXPARGRAPH(05)' '*'.
PERFORM bdc_field USING 'RSTXT-TXLINE(05)' itab-po_ltex4 .
PERFORM bdc_field USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(06)'.
PERFORM bdc_field USING 'RSTXT-TXPARGRAPH(06)' '*'.
PERFORM bdc_field USING 'RSTXT-TXLINE(06)' itab-po_ltex5 .
PERFORM bdc_field USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(07)'.
PERFORM bdc_field USING 'RSTXT-TXPARGRAPH(07)' '*'.
PERFORM bdc_field USING 'RSTXT-TXLINE(07)' itab-po_ltex6 .
PERFORM bdc_field USING 'BDC_CURSOR' 'RSTXT-TXPARGRAPH(08)'.
PERFORM bdc_field USING 'RSTXT-TXPARGRAPH(08)' '*'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE' '=YES' .
PERFORM bdc_dynpro USING 'SAPLMGMM' '4040'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
endif.
*/ End of changes by Anoop for Purchase Order Text Date: 18 feb 2004
IF v_mrp1 = 'X'.
*/ MRP 1
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'ENTR'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'MARA-MEINS'
itab-meins_022.
PERFORM bdc_field USING 'MARC-EKGRP'
itab-ekgrp_030.
PERFORM bdc_field USING 'MARC-DISMM'
itab-dismm_035.
PERFORM bdc_field USING 'MARC-DISPO'
itab-dispo_036.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-DISLS'.
PERFORM bdc_field USING 'MARC-DISLS'
itab-disls_037.
IF itab-ekgrp <> ' '.
PERFORM bdc_field USING 'MARC-EKGRP'
itab-ekgrp.
ENDIF.
PERFORM bdc_field USING 'MARC-BSTFE'
itab-bstfe_044.
ENDIF.
IF v_mrp2 = 'X'.
*/ MRP 2
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'MARC-BESKZ'
itab-beskz_046.
PERFORM bdc_field USING 'MARC-LGPRO'
itab-lgpro_047.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-DZEIT'.
PERFORM bdc_field USING 'MARC-DZEIT'
itab-dzeit_048.
PERFORM bdc_field USING 'MARC-PLIFZ'
itab-plifz_049.
PERFORM bdc_field USING 'MARC-FHORI'
itab-fhori_050.
ENDIF.
IF v_mrp3 = 'X'.
*/ MRP 3
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
perform bdc_field using 'MARC-PERKZ'
itab-PERKZ_052.
PERFORM bdc_field USING 'MARC-STRGR'
itab-strgr_053.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-MTVFP'.
PERFORM bdc_field USING 'MARC-MTVFP'
itab-mtvfp_054.
ENDIF.
IF v_mrp4 = 'X'.
*/ MRP 4
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-SBDKZ'.
PERFORM bdc_field USING 'MARC-SBDKZ'
itab-sbdkz_056.
ENDIF.
IF v_wrksch = 'X'.
*/ WORK SCHEDULES
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-SERNP'.
PERFORM bdc_field USING 'MARA-MEINS'
itab-meins_022.
PERFORM bdc_field USING 'MARC-LGPRO'
itab-lgpro_047.
PERFORM bdc_field USING 'MARC-SERNP'
itab-sernp_060.
PERFORM bdc_field USING 'MARC-DZEIT'
itab-dzeit_048.
ENDIF.
IF v_gplnt1 = 'X'.
*/ PLANT DATA/STR1
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARD-LGPBE'.
PERFORM bdc_field USING 'MARA-MEINS'
itab-meins_022.
PERFORM bdc_field USING 'MARD-LGPBE'
itab-lgpbe_064.
perform bdc_field using 'MARA-IPRKZ'
itab-IPRKZ_065.
ENDIF.
IF v_gplnt2 = 'X'.
*/ PLANT DATA/STR2
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARA-GROES'.
PERFORM bdc_field USING 'MARA-GROES'
itab-groes_067.
PERFORM bdc_field USING 'MARC-SERNP'
itab-sernp_060.
ENDIF.
IF v_qality = 'X'.
*/ QUALITY MANAGEMENT
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=PB01'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-WEBAZ'.
PERFORM bdc_field USING 'MARA-MEINS'
itab-meins_022.
PERFORM bdc_field USING 'MARC-WEBAZ'
itab-webaz_071.
Addition done by Hymavathi on 24-01-2005
PERFORM bdc_dynpro USING 'SAPLQPLS' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMQAM-ARGUMENT'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=NEU'.
PERFORM bdc_dynpro USING 'SAPLQPLS' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMQAM-AKTIV(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_field USING 'RMQAM-ART(01)'
'01'.
PERFORM bdc_field USING 'RMQAM-AKTIV(01)'
'X'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-WEBAZ'.
PERFORM bdc_field USING 'MARA-MEINS'
itab-meins_022.
PERFORM bdc_field USING 'MARC-WEBAZ'
itab-webaz_071.
End Of Addition Done By Hymavathi
ENDIF.
IF v_acct1 = 'X'.
*/ ACCOUNTING 1
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
itab-maktx_021.
PERFORM bdc_field USING 'MARA-MEINS'
itab-meins_022.
PERFORM bdc_field USING 'BDC_CURSOR'
'MBEW-STPRS'.
PERFORM bdc_field USING 'MBEW-BKLAS'
itab-bklas_074.
PERFORM bdc_field USING 'MBEW-VPRSV'
-
Hi,
How do we put the Material Origin(MBEW-HKMAT) in the Costing1 View in the material master checked by default?
When the users create a material master they sometimes forget to put a tick mark in the Material Origin adn this causing difficulty in the Reporting. We want this to be activated by default so that the user need not do this when creating a material master.
Thanks in advance.
Raj/I tried to do that. But when I make the MBEW-HKMAT required there are some other fields like MBEW-HRKFT and MBEW-KOSGR which are also becoming required. I don't want this to happen.
In OMSR, I gave 240 as the Selection Group in which I ensured that there is only MBEW-HKMAT and no other field. But not sure why other fields are being impacted.
Raj/ -
IDOC: Material master (Extend Plants)
I used LSMW IDOC option to migrate material master data (MATMAS):
- Basic views
- Description
- Costing
- Plant Stock
I want to extend the plant view (Plant Stock). What change do I do to original LSMW to extend plant?
How do I specify that I am extending?
Is it that function code at the beginning of IDOC?You can do this by writing a program:
REPORT zdmmm_mm_multiplant NO STANDARD PAGE HEADING
MESSAGE-ID zdmmm
LINE-SIZE 255.
TABLE DECLARATION *
TABLES: mara, "General Material Data
mard, "Storage location data
mdma, "MRP data for material
marc. "Plant Data for Material
include zdmmmr_dev00160_mm_multi_top.
include zdmmmr_dev00160_mm_multi_f00.
AT SELECTION-SCREEN *
AT SELECTION-SCREEN.
IF NOT s_matnr[] IS INITIAL.
*Subroutine to perform the Material Number validation
PERFORM sub_validate_matnr.
ELSEIF p_ersda IS INITIAL.
MESSAGE e003 .
ENDIF.
IF NOT s_werks[] IS INITIAL.
Subroutine to perform the plant validation
PERFORM sub_validate_plant.
ENDIF.
START-OF-SELECTION
START-OF-SELECTION.
*To retrive all possible material numbers that have to be
*extended.
PERFORM sub_get_mara.
*To retrieve all possible plants to which the material needs
*to be extended.
IF s_werks IS INITIAL.
PERFORM sub_get_werks.
ENDIF.
*For retrieving Procurement status data from T134.
PERFORM sub_get_pstat.
*To determine the plants to which the Materials have
*already been extended.
PERFORM sub_get_marc.
*To determine all Storage Locations for individual Plants.
PERFORM sub_get_t001l.
*To retrieve company code
PERFORM sub_get_t001k.
*To determine the storage locations and plants to which the Material
*has already extended.
PERFORM sub_get_mard.
*To determine the MRP Areas to which the materials need to be extended.
PERFORM sub_get_mdlv.
*To determine the MRP Areas to which the materials already been extended.
PERFORM sub_get_mdma.
*To retrieve the MRP Area related data from customized table.
PERFORM sub_get_zdmmm_mrp_area.
*TO retrieve the Scalabilty info
PERFORM sub_get_scalability.
*For extending Material to Plant, all possible Storage Location and corresponding MRP Area .
PERFORM sub_mat_extn.
*For creating success and error log.
PERFORM sub_create_log.
*Text elements
001 Material/Plant Selection
002 No data found for given Selection.
003 Reference material is not maintained
004 Material is already extended to the plant
006 Material extended for MRP Area
007 Successfully extended
008 Already extended
009 Not a seviceable storage location,cannot be extended to MRP Area
*Selection texts
P_ERSDA Date
S_MATNR Material Number
S_WERKS Extend to Plant
*Messages
Message class: ZDMMM
*000 & & & &
*001 The material no. does not exist
*002 The plant does not exists.
*003 Enter either material no. or Creation date
*& Include ZDMMMR_MM_MULTI_TOP *
Types
*Type declaration to hold material no.
TYPES: BEGIN OF ty_matnr,
matnr TYPE matnr, "Material Number
mtart TYPE mtart, "Material Type
ersda TYPE ersda, "Creation date
mbrsh TYPE mbrsh, "Industry Sector
vkorg TYPE vkorg, "Sales Organization
vtweg TYPE vtweg, "Distribution Channel
mtartz TYPE zmtart, "Material Type (Customized)
END OF ty_matnr.
*Type declaration to hold plant.
TYPES: BEGIN OF ty_plant,
werks TYPE werks_d, "Plant
bwkey TYPE bwkey, "Valuation area
END OF ty_plant.
*Type declaration to hold data from marc.
TYPES: BEGIN OF ty_marc,
matnr TYPE matnr, "Material Number
werks TYPE werks_d, "Plant
bwkey TYPE bwkey,
END OF ty_marc.
*Type declaration to hold data from mard.
TYPES: BEGIN OF ty_mard,
matnr TYPE matnr, "Material Number
werks TYPE werks_d, "Plant
lgort TYPE lgort_d, "Storage Location
mtart TYPE mtart, "Material Type
END OF ty_mard.
*Type declaration to hold data from t001l.
TYPES: BEGIN OF ty_sloc,
werks TYPE werks_d, "Plant
lgort TYPE lgort_d, "Storage Location
END OF ty_sloc.
*Type declaration to hold data from mdlv.
TYPES: BEGIN OF ty_mdlv,
berid TYPE berid, "MRP Area
werzg TYPE werks_d, "Plant
ortzg TYPE lgort_d, "Storage Location
END OF ty_mdlv.
*Type declaration to hold data from custom table ZDMMM_MRP_AREA.
TYPES: BEGIN OF ty_refmdma,
zmtart TYPE zdmmm_mrp_area-zmtart, "Material Type (Customized)
zwerks TYPE zdmmm_mrp_area-zwerks, "Plant
zberid TYPE zdmmm_mrp_area-zberid, "MRP Area
zdismm TYPE zdmmm_mrp_area-zdismm, "MRP Type
zeisbe TYPE zdmmm_mrp_area-zeisbe, "Safety Stock
zdisls TYPE zdmmm_mrp_area-zdisls, "Lot Size
zdispo TYPE zdmmm_mrp_area-zdispo, "MRP Controller
zfxhor TYPE zdmmm_mrp_area-zfxhor, "Plant Delivery Time (In days)
END OF ty_refmdma.
*Type declaration to hold data for success log.
TYPES: BEGIN OF ty_succ,
mat(18) TYPE c, "Material
plant(8) TYPE c, "Plant
sloc(15) TYPE c, "Storage Location
comm(150) TYPE c, "Comments
END OF ty_succ.
*Type declaration to hold data for error log.
TYPES: BEGIN OF ty_error,
mat(18) TYPE c, "Material
plant(8) TYPE c, "Plant
sloc(15) TYPE c, "Storage Location
comm(150) TYPE c, "Comments
END OF ty_error.
*Type declaration for holding data from mvke
TYPES: BEGIN OF ty_mvke,
matnr TYPE matnr, "Material Number
vkorg TYPE vkorg, "Sales Org
vtweg TYPE vtweg, "Distribution Channel
END OF ty_mvke.
*Type declaration for holding data from qmat
TYPES: BEGIN OF ty_qmat,
matnr type matnr,
werks type werks_d,
art TYPE qmat-art,
ppl TYPE qmat-ppl,
spezueber TYPE qmat-spezueber,
conf TYPE qmat-conf,
tls TYPE qmat-tls,
app TYPE qmat-app,
mer TYPE qmat-mer,
insmk TYPE qmat-insmk,
ave TYPE qmat-ave,
stichprver TYPE qmat-stichprver,
dynregel TYPE qmat-dynregel,
sproz TYPE qmat-sproz,
hpz TYPE qmat-hpz,
dyn TYPE qmat-dyn,
mpb TYPE qmat-mpb,
mst TYPE qmat-mst,
ein TYPE qmat-ein,
mpdau TYPE qmat-mpdau,
chg TYPE qmat-chg,
qkzverf TYPE qmat-qkzverf,
qpmat TYPE qmat-qpmat,
kzprfkost TYPE qmat-kzprfkost,
aufnr_co TYPE qmat-aufnr_co,
aktiv TYPE qmat-aktiv,
apa TYPE qmat-apa,
afr TYPE qmat-afr,
mma TYPE qmat-mma,
feh TYPE qmat-feh,
prfrq TYPE qmat-prfrq,
nkmpr TYPE qmat-nkmpr,
END OF ty_qmat.
*Type declaration for MARA and MARC data for reference material
TYPES: BEGIN OF ty_ref_data,
matnr TYPE matnr, "Material Number
ladgr TYPE ladgr, "Loading Group
bklas TYPE bklas, "Valuation class
peinh TYPE peinh, "Price unit
losgr TYPE losgr, "Costing Lot Size
hkmat TYPE hkmat, "Material Origin
herkl TYPE herkl, "Country Of Origin
dismm TYPE dismm, "MRP Type
dispo TYPE dispo, "MRP Controller
fxhor TYPE fxhor, "Planned delivery time (In days)
disls TYPE disls, "Lot size
fhori TYPE fhori, "Scheduling Margin Key for Floats
magrv TYPE magrv,
vhart TYPE vhart,
ergew TYPE ergew,
ervol TYPE ervol,
fuelg TYPE fuelg,
stfak TYPE stfak,
gewto TYPE gewto,
volto TYPE volto,
prctr TYPE prctr,
kzgvh TYPE kzgvh,
stawn TYPE stawn,
mtver TYPE mtver,
casnr TYPE casnr,
gpnum TYPE gpnum,
steuc TYPE steuc,
herkr TYPE herkr,
mownr TYPE mownr,
mogru TYPE mogru,
prenc TYPE prenc,
preno TYPE preno,
prend TYPE prend,
itark TYPE itark,
bstme TYPE bstme,
vabme TYPE vabme,
nrfhg TYPE nrfhg,
mfrgr TYPE mfrgr,
ekwsl TYPE ekwsl,
webaz TYPE webaz,
insmk TYPE insmk,
kzkri TYPE kzkri,
usequ TYPE usequ,
kordb TYPE kordb,
mprof TYPE mprof,
ekgrp TYPE ekgrp,
disgr TYPE disgr,
maabc TYPE maabc,
minbe TYPE minbe,
lfrhy TYPE lfrhy,
bstmi TYPE bstmi,
bstma TYPE bstma,
bstfe TYPE bstfe,
mabst TYPE mabst,
losfx TYPE losfx,
lagpr TYPE lagpr,
ausss TYPE ausss,
takzt TYPE takzt,
rdprf TYPE rdprf,
bstrf TYPE bstrf,
megru TYPE megru,
sobsl TYPE sobsl,
kzech TYPE kzech,
lgpro TYPE lgpro,
vspvb TYPE vspvb,
rgekz TYPE rgekz,
lgfsb TYPE lgfsb,
fabkz TYPE fabkz,
eprio TYPE eprio,
schgt TYPE schgt,
plifz TYPE plifz,
mrppp TYPE mrppp,
eisbe TYPE eisbe,
lgrad TYPE lgrad,
eislo TYPE eislo,
rwpro TYPE rwpro,
shflg TYPE shflg,
shzet TYPE shzet,
shpro TYPE shpro,
periv TYPE periv,
auftl TYPE auftl,
strgr TYPE strgr,
vrmod TYPE vrmod,
vint2 TYPE vint2,
umref TYPE umref,
prgrp TYPE prgrp,
vint1 TYPE vint1,
miskz TYPE miskz,
prwrk TYPE prwrk,
mtvfp TYPE mtvfp,
wzeit TYPE wzeit,
kzpsp TYPE kzpsp,
stdpd TYPE stdpd,
perkz TYPE perkz,
altsl TYPE altsl,
kausf TYPE kausf,
sbdkz TYPE sbdkz,
kzbed TYPE kzbed,
ahdis TYPE ahdis,
kzaus TYPE kzaus,
ausdt TYPE ausdt,
nfmat TYPE nfmat,
sauft TYPE sauft,
sfepr TYPE sfepr,
mdach TYPE mdach,
dplfs TYPE dplfs,
dplpu TYPE dplpu,
dplho TYPE dplho,
tempb TYPE tempb,
raube TYPE raube,
behvo TYPE behvo,
stoff TYPE stoff,
abcin TYPE abcin,
ccfix TYPE ccfix,
wesch TYPE wesch,
etiar TYPE etiar,
etifo TYPE etifo,
xgchp TYPE xgchp,
maxlz TYPE maxlz,
lzeih TYPE lzeih,
mhdrz TYPE mhdrz,
mhdhb TYPE mhdhb,
iprkz TYPE dattp,
rdmhd TYPE rdmhd,
mhdlp TYPE mhdlp,
brgew TYPE brgew,
ntgew TYPE ntgew,
volum TYPE volum,
voleh TYPE voleh,
groes TYPE groes,
xmcng TYPE xmcng,
loggr TYPE loggr,
sernp TYPE serail,
serlv TYPE serlv,
fprfm TYPE fprfm,
ausme TYPE ausme,
qmata TYPE qmatauth,
kzdkz TYPE kzdkz,
prfrq TYPE prfrq,
rbnrm TYPE rbnr,
qmpur TYPE qmpur,
ssqss TYPE ssqss,
qzgtp TYPE qzgtyp,
qssys TYPE qssys,
bwtty TYPE bwtty,
eklas TYPE eklas,
qklas TYPE qklas,
verpr TYPE verpr,
stprs TYPE stprs,
zkprs TYPE dzkprs,
zkdat TYPE dzkdat,
bwprs TYPE bwprs,
bwprh TYPE bwprh,
bwps1 TYPE bwps1,
bwph1 TYPE bwph1,
vjbws TYPE vjbws,
vjbwh TYPE vjbwh,
abwkz TYPE abwkz,
bwpei TYPE bwpei,
xlifo TYPE xlifo,
mypol TYPE mypool,
ncost TYPE ck_no_costing,
ekalr TYPE ck_ekalrel,
hrkft TYPE hrkft,
kosgr TYPE ck_kosgr,
awsls TYPE awsls,
mmsta TYPE mmsta,
mmstd TYPE mmstd,
stlal TYPE stlal,
stlan TYPE stlan,
plnnr TYPE plnnr,
aplal TYPE plnal,
plnty TYPE plnty,
sobsk TYPE ck_sobsl,
zplpr TYPE dzplpr,
zplp1 TYPE dzplp1,
zpld1 TYPE dzpld1,
zplp2 TYPE dzplp2,
zpld2 TYPE dzpld2,
zplp3 TYPE dzplp3,
zpld3 TYPE dzpld3,
lvolg TYPE lvolg,
diskz TYPE diskz,
lsobs TYPE lsobs,
lminb TYPE lminb,
lbstf TYPE lbstf,
lgpbe TYPE lgpbe,
END OF ty_ref_data.
*Type declaration for holding data from mdma
TYPES: BEGIN OF ty_mdma,
matnr TYPE mdma-matnr, "Material Number
berid TYPE mdma-berid, "MRP Area
werks TYPE mdma-werks, "Plant
END OF ty_mdma.
*Type declaration for holding Company code data
TYPES: BEGIN OF ty_bukrs,
bwkey TYPE bwkey, "Valuation Area
bukrs TYPE bukrs, "Company code
END OF ty_bukrs.
*Type declaration for holding T001w Data
TYPES: BEGIN OF ty_t001w,
werks TYPE werks_d, "Plant
bwkey TYPE bwkey, "Valuation Area
END OF ty_t001w.
*Type declaration for holding T134 Data
TYPES: BEGIN OF ty_t134,
mtart TYPE mtart, " Material type
pstat TYPE pstat, "Condensed status display
END OF ty_t134.
Type declaration for Holding TWLAD data
TYPES: BEGIN OF ty_twlad,
werks TYPE werks_d,
lgort TYPE lgort_d,
adrnr TYPE adrnr,
END OF ty_twlad.
*Type declaration for holding ADRC data
TYPES: BEGIN OF ty_adrc,
adrnr TYPE adrnr, "Address number
sort2 TYPE ad_sort2, "Search Term
END OF ty_adrc.
TYPES: BEGIN OF ty_dev00160,
pkey TYPE zkey, "parameter key
item TYPE zitem, "Item No
value TYPE zvalue,
END OF ty_dev00160.
Constants
CONSTANTS: c_header(1) TYPE c VALUE 'H', "Header
c_true(1) TYPE c VALUE 'X', "value = x
c_v(1) TYPE c VALUE 'V', "Sales View
c_e(1) TYPE c VALUE 'E', "Purchasing View
c_d(1) TYPE c VALUE 'D', "MRP View
c_p(1) TYPE c VALUE 'P', "Forecasting View
c_a(1) TYPE c VALUE 'A', "Work Scheduling view
c_l(1) TYPE c VALUE 'L', "Storage View
c_q(1) TYPE c VALUE 'Q', "Quality View
c_b(1) TYPE c VALUE 'B', "Accounting
c_g(1) TYPE c VALUE 'G', "Costing View
c_f(1) TYPE c VALUE 'F', "PRT View
c_k(1) TYPE c VALUE 'K'. "Basic View
Internal tables
*Internal table to hold material no and material type
DATA: i_matnr TYPE STANDARD TABLE OF ty_matnr INITIAL SIZE 0.
*Internal table to hold plant
DATA: i_plant TYPE STANDARD TABLE OF ty_plant INITIAL SIZE 0.
*Internal table to hold marc data
DATA: i_marc TYPE STANDARD TABLE OF ty_marc INITIAL SIZE 0.
*Internal table to hold marc data
DATA: i_tmarc TYPE STANDARD TABLE OF ty_marc INITIAL SIZE 0.
*Internal table to hold mard data
DATA: i_mard TYPE STANDARD TABLE OF ty_mard INITIAL SIZE 0.
*Internal table to hold t001l data
DATA: i_sloc TYPE STANDARD TABLE OF ty_sloc INITIAL SIZE 0.
*Internal table to hold MRP Area
DATA: i_mdlv TYPE STANDARD TABLE OF ty_mdlv INITIAL SIZE 0.
*Internal table to hold already extended MRP Area
DATA: i_mdma TYPE STANDARD TABLE OF ty_mdma INITIAL SIZE 0.
*Internal table to hold MRP Area data from customized table
DATA: i_refmdma TYPE STANDARD TABLE OF ty_refmdma INITIAL SIZE 0.
*Internal table to hold success messages
DATA: i_succ TYPE STANDARD TABLE OF ty_succ INITIAL SIZE 0.
*Internal table to hold error messages
DATA: i_error TYPE STANDARD TABLE OF ty_error INITIAL SIZE 0.
*Internal table to hold mvke data
DATA: i_mvke TYPE STANDARD TABLE OF ty_mvke INITIAL SIZE 0.
*Internal table for company code data
DATA: i_bukrs TYPE STANDARD TABLE OF ty_bukrs INITIAL SIZE 0.
*Internal table for T001W data
DATA: i_t001w TYPE STANDARD TABLE OF ty_t001w INITIAL SIZE 0.
*Internal table for T134 data
DATA: i_t134 TYPE STANDARD TABLE OF ty_t134 INITIAL SIZE 0.
*Internal table for TWLAD data
DATA: i_twlad TYPE STANDARD TABLE OF ty_twlad INITIAL SIZE 0.
*Internal table for ADRC data
DATA: i_adrc TYPE STANDARD TABLE OF ty_adrc INITIAL SIZE 0.
*Internal table for dev00160 data
DATA: i_dev00160 TYPE STANDARD TABLE OF ty_dev00160 INITIAL SIZE 0.
*Internal table for qmat data
DATA: i_qmat TYPE STANDARD TABLE OF ty_qmat INITIAL SIZE 0.
Work areas
*Work Area for Internal table i_mara
DATA: wa_matnr TYPE ty_matnr.
*Work Area for Internal table i_werks
DATA: wa_plant TYPE ty_plant.
*Work Area for Internal table i_marc
DATA: wa_marc TYPE ty_marc.
*Work Area for Internal table i_t001l
DATA: wa_sloc TYPE ty_sloc.
*Work Area for Internal table i_mdlv
DATA: wa_mdlv TYPE ty_mdlv.
*Work Area for Internal table i_bukrs
DATA: wa_bukrs TYPE ty_bukrs.
*Work Area for Internal table i_refmdma.
DATA: wa_refmdma TYPE ty_refmdma.
*Work Area for Internal table i_succ
DATA: wa_succ TYPE ty_succ.
*Work Area for Internal table i_error
DATA: wa_error TYPE ty_error.
*Work Area for Internal table i_selfields
DATA: wa_selfields TYPE sdibe_massfields.
*Work Area for Internal table i_mvke
DATA: wa_mvke TYPE ty_mvke.
*Work Area for Internal table i_ref_data
DATA: wa_ref_data TYPE ty_ref_data.
*Work Area for internal table I_t001w
DATA: wa_t001w TYPE ty_t001w.
*Work Area for internal table I_t001w
DATA: wa_twlad TYPE ty_twlad.
*Work Area for internal table I_t134
DATA: wa_t134 TYPE ty_t134.
WOrk Area for ADRC Table
DATA: wa_adrc TYPE ty_adrc.
WOrk Area for MARD Table
DATA: wa_mard TYPE ty_mard.
*Work Area for Internal table i_mvke
DATA: wa_dev00160 TYPE ty_dev00160.
*Work Area for Internal table i_mvke
DATA: wa_qmat TYPE ty_qmat.
SELECTION SCREEN *
SELECTION-SCREEN : BEGIN OF BLOCK b_001
WITH FRAME
TITLE text-001 . "Start of selection-screen
SELECT-OPTIONS: s_matnr FOR mara-matnr. "Material Number
PARAMETERS : p_ersda LIKE mara-ersda. "Creation Data
SELECT-OPTIONS: s_werks FOR marc-werks NO INTERVALS. "Plant
SELECTION-SCREEN : END OF BLOCK b_001 . "End of Selection-screen
*& Include ZDMMMR_MM_MULTI_F00 *
*& Form sub_validate_matnr
Subroutine for validating material number
FORM sub_validate_matnr .
SELECT matnr "Material Number
mtart "Material Type
ersda "Creation date
mbrsh "Industry Sector
FROM mara "Table for General Material Data
INTO TABLE i_matnr
WHERE matnr IN s_matnr.
*If no material is found an error message is given
IF sy-subrc <> 0.
MESSAGE e001.
ENDIF.
ENDFORM. " sub_validate_matnr
*& Form sub_validate_plant
Subroutine to validate Plant
FORM sub_validate_plant .
SELECT werks "Plant
bwkey "Valuation area
FROM t001w "Table for Plants/Branches
INTO TABLE i_plant
WHERE werks IN s_werks.
*If no plant is found an error message is given
IF sy-subrc NE 0.
MESSAGE e002.
ENDIF.
ENDFORM. " sub_validate_plant
*& Form sub_get_mara
*Determine all the materials that need to be extended to new plants,
*storage locations and MRP areas
FORM sub_get_mara .
IF NOT s_matnr[] IS INITIAL.
SORT i_matnr BY matnr.
IF p_ersda IS NOT INITIAL.
DELETE i_matnr WHERE ersda NE p_ersda.
ENDIF.
ELSE.
*If only Creation Date is given
SELECT matnr "Material No.
mtart "Material Type
ersda "Creation date
mbrsh "Industry Sector
FROM mara "Table for General Material Data
INTO TABLE i_matnr
WHERE ersda EQ p_ersda.
IF sy-subrc EQ 0.
SORT i_matnr BY matnr.
ELSE.
MESSAGE i000 WITH 'No data found for given Selection.'(002).
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
Subroutine to get data from mvke.
PERFORM sub_get_mvke.
LOOP AT i_matnr INTO wa_matnr.
CLEAR wa_mvke.
READ TABLE i_mvke INTO wa_mvke WITH KEY matnr = wa_matnr-matnr
BINARY SEARCH.
IF sy-subrc EQ 0.
wa_matnr-vkorg = wa_mvke-vkorg.
wa_matnr-vtweg = wa_mvke-vtweg.
ENDIF.
IF wa_matnr-mtart = 'AD01'.
wa_matnr-mtartz = 'AD01'.
ELSE.
wa_matnr-mtartz = 'NAD01'.
ENDIF.
MODIFY i_matnr FROM wa_matnr TRANSPORTING vkorg vtweg mtartz.
ENDLOOP.
ENDFORM. " sub_get_mara
*& Form sub_get_werks
*Determine all the plants to which the Materials need to be extended
FORM sub_get_werks .
SELECT werks "Plant
bwkey "Valuation Area
FROM t001w "Check table for Plants/Branches
INTO TABLE i_plant.
IF sy-subrc EQ 0.
SORT i_plant BY werks.
ENDIF.
ENDFORM. " sub_get_werks
*& Form sub_get_marc
*Determine the status of the materials with respect to which plants
*they have already been extended to
FORM sub_get_marc .
CHECK i_matnr[] IS NOT INITIAL.
SELECT m~matnr "Material Number
m~werks "Plant
t~bwkey
INTO TABLE i_marc
FROM marc AS m "Table for Plant Data for Material
INNER JOIN t001w AS t
ON mwerks = twerks
FOR ALL ENTRIES IN i_matnr
WHERE matnr EQ i_matnr-matnr.
IF sy-subrc EQ 0.
*Append the plants that have been extended to
to the list of plants to which they have to be extended
only when no plants are given in the selection screen
IF s_werks IS INITIAL.
LOOP AT i_marc INTO wa_marc.
wa_plant-werks = wa_marc-werks.
wa_plant-bwkey = wa_marc-bwkey.
APPEND wa_plant TO i_plant.
CLEAR wa_plant.
ENDLOOP.
SORT i_plant BY werks bwkey.
DELETE ADJACENT DUPLICATES FROM i_plant
COMPARING werks bwkey.
ENDIF.
SORT i_marc BY matnr werks.
*Retrieve the Valutaion Area for the plants to which the material
*has already been extended.
SELECT werks "Plant
bwkey "Valuation area
INTO TABLE i_t001w
FROM t001w "Table for Plants/Branches
FOR ALL ENTRIES IN i_marc
WHERE werks = i_marc-werks.
*If selection succeed.
IF sy-subrc EQ 0.
Sort by Plant
SORT i_t001w BY werks.
ENDIF.
ENDIF.
*Copy the content of MARC into a temporary internal table
i_tmarc[] = i_marc[].
DELETE ADJACENT DUPLICATES FROM i_tmarc
COMPARING matnr.
*Retrieving Inspection type - material parameters (QMAT)
*data
SELECT matnr "Material Number
werks "Plant
art "Inspection Type
ppl "Inspection with Task List
spezueber "Inspect with Material Specification
conf "Inspection Specifications from
" Configuration
tls "Inspection Specifications from Batch
" Determination
app "Automatic Specification Assignment
mer "nspect by Characteristics
insmk "Post to Inspection Stock
ave "Automatic Usage Decision Planned
stichprver "Sampling Procedure
dynregel "Dynamic Modification Rule
sproz "Inspection Percentage
hpz "100% Inspection
dyn "Skips Allowed
mpb "Enter the Sample Manually
mst "Trigger Sample Calculation Manually
ein "Serial Number Management Possible
mpdau "Average Inspection Duration
chg "Control of Inspection Lot Creation (Lot
"Summary)
qkzverf "Procedure for Calculating Quality Score
qpmat "Allowed Share of Scrap (Percent) in
"Inspection Lot
kzprfkost "Record Appraisal Costs in Individual QM
"Order
aufnr_co "Order Number for Recording Appraisal
"Costs
aktiv "Inspection Type - Material Combination is
"Active
apa "Preferred Inspection Type
afr "Inspection for Handling Unit
mma "Field Not Used as of 3.0 Field
"Reserved for SAP
feh "Field Not Used as of 3.0 Field
"Reserved for SAP
prfrq "Field Not Used as of 3.0 Field
"Reserved for SAP
nkmpr "Field Not Used as of 3.0 Field
"Reserved for SAP
INTO TABLE i_qmat
FROM qmat "Table of "Inspection type - material
"parameters"
FOR ALL ENTRIES IN i_tmarc
WHERE matnr = i_tmarc-matnr "Material no. of temporary internal
"table
AND werks = i_tmarc-werks. "Plant of temporary internal table
*If selection succeed
IF sy-subrc EQ 0.
SORT i_qmat BY matnr.
ENDIF.
ENDFORM. " sub_get_marc
*& Form sub_get_mard
Determine the storage locations for the Plants i_plant.
FORM sub_get_mard .
CHECK i_marc[] IS NOT INITIAL.
SELECT matnr "Material Number
werks "Plant
lgort "Storage Location
FROM mard "Table for Storage Location Data for Material
INTO TABLE i_mard
FOR ALL ENTRIES IN i_marc
WHERE matnr EQ i_marc-matnr
AND werks EQ i_marc-werks.
*If selection succeed
IF sy-subrc EQ 0.
*Sort internal table by Material no , Plant and Storage Location
SORT i_mard BY matnr werks lgort .
ENDIF.
ENDFORM. " sub_get_mard
*& Form sub_get_t001l
Determine the storage locations for the Plants i_plant.
FORM sub_get_t001l .
CHECK i_plant[] IS NOT INITIAL.
SELECT werks "Plant
lgort "Storage Location
FROM t001l "Check table for Storage Location
INTO TABLE i_sloc
FOR ALL ENTRIES IN i_plant
WHERE werks EQ i_plant-werks.
*If selection succeed
IF sy-subrc EQ 0.
*Sort by Plant and Storage Location
SORT i_sloc BY werks lgort.
For all the storage location get the Storage Location Address
*Number
SELECT werks "Plant
lgort "Storage Location
adrnr "Address Number
FROM twlad "Table of 'Determination of Address from Plant and
"Storage Location'
INTO TABLE i_twlad
FOR ALL ENTRIES IN i_sloc
WHERE werks = i_sloc-werks
AND lgort = i_sloc-lgort.
*If selection succeed
IF sy-subrc EQ 0.
*Sort by Plant, Storage Location and Address number
SORT i_twlad BY werks lgort adrnr.
For all address numbers retrieved get the search term
SELECT addrnumber "Address number
sort2 "Search Term 2
INTO TABLE i_adrc
FROM adrc "Table of 'Addresses (Business Address
"Services)'
FOR ALL ENTRIES IN i_twlad
WHERE addrnumber = i_twlad-adrnr.
IF sy-subrc EQ 0.
SORT i_adrc BY adrnr.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " sub_get_t001l
*& Form sub_get_mdlv
Determine the MRP Areas to which the materials need to be extended.
FORM sub_get_mdlv .
CHECK i_sloc[] IS NOT INITIAL.
SELECT berid "MRP Area
werzg "Plant
ortzg "Receiving Storage Location
FROM mdlv "Table for Customizing MRP Area
INTO TABLE i_mdlv
FOR ALL ENTRIES IN i_sloc
WHERE werzg EQ i_sloc-werks
AND ortzg EQ i_sloc-lgort.
*If selection succeed.
IF sy-subrc EQ 0.
*Sort by Plant and Storage Location
SORT i_mard BY werks lgort.
ENDIF.
ENDFORM. " sub_get_mdlv
*& Form sub_get_zdmmm_mrp_area
Determine required fields w.r.t Plant and MRP Area from customized
*table
FORM sub_get_zdmmm_mrp_area .
CHECK i_mdlv[] IS NOT INITIAL.
*Retrieving MRP data from Customized table
SELECT zmtart "Material Type
zwerks "Plant
zberid "MRP Area
zdismm "MRP Type
zeisbe "Safety Stock
zdisls "Lot Size
zdispo "Mrp Controller
zfxhor "Planned Delivery Time (In Days)
FROM zdmmm_mrp_area "Customized table for MRP Area wrt
"plant and mat type.
INTO TABLE i_refmdma
FOR ALL ENTRIES IN i_mdlv
WHERE zberid = i_mdlv-berid
AND zwerks = i_mdlv-werzg.
*If selection succeed
IF sy-subrc <> 0.
*Sort by MRP Area and Plant
SORT i_refmdma BY zberid zwerks.
ENDIF.
ENDFORM. " sub_get_zdmmm_mrp_area
*& Form sub_mat_extn
For extending Material to Plant, all possible Storage Location and
corresponding MRP Area .
FORM sub_mat_extn .
*Local variable declaration
DATA: l_index TYPE sytabix. "For storing sy-tabix
DATA: l_counter TYPE i VALUE 0. "For formatting Error log.
DATA: l_sloc_extend TYPE c. "Flag for Extending the material
DATA: wa_dpop LIKE dpop. "For sending as a exporting
"parameter
DATA: wa_mdma LIKE mdma. "For sending as a exporting
"parameter
DATA: l_stat TYPE c. "For checking the Storage Location
"is Seviceable or not.
DATA: wa_bapireturn1 TYPE bapiret1. "Return Work area of
"'MD_MRP_LEVEL_CREATE_DATA'
*No material is selected.
CHECK i_matnr[] IS NOT INITIAL.
SORT i_plant BY werks.
SORT i_marc BY matnr werks.
SORT i_mard BY matnr werks lgort.
*For extending the material to Plant Storage Location and possible MRP
*Area
LOOP AT i_matnr INTO wa_matnr.
CLEAR wa_marc.
Checking whether Reference Material Exists or not
READ TABLE i_marc INTO wa_marc WITH KEY matnr = wa_matnr-matnr
BINARY SEARCH.
If no reference material exists..populate data for error log.
IF sy-subrc NE 0.
CLEAR wa_error.
PERFORM material_convert USING wa_matnr-matnr
CHANGING wa_error-mat.
wa_error-comm = 'Reference material is not maintained'(003).
APPEND wa_error TO i_error.
CLEAR wa_error.
CONTINUE.
ENDIF.
For retrieving the reference data
PERFORM sub_retrieve_refdata.
LOOP AT i_plant INTO wa_plant.
READ TABLE i_marc INTO wa_marc WITH KEY matnr = wa_matnr-matnr
werks = wa_plant-werks
BINARY SEARCH.
IF sy-subrc EQ 0.
-
Production costs for material with price control V
Dear all,
Can anyone pls tell me, how will the costing occur for a material produced in-house and having price control 'V' ? I am not able to see the target costs.
Also kindly tell me the settings to be done in CO, like target cost version, valuation variant, costing variant, etc.
Thank you,
ShrenikRather than giving my own versions I have compiled here SAP inputs. Pl let me know if you require any clarifications:
Costing variant has the following components:
<b>Define Costing Types
Define Valuation Variants
Define Date Control
Define Quantity Structure Control
Define Transfer Strategy
Define Reference Variants</b>
<u>Costing type:</u>
In the costing type, you define the purpose of a material cost estimate by specifying, for example, which field in the material master record the costing results can be transferred to:
Update Cost Estimate
Standard price Standard cost estimate (01)
Tax-based price Inventory cost estimate
Commercial price Inventory cost estimate
Price other than std price Modified standard cost estimate or
current cost estimate
No update Any cost estimate
Define Valuation Variants:
Define Valuation Variants
Here you create a valuation variant containing the parameters required for valuation of a cost estimate.
You also specify which costing sheet should be used to calculate overhead.
Valuation Strategies
Material valuation
Here you define the sequence in which the system searches for prices from the accounting view or costing view of the material master record to valuate materials. You can also access prices from purchasing info records and condition types.
For material cost estimates, you also specify whether additive costs can be added to the selected price.
With configurable/configured material components and with procurement alternatives, the sequence defined here is ignored if the strategy "price from purchasing info record" was selected, in which case that strategy is always executed first. For more information, refer to the SAP Library in the component Product Cost Planning under Raw Material Costing or Mixed Costing.
Activity Types / Processes
Here you define the sequence in which the system searches for prices in activity type planning or actual activity price calculation in Cost Center Accounting or Activity-Based Costing to valuate the utilized activity types and business processes.
You also specify which plan/actual version is used.
Subcontracting
Here you define the sequence in which the system searches for prices in the purchasing info record. In purchasing, quota arrangements are used to create a mixed price for materials that are manufactured with external vendors with parts provided by the customer. You can specify whether the quota of the individual vendors that are entered in the source list for the material to be processed should be determined through the planned quota arrangement or the actual quota arrangement.
External processing
Here you define the sequence in which the system searches for prices in the purchasing info record or routing operation for valuation of the external activities.
Strategy Sequence
You define the individual valuation methods for the valuation variant as strategy sequences. For the valuation of the material components you define a strategy sequence that reads the fields of the material master record in a particular sequence such as:
1. Planned price 1
2. Standard price
3. Moving price
The first price that is not zero is used to valuate the material component.
Target versions:
Target cost versions are used in the following ways:
In variance calculation:
To control which variance (total variance, production variances or planning variance) is calculated
To valuate unplanned scrap( scrap variance)
Unplanned scrap is valuated in the period-end closing activities when the variances are calculated. You can specify in a valuation variant for WIP and scrap which cost estimate you want to use to calculate the target costs for the valuation of unplanned scrap. You assign the valuation variant to target cost version 0 if you want to include it in the valuation of scrap.
When you are using a cost object hierarchy with active distribution, you use the target cost version to control which cost estimate the system uses to calculate the target costs, which are used as the basis for determining equivalences for actual cost distribution.
The actual costs collected at the level of the hierarchy are distributed across the orders in accordance with these equivalences. This distribution is proportional to the target costs for the cost element under which the actual costs are written. Actual costs for material costs are distributed in proportion to the target costs for the origin group, such as for the material, if you have entered an origin group in the costing view of the material master record and have set the indicator Material origin, for example.
If no target costs were calculated under this cost element, enter a cost element group in the target cost version. The actual costs are distributed in proportion to the target costs for this cost element group. This cost element group should be complete. If costs were updated under a cost element that is not in this cost element group, no distribution is possible.
You can calculate equivalences on the basis of SAP standard target cost versions 0, 1 and 3.
The standard system supplies the following target cost versions:
Target cost version 0 ( total variance)
The amount of the total variance generates a posting in Financial Accounting during settlement.
For this version, select actual costs as the control costs and standard cost estimate as the target costs.
Target cost version 1 ( production variance)
For this version you choose actual costs as the control costs and planned costs as the target costs.
Target cost version 2( planning variance)
With target cost version 2, the costs from the preliminary order cost estimate are interpreted as control costs.
For this version, select planned costs as the control costs and current cost estimate as the target costs. You cannot calculate planning variances for the product cost collector.
Target cost version 3 (production variance of the period)
You compare the planned costs of the period calculated on the basis of an alternative material cost estimate (such as a modified standard cost estimate) with the actual costs of the period on the basis of the yield delivered to stock in the period.
The base quantity for variance calculation is the yield.
For this version, you choose the actual costs as the control costs and the alternative material cost estimate as the target costs. To determine the alternative material cost estimate, enter a costing variant and choose a costing version.
The target cost version specifies which data is to be compared. The target cost version also specifies which variance variant is used and therefore which variance catagories are calculated. You can define a different target cost version for each controlling area -
ERRO DE IMAGEM NA TELA DE BLOQUEIO
Bom dia,
Fiz a ultima atualização do IPHONE 4, para o software 7.0.3,e depois disso estou tendo problemas com a minha imagem.
Quando o aparelho entra na tela de descanço/bloqueio, a imagem fica toda manchada, e distorcida, não consigo visualizar nada, e nem fazer nada no aparelho.
E para conseguir sair desta tela preciso ficar apertando o botão do meio e a de bloqueio por um tempo. Para só assim conseguir utilizar.
Alguém já passou por isso? Sabe o que é? Como proceder?Olá.
É necessário primeiramente cancelar os documentos de material criados em stock posting anteriormente.
Se a decisão de uso foi feita, precisa ser revertida.
Utilize a SAP note 175842 para mais referências sobre isso.
Após, será possível cancelar o documento de material original via MBST.
Veja também a SAP note 32236.
Outras notas relacionadas:
316750 Error QA046 w. canceling mat.doc. w/ inspection lot
33924 Reversing usage decisions
Se o problema persistir, verique a nota 48815, pois tal report irá verificar se há inconsistências entre QM e IM.
Espero que com estas informações, você solucine seu problema.
Att,
Felipe Silveira
Maybe you are looking for
-
How to delete the complete status of the tasklist one time?
When finished the planning cycle, all task lists which have been marked as completed must be reset to incomplete. Is there any way to do that in one time? I did that job by hand now which took me so much time. thanks in advance.
-
Building a Composite Business Process from Scratch-Guided 1 (Cannot Build)
Hi, I have tried to followed the document : Building a Composite Business Process from Scratch with SAP NetWeaver BPM u2013 Guide 1 to create my first BPM program, however, the program cannnot be built. I don't knoww how to fix the program, can you h
-
Related to Reservation and Goods Issue
Hi SAP Gurus, Reservation Created for Materials A,B,C on 16th of Augest and Stock was not available on that day. Goods came on after 20th Aug and I am creating Goods Issue for A,B,C and For A i can create Goods Issue against that reservation and for
-
hi, how to set the field length in internal table . i have created on report to download loadfile program. the field length is 50 but field input is 20 i want 2o ch and 30 sapece after next field was prit. how to do this.
-
GPU Mode crash when using 1024x1024px images on iPad Retina with cacheAsBitmapMatrix
So I am building a menu for a mobile app and I have created a sliding menu with tiles, I have done this before, all works great normally. This time, my tiles were really close to the power of 2 ( 1024x1024px ) so I decided to use that size and resize