MM - Material master data - move standard field to another view
Hi everyone,
ÉCC 6.0 - release 7.0.
I've been adding many custom fields in Material master data MM01/02/03. Now I got a problem because we have to use a standard field in another view.
The field MARA-HERKL is set up to 'SV'(attribute V_130F-PSTAT):
Warehouse management = S
Sales = V
I want to add 'K - Basic data' in this field's attribute at OSMR Tcode , but this attribute is disactivated. I can not change this value.
I've check this note 306966 that mention: You cannot create new entries and delete entries in client 000. This client contains only the entries delivered by SAP which are used for distinguishing customer-specific fields and SAP standard during the maintenance of the other clients.
Is there any problem whether I delete this field and afterwards create it with the new values?
I'm not in client 000. So, I want to just make sure I will do a legal change.
thank you in advance,
Alexandre
None tips, Closed.
Similar Messages
-
Extend material master data from one plant to another plant
hi,
how can i extend material master data from one plant to another plant.
is there any sap standard transaction for this ie. bdc/t-code.
thanks in advance.......
rahulHi
If you want to extend the material form one plant to another then below are the possible options.
1) MM01 - Use the material in the reference and fill in copy from and to then press enter to complete the extention.This is recommended only if you want to extend very less records.
2) Use LSMW and record MM01 thru BDC recording available in LSMW and make the template in excel and convert it to .txt tab delimited format to upload more records.LSMW is the perfect tool and is used extensively in all the projects.
3) Get the help from ABAPer to create upload program and include the BDC recording.
There is no standard T code available in SAP becoz data mainatenance in the material master will be based on the industry.
Hope it will help.
Thanks/Karthik -
Copy Material Master data - cannot copy "Proportion/Prod.Unit" view
Hello,
When I try to create material master data using the "Copy from..." option, data from the "Proportion/Prod.Unit" view is not copied to the new material. We are using SAP for Mill products.
Any clues?
Regards,
JoaoHello Joao,
There are two things, which have to be done :
The first thing of course is, that for the field MARA-KZWSM the field
"Propose Field Content from the Reference" must be set in transaction
OMSR.
The second is, that the user have to enter this screen, because if he
don't display this screen, then it is technically not possible to
copy the reference values.
(To copy this data from the reference material you have to go to the
subscreen SAPLMWSM 8030 and press enter).
Regards,
Mauro -
SAP standards for retriving the Material Master Data
Can someone provide me list of all SAP standards for retriving the Material Master Data with respect to views.
Standard Reports
Function Modules
RFC's
BAPI's.
T.codes
Sample code's
useful answers will surely be awarded.
Regards
VinayakHi,
These are the standard BAPI's for Material master.
BAPI_MATERIAL_DELETE Flag Material for Deletion
BAPI_MATERIAL_DISPLAY Display Material
BAPI_MATERIAL_EDIT Change Material
BAPI_RETAILMATERIAL_CREATE Create Material
BAPI_RETAILMATERIAL_DELETE Discontinue Material
BAPI_STANDARDMATERIAL_CREATE Create/Extend Material
BAPI_MATERIAL_SAVEREPLICA BAPI for Mass Maintenance of Material Data
BAPI_MATERIAL_SAVEDATA Create and Change Material Master Data
BAPI_MATERIAL_EXISTENCECHECK Check Existence of Material
BAPI_MATERIAL_GETBATCHCERT Create Quality Certificate for Batch in Portable Document Format (PDF)
BAPI_MATERIAL_GETBATCHES Create Batch List for a Material
BAPI_MATERIAL_GETCHARMERCHHIER Supply Characteristics of Retail Material for Material Group Hierarchy
BAPI_MATERIAL_GETINTNUMBER Assign New Internal Numbers for a Material Type
BAPI_MATERIAL_GETINTNUMBERRET Assign New Internal Numbers for a Material Type for Retail Materials
BAPI_MATERIAL_GETLIST Supply List of Materials for Search Criteria Transferred
Thanks., -
Combination of two material master data fields
Hello,
is there a possibility to combine two fields in the material master data?
I want to combine the "do not cost" in view Costing 1 with the "price control".
In case of price control = "V" I want to set the "do not cost" flag and in case of price control = "S" I want to delete the flag automatically.
Is it possible to combine these fields?
Thank you for any answer & regards
BrittaHi Britta,
Try the user-exit: MGA00001
I think you should be able to manage with it. Check & revert.
Regards,
Vivek -
What is procedure for creating new vendor and material master data in ABAP
What is procedure for creating new vendor and material master data in ABAP .
see below code which is used for creation of vendor master as well as extension...
*& Report ZFC_VENDOR_CREATE *
REPORT ZFC_VENDOR_CREATE LINE-SIZE 100
NO STANDARD PAGE HEADING
MESSAGE-ID ZZ.
TABLES
TABLES : SSCRFIELDS. " Fields on selection screens
CONSTANTS
DATA : C_SPLIT TYPE C VALUE '#'. " Used for Has Separator in GUI_UPLAOD
TYPES
Int'table to hold Vendor Master Data
TYPES : BEGIN OF TY_VENDOR_MASTER,
FLAG TYPE C, " Update Flag
LIFNR TYPE LIFNR, " Vendor Number
BUKRS TYPE BUKRS, " Company Code
KTOKK TYPE KTOKK, " Account Group
ANRED TYPE ANRED, " Title
NAME1 TYPE NAME1_GP, " Name1
NAME2 TYPE NAME2_GP, " Name2
SORTL TYPE SORTL, " Search Term 1
SORT2 TYPE AD_SORT2UL, " Search Term 2
STRAS TYPE STRAS_GP, " Street
PSTLZ TYPE PSTLZ, " Postal Code
ORT01 TYPE ORT01_GP, " City
REGIO TYPE REGIO, " Region
LAND1 TYPE LAND1_GP, " Country
SPRAS TYPE SPRAS, " Language
VBUND TYPE RASSC, " Trading Partner
BANKS TYPE BANKS, " Country
BANKL TYPE BANKK, " Bank Key
BANKN TYPE BANKN, " Bank Account
BKONT TYPE BKONT, " Bank Control Key
BANKA TYPE BANKA, " Name of Bank
AKONT TYPE AKONT, " Reconciliation Account
FDGRV TYPE FDGRV, " Cash Management Group
ZTERM TYPE DZTERM, " Payment Terms
REPRF TYPE REPRF, " Check Double Invoice
ZWELS TYPE DZWELS, " Payment Methods
XPORE TYPE XPORE, " Pay all items separately
END OF TY_VENDOR_MASTER,
Int'table to hold Vendor Extend Data
BEGIN OF TY_VENDOR_EXTEND,
FLAG TYPE C, " Update Flag
LIFNR TYPE LIFNR, " Vendor Number
BUKRS TYPE BUKRS, " Company Code
KTOKK TYPE KTOKK, " Account Group
REF_LIFNR TYPE LIFNR, " Reference Vendor Number
REF_BUKRS TYPE BUKRS, " Reference Company Code
AKONT TYPE AKONT, " Reconciliation Account
FDGRV TYPE FDGRV, " Cash Management Group
ZTERM TYPE DZTERM, " Payment Terms
REPRF TYPE REPRF, " Check Double Invoice
ZWELS TYPE DZWELS, " Payment Methods
XPORE TYPE XPORE, " Pay all items separately
END OF TY_VENDOR_EXTEND,
Int'table to hold Error Records Data
BEGIN OF TY_ERROR,
MSG(200) TYPE C, " To hold Message
LIFNR TYPE LIFNR, " Vendor Number
BUKRS TYPE BUKRS, " Company Code
END OF TY_ERROR.
DATA (Simple Fields)
DATA : W_COUNT TYPE I, " Variable to hold count of Records
W_SUCC_REC TYPE I, " No. of Success Records
W_SUCC_REC1 TYPE I, " No. of Updated Records
W_ERR_REC TYPE I, " No. of Error Records
w_noupdate_rec type i. " No. of Records not Changed
INTERNAL TABLES
Int'table to hold uploaded data from File
DATA : IT_VENDOR_MASTER TYPE STANDARD TABLE OF TY_VENDOR_MASTER,
WA_IT_VENDOR_MASTER TYPE TY_VENDOR_MASTER,
IT_VENDOR_EXTEND TYPE STANDARD TABLE OF TY_VENDOR_EXTEND,
WA_IT_VENDOR_EXTEND TYPE TY_VENDOR_EXTEND,
WA_IT_BDCDATA TYPE BDCDATA,
IT_BDCDATA TYPE STANDARD TABLE OF BDCDATA,
WA_IT_MESSTAB TYPE BDCMSGCOLL,
IT_MESSTAB TYPE STANDARD TABLE OF BDCMSGCOLL,
IT_ERROR TYPE STANDARD TABLE OF TY_ERROR,
WA_IT_ERROR TYPE TY_ERROR,
it_error_fk01 type standard table of ty_error,
wa_it_error_fk01 type ty_error,
it_error_fk02 type standard table of ty_error,
wa_it_error_fk02 type ty_error,
it_succ_rec1 type standard table of ty_error,
wa_it_succ_rec1 type ty_error,
it_noupdate type standard table of ty_error,
wa_it_noupdate type ty_error.
FLAGS
DATA : FL_FLAG1 TYPE C, " Flag to check error upload file
FL_FLAG2 TYPE C, " Flag to hold value
FL_FLAG3 TYPE C, " Flag to hold value
FL_FLAG4 TYPE C. " Flag to hold value
SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-001,
POSITION POS_LOW.
PARAMETERS : P_FILE(128) DEFAULT 'C:\UPLOAD.TXT' OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-002,
POSITION POS_LOW.
PARAMETERS : P_VENMAS RADIOBUTTON GROUP R1 DEFAULT 'X'.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-003,
POSITION POS_LOW.
PARAMETERS : P_VENEXT RADIOBUTTON GROUP R1.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-004,
POSITION POS_LOW.
PARAMETERS : P_MODE(1) DEFAULT 'N'.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-005,
POSITION POS_LOW.
PARAMETERS : P_GROUP(12) DEFAULT 'ZFC_VENDOR_C' OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-016,
POSITION POS_LOW.
PARAMETERS : P_GROUP1(12) DEFAULT 'ZFC_VENDOR_U' OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN ON
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
Form to get file path for upload of data
PERFORM GET_FILE_PATH.
AT SELECTION-SCREEN ON BLOCK B1.
Form to Validate data specified on Selection Screen
CHECK SSCRFIELDS-UCOMM EQ 'ONLI'.
PERFORM VALIDATE_DATA.
START - OF - SELECTION
START-OF-SELECTION.
IF P_VENMAS = 'X'.
Form to upload data from Presentation Server for Vendor Master
PERFORM UPLOAD_DATA TABLES IT_VENDOR_MASTER.
IF FL_FLAG1 NE 'X'.
SORT IT_VENDOR_MASTER BY LIFNR BUKRS KTOKK.
DELETE IT_VENDOR_MASTER WHERE LIFNR = ' '
AND BUKRS = ' '
AND KTOKK = ' '.
Form to process data for Vendor Master
PERFORM INSERT_VENDOR_MASTER_DATA.
ENDIF.
ELSEIF P_VENEXT = 'X'.
Form to upload data from Presentation Server for Vendor Extend
PERFORM UPLOAD_DATA TABLES IT_VENDOR_EXTEND.
IF FL_FLAG1 NE 'X'.
SORT IT_VENDOR_EXTEND BY LIFNR BUKRS KTOKK.
DELETE IT_VENDOR_EXTEND WHERE LIFNR = ' '
AND BUKRS = ' '
AND KTOKK = ' '.
Form to process data for Vendor Master
PERFORM CHK_AND_INS_VENDOR_EXTEND_DATA.
ENDIF.
ENDIF.
END - OF - SELECTION
END-OF-SELECTION.
IF FL_FLAG1 NE 'X'.
FORMAT COLOR 7.
WRITE:/2 TEXT-O01. " Total Number of records read :
FORMAT COLOR OFF.
WRITE:40 W_COUNT.
FORMAT COLOR 7.
WRITE:/2 TEXT-O02. " Total Number of Success records :
FORMAT COLOR OFF.
WRITE:40 W_SUCC_REC.
FORMAT COLOR 7.
WRITE:/2 TEXT-O07. " Total Number of Updated records :
FORMAT COLOR OFF.
WRITE:40 W_SUCC_REC1.
FORMAT COLOR 7.
WRITE:/2 TEXT-O08. " Total Number of Unchanged records :
FORMAT COLOR OFF.
WRITE:40 W_noupdate_REC.
FORMAT COLOR 7.
WRITE:/2 TEXT-O03. " Total Number of Error records :
FORMAT COLOR OFF.
WRITE:40 W_ERR_REC.
if not it_succ_rec1 is initial.
skip 1.
perform display_changed_report.
endif.
if not it_noupdate is initial.
skip 1.
perform display_nochange_report.
endif.
IF NOT IT_ERROR IS INITIAL.
SKIP 3.
Form to display error data
PERFORM DISPLAY_ERROR_REPORT.
ENDIF.
IF FL_FLAG2 = 'X'.
SKIP 2.
FORMAT COLOR 4.
WRITE:/2 TEXT-O04. " BDC Session Name for Creation (FK01) :
FORMAT COLOR OFF.
WRITE:40 P_GROUP.
perform display_error_report_fk01.
ENDIF.
IF FL_FLAG3 = 'X'.
SKIP 2.
FORMAT COLOR 4.
WRITE:/2 TEXT-O09. " BDC Session Name for Updation (FK02) :
FORMAT COLOR OFF.
WRITE:40 P_GROUP1.
perform display_error_report_fk02.
ENDIF.
ENDIF.
*& Form GET_FILE_PATH
This form is used to get the specified path for uploading of data from
flat file with the help of F4 function key
FORM GET_FILE_PATH .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = P_FILE.
ENDFORM. " GET_FILE_PATH
*& Form VALIDATE_DATA
This form is used to validate the data given by user on the Selection
Screen and the appropriate message is been displayed when an wrong
entry is inputted
FORM VALIDATE_DATA .
IF SY-BATCH EQ 'X'.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E001(ZZ) WITH TEXT-011.
" Excel file not to be used in Batch Mode
ENDIF.
IF P_MODE NE 'A' AND P_MODE NE 'N' AND P_MODE NE 'E'.
MESSAGE E001(ZZ) WITH TEXT-012.
" Session Mode should be either A or N or E
ENDIF.
ENDFORM. " VALIDATE_DATA
*& Form UPLOAD_DATA
This form is used to upload data from Presentation Server for either
Vendor Master or Vendor Extend
FORM UPLOAD_DATA TABLES P_IT_VENDOR.
DATA : L_FILENAME TYPE STRING,
L_FILETYPE TYPE CHAR10 VALUE 'ASC',
L_HEADER_LENGTH TYPE I VALUE 0,
L_READ_BY_LINE TYPE CHAR01 VALUE 'X'.
MOVE P_FILE TO L_FILENAME.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = L_FILENAME
FILETYPE = L_FILETYPE
HEADER_LENGTH = L_HEADER_LENGTH
READ_BY_LINE = L_READ_BY_LINE
HAS_FIELD_SEPARATOR = C_SPLIT
TABLES
DATA_TAB = P_IT_VENDOR
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF SY-SUBRC <> 0.
MESSAGE I001(ZZ) WITH TEXT-006 L_FILENAME.
MESSAGE ID SY-MSGID TYPE 'I' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
FL_FLAG1 = 'X'.
ELSEIF P_IT_VENDOR[] IS INITIAL.
MESSAGE I001(ZZ) WITH TEXT-014. " Uploaded File contains no data
FL_FLAG1 = 'X'.
ENDIF.
ENDFORM. " UPLOAD_DATA
*& Form INSERT_VENDOR_MASTER_DATA
This form is used to process BDC data for Vendor Master
FORM INSERT_VENDOR_MASTER_DATA .
DATA : L_LIFNR TYPE LIFNR.
CLEAR : L_LIFNR.
sort it_vendor_master by flag.
LOOP AT IT_VENDOR_MASTER INTO WA_IT_VENDOR_MASTER.
W_COUNT = W_COUNT + 1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_MASTER-LIFNR
IMPORTING
OUTPUT = WA_IT_VENDOR_MASTER-LIFNR.
if wa_it_vendor_master-flag = 'A'.
SELECT SINGLE LIFNR
FROM LFB1
INTO L_LIFNR
WHERE LIFNR = WA_IT_VENDOR_MASTER-LIFNR
AND BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
IF SY-SUBRC EQ 0.
WA_IT_ERROR-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_ERROR-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
WA_IT_ERROR-MSG = TEXT-015.
APPEND WA_IT_ERROR TO IT_ERROR.
W_ERR_REC = W_ERR_REC + 1.
CLEAR : WA_IT_ERROR, L_LIFNR.
ELSE.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_MASTER.
PERFORM CALL_TRANSACTION.
ENDIF.
CLEAR : WA_IT_VENDOR_MASTER.
elseif wa_it_vendor_master-flag = 'C'.
IF FL_FLAG2 = 'X' and fl_flag4 ne 'X'.
PERFORM CLOSE_BDC_SESSION.
fl_flag4 = 'X'.
ENDIF.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_MASTER.
PERFORM CALL_TRANSACTION_FK02.
CLEAR : WA_IT_VENDOR_MASTER.
elseif wa_it_vendor_master-flag = 'N'.
WA_IT_noupdate-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_noupdate-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
WA_IT_noupdate-MSG = TEXT-018.
APPEND WA_IT_noupdate TO IT_noupdate.
W_noupdate_REC = W_noupdate_REC + 1.
CLEAR : WA_IT_noupdate, WA_IT_VENDOR_MASTER.
endif.
ENDLOOP.
IF FL_FLAG3 = 'X'.
PERFORM CLOSE_BDC_SESSION.
ENDIF.
ENDFORM. " INSERT_VENDOR_MASTER_DATA
*& Form POPULATE_BDC_DATA_VEN_MASTER
This form is used to populate BDC data of Vendor Master
FORM POPULATE_BDC_DATA_VEN_MASTER .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_MASTER-ZTERM
IMPORTING
OUTPUT = WA_IT_VENDOR_MASTER-ZTERM.
IF WA_IT_VENDOR_MASTER-REPRF = 'Y'.
WA_IT_VENDOR_MASTER-REPRF = 'X'.
ENDIF.
IF WA_IT_VENDOR_MASTER-XPORE = 'Y'.
WA_IT_VENDOR_MASTER-XPORE = 'X'.
ENDIF.
if wa_it_vendor_master-flag = 'A'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0105',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_MASTER-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_MASTER-BUKRS,
BDC_FIELD USING 'RF02K-KTOKK' WA_IT_VENDOR_MASTER-KTOKK,
BDC_FIELD USING 'BDC_OKCODE' '/00'.
elseif wa_it_vendor_master-flag = 'C'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0106',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_MASTER-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_MASTER-BUKRS,
BDC_FIELD USING 'BDC_OKCODE' '=MALL',
BDC_DYNPRO USING 'SAPMF02K' '0106',
BDC_FIELD USING 'RF02K-D0110' 'X',
BDC_FIELD USING 'RF02K-D0120' 'X',
BDC_FIELD USING 'RF02K-D0130' 'X',
BDC_FIELD USING 'RF02K-D0210' 'X',
BDC_FIELD USING 'RF02K-D0215' 'X',
BDC_FIELD USING 'RF02K-D0220' 'X',
BDC_FIELD USING 'BDC_OKCODE' '/00'.
endif.
perform :BDC_DYNPRO USING 'SAPMF02K' '0110',
BDC_FIELD USING 'LFA1-ANRED' WA_IT_VENDOR_MASTER-ANRED,
BDC_FIELD USING 'LFA1-NAME1' WA_IT_VENDOR_MASTER-NAME1,
BDC_FIELD USING 'LFA1-NAME2' WA_IT_VENDOR_MASTER-NAME2,
BDC_FIELD USING 'LFA1-SORTL' WA_IT_VENDOR_MASTER-SORTL,
BDC_FIELD USING 'LFA1-STRAS' WA_IT_VENDOR_MASTER-STRAS,
BDC_FIELD USING 'LFA1-ORT01' WA_IT_VENDOR_MASTER-ORT01,
BDC_FIELD USING 'LFA1-PSTLZ' WA_IT_VENDOR_MASTER-PSTLZ,
BDC_FIELD USING 'LFA1-LAND1' WA_IT_VENDOR_MASTER-LAND1,
BDC_FIELD USING 'LFA1-REGIO' WA_IT_VENDOR_MASTER-REGIO,
BDC_FIELD USING 'LFA1-SPRAS' WA_IT_VENDOR_MASTER-SPRAS,
BDC_FIELD USING 'BDC_OKCODE' '/00',
BDC_DYNPRO USING 'SAPMF02K' '0120',
BDC_FIELD USING 'LFA1-VBUND' WA_IT_VENDOR_MASTER-VBUND,
BDC_FIELD USING 'BDC_OKCODE' '/00',
BDC_DYNPRO USING 'SAPMF02K' '0130',
BDC_FIELD USING 'LFBK-BANKS(01)' WA_IT_VENDOR_MASTER-BANKS,
BDC_FIELD USING 'LFBK-BANKL(01)' WA_IT_VENDOR_MASTER-BANKL,
BDC_FIELD USING 'LFBK-BANKN(01)' WA_IT_VENDOR_MASTER-BANKN,
BDC_FIELD USING 'BDC_OKCODE' '=BANK',
BDC_DYNPRO USING 'SAPLBANK' '0100',
BDC_FIELD USING 'BNKA-BANKA' WA_IT_VENDOR_MASTER-BANKA,
BDC_FIELD USING 'BDC_OKCODE' '=ENTR',
BDC_DYNPRO USING 'SAPMF02K' '0130',
BDC_FIELD USING 'BDC_OKCODE' '=ENTR',
BDC_DYNPRO USING 'SAPMF02K' '0210',
BDC_FIELD USING 'LFB1-AKONT' WA_IT_VENDOR_MASTER-AKONT,
BDC_FIELD USING 'LFB1-FDGRV' WA_IT_VENDOR_MASTER-FDGRV,
BDC_FIELD USING 'BDC_OKCODE' '=/00',
BDC_DYNPRO USING 'SAPMF02K' '0215',
BDC_FIELD USING 'LFB1-ZTERM' WA_IT_VENDOR_MASTER-ZTERM,
BDC_FIELD USING 'LFB1-REPRF' WA_IT_VENDOR_MASTER-REPRF,
BDC_FIELD USING 'LFB1-ZWELS' WA_IT_VENDOR_MASTER-ZWELS,
BDC_FIELD USING 'LFB1-XPORE' WA_IT_VENDOR_MASTER-XPORE,
BDC_FIELD USING 'BDC_OKCODE' '=UPDA'.
ENDFORM. " POPULATE_BDC_DATA_VEN_MASTER
*& Form BDC_DYNPRO
This form is used to move data to BDCDATA int'table
FORM BDC_DYNPRO USING PROGRAM TYPE BDC_PROG
DYNPRO TYPE BDC_DYNR.
CLEAR WA_IT_BDCDATA.
WA_IT_BDCDATA-PROGRAM = PROGRAM.
WA_IT_BDCDATA-DYNPRO = DYNPRO.
WA_IT_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_IT_BDCDATA TO IT_BDCDATA.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
This form is used to move data to BDCDATA int'table
FORM BDC_FIELD USING FNAM TYPE ANY
FVAL TYPE ANY.
CLEAR WA_IT_BDCDATA.
WA_IT_BDCDATA-FNAM = FNAM.
WA_IT_BDCDATA-FVAL = FVAL.
APPEND WA_IT_BDCDATA TO IT_BDCDATA.
ENDFORM. " BDC_FIELD
*& Form CALL_TRANSACTION
This form is used to Call FK01 for processing of data either for
Vendor Master or Vendor Extend. The error records are inserted to
Session which can be processed using SM35
FORM CALL_TRANSACTION .
DATA : L_OPTION TYPE CTU_PARAMS,
L_SUBRC TYPE SYSUBRC.
REFRESH IT_MESSTAB.
CLEAR IT_MESSTAB.
L_OPTION-DEFSIZE = 'X'.
L_OPTION-DISMODE = P_MODE.
L_OPTION-UPDMODE = 'S'.
CALL TRANSACTION 'FK01'
USING IT_BDCDATA
MESSAGES INTO IT_MESSTAB
OPTIONS FROM L_OPTION.
L_SUBRC = SY-SUBRC.
IF L_SUBRC = 0.
W_SUCC_REC = W_SUCC_REC + 1.
ELSE.
IF FL_FLAG2 NE 'X'.
PERFORM OPEN_BDC_SESSION.
FL_FLAG2 = 'X'.
ENDIF.
PERFORM BDC_INSERT.
W_ERR_REC = W_ERR_REC + 1.
PERFORM ERROR_RECORD_DATA.
ENDIF.
ENDFORM. " CALL_TRANSACTION
*& Form OPEN_BDC_SESSION
Form used to open session for Error out Records
FORM OPEN_BDC_SESSION .
DATA : L_USERID TYPE APQ_MAPN, " Variable to hold user-id
L_GROUP TYPE APQ_GRPN. " Variable to hold value
MOVE P_GROUP TO L_GROUP.
MOVE SY-UNAME TO L_USERID.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = L_GROUP
KEEP = SPACE
USER = L_USERID
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-008. " Unable to open BDC Session
ENDIF.
ENDFORM. " OPEN_BDC_SESSION
*& Form BDC_INSERT
This form is used to insert error records to a Session method
FORM BDC_INSERT .
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FK01'
TABLES
DYNPROTAB = IT_BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-009. " Unable to Insert Data to BDC Session
ENDIF.
ENDFORM. " BDC_INSERT
*& Form ERROR_RECORD_DATA
This form is used to process the messages for the error records which
will be displayed on the output report
FORM ERROR_RECORD_DATA .
DATA : L_LINES TYPE I,
L_MSG(200) TYPE C.
DESCRIBE TABLE IT_MESSTAB LINES L_LINES.
READ TABLE IT_MESSTAB INTO WA_IT_MESSTAB INDEX L_LINES.
IF SY-SUBRC = 0.
CLEAR L_MSG.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = WA_IT_MESSTAB-MSGID
LANG = SY-LANGU
NO = WA_IT_MESSTAB-MSGNR
V1 = WA_IT_MESSTAB-MSGV1
V2 = WA_IT_MESSTAB-MSGV2
V3 = WA_IT_MESSTAB-MSGV3
V4 = WA_IT_MESSTAB-MSGV4
IMPORTING
MSG = L_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WA_IT_ERROR_fk01-MSG = L_MSG.
ENDIF.
IF P_VENMAS = 'X'.
WA_IT_ERROR_fk01-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_ERROR_fk01-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
ELSEIF P_VENEXT = 'X'.
WA_IT_ERROR_fk01-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_ERROR_fk01-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
ENDIF.
APPEND WA_IT_ERROR_fk01 TO IT_ERROR_fk01.
CLEAR WA_IT_ERROR_fk01.
ENDIF.
ENDFORM. " ERROR_RECORD_DATA
*& Form CLOSE_BDC_SESSION
Form used to close session of the Error Records
FORM CLOSE_BDC_SESSION .
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-010. " Unable to Close BDC Session
ENDIF.
ENDFORM. " CLOSE_BDC_SESSION
*& Form CHK_AND_INS_VENDOR_EXTEND_DATA
This form is used to process BDC data for Vendor Extend
FORM CHK_AND_INS_VENDOR_EXTEND_DATA .
DATA : L_LIFNR TYPE LIFNR.
CLEAR : L_LIFNR, fl_flag4.
sort it_vendor_extend by flag.
LOOP AT IT_VENDOR_EXTEND INTO WA_IT_VENDOR_EXTEND.
W_COUNT = W_COUNT + 1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_EXTEND-REF_LIFNR
IMPORTING
OUTPUT = WA_IT_VENDOR_EXTEND-REF_LIFNR.
if wa_it_vendor_extend-flag = 'A'.
SELECT SINGLE LIFNR
FROM LFB1
INTO L_LIFNR
WHERE LIFNR = WA_IT_VENDOR_EXTEND-REF_LIFNR
AND BUKRS = WA_IT_VENDOR_EXTEND-REF_BUKRS.
IF SY-SUBRC NE 0.
WA_IT_ERROR-LIFNR = WA_IT_VENDOR_EXTEND-REF_LIFNR.
WA_IT_ERROR-BUKRS = WA_IT_VENDOR_EXTEND-REF_BUKRS.
WA_IT_ERROR-MSG = TEXT-007.
APPEND WA_IT_ERROR TO IT_ERROR.
W_ERR_REC = W_ERR_REC + 1.
CLEAR : WA_IT_ERROR, L_LIFNR.
ELSE.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_EXTEND-LIFNR
IMPORTING
OUTPUT = WA_IT_VENDOR_EXTEND-LIFNR.
SELECT SINGLE LIFNR
FROM LFB1
INTO L_LIFNR
WHERE LIFNR = WA_IT_VENDOR_EXTEND-LIFNR
AND BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
IF SY-SUBRC EQ 0.
WA_IT_ERROR-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_ERROR-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
WA_IT_ERROR-MSG = TEXT-015.
APPEND WA_IT_ERROR TO IT_ERROR.
W_ERR_REC = W_ERR_REC + 1.
CLEAR : WA_IT_ERROR, L_LIFNR.
ELSE.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_EXTEND.
PERFORM CALL_TRANSACTION.
ENDIF.
ENDIF.
CLEAR : WA_IT_VENDOR_EXTEND.
elseif wa_it_vendor_extend-flag = 'C'.
IF FL_FLAG2 = 'X' and fl_flag4 ne 'X'.
PERFORM CLOSE_BDC_SESSION.
fl_flag4 = 'X'.
ENDIF.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_extend.
PERFORM CALL_TRANSACTION_FK02.
CLEAR : WA_IT_VENDOR_EXTEND.
elseif wa_it_vendor_extend-flag = 'N'.
WA_IT_noupdate-LIFNR = WA_IT_VENDOR_extend-LIFNR.
WA_IT_noupdate-BUKRS = WA_IT_VENDOR_extend-BUKRS.
WA_IT_noupdate-MSG = TEXT-019.
APPEND WA_IT_noupdate TO IT_noupdate.
W_noupdate_REC = W_noupdate_REC + 1.
CLEAR : WA_IT_noupdate, WA_IT_VENDOR_EXTEND.
endif.
ENDLOOP.
IF FL_FLAG2 = 'X'.
PERFORM CLOSE_BDC_SESSION.
ENDIF.
if fl_flag3 = 'X'.
PERFORM CLOSE_BDC_SESSION.
ENDIF.
ENDFORM. " CHK_AND_INS_VENDOR_EXTEND_DATA
*& Form POPULATE_BDC_DATA_VEN_EXTEND
This form is used to populate BDC data of Vendor Extend
FORM POPULATE_BDC_DATA_VEN_EXTEND .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_EXTEND-ZTERM
IMPORTING
OUTPUT = WA_IT_VENDOR_EXTEND-ZTERM.
IF WA_IT_VENDOR_EXTEND-REPRF = 'Y'.
WA_IT_VENDOR_EXTEND-REPRF = 'X'.
ENDIF.
IF WA_IT_VENDOR_extend-XPORE = 'Y'.
WA_IT_VENDOR_extend-XPORE = 'X'.
ENDIF.
if wa_it_vendor_extend-flag = 'A'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0105',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_EXTEND-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_EXTEND-BUKRS,
BDC_FIELD USING 'RF02K-KTOKK' WA_IT_VENDOR_EXTEND-KTOKK,
BDC_FIELD USING 'RF02K-REF_LIFNR'
WA_IT_VENDOR_EXTEND-REF_LIFNR,
BDC_FIELD USING 'RF02K-REF_BUKRS'
WA_IT_VENDOR_EXTEND-REF_BUKRS,
BDC_FIELD USING 'BDC_OKCODE' '/00'.
elseif wa_it_vendor_extend-flag = 'C'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0106',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_extend-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_extend-BUKRS,
BDC_FIELD USING 'RF02K-D0210' 'X',
BDC_FIELD USING 'RF02K-D0215' 'X',
BDC_FIELD USING 'BDC_OKCODE' '/00'.
endif.
perform :BDC_DYNPRO USING 'SAPMF02K' '0210',
BDC_FIELD USING 'LFB1-AKONT' WA_IT_VENDOR_EXTEND-AKONT,
BDC_FIELD USING 'LFB1-FDGRV' WA_IT_VENDOR_EXTEND-FDGRV,
BDC_FIELD USING 'BDC_OKCODE' '=/00',
BDC_DYNPRO USING 'SAPMF02K' '0215',
BDC_FIELD USING 'LFB1-ZTERM' WA_IT_VENDOR_EXTEND-ZTERM,
BDC_FIELD USING 'LFB1-REPRF' WA_IT_VENDOR_EXTEND-REPRF,
BDC_FIELD USING 'LFB1-ZWELS' WA_IT_VENDOR_EXTEND-ZWELS,
BDC_FIELD USING 'LFB1-XPORE' WA_IT_VENDOR_extend-XPORE,
BDC_FIELD USING 'BDC_OKCODE' '=UPDA'.
ENDFORM. " POPULATE_BDC_DATA_VEN_EXTEND
*& Form DISPLAY_ERROR_REPORT
This form is used to display the error records on the output screen
FORM DISPLAY_ERROR_REPORT .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O05. " Error List for Vendor Master
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O06. " Error List for Vendor Master Extended
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H03, " Error Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_ERROR INTO WA_IT_ERROR.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_ERROR-LIFNR,
17 SY-VLINE,
18 WA_IT_ERROR-BUKRS,
31 SY-VLINE,
32 WA_IT_ERROR-MSG,
100 SY-VLINE.
CLEAR : WA_IT_ERROR.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
ENDFORM. " DISPLAY_ERROR_REPORT
*& Form CALL_TRANSACTION_FK02
Form used to Call Transaction FK02
form CALL_TRANSACTION_FK02 .
DATA : L_OPTION TYPE CTU_PARAMS,
L_SUBRC TYPE SYSUBRC.
REFRESH IT_MESSTAB.
CLEAR IT_MESSTAB.
L_OPTION-DEFSIZE = 'X'.
L_OPTION-DISMODE = P_MODE.
L_OPTION-UPDMODE = 'S'.
CALL TRANSACTION 'FK02'
USING IT_BDCDATA
MESSAGES INTO IT_MESSTAB
OPTIONS FROM L_OPTION.
L_SUBRC = SY-SUBRC.
IF L_SUBRC = 0.
W_SUCC_REC1 = W_SUCC_REC1 + 1.
WA_IT_succ_rec1-MSG = Text-017.
IF P_VENMAS = 'X'.
WA_IT_succ_rec1-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_succ_rec1-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
ELSEIF P_VENEXT = 'X'.
WA_IT_succ_rec1-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_succ_rec1-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
ENDIF.
APPEND WA_IT_succ_rec1 TO IT_succ_rec1.
ELSE.
IF FL_FLAG3 NE 'X'.
PERFORM OPEN_BDC_SESSION_fk02.
FL_FLAG3 = 'X'.
ENDIF.
PERFORM BDC_INSERT_fk02.
W_ERR_REC = W_ERR_REC + 1.
PERFORM ERROR_RECORD_DATA1.
ENDIF.
endform. " CALL_TRANSACTION_FK02
*& Form OPEN_BDC_SESSION_fk02
Form used to Open session for FK02
form OPEN_BDC_SESSION_fk02 .
DATA : L_USERID TYPE APQ_MAPN, " Variable to hold user-id
L_GROUP TYPE APQ_GRPN. " Variable to hold value
MOVE P_GROUP1 TO L_GROUP.
MOVE SY-UNAME TO L_USERID.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = L_GROUP
KEEP = SPACE
USER = L_USERID
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-008. " Unable to open BDC Session
ENDIF.
endform. " OPEN_BDC_SESSION_fk02
*& Form BDC_INSERT_fk02
Form used to insert data into BDC session using FK02
form BDC_INSERT_fk02 .
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FK02'
TABLES
DYNPROTAB = IT_BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-009. " Unable to Insert Data to BDC Session
ENDIF.
endform. " BDC_INSERT_fk02
*& Form display_changed_report
Form to display Updated Vendor data
form display_changed_report .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O10. " Updated List for Vendor Master
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O11. " Updated List for Vendor Master Extended
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H04, " Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_succ_rec1 INTO WA_IT_succ_rec1.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_succ_rec1-LIFNR,
17 SY-VLINE,
18 WA_IT_succ_rec1-BUKRS,
31 SY-VLINE,
32 WA_IT_succ_rec1-MSG,
100 SY-VLINE.
CLEAR : WA_IT_succ_rec1.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
endform. " display_changed_report
*& Form display_nochange_report
Form to display No Changed data for Vendors
form display_nochange_report .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O12. " No Changes List for Vendor Master
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O13. " No Changes List for Vendor Master Extended
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H04, " Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_noupdate INTO WA_IT_noupdate.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_noupdate-LIFNR,
17 SY-VLINE,
18 WA_IT_noupdate-BUKRS,
31 SY-VLINE,
32 WA_IT_noupdate-MSG,
100 SY-VLINE.
CLEAR : WA_IT_noupdate.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
endform. " display_nochange_report
*& Form ERROR_RECORD_DATA1
Form to get Error Message for Changed Vendors
form ERROR_RECORD_DATA1 .
DATA : L_LINES TYPE I,
L_MSG(200) TYPE C.
DESCRIBE TABLE IT_MESSTAB LINES L_LINES.
READ TABLE IT_MESSTAB INTO WA_IT_MESSTAB INDEX L_LINES.
IF SY-SUBRC = 0.
CLEAR L_MSG.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = WA_IT_MESSTAB-MSGID
LANG = SY-LANGU
NO = WA_IT_MESSTAB-MSGNR
V1 = WA_IT_MESSTAB-MSGV1
V2 = WA_IT_MESSTAB-MSGV2
V3 = WA_IT_MESSTAB-MSGV3
V4 = WA_IT_MESSTAB-MSGV4
IMPORTING
MSG = L_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WA_IT_ERROR_fk02-MSG = L_MSG.
ENDIF.
IF P_VENMAS = 'X'.
WA_IT_ERROR_fk02-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_ERROR_fk02-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
ELSEIF P_VENEXT = 'X'.
WA_IT_ERROR_fk02-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_ERROR_fk02-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
ENDIF.
APPEND WA_IT_ERROR_fk02 TO IT_ERROR_fk02.
CLEAR WA_IT_ERROR_fk02.
ENDIF.
endform. " ERROR_RECORD_DATA1
*& Form display_error_report_fk01
Form to display Error Report for Master Vendors (FK01)
form display_error_report_fk01 .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O05. " Error List for Vendor Master (FK01)
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O06. " Error List for Vendor Master Extended (FK01)
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H04, " Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_ERROR_fk01 INTO WA_IT_ERROR_fk01.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_ERROR_fk01-LIFNR,
17 SY-VLINE,
18 WA_IT_ERROR_fk01-BUKRS,
31 SY-VLINE,
32 WA_IT_ERROR_fk01-MSG,
100 SY-VLINE.
CLEAR : WA_IT_ERROR_fk01.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
endform. " display_error_report_fk01
*& Form display_error_report_fk02
Form to display Error Report for changed Vendors (FK02)
form display_error_report_fk02 .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O14. " Error List for Vendor Master (FK02)
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O15. " Error List for Vendor Master Extended (FK02)
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number -
ALE:Material Master Data Distribution
Hi
I am new to ALE Material Master Data Distribution and if the questions are incorrectly worded, please accept my apologies. It is due to lack of knowledge.
I am doing Material Master Data distribution and I am using standard basic type MATMAS03. The standard TCode MM01, MM02 has SAP tables and 3 custom tables.
I have turned the active on using BD61 and change pointers to message type.
Q: Is the change pointer, applicable to entire material master? i.e. if I change a field in Z table or standard material tables, can an IDOC be created for the entire material record?
Q: What is the function of BD52? Does this override the option Activate Change pointers for message type? Does it mean, if the changes are made to those fields in BD52 a change pointer is created?
Q: If I change Z table only, will there be a change pointer created? If not, how could I accomplish this using BD52.
Q When do we use the enhancement MGV00001?
Also, If you could add anything in addition to above queries, it will be helpful to me and I appreciate it.
With regards,
WilliamThank you Sudhakar.
Your tips are good, but, I was not able to get the problem resolved.
Let me explain what I have done based on your tips.
1. MATMAS uses MATMAS03. The basic type has NOT been modified to have z fields yet.
2. Using BD52, i have created the following fields
MATERIAL ZEMM_MARA_TECH IM_ADVISORY_CODE
MATERIAL ZEMM_MARA_TECH KEY.
3. Modified the MMR for IM_ADVISORY_CODE.
I did not see a change pointer for this change.
Q: When I created above entry using BD52, was asking the table name. The table name is stored in TCD0B. What TCode is available the entries in TCDOB. For the time being, i created using SQL.
Q. Is there a follow up configuration required to capture the changes?
I will award the points in a couple of days time, even if I do not get the solution, because you have spent your precious time for the community. I will wait for a couple of days for other suggestions and close the Problem. -
About material master data batch input
hello
i wrote a batch input for material master data. but it can't work ,i can't use it to create material.hope someone help me!thanks.code is below.
report z_mat_batchinput no standard page heading
line-size 255 message-id YB.
mat batch input
include bdcrecx1.
include .
tables: mara,marm,MARC,MARD,T134,NRIV,T006A,T023,T001W,T001L,
TVKO,TVTW,T025,TTGR,TLGR,TVKWZ,T006.
data: DIMID like t006-DIMID.
data: flag, K, tmp.
DATA: X TYPE I.
************ÉÏÔØÎļþÄÚ±í************************
data: begin of record occurs 0,
MATNR(018), " ÎïÁϺÅ
MTART(004), " ÎïÁÏÀàÐÍ
**generaldata1**
MAKTX(040), " ÎïÁÏÃèÊö
EAKTX(040), " Ó¢ÎÄÃèÊö
MEINS(003), " »ù±¾¼ÆÁ¿µ¥Î»
MATKL(009), " ÎïÁÏ×é
BISMT(018), " ¾ÉÎïÁϺÅ
EXTWG(018), " ÍⲿÎïÁÏ×é
SPART(002), " ²¿ÃÅ
MTPOS_MARA(004), " ÆÕͨÏîÄ¿Àà±ð×é
BRGEW(017), " ëÖØ
GEWEI(003), " ÖØÁ¿µ¥Î»
NTGEW(017), " ¾»ÖØ
VOLUM(017), " Ìå»ý
VOLEH(003), " Ìå»ýµ¥Î»
GROES(032), " Á¿¸Ù
MAGRV(004), " ÎïÁÏ×éµÄ°ü×°Îï
**generaldata2**
NORMT(018), " ¹¤Òµ±ê×¼ÃèÊö
FERTH(018), " ÀàÐÍ
WRKST(048), " ¹æ¸ñ
**generaldata1**
EAN11(018), " ²úÆ·±íʶÂë
**generaldata2**
ZEIAR(003), " ÎĵµÀàÐÍ£¬ºÏÀí´¢±¸ÖÜתÆÚ
WERKS(004), " ¹¤³§
VKORG(004), " ÏúÊÛ×éÖ¯
VTWEG(002), " ·ÖÏúÇþµÀ
**salesorg 1**
VRKME(003), " ÏúÊÛµ¥Î»
VMREN(006), " ÏúÊÛµ¥Î»×ª»»Òò×Ó
VMREZ(006), " »ù±¾µ¥Î»×ª»»Òò×Ó
SPART(002), " ²úÆ·×é
DWERK(004), " ½»»õ¹¤³§
TAXKM(001), " ÎïÁÏË°·ÖÀà
**salesorg 2**
KONDM(002), " ÎïÁ϶¨¼Û×é
KTGRM(002), " ¿ÆÄ¿ÉèÖÃ×é
MVGR1(003), " ÎïÁÏ×é 1
MVGR2(003), " ÎïÁÏ×é 2
MTPOS(004), " ÏîÄ¿Àà±ð×é
VERSG(001), " ÎïÁÏͳ¼Æ×é
**ÏúÊÛ£ºÒ»°ã/¹¤³§Êý¾Ý**
MTVFP(002), " ¿ÉÓÃÐÔ¼ì²é
XCHPF(001), " Åú´Î¹ÜÀí
YCHPF(001), " ÅúÁ¿¹ÜÀí
TRAGR(004), " ÔËÊä×é
ladgr(004), " ×°ÔØ×é
**pur**
BSTME(003), " ¶©µ¥µ¥Î»
UMREZ(006), " »ù±¾µ¥Î»×ª»»Òò×Ó
UMREN(006), " ¶©µ¥µ¥Î»×ª»»Òò×Ó
WEBAZ(003), " ÊÕ»õ´¦Àíʱ¼ä
EKGRP(003), " ²É¹º×é
LGORT(004), " ¿â´æµØ
**Ò»°ã¹¤³§Êý¾Ý/²Ö´¢1**
AUSME(003), " ·¢»õµ¥Î»
UMREJ(006), " »ù±¾µ¥Î»×ª»»Òò×Ó
UMREF(006), " ·¢»õµ¥Î»×ª»»Òò×Ó
XCHPF(001), " ÅúÁ¿¹ÜÀí
**MRP 1**
DISGR(004), " MRP×é
DISMM(002), " MRPÀàÐÍ
FXHOR(003), " ¼Æ»®µÄʱ½ì
DISPO(003), " MRP¿ØÖÆÕß
DISLS(002), " ÅúÁ¿
MAABC(001), " ABC±êʶ
BSTFE(018), " ¹Ì¶¨ÅúÁ¿´óС
**MRP 2**
RESKZ(001), " »ñÈ¡ÀàÐÍ
BESKZ(001), " ²É¹ºÀàÐÍ
SOBSL(002), " ÌØÊâ²É¹ºÀà
LGPRO(004), " ·¢»õ²Ö´¢µØµã
RGEKZ(001), " ·´³å
PLIFZ(003), " ¼Æ»®½»»õʱ¼ä
VEBAZ(003), " ÊÕ»õ´¦Àíʱ¼ä
DZEIT(008), "×ÔÖÆÉú²ú
FHORI(003), " ¼Æ»®±ß¼ÊÂë
EISBE(018), " °²È«¿â´æ
**MRP 3**
PERKZ(001), " ÆÚ¼ä±êʶ
STRGR(002), " ²ßÂÔ×é
VRMOD(001), " ÏûºÄģʽ
VINT1(003), " ÄæÏòÏûºÄÆÚ¼ä
VINT2(003), " ÏòÇ°ÏûºÄÆÚ¼ä
NTVFP(002), " ¿ÉÓÃÐÔ¼ì²é
**MRP 4**
SAUFT(001), " Öظ´ÖÆÔì±êÖ¾
SFEPR(004), " Öظ´Éú²ú²ÎÊýÎļþ
**¹¤×÷¼Æ»®**
FEVOR(003), " Éú²úµ÷¶ÈÔ±
FRTME(003), " Éú²úµ¥Î»
SMREZ(006), " »ù±¾µ¥Î»×ª»»Òò×Ó
SMREN(006), " Éú²úµ¥Î»×ª»»Òò×Ó
UEETK(001), " ÎÞÏÞÖƹýÁ¿½»»õ
**»á¼Æ 1**
BKLAS(004), " ÆÀ¹ÀÀà
BWTTY(001), " ¹À¼Û·ÖÀà
VPRSV(001), " ¼Û¸ñ¿ØÖÆ
PEINH(006), " ¼Û¸ñµ¥Î»
VERPR(015), " Òƶ¯Æ½¾ù¼Û
STPRS(015), " ±ê×¼¼Û
**»á¼Æ 2**
BWPRH(014), " ÉÌÒµ¼Û¸ñ 1
**³É±¾ 1**
LOSGR(018), " ÅúÁ¿³É±¾ºËËã
**³É±¾ 2**
ZPLP1(014), " ¼Æ»®¼Û¸ñ 1
ZPLD1(010), " ¼Æ»®ÈÕÆÚ 1
**qm**
ART1(8), "¼ìÑéÀàÐÍ1
AKTIV1(1), "ÒѼ¤»î
QMPUR(1), "¼¤»î²É¹ºÖÐµÄ QM
SSQSS(8), "QM ¿ØÖÆÂë¡¢
QMATV(8), "QM¼ìÑéÉèÖÃ
ART2(8), "¼ìÑéÀàÐÍ2
AKTIV2(6), "ÒѼ¤»î
ART3(8), "¼ìÑéÀàÐÍ3
AKTIV3(6), "ÒѼ¤»î
end of record.
************ÏÂÔظñʽ/´íÎóÎļþÄÚ±í**************
data: begin of record1 occurs 0,
MATNR(018), " ÎïÁϺÅ
MTART(008), " ÎïÁÏÀàÐÍ
**»ù±¾Êý¾Ý1**
MAKTX(040), " ÎïÁÏÃèÊö
EAKTX(040), " Ó¢ÎÄÃèÊö
MEINS(013), " »ù±¾¼ÆÁ¿µ¥Î»
MATKL(009), " ÎïÁÏ×é
BISMT(018), " ¾ÉÎïÁϺÅ
EXTWG(018), " ÍⲿÎïÁÏ×é
SPART(002), " ²¿ÃÅ
MTPOS_MARA(004), " ÆÕͨÏîÄ¿Àà±ð×é
BRGEW(017), " ëÖØ
GEWEI(008), " ÖØÁ¿µ¥Î»
NTGEW(017), " ¾»ÖØ
VOLUM(017), " Ìå»ý
VOLEH(008), " Ìå»ýµ¥Î»
GROES(032), " Á¿¸Ù
MAGRV(014), " ÎïÁÏ×éµÄ°ü×°Îï
**»ù±¾Êý¾Ý2**
NORMT(018), " ¹¤Òµ±ê×¼ÃèÊö
FERTH(018), " ÀàÐÍ
WRKST(048), " ¹æ¸ñ
**»ù±¾Êý¾Ý1**
EAN11(018), " ²úÆ·±íʶÂë
**»ù±¾Êý¾Ý2**
ZEIAR(003), " ÎĵµÀàÐÍ£¬ºÏÀí´¢±¸ÖÜתÆÚ
WERKS(004), " ¹¤³§
VKORG(008), " ÏúÊÛ×éÖ¯
VTWEG(008), " ·ÖÏúÇþµÀ
**ÏúÊÛ×éÖ¯ 1**
VRKME(003), " ÏúÊÛµ¥Î»
VMREN(006), " ÏúÊÛµ¥Î»×ª»»Òò×Ó
VMREZ(006), " »ù±¾µ¥Î»×ª»»Òò×Ó
SPART(006), " ²úÆ·×é
DWERK(008), " ½»»õ¹¤³§
TAXKM(010), " ÎïÁÏË°·ÖÀà
**ÏúÊÛ×éÖ¯ 2**
KONDM(010), " ÎïÁ϶¨¼Û×é
KTGRM(010), " ¿ÆÄ¿ÉèÖÃ×é
MVGR1(003), " ÎïÁÏ×é 1
MVGR2(003), " ÎïÁÏ×é 2
MTPOS(010), " ÏîÄ¿Àà±ð×é
VERSG(001), " ÎïÁÏͳ¼Æ×é
**ÏúÊÛ£ºÒ»°ã/¹¤³§Êý¾Ý**
MTVFP(010), " ¿ÉÓÃÐÔ¼ì²é
XCHPF(008), " Åú´Î¹ÜÀí
YCHPF(001), " ÅúÁ¿¹ÜÀí
TRAGR(006), " ÔËÊä×é
ladgr(006), " ×°ÔØ×é
**²É¹º**
BSTME(003), " ¶©µ¥µ¥Î»
UMREZ(006), " »ù±¾µ¥Î»×ª»»Òò×Ó
UMREN(006), " ¶©µ¥µ¥Î»×ª»»Òò×Ó
WEBAZ(003), " ÊÕ»õ´¦Àíʱ¼ä
EKGRP(006), " ²É¹º×é
LGORT(004), " ¿â´æµØ
**Ò»°ã¹¤³§Êý¾Ý/²Ö´¢1**
AUSME(003), " ·¢»õµ¥Î»
UMREJ(006), " »ù±¾µ¥Î»×ª»»Òò×Ó
UMREF(006), " ·¢»õµ¥Î»×ª»»Òò×Ó
XCHPF(001), " ÅúÁ¿¹ÜÀí
**MRP 1**
DISGR(004), " MRP×é
DISMM(009), " MRPÀàÐÍ
FXHOR(003), " ¼Æ»®µÄʱ½ì
DISPO(011), " MRP¿ØÖÆÕß
DISLS(004), " ÅúÁ¿
MAABC(007), " ABC±êʶ
BSTFE(018), " ¹Ì¶¨ÅúÁ¿´óС
**MRP 2**
RESKZ(001), " »ñÈ¡ÀàÐÍ
BESKZ(008), " ²É¹ºÀàÐÍ
SOBSL(002), " ÌØÊâ²É¹ºÀà
LGPRO(004), " ·¢»õ²Ö´¢µØµã
RGEKZ(001), " ·´³å
PLIFZ(012), " ¼Æ»®½»»õʱ¼ä
VEBAZ(003), " ÊÕ»õ´¦Àíʱ¼ä
DZEIT(008), "×ÔÖÆÉú²ú
FHORI(010), " ¼Æ»®±ß¼ÊÂë
EISBE(018), " °²È«¿â´æ
**MRP 3**
PERKZ(008), " ÆÚ¼ä±êʶ
STRGR(006), " ²ßÂÔ×é
VRMOD(001), " ÏûºÄģʽ
VINT1(003), " ÄæÏòÏûºÄÆÚ¼ä
VINT2(003), " ÏòÇ°ÏûºÄÆÚ¼ä
NTVFP(010), " ¿ÉÓÃÐÔ¼ì²é
**MRP 4**
SAUFT(001), " Öظ´ÖÆÔì±êÖ¾
SFEPR(004), " Öظ´Éú²ú²ÎÊýÎļþ
**¹¤×÷¼Æ»®**
FEVOR(003), " Éú²úµ÷¶ÈÔ±
FRTME(003), " Éú²úµ¥Î»
SMREZ(006), " »ù±¾µ¥Î»×ª»»Òò×Ó
SMREN(006), " Éú²úµ¥Î»×ª»»Òò×Ó
UEETK(001), " ÎÞÏÞÖƹýÁ¿½»»õ
**»á¼Æ 1**
BKLAS(006), " ÆÀ¹ÀÀà
BWTTY(001), " ¹À¼Û·ÖÀà
VPRSV(008), " ¼Û¸ñ¿ØÖÆ
PEINH(008), " ¼Û¸ñµ¥Î»
VERPR(015), " Òƶ¯Æ½¾ù¼Û
STPRS(015), " ±ê×¼¼Û
**»á¼Æ 2**
BWPRH(014), " ÉÌÒµ¼Û¸ñ 1
**³É±¾ 1**
LOSGR(018), " ÅúÁ¿³É±¾ºËËã
**³É±¾ 2**
ZPLP1(014), " ¼Æ»®¼Û¸ñ 1
ZPLD1(010), " ¼Æ»®ÈÕÆÚ 1
**ÖÊÁ¿¹ÜÀí**
ART1(8), "¼ìÑéÀàÐÍ1
AKTIV1(6), "ÒѼ¤»î
QMPUR(010), "¼¤»î²É¹ºÖÐµÄ QM
SSQSS(8), "QM ¿ØÖÆÂë¡¢
QMATV(8), "QM¼ìÑéÉèÖÃ
ART2(8), "¼ìÑéÀàÐÍ2
AKTIV2(6), "ÒѼ¤»î
ART3(8), "¼ìÑéÀàÐÍ3
AKTIV3(6), "ÒѼ¤»î
end of record1.
selection-screen begin of block 0 with frame title text-001.
selection-screen begin of line .
selection-screen position 1.
parameters: test like rkec1-test .
selection-screen
comment 3(4) text-004 for field test.
selection-screen position 26.
parameters: oldfile like rlgrap-filename.
selection-screen
comment 9(17) text-003 for field oldfile.
selection-screen: end of line.
selection-screen begin of line.
selection-screen position 1.
parameters: dnldflag like rkec1-test default 'X'.
selection-screen
comment 3(4) text-005 for field dnldflag.
selection-screen position 26.
parameters: outfile like rlgrap-filename .
selection-screen
comment 9(17) text-006 for field outfile.
selection-screen: end of line.
selection-screen end of block 0 .
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-002.
selection-screen begin of line.
selection-screen position 1.
PARAMETERS: GEN1 LIKE RKEC1-TEST.
selection-screen
comment 3(9) text-007 for field GEN1.
selection-screen position 26.
PARAMETERS: GEN2 LIKE RKEC1-TEST.
selection-screen
comment 28(9) text-008 for field GEN2.
selection-screen end of line.
selection-screen begin of line.
selection-screen position 1.
PARAMETERS: SALORG1 LIKE RKEC1-TEST.
selection-screen
comment 3(21) text-009 for field SALORG1.
selection-screen position 26.
PARAMETERS: SALORG2 LIKE RKEC1-TEST.
selection-screen
comment 28(21) text-010 for field SALORG2.
selection-screen position 51.
PARAMETERS: SALPLANT LIKE RKEC1-TEST.
selection-screen
comment 53(19) text-011 for field SALPLANT.
selection-screen end of line.
selection-screen begin of line.
selection-screen position 1.
PARAMETERS: PURCHASE LIKE RKEC1-TEST.
selection-screen
comment 3(21) text-012 for field PURCHASE.
selection-screen position 26.
PARAMETERS: PLTSTRG1 LIKE RKEC1-TEST.
selection-screen
comment 28(21) text-018 for field PLTSTRG1.
selection-screen end of line.
selection-screen begin of line.
selection-screen position 1.
PARAMETERS: MRP1 LIKE RKEC1-TEST.
selection-screen
comment 3(4) text-013 for field MRP1.
selection-screen position 13.
PARAMETERS: MRP2 LIKE RKEC1-TEST.
selection-screen
comment 15(4) text-014 for field MRP2.
selection-screen position 26.
PARAMETERS: MRP3 LIKE RKEC1-TEST.
selection-screen
comment 28(4) text-015 for field MRP3.
selection-screen position 37.
PARAMETERS: MRP4 LIKE RKEC1-TEST.
selection-screen
comment 39(4) text-016 for field MRP4.
selection-screen position 51.
PARAMETERS: PLANTSTR LIKE RKEC1-TEST.
selection-screen
comment 53(8) text-017 for field PLANTSTR.
selection-screen end of line.
selection-screen begin of line.
selection-screen position 1.
PARAMETERS: QAU LIKE RKEC1-TEST.
selection-screen
comment 3(8) text-023 for field QAU.
selection-screen position 13.
PARAMETERS: ACC1 LIKE RKEC1-TEST.
selection-screen
comment 15(5) text-019 for field ACC1.
selection-screen position 26.
PARAMETERS: ACC2 LIKE RKEC1-TEST.
selection-screen
comment 28(5) text-020 for field ACC2.
selection-screen position 37.
PARAMETERS: COR1 LIKE RKEC1-TEST.
selection-screen
comment 39(5) text-021 for field COR1.
selection-screen position 51.
PARAMETERS: COR2 LIKE RKEC1-TEST.
selection-screen
comment 53(5) text-022 for field COR2.
selection-screen end of line.
SELECTION-SCREEN END OF BLOCK 1.
at selection-screen on value-request for oldfile.
call function 'KD_GET_FILENAME_ON_F4'
EXPORTING
mask = ',Îı¾Îļþ(ÖƱí·û·Ö¸ô),*.txt'
static = 'X'
CHANGING
file_name = oldfile.
at selection-screen on value-request for outfile.
call function 'KD_GET_FILENAME_ON_F4'
EXPORTING
mask = ',Microsoft Excel¹¤×÷²¾,*.xls'
static = 'X'
CHANGING
file_name = outfile.
initialization.
******µÃµ½ÎļþĿ¼*******
call function 'WS_QUERY'
EXPORTING
query = 'CD'
IMPORTING
return = outfile.
if sy-subrc <> 0.
message e005 with outfile.
endif.
oldfile = outfile.
concatenate outfile 'mat_fat' into outfile.
*ÅúÊäÈëĬÈÏÃû³Æ
group = 'MATBATCHIN'.
start-of-selection.
if dnldflag eq 'X' and not ( outfile is initial ).
perform download_data.
stop.
endif.
perform upload_data.
if test = ' '.
*ÊÓͼ²ÎÊý¼ì²é
IF ( GEN1 NE 'X' AND GEN2 NE 'X' AND SALORG1 NE 'X'
AND SALORG2 NE 'X' AND SALPLANT NE 'X'
AND PURCHASE NE 'X' AND PLTSTRG1 NE 'X'
AND MRP1 NE 'X' AND MRP2 NE 'X' AND MRP3 NE 'X'
AND MRP4 NE 'X' AND PLANTSTR NE 'X'
AND ACC1 NE 'X' AND ACC2 NE 'X'
AND COR1 NE 'X' AND COR2 NE 'X' and qau ne 'X' ) .
MESSAGE E000 WITH 'ÇëÑ¡ÔñÐèά»¤ÊÓͼ'.
ENDIF.
perform open_group.
SORT RECORD BY WERKS MATNR.
loop at record.
perform bdc_fill.
perform bdc_transaction using 'MM01'.
clear: bdcdata.
refresh: bdcdata.
endloop.
perform close_group.
else.
perform file_check.
endif.
end-of-selection.
*& Form UPLOAD_DATA
ÉÏÔØÅúÊäÈëÊý¾Ý
--> p1 text
<-- p2 text
form upload_data.
call function 'WS_UPLOAD'
EXPORTING
filename = oldfile
filetype = 'DAT'
TABLES
data_tab = record
EXCEPTIONS
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_table_width = 4
invalid_type = 5
no_batch = 6
unknown_error = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10.
if sy-subrc <> 0.
message E000 with 'ÇëÊäÈëÉÏÔØÎļþ'.
endif.
read table record with key MATNR = '**'.
if sy-tabix lt 1.
message E000 with 'ÉÏÔØÎļþÎļþÍ·ÓëÊý¾ÝÖ®¼äÎÞ**'.
endif.
delete record from 1 to sy-tabix.
endform. " UPLOAD_DATA
*& Form BDC_FILL
ÅúÊäÈë
--> p1 text
<-- p2 text
form bdc_fill.
data: N type I,
M type I,
S_MATNR(018),
test(1) type N.
PERFORM BDC_FILL_INITALSCR. "³õʼÆÁÄ»
tmp = '0'.
condense record-matnr no-gaps.
test = record-matnr(1).
if test <> ''.
M = STRLEN( RECORD-MATNR ).
M = 18 - M.
DO M TIMES.
CONCATENATE '0' RECORD-MATNR INTO S_MATNR.
RECORD-MATNR = S_MATNR.
ENDDO.
endif.
**ÅжÏÎïÁÏ»ù±¾ÊÓͼÊÇ·ñÒѾ±»Î¬»¤¹ý**
SELECT SINGLE * FROM MARA WHERE MATNR = RECORD-MATNR.
IF SY-SUBRC NE 0.
K = '0'.
Else.
condense MARA-PSTAT no-gaps.
N = strlen( mara-pstat ).
M = 0.
record-meins = mara-meins.
do N times.
K = MARA-PSTAT+M.
IF K = 'K'.
EXIT.
ENDIF.
M = M + 1.
enddo.
ENDIF.
IF ( ( GEN1 EQ 'X' OR GEN2 EQ 'X' ) AND SALORG1 NE 'X'
AND SALORG2 NE 'X' AND SALPLANT NE 'X'
AND PURCHASE NE 'X' AND PLTSTRG1 NE 'X'
AND MRP1 NE 'X' AND MRP2 NE 'X' AND MRP3 NE 'X'
AND MRP4 NE 'X' AND PLANTSTR NE 'X'
AND ACC1 NE 'X' AND ACC2 NE 'X'
AND COR1 NE 'X' AND COR2 NE 'X' and qau ne 'X' ) .
IF K EQ 'K'.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(15)'.
perform bdc_field using 'BDC_OKCODE'
'/N'.
ELSE.
PERFORM BDC_FILL_CHOICEVIEW. "Ñ¡ÔñÊÓͼ
ENDIF.
ELSE.
PERFORM BDC_FILL_CHOICEVIEW. "Ñ¡ÔñÊÓͼ
PERFORM BDC_FILL_ORGVIEW. "×éÖ¯¼¶±ð
ENDIF.
TRANSLATE record-MEINS TO UPPER CASE.
TRANSLATE record-BSTME TO UPPER CASE.
TRANSLATE record-VRKME TO UPPER CASE.
TRANSLATE record-FRTME TO UPPER CASE.
TRANSLATE record-AUSME TO UPPER CASE.
if gen1 eq 'X'.
IF K NE 'K'.
PERFORM GENERALDATA1.
ENDIF.
endif.
if gen2 eq 'X'.
IF K NE 'K'.
perform generaldata2.
ENDIF.
endif.
if salorg1 eq 'X'.
perform salorg1.
endif.
if salorg2 eq 'X'.
perform salorg2.
endif.
if salplant eq 'X'.
perform salplant.
endif.
if purchase eq 'X'.
perform purchasedata.
endif.
if mrp1 eq 'X'.
perform MRP1.
endif.
if mrp2 eq 'X'.
perform MRP2.
endif.
if mrp3 eq 'X'.
perform MRP3.
endif.
if mrp4 eq 'X'.
perform MRP4.
endif.
if PLANTSTR eq 'X'.
perform PLANTSTR.
endif.
if PLTSTRG1 eq 'X'.
perform PLTSTRG1.
endif.
if qau eq 'X'.
perform qualitydata.
endif.
if ACC1 eq 'X'.
perform ACC1DATA.
endif.
if ACC2 eq 'X'.
perform ACC2DATA.
endif.
if COR1 eq 'X'.
perform COR1DATA.
endif.
if COR2 eq 'X'.
perform COR2DATA.
endif.
perform BDC_SAVE.
endform. " BDC_FILL
*& Form GENERALDATA1
Ò»°ãÊý¾Ý 1
--> p1 text
<-- p2 text
form generaldata1.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
"'=ZU01'.
'/00'.
perform bdc_field using 'MAKT-MAKTX'
record-MAKTX. " ÎïÁÏÃèÊö
perform bdc_field using 'MARA-MEINS'
record-MEINS. " »ù±¾¼ÆÁ¿µ¥Î»
perform bdc_field using 'MARA-MATKL'
record-MATKL. " ÎïÁÏ×é
perform bdc_field using 'MARA-BISMT'
record-BISMT.
perform bdc_field using 'MARA-EXTWG'
record-EXTWG.
perform bdc_field using 'MARA-SPART'
record-SPART.
perform bdc_field using 'MARA-MTPOS_MARA'
record-MTPOS_MARA.
perform bdc_field using 'BDC_CURSOR'
'MARA-GROES'.
perform bdc_field using 'MARA-BRGEW'
record-BRGEW.
if record-gewei = '' and ( salorg1 = 'X' or salorg2 = 'X'
or salplant = 'X' ).
perform bdc_field using 'MARA-GEWEI'
'KG'. " ÖØÁ¿µ¥Î»
else.
perform bdc_field using 'MARA-GEWEI'
record-GEWEI. " ÖØÁ¿µ¥Î»
endif.
perform bdc_field using 'MARA-NTGEW'
record-NTGEW.
perform bdc_field using 'MARA-VOLUM'
record-VOLUM.
perform bdc_field using 'MARA-VOLEH'
record-VOLEH.
perform bdc_field using 'MARA-GROES'
record-GROES.
condense record-EAN11 no-gaps.
if record-EAN11 <> ''.
perform bdc_field using 'MARA-EAN11'
record-EAN11.
perform bdc_field using 'MARA-NUMTP'
'HT'.
endif.
perform bdc_field using 'MARA-MAGRV'
record-MAGRV.
perform bdc_dynpro using 'SAPLMGMM' '4300'.
perform bdc_field using 'BDC_OKCODE'
'=ZU02'.
condense record-EAKTX no-gaps.
if record-EAKTX <> ''.
perform bdc_field using 'SKTEXT-SPRAS(2)'
'EN'.
perform bdc_field using 'SKTEXT-MAKTX(2)'
record-EAKTX.
endif.
perform bdc_dynpro using 'SAPLMGMM' '4300'.
perform bdc_field using 'BDC_OKCODE'
'=MAIN'.
if record-meins <> 'PAK'.
perform bdc_field using 'SMEINH-UMREN(05)'
'1'.
perform bdc_field using 'SMEINH-MEINH(05)'
'PAK'.
perform bdc_field using 'SMEINH-UMREZ(05)'
'1'.
endif.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
endform. " GENERALDATA
*& Form generaldata2
Ò»°ãÊý¾Ý 2
--> p1 text
<-- p2 text
FORM generaldata2.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MAKT-MAKTX'
record-MAKTX.
perform bdc_field using 'BDC_CURSOR'
'MARA-NORMT'.
condense record-ferth no-gaps.
if record-ferth <> ''.
perform bdc_field using 'MARA-FERTH'
record-FERTH.
endif.
perform bdc_field using 'MARA-NORMT'
record-NORMT.
perform bdc_field using 'MARA-WRKST'
record-WRKST.
perform bdc_field using 'MARA-ZEIAR'
record-ZEIAR.
ENDFORM. " generaldata2
*& Form salorg1
ÏúÊÛ×éÖ¯ 1
--> p1 text
<-- p2 text
FORM salorg1.
condense RECORD-SPART no-gaps.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '4000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'MAKT-MAKTX'
RECORD-MAKTX. " ÎïÁÏÃèÊö
IF K NE 'K'.
perform bdc_field using 'MARA-MEINS'
record-MEINS. " »ù±¾¼ÆÁ¿µ¥Î»
ENDIF.
perform bdc_field using 'MARA-SPART'
record-SPART. " ²úÆ·×é
perform bdc_field using 'MVKE-DWERK'
record-DWERK. " ½»»õ¹¤³§
PERFORM BDC_FIELD USING 'MG03STEUER-TAXKM(01)'
RECORD-TAXKM. " ÎïÁÏË°·ÖÀà
condense RECORD-VRKME no-gaps.
IF RECORD-MEINS <> RECORD-VRKME and RECORD-VRKME <> ''.
perform bdc_field using 'MVKE-VRKME'
record-VRKME. " ÏúÊÛµ¥Î»
select single * from MARM where matnr = record-matnr
and meinh = record-vrkme.
if SY-SUBRC NE 0.
tmp = 'W'.
select single * from t006 where MSEHI = record-meins.
if t006-DIMID = 'AAAADL'.
DIMID = ''.
else.
DIMID = t006-DIMID.
endif.
select single * from t006 where MSEHI = record-vrkme.
if dimid <> t006-DIMID.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0510'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RMMZU-UMREN'
record-VMREN. "ÏúÊÛµ¥Î»×ª»»Òò×Ó
perform bdc_field using 'RMMZU-UMREZ'
record-VMREZ. "»ù±¾µ¥Î»×ª»»Òò×Ó
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '4000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
endif.
endif.
ENDIF.
perform bdc_dynpro using 'SAPLMGMM' '4200'.
perform bdc_field using 'BDC_OKCODE' " µ÷ÓÃË°Àà×ÓÆÁÄ»
'/00'.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '4000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' " ·µ»ØÏúÊÛ×éÖ¯ 1ÆÁÄ»
'/00'.
ENDFORM. " salorg1
*& Form salorg2
ÏúÊÛ×éÖ¯ 2
--> p1 text
<-- p2 text
FORM salorg2.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '4000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'MVKE-KTGRM'.
PERFORM BDC_FIELD USING 'MVKE-VERSG'
RECORD-VERSG. " ÎïÁÏͳ¼Æ×é
PERFORM BDC_FIELD USING 'MVKE-KTGRM'
RECORD-KTGRM. " ¿ÆÄ¿ÉèÖÃ×é
PERFORM BDC_FIELD USING 'MVKE-KONDM'
RECORD-KONDM. " ÎïÁ϶¨¼Û×é
perform bdc_field using 'MVKE-MTPOS'
RECORD-MTPOS. " ÏîÄ¿Àà±ð×é
PERFORM BDC_FIELD USING 'MVKE-MVGR1'
RECORD-MVGR1. " ÎïÁÏ×é 1
PERFORM BDC_FIELD USING 'MVKE-MVGR2'
RECORD-MVGR2. " ÎïÁÏ×é 2
ENDFORM. " salorg2
*& Form salplant
ÏúÊÛ£ºÒ»°ã/¹¤³§Êý¾Ý
--> p1 text
<-- p2 text
FORM salplant.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '4000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
select single * from marc where matnr = record-matnr
and werks = record-werks.
if SY-SUBRC NE 0 OR MARC-MTVFP = ''.
PERFORM BDC_FIELD USING 'MARC-MTVFP'
RECORD-MTVFP. " ¿ÉÓÃÐÔ¼ì²é
endif.
PERFORM BDC_FIELD USING 'MARA-TRAGR'
RECORD-TRAGR. " ÔËÊä×é
PERFORM BDC_FIELD USING 'MARC-LADGR'
RECORD-LADGR. " ×°ÔØ×é
perform bdc_field using 'MARC-XCHPF'
record-XCHPF. " ÅúÁ¿¹ÜÀí
ENDFORM. " salplant
*& Form PURCHASEDATA
²É¹ºÊý¾Ý
--> p1 text
<-- p2 text
form purchasedata.
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'MARC-WEBAZ'.
perform bdc_field using 'MAKT-MAKTX'
record-MAKTX.
IF K NE 'K'.
perform bdc_field using 'MARA-MEINS'
record-MEINS. " »ù±¾¼ÆÁ¿µ¥Î»
perform bdc_field using 'MARA-MATKL'
record-MATKL. " ÎïÁÏ×é
ENDIF.
condense RECORD-BSTME no-gaps.
IF RECORD-MEINS <> RECORD-BSTME and RECORD-BSTME <> ''.
perform bdc_field using 'MARA-BSTME'
record-BSTME. " ¶©µ¥µ¥Î»
select single * from MARM where matnr = record-matnr
and meinh = record-bstme.
if SY-SUBRC NE 0 and
( record-vrkme <> record-bstme or tmp <> 'W' ).
tmp = 'W'.
select single * from t006 where MSEHI = record-meins.
if t006-DIMID = 'AAAADL'.
DIMID = ''.
else.
DIMID = t006-DIMID.
endif.
select single * from t006 where MSEHI = record-bstme.
if dimid <> t006-DIMID.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0510'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RMMZU-UMREN'
record-UMREN. "¶©µ¥µ¥Î»×ª»»Òò×Ó
perform bdc_field using 'RMMZU-UMREZ'
record-UMREZ. "»ù±¾µ¥Î»×ª»»Òò×Ó
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '4000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
endif.
endif.
ENDIF.
perform bdc_field using 'MARC-EKGRP'
record-EKGRP. " ²É¹º×é
perform bdc_field using 'MARC-WEBAZ'
record-WEBAZ. " ÊÕ»õ´¦Àíʱ¼ä
endform. " PURCHASEDATA
*& Form MRP1
text
--> p1 text
<-- p2 text
FORM MRP1.
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MAKT-MAKTX'
record-MAKTX. " ÎïÁÏÃèÊö
IF K NE 'K'.
perform bdc_field using 'MARA-MEINS'
record-MEINS. " »ù±¾µ¥Î»
ENDIF.
perform bdc_field using 'MARC-DISGR'
record-DISGR. " MRP×é
perform bdc_field using 'MARC-MAABC'
record-MAABC. " ABC±êʶ
perform bdc_field using 'MARC-DISMM'
record-DISMM. " MRPÀàÐÍ
perform bdc_field using 'MARC-FXHOR'
record-FXHOR. " ¼Æ»®µÄʱ½ì
perform bdc_field using 'MARC-DISPO'
record-DISPO. " MRP¿ØÖÆÕß
perform bdc_field using 'MARC-DISLS'
record-DISLS. " ÅúÁ¿
perform bdc_field using 'MARC-BSTFE'
Here is a sample program which creates a material with the bare minmal fields, this will get you started.
report zrich_0003 .
data: headdata type bapimathead.
data: clientdata type bapi_mara.
data: clientdatax type bapi_marax.
data: descdata type table of BAPI_MAKT with header line.
data: return type bapiret2 .
data: returnm type table of bapi_matreturn2 with header line.
data: xmara type mara.
parameters: p_matnr type mara-matnr.
headdata-material = p_matnr.
headdata-ind_sector = 'M'.
headdata-matl_type = 'FERT'.
headdata-basic_view = 'X'.
clientdata-BASE_UOM = 'EA'.
clientdatax-BASE_UOM = 'X'.
clientdata-old_mat_no = 'Old Material'.
clientdatax-old_mat_no = 'X'.
clientdata-division = '00'.
clientdatax-division = 'X'.
descdata-LANGU = sy-langu.
descdata-MATL_DESC = 'This is the description'.
append descdata.
call function 'BAPI_MATERIAL_SAVEDATA'
exporting
headdata = headdata
clientdata = clientdata
clientdatax = clientdatax
* PLANTDATA =
* PLANTDATAX =
* FORECASTPARAMETERS =
* FORECASTPARAMETERSX =
* PLANNINGDATA =
* PLANNINGDATAX =
* STORAGELOCATIONDATA =
* STORAGELOCATIONDATAX =
* VALUATIONDATA =
* VALUATIONDATAX =
* WAREHOUSENUMBERDATA =
* WAREHOUSENUMBERDATAX =
* SALESDATA =
* SALESDATAX =
* STORAGETYPEDATA =
* STORAGETYPEDATAX =
importing
return = return
tables
MATERIALDESCRIPTION = descdata
* UNITSOFMEASURE =
* UNITSOFMEASUREX =
* INTERNATIONALARTNOS =
* MATERIALLONGTEXT =
* TAXCLASSIFICATIONS =
returnmessages = returnm
* PRTDATA =
* PRTDATAX =
* EXTENSIONIN =
* EXTENSIONINX =
check sy-subrc = 0.
Regards,
Rich Heilman -
Report to display material master data changes
Hi,
Is there a standard report available to display all changes to material master data over a specified time frame i.e all changes made alst week,all chnages made today.
Please suggest.
Thanks in advance.Hi!
Appart from MM04, you can also have a look at MM03 or MM02:
1. Goto MM02 or MM03 transactions and enter the material.
2. Select the relevant views for which you want to have the details.
In the Bar menu follow the path Environment -> Display changes.
Here you will get the list of changes done to the fields with Old and
New values.
Appart from these two tools, there is not any other report provided in the standard for this target.
I hope this helps!
Esther. -
Program to update info record with material master data
I am trying to determine if there is a standard SAP program that can be run as a batch file to update the fields in the info record with the same fields that are in the material master? ie: Planned delivery time, Tolerance, purchasing group etc.
Hi,
There is no standard report or transaction that can do this.
The data from these fields in the material master is brought in as a default to the info record when it is created. beyond this point the Info record is treated as being the correct data regardless of what happens to the material master data and so no updates occur in the standard system.
It would not be difficult to build an LSMW job to copy the data from the material master to the info records and this would be the recommendation if you want to do this.
Steve B -
MATERIAL MASTER DATA UPLOADING THROUGH LSMW
Hi.
I am new to lsmw.
we have a requirement to upload the material master data through LSMW,.
the data is on Excel sheet on the Desktop of the system.
Can any body help me to upload the Material Master data, procedure in step wise.
Thanks in advance,
regards,
Eswar.MHi Venkat,
Go through the following Steps
Using Tcode MM01 -- Maintain the source fields are
1) mara-amtnr char(18)
2) mara-mbrsh char(1)
3) mara-mtart char(4)
4) makt-maktx char(40)
5) mara-meins char(3)
the flate file format is like this as follows
MAT991,C,COUP,Srinivas material01,Kg
MAT992,C,COUP,Srinivas material02,Kg
AMT993,C,COUP,Srinivas material03,Kg
MAT994,C,COUP,Srinivas material04,Kg
MAT995,C,COUP,Srinivas material05,Kg
goto Tcode LSMW
give Project Name
Subproject Name
object Name
Press Enter -
Press Execute Button
It gives 13 radio-Button Options
do the following 13 steps as follows
1) select radio-Button 1 and execute
Maintain Object Attributes
select Standard Batch/Direct Input
give Object -- 0020
Method -- 0000
save & Come Back
2) select radio-Button 2 and execute
Maintain Source Structures
select the source structure and got to click on create button
give source structure name & Description
save & Come Back
3) select radio-Button 3 and execute
Maintain Source Fields
select the source structure and click on create button
give
first field
field name matnr
Field Label material Number
Field Length 18
Field Type C
Second field
field name mbrsh
Field Label Industrial Sector
Field Length 1
Field Type C
Third field
field name mtart
Field Label material type
Field Length 4
Field Type C
fourth field
field name maktx
Field Label material description
Field Length 40
Field Type C
fifth field
field name meins
Field Label base unit of measurement
Field Length 3
Field Type C
save & come back
4) select radio-Button 4 and execute
Maintain Structure Relations
go to blue lines
select first blue line and click on create relationship button
select Second blue line and click on create relationship button
select Third blue line and click on create relationship button
save & come back
5) select radio-Button 5 and execute
Maintain Field Mapping and Conversion Rules
Select the Tcode and click on Rule button there you will select constant
and press continue button
give Transaction Code : MM01 and press Enter
after that
1) select MATNR field click on Source filed(this is the field mapping) select MATNR and press Enter
2) select MBRSH field click on Source filed(this is the field mapping) select MBRSH and press Enter
3) select MTART field click on Source filed(this is the field mapping) select MTART and press Enter
4) select MAKTX field click on Source filed(this is the field mapping) select MAKTX and press Enter
5) select MEINS field click on Source filed(this is the field mapping) select MEINS and press Enter
finally
save & come back
6) select radio-Button 6 and execute
Maintain Fixed Values, Translations, User-Defined Routines
Create FIXED VALUE Name & Description as MM01
Create Translations Name & Description as MM01
Create User-Defined Routines Name & Description as MM01
after that delete all the above three just created in the 6th step
FIXED VALUE --MM01
Translations --MM01
User-Defined Routines --MM01
come back
7) select radio-Button 7 and execute
Specify Files
select On the PC (Frontend) -- and click on Create button(f5)
give the path of the file like "c:\material_data.xls"
description : -
separators as select tab radiao- button
and press enter save & come back
8) select radio-Button 8 and execute
Assign Files
Save & come back
9) select radio-Button 9 and execute
Read Files
Execute
come back
come back
10) select radio-Button 10 and execute
Display Imported Data
Execute and press enter
come back
Come back
11) select radio-Button 11 and execute
Convert Data
Execute
come back
Come back
12) select radio-Button 12 and execute
Display Converted Data
Execute & come back
13) select radio-Button 13 and execute
Start Direct Input Program
select the Program
select continue button
go with via physical file
give the lock mode as 'E'
and execute
Regards
Sreeni -
Create Material Master Data with BAPI
Hi,
I don't know using of BAPI. I want using BAPI_MATERIAL_SAVEDATA bapi for creating material master data for Basic Data1, Basic Data2, Purchasing and MRP views. Does anybody can help me ?
Thank you
Good nightHi,
Please refer to the documentation below:
BAPI_MATERIAL_SAVEDATA
Short Text
Create and Change Article Master Data
Functionality
You use this method to create new material master data or to change existing material master data. The data on a material can be transferred for each call.
When creating material master data, you must transfer the material number, the material type, and the industry sector to the method. You must also enter a material description and its language.
When changing material master data, you need enter only the material number.
In the header data, you must select at least one view for which data is to be created. Depending on the view selected, you must maintain other required parameters. If you do not enter values for all of the required parameters, the method is ended with an error message.
The corresponding fields in the tables (such as CLIENTDATA) must first be supplied with data by the calling program. An indicator must also be set for each of these fields so that the data is written to the database by the method. This requires the calling program to supply the corresponding field with the indicator in a checkbox table (for example, CLIENTDATAX). Checkbox tables exist for tables that do not contain any language-dependent texts (MAKT, MLTX), International Article Numbers (MEAN), or tax classifications (MLAN). Several data records for a material can be created in these tables.
If a structure contains fields for units of measurement (such as structure CLIENTDATA, field BASE_UOM), language indicators (such as structure MATERIALDESCRIPTION, field LANGU), or country indicators (such as structure TAXCLASSIFICATIONS, field DEPCOUNTRY), there is always a field of the same name with the ending _ISO. This makes it possible to transfer either the internally used SAP code or a standardized ISO code for the units of measurement, language indicators, or country indicators. ISO codes are converted to an SAP code internally for further processing. The ISO code is used only if the SAP code is not transferred. If you use ISO codes, there must be a unique assignment of the ISO code to the SAP code in the following activities in Customizing for Global Parameters:
Check Units of Measurement
Define Countries
If you want to maintain long texts (basic data texts, internal comments, purchase order texts, material memos, or sales texts) or customer-defined fields for a material, some special conditions have to be observed. They are described in the documentation for parameters MATERIALLONGTEXT and EXTENSIONIN.
Parameters
HEADDATA
CLIENTDATA
CLIENTDATAX
PLANTDATA
PLANTDATAX
FORECASTPARAMETERS
FORECASTPARAMETERSX
PLANNINGDATA
PLANNINGDATAX
STORAGELOCATIONDATA
STORAGELOCATIONDATAX
VALUATIONDATA
VALUATIONDATAX
WAREHOUSENUMBERDATA
WAREHOUSENUMBERDATAX
SALESDATA
SALESDATAX
STORAGETYPEDATA
STORAGETYPEDATAX
FLAG_ONLINE
FLAG_CAD_CALL
NO_DEQUEUE
NO_ROLLBACK_WORK
RETURN
MATERIALDESCRIPTION
UNITSOFMEASURE
UNITSOFMEASUREX
INTERNATIONALARTNOS
MATERIALLONGTEXT
TAXCLASSIFICATIONS
RETURNMESSAGES
PRTDATA
PRTDATAX
EXTENSIONIN
EXTENSIONINX
Exceptions
Function Group
1001UEB
Thanks,
Sandeep. -
Sales order does not extract plant information from material master data
Hi experts,
I have created a sales order. However, the plant in the shipping tab can only be manually entered.
I have made the check:
the customer material master data does not have the plant info.
the customer master data does not have it either.
It is defined in the material master data: sales:general/plant
But the sales order did not extract this information. Why does this happen?
Thank you in advance.
Best regards,
FanHello Friend,
As right stated by you,
The Plant will be copied from the master data to the sales order, if not it should be manually entered
The Sequence System will search for the Plant is as follow..
1. Customer material infor record, If it was not maintained then it will search in
2. Customer master, if the entre was not maintained in the SHIPPING TAB
3. Finally it will search in the Material master in the Sales organisation data 1 in the field DELVERING PLANT field.
So please search whether the entry was maintained in that field at the sales:sales organisation data 1.
This might be the issue.
Please revert if you want further details
regards,
santosh -
Non-SAP to SAP Material Master Data Transfer
Hi Experts,
Please indicate any standard tools in SAP and how to use it wherein we can migrate non-SAP material master data to SAP.
Points will be awarded.
Regards,
LMHello Leo,
There are a number of options to do this. You can use the standard SAP tool named LSMW - Legacy System Migration Workbench (transaction LSMW) as a starting point.
Also please read this [Documentation|http://help.sap.com/saphelp_47x200/helpdata/en/0d/414538bc0fe927e10000009b38f8cf/frameset.htm] before undertaking the data migration activity via LSMW.
Additionally, there is also a Direct Input program available named RMDATIND - please go through the program documentation before you use it. You can use this program to transfer material master data to SAP but
make sure you assign this program through LSMW for mapping structures etc. The internet link above will give
more details and step-by-step instructions to follow.
Hope this helps,
Cheers,
Sougata.
p.s. It is sad to see useful answers remain unrewarded such as this one!
Edited by: Sougata Chatterjee on May 9, 2008 10:13 PM -
Authorization Material Master data
Hello,
vould you tell me if it's possible to restrict changing Material master data according to material type ?
Thank'sHi,
Use authorization object M_MATE_MAR - Material type authorization for material master records
This object determines whether a user is authorized to maintain the material master record for a specific material type.
Defined fields
Fields Possible values Meaning
ACTVT 01 User may create data.
02 User may change data.
03 User may display data.
06 User may flag data for deletion.
BEGRU Here you must specify the
authorization groups from table
T134 for which the materials
concerned may be processed.
Maybe you are looking for
-
Display a schematic view with icons (jpg, gif, etc).
I'm trying to display a schematic view and use icons to represent the difference objects in this schematic view. For example: to show a 3 phones conference call. The description will be the phone number (or person's name) and the icon will be the per
-
Getting "An unknown error has occurred" when trying to save a new contact
Scenario: Using Outlook 2003 and Oracle Connector for Outlook 10.1.2_03 against an OCS 9 installation. When I make a new contact and try to save it I get an error message in a popup window (with the title "Microsoft Office Outlook") with the text "An
-
No, this isn't a "can't get a decent print out of Lightroom" post and because of the amount of posts in this regard I haven't got 2 hours to spend searching for an answer to my question - if indeed an answer has already been posted. Please bear with
-
Can't login to application anymore
Hi guys I can't login to my appilcation anymore (single node install) 11.5.10.2 I get the loginscreen (apache working. DB workin with same logins as before). But as soon as I enter password and click to enter I get the following error: oracle.apps.fn
-
Hi - I need to interface with a DLL. I can communicate fine with most of the functions, but I can't figure out how to configure Call Library Function for "GPIO_Init". Can anyone with more experience help me out? I've attached the header, and also the