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.
Similar Messages
-
Message Type for Material Master Data Changes
Hi all
I'm managing Message Types for Material Master Data extraction from R\3 system to BW system, in order to load on BW only the changes done to some fields of MARA table that are delta relevant.
Now from R/3 BD50 Transaction I can see that there is a message type that refer to changes done on MARA fields: RS0044.
I would like to replace this message type with another one (RS0020) in order to align different systems.
Now changes to material master data in R/3 system are recorder with both message types but only those with RS0044 message type are processed and loaded into BW system.
So I would like to know:
1. How is the message type related to the DataSource 0material?
2. is it possible to replace a message type for BW?
3. if yes, how can I do it?
Thanks in advance.
Elisa
mail: [email protected]Hi Oscar!
At the moment I'm using Delta queue of 0MATERIAL. I know that in the queue there are all the new and changed records.
But I would like to be able not to load all the changed records, but only those that refer to some fields of MARA table.
E.g. if the gross weight of a material is modified I don't want to load this change on BW with Delta loading .
I've seen that from R/3 Transaction BD52 you can set only delta relevant fields referred to a specific message type and to delete the other fields.
As I'm able to do this directly in the Development system and Test System, I haven't got the authorization of doing it in the Production system.
That's why I need to include this setting in a CR and then ask to transport it from Test to Production system.
But message types referred to MARA field changes are different between the two systems.
And it seems they are automatically created.
Is it true?
Thanks
Elisa -
User Exist for Material master data changes like standard cost, master pric
Hello,
Could anyone please provide the user exit name for the following requirement.
The trigger to transfer data from SAP to Unix directory should be whenever one of the SAP field values change (standard cost, master price, Type Of Sales) or whenever a new item is added to SAP. The data will be interfaced out of SAP NIGHTLY using the certain data format.
thanks
kumarHi Lakshminarayanan
thanks for your information.
i have tested by changing the Type of Sales in material master(MM02) but the FM - EXIT_SAPLMGMU_001(MGA00001) did NOT get trigger. i did not write any code in side the INCLUDE program.i just tried wether the User Exit is getting trigger or not while changing the material master.
Please advise me how to test it.
Thanks
Kumar -
How can data in cube will update after Master data changes
Hi,
We have a Revenue cube which we are loading actuals after every month.
Now we have master data changes at profit center level. Profit center is moving from Holdings to Power, effective with October reporting. So master data we updated accordinglt now we need to update data in cube.
I want know how can we update all the data in cube without dropping and relaoding again.
We have DS0s first then cube.
Please let me know available options.
Thanks
SivaprasadHi,
Make the field which stores data whether it is holding or power as navigational attribute of profit centre.
So whenever master data changes just update profit center master data . Use this nav attribute in reports.
So whenever master data changes report changes automatically.
If you want time dependant 2008 to 2009 Holdings then 2007 power enable profit center time dependant master data.
Hope it helps.
Thanks,
Arun -
Vendor master data change confirmation -Report Y_CD1_39000398
Hello All,
In report Y_CD1_39000398 we can see the confirmation pending for the Vendor master data changs. There are some entries which are pending since last 5 years becasue the chagnes are rejected. Is there is any possibility to remove this so that in this report we can get only relevant entries
Thanks & regards,
PrashantHi,
I dont think it is the standard report. I think its a developed one as it is starting with Y. If so, then co-ordinate with your abaper and do the necessary changes to get the right result. -
Material Master Data Reporting with SAP BW?
Hello,
I have a question regarding the use of a SAP BW System. Do you guys think SAP BW is a appropriate System for modelling and analysing Queries for the Material master data of the R/3 System.
Focus:
Material master data
Bill of Material
Material Classification System
Iu2019m not sure if Infocubes are the right way to report such kind of requirement. I mean Infocubes always requires key figures and dates but the material master data are mainly characteristics. Can someone give me some advice?
Thanks & GreetingsHi,
I'd say yes. You can aalo use InfoObejct and DSO (like Tables) as well as InfoSets (Join ability).
Masteer Data and BoM shouldn't be a problem.
Material Classification System is always a bit tricky. Standard Class extractors are not able to extract multiple classifcations. There will be need of some Programming due to the poor standard solution.
I suppose some 10 - 15 days till it's finished an productive.
hth
cheers
Sven -
Does a Master Data Change Log or Report Exist?
Does anyone know of a master data change log or report?
Such a log or report would show all changes made to cons units, cons groups, and items; including additions, deletions and changes to a hierarchy.
We hope to use this to synchronize cons group/unit and item hierarchies between BCS systems: Production and Development.
For example, if a master data change was made in the Production system, we would like to log the change, and synch this change back to the Development system.
Thanks for any insight.Thanks, TheScotsman, for really helpful information!
Some detail of the findings for those who interested:
There is a "How to... trace changes to master-data and settings for SEM-BCS" which describes all nuances of tracking changes in MD.
The HowTo mentions the reports RSVTPROT , UGMD_DB_LOG_DISPLAY, and a t-code SCU3 that may show the changes.
Certainly the code of the reports might be taken as an example for writing your own code.
Though, the reports and the SCU3 are useful when the logging of DB tables changes is activated. -
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., -
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 -
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 -
Hi all,
Please help me with some useful information regarding the history of master data creationa and changes. I need to create a query for creation and changes of vendor master data. Data for creation of the vendor master data are saved in LFA1 but for changes I cannot find table.
Thank you,
DesimiraHi,
You can use the standard report for Vendor master data changes, S_ALR_87012089 - Display Changes to Vendors.
Regards,
SAPFICO -
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. -
Material Master Data load failed
Hi All,
I am loading material master data. I have around 8055 records in R/3. The load has failed with an error "Non-updated Idocs found in Business Information Warehouse" and asking me to process the IDocs manually. I have checked in WE05 for the IDocs and found 3 Idocs with status 64(IDoc ready to be transferred to application).
But when I checked in the manage screen of the 0MATERIAL I could find the Transfered and Updated records as 8055. I have even checked the data in 0MATERIAL and found that all the data(8055 records) has already been uploaded.
Why is it still showing an error(load failed) even when all the data has been uploaded? What should I do now?
Best Regards,
Nene.hi Nene/Sankar,
for material text no language please check Note 546346 - Material texts: no selection on languages
and for why idocs problem, check e.g Note 561880 - Requests hang because IDocs are not processed, Note 555229 - IDocs hang in status 64 for tRFC with immediate processing.
hope this helps.
Note 546346 - Material texts: no selection on languages
Summary
Symptom
When loading material texts from R/3 into the Business Information Warehouse, you cannot select languages.
Other terms
DataSource, 0MATERIAL_TEXT, InfoSource, InfoObject, 0MATERIAL, SPRAS, LANGU, 0LANGU, MAT_BW, extraction, selection field, delta extraction, ALE, delta, change pointer
Reason and Prerequisites
As of PI/PI-A 2001_2 Support Package 6, the selection option for the 'SPRAS' field in the OLTP system was undone in the 0MATERIAL_TEXT DataSource. (Refer here to note 505952).
Solution
As of PI/PI-A 2002_1 Support Package 4, the 'SPRAS' field is provided for selection again with the 0MATERIAL_TEXT DataSource in the OLTP system. When loading the material texts from BW, the language is still not provided for selection in the scheduler, instead all languages of the language vector in BW are implicitly requested from the source system. However, during the delta update in the source system, the change pointers for all languages in the source system are now set to processed, regardless of whether the language was requested by BW or not.
Import
Support Package 4 for PI/PI-A 2002_1_31I - PI/PI-A 2002_1_45B
Support Package 4 for PI 2002_1_46B - PI 2002_1_46C
Support Package 3 for PI 2002_1_470
In transaction RSA5, copy the D version of the 0MATERIAL_TEXT DataSource to the A version.
Then replicate the DataSources for 0MATERIAL in the BW system. The 'SPRAS' field is then flagged again as a selection field in the transfer structure of the 0MATERIAL InfoSource. The transfer rules remain unchanged. Activate the transfer rules and perform a delta initialization again.
Note 561880 - Requests hang because IDocs are not processed
Symptom
Data extraction in a BW or SEM BW system from an external OLTP System (such as R/3) or an internal (via DataMart) OLTP System hangs with the 'Yellow' status in the load monitor.
After a timeout, the request status finally switches to 'Red'.
Information IDocs with the status '64' are displayed in the 'Detail' tab.
Other terms
IDoc, tRFC, ALE, status 64
Reason and Prerequisites
Status information on load requests is transferred in the form of IDocs.
IDocs are processed in the BW ALE model using tRFC in online work processes (DIA).
IDoc types for BW (RSINFO, RSRQST, RSSEND) are processed immediately.
If no free online work process is available, the IDocs remain and must then be restarted to transfer the request information.With the conversion to asynchronous processing, it can often happen that no DIA is available for tRFC for a short period of time (see note 535172).
The IDoc status 64 can be caused by other factors such as a rollback in the application updating the IDocs. See the relevant notes.
Furthermore, you can also display these IDocs after the solution mentioned below, however, this is only intended as information.
You must therefore analyze the status text.
Solution
We recommend asynchronous processing for Business Warehouse.
To do this, you need the corrections from note 535172 as well as note 555229 or the relevant Support Packages.
The "BATCHJOB" entry in the TEDEF table mentioned in note 555229 is generated automatically in the BW system when you import Support Package 08 for BW 3.0B (Support Package 2 for 3.1 Content).For other releases and Support Package levels, you must manually implement the entry via transaction SE16.
Depending on the Basis Support Package imported, you may also have to implement the source code corrections from note 555229.
The following basic recommendations apply in avoiding bottlenecks in the dialog processing and checking of IDocs for BW:
1. Make sure there is always sufficient DIA, that is, at least 1 DIA more than all other work processes altogether, for example, 8 DIA for a total of 15 work processes (see also note 74141).
TIP: 2 UPD process are sufficient in BW, BW does not need any UP2.
2. Unprocessed Info IDocs should be processed manually within the request in BW;in the 'Detail' tab, you can start each IDoc again by selecting 'Update manually' (right mouse button).
3. Use BD87 to check the system daily (or whenever a problem arises) for IDocs that have not yet been processed and reactivate if necessary.
However, make sure beforehand that these IDocs can actually be assigned to the current status of requests.
TIP: Also check transaction SM58 for problematic tRFC entries.
IMPORTANT: Notes 535172, 555229 and the above recommendations are relevant (unless otherwise specified) both for BW and for SAP source systems. -
Material Master Data upload approach
Hi,
I have a requirement to upload material master data into D.B
1. Which is the best option to use - BDC/LSMW/BAPI(Program)/Direct upload program!
2. Based on Material types fields to be uploaded will change as per sample sheet,
Can we make use of single sheet With all fields in it(By removing common fields for all Mat.Types)!
Will BAPI - BAPI_MATERIAL_SAVEDATA useful for both MM01/MM02!
What is the better approach for the same!
Thanks,
Deep.Hi,
I have 2 queations in addition to above.
1. If i write a program using above BAPI for material master data. Then will it be better approach than LSMW with BAPI?
In this case user will trigger Z tcode & he will select input file from desktop & execute & report log will be shown in the output with successful & unsuccessful materials.
2. I have to upload material master data. Now i have got sample files for Basic, Plant & Sales organization specific.
If i have single excel file (All fields in one single sheet/line) which covers all unique fields of material master related to diff Basic, Plant & Sales organization specific data & also for all diffrent material types will that be fine (or) it usually required seperate excel sheets for diffrent kinds of data!
Please clarify about above 2 issues!
Thanks in advance.
Thanks,
Deep.
Edited by: Deep on May 12, 2009 6:56 AM -
Material master data complete in bi - infoset or multiprovider
Hi all.
for one of the reporting requirement of my client i need to extract the complete material master data in BI - from MARA, MARC, MARD, MSTLB tabls.
which i have done and stored in the infoobjects - 0MATERIAL, 0MAT_ST_LOC, 0MAT_PLANT, 0MAT_SALES.
now user want to see all the information against each material in 1 single line the multiple lines will only come in when there is plant.
which approach i shoul go for this scenario.
infoset or multiprovider.
i created infoset by using inner join but then i see only common materials, left outer join is giving me problems.like -
Invalid or missing ON condition for left outer join (0MAT_PLANT)
Invalid or missing ON condition for left outer join (0MAT_ST_LOC)
Invalid ON condition for left outer join (0MATERIAL)
kindly give your suggesstions on this.
thanks
dipikaHello,
There are restrictions regarding left outer join in infoset:
If a left outer join is used, the following restriction applies to the right table (right operand):
· Only join conditions with exactly one other table can be defined and
· This table in turn cannot be a right table (right operand) of a left outer join.
Tables connected with left outer joins always form the end of a chain of tables. In this way, as many tables as you want can be linked in an InfoSet with a left outer join to a core of tables that are connected using inner joins.
The restrictions on the definition of left outer joins are due to the technical limitations of databases. These restrictions do not apply to inner joins.
http://help.sap.com/saphelp_nw2004s/helpdata/EN/67/7e4b3eaf72561ee10000000a114084/content.htm
http://help.sap.com/saphelp_banking60/helpdata/ru/a3/96663bd194a978e10000000a11402f/content.htm
BR
Ondrej
Maybe you are looking for
-
Help! My Podcast Dissapeared Overnight - How do I get it back in iTunes?
I have a popular podcast, in fact it was ranked #1 in my category, but it dissapeared overnight. The search results for it don't show the podcast page anymore in iTunes, but some specific episodes do display in the search results. When I click on one
-
HT201250 G Drive Mini Space missing
I only have about 400gigs stored on my 1TB G mini hdd yet it only shows 200gigs as being available. Why?
-
How to find Tables behind a Custom Query in SAP
Hi Gurus, Can anyone please help me find tables behind a custom query in SAP. Regards As
-
Storm password locks when trying to download from appworld
HELP! My storm is about to turn into another "Irene". Everytime I try to update anything from appworld it asks for the email and password. Once I type in the password it authenticates then gives me a message that my "Blackberry ID will be locked f
-
High processor utilization during DAQmxReadCounterF64
Hardware: PCI-6220 Software: C++ 6.0 Driver: NI-DAQmx 7.3 This is a typical function call to get an encoder reading that is sampled on a 60Hz clock: lStatus = DAQmxReadCounterF64(m_hEncHandle, 1, 0.25, dEncData, BUFFER_SIZE, &lEncPtsRead, NULL); No p