APD master data join - ABAP dump TSV_TNEW_PAGE_ALLOC_FAILED
Hi,
I have created an APD to join 3 ISU master data infoobjects
1. left join 0UCPREMISE with 0UC_CONNOBJ
2. left join 0UCINSTALLA with result of 1.
3. Store the data in ODS
When I did this in DEV (D4S) everything worked - but there is also much
less data in the master data infoobjects.
When running the APD in Test (Q4S) I get ABAP dump after a while (not
time out): TSV_TNEW_PAGE_ALLOC_FAILED
1. I have tried with the APD setting to store in internal memory to OFF
but the same problems occur.
2. I tried to create index (on /BI0/P* ) for fields part of the join
which was not table key but same problem occurs.
3. I have no filters for the joins as I want to get all master data in
the output ODS.
4. The size of the p-tables are:
/BI0/PUCPREMISE = 1 385 792
/BI0/PUC_CONNOBJ = 1 031 272
/BI0/PUCINSTALLA = 2 445 742
5. Components + SP level:
SAP_ABA 700 0013 SAPKA70013
SAP_BASIS 700 0013 SAPKB70013
PI_BASIS 2005_1_700 0013 SAPKIPYJ7D
ST-PI 2005_1_700 0005 SAPKITLQI5
SAP_BW 700 0015 SAPKW70015
BI_CONT 703 0005 SAPKIBIIP5
Linux / Oracle 10.2.0.2.0
6. Info from ABAP Dump:
Error analysis
The internal table "\CLASS=CL_RSMD_RS_UTILITIES\METHOD=DATA_TO_RETURN\DATA=L_SX
RETURN-TVALUE" could not be further extended. To enable
error handling, the table had to be delete before this log was written.
As a result, the table is displayed further down or, if you branch to
the ABAP Debugger, with 0 rows.
At the time of the termination, the following data was determined for
the relevant internal table:
Memory location: "Session memory"
Row width: 200
Number of rows: 15
Allocated rows: 15
Newly requested rows: 64 (in 1 blocks)
Last error logged in SAP kernel
Component............ "EM"
Place................ "SAP-Server q4s_Q4S_72 on host q4s (wp 12)"
Version.............. 37
Error code........... 7
Error text........... "Warning: EM-Memory exhausted: Workprocess gets PRIV "
Description.......... " "
System call.......... " "
Module............... "emxx.c"
Line................. 1881
The error reported by the operating system is:
Error number..... " "
| Error text....... " "
How to correct the error
The amount of storage space (in bytes) filled at termination time was:
Roll area...................... 2755600
Extended memory (EM)........... 1977608256
Assigned memory (HEAP)......... 2000733904
Short area..................... " "
Paging area.................... 24576
Maximum address space.......... 4294967295
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"TSV_TNEW_PAGE_ALLOC_FAILED" " "
"CL_RSMD_RS_UTILITIES==========CP" or "CL_RSMD_RS_UTILITIES==========CM006"
| "DATA_TO_RETURN"
Anybody have any idea what i can do to be able to run this APD (in production I want to run it on a monthly basis). To me it seems the APD fills 2 gig of mem, I thought the APD option to not store the complete dataset in internal memory (using temp tables instead) would kick in before the 2 gigs was used. Basis team didn't want to raise mem paramenters if it could be sorted out any other way.
Thanks,
Johan
I have searched on my problem before posting here ofcourse - but somehow I missed this one, mentioned in 794257:
"InfoObject" data source
A dump occurs because of a memory overflow in the SAPLRSDM_F4 function group in the SD_CHA_GET_VALUES function module.
The InfoObject data source for reading master data is currently based on a function module that loads all data into the main memory in an inefficient data structure. As a result, the data source is only suitable for reading master data with a few data records. A memory overflow can occur for master data tables with lots of records such as business partners or products. This occurs regardless of how the "Process data in the memory" indicator was set.
If this situation occurs, set the InfoObject in such a way that it is available as an InfoProvider. Then use the "InfoProvider" data source instead of the "InfoObject" data source in the analysis process.
I'll try this...
//Johan
Similar Messages
-
Upload the master data in abap-hr using Lsmw tool
Hi Friends,
Any one Help me How to Upload the Master data in ABAP-HR using LSMW.
In Recording what need to fill.
If any screenshots are availave please provied me.
Thanks and Regards,
Sai.http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
Try this ..... -
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 -
MB5L _ ABAP Dump - TSV_TNEW_PAGE_ALLOC_FAILED
Hi all,
While ruuning transaction MB5L, but giving below as selection parameter. i getting ABAP dump"TSV_TNEW_PAGE_ALLOC_FAILED" .
Company code:xxxx
G/L account"XXXX
**Select Balance,prev period
**Display Indiv.Matl Lines
As per client, they need this report..we implemented SAP notes and SPU, but still facing this error.
anyone can help this case?
Thanks and regards,
PrabakaranPlease see attached note 198596 which explains you may need to use report RM07MMFI when you are trying to
report on a large number of materials.
This issue is due to the memory space required in internal table.
Please kindly check your setting for memory space. In standard system it
takes maximum 700 MB. This is the technical limitation.
Please use report RM07MMFI to compare the stock values in MM
with the stock accounts in FI as desribed in note 921161.
Runtime/memory consumption of RM07MBST can only be improved by
using reasonable selection settings.
The report RM07MBST (MB5L) is not to be improved in its memory
consumption. The "correction" for the high memory consumption of the
report RM07MBST was the new development of report RM07MMFI.
369726 TSV_TNEW_PAGE_ALLOC_FAILED -
PA30 - Maintain HR Master Data - ITAB_DUPLICATE_KEY shoprt dump
Hello,
when I run PA30 transaction I immediately receive short dump ITAB_DUPLICATE_KEY with info as follows:
What happened?
Error in ABAP application program.
The current ABAP program "SAPLHRBAS00GENERICSELECTION" had to be terminated
because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Error analysis
You wanted to add an entry to table
"\FUNCTION=HR_GET_TEXT_FOR_OBJECTS\DATA=L_PERNR_DATE_TAB", which you declared
with a UNIQUE KEY. However, there was already an entry with the
same key.
This may have been in an INSERT or MOVE statement, or within a
SELECT ... INTO statement.
In particular, you cannot insert more than one initial line into a
table with a unique key using the INSERT INITIAL LINE... statement.
User and Transaction
Language key........ "E"
Transaction......... "PA30 "
Program............. "SAPLHRBAS00GENERICSELECTION"
Screen.............. "SAPMP50A 1100"
Screen line......... 3
Information on where terminated
The termination occurred in the ABAP program "SAPLHRBAS00GENERICSELECTION" in
"HR_GET_TEXT_FOR_OBJECTS".
The main program was "SAPMP50A ".
The termination occurred in line 65 of the source code of the (Include)
program "LHRBAS00GENERICSELECTIONU17"
of the source code of program "LHRBAS00GENERICSELECTIONU17" (when calling the
editor 650).
SourceCode
.........cut................
60 IF begda > endda.
61 RAISE wrong_dates.
62 ENDIF.
63
64 IF NOT pernr_tab[] IS INITIAL.
65 SELECT pernr ename AS name begda endda FROM pa0001
66 INTO CORRESPONDING FIELDS OF TABLE l_pernr_date_tab
67 FOR ALL ENTRIES IN pernr_tab
68 WHERE pernr = pernr_tab-pernr AND
69 sprps EQ space.
70 CLEAR pernr_tab[].
71 * ENAME contains allways the latest name, so we don't have to care
72 * about the dates
73 LOOP AT l_pernr_date_tab INTO l_pernr_date_wa.
...........cut..............
This happens for a specific employee.
There are two records in PA0001 table, but they are on a different date ranges, so this should be OK.
PA0001 table content:
PERNR SUBTY OBJPS SPRPS ENDDA BEGDA SEQNR AEDTM UNAME
10001228 31.12.2008 01.09.2008 000 03.10.2008 MARTISB
10001228 31.12.9999 01.01.2009 000 03.10.2008 MARTISB
I suppose this happens when PA30 before showing screen to a user tries to read info of users used in last usage of PA30.
Maybe clear of SAP GUI cache should help? (Do you know how to cleare GUI cache on user's desktop?)
Maybe field SPRPS ("Lock Indicator for HR Master Data Record") should not be empty for the second record of PA0001 table?
Anyone know any solution for that or OSS note?
Kind regards
MarcinTo solve that I've run program RH_DELETE_USER_SETTINGS via se38 transaction. I've selected only first checkbox named: "Delete last object selection".
Now PA30 works fine.
Good luck and thanks! -
Master data load gives dump with exception CX_RSR_X_MESSAGE
Hi all,
I scheduled master data load for 0MATERIAL in our BI 7.0 Quality server. The load ended in dump with the exception CX_RSR_X_MESSAGE. The data has loaded into PSA( 37257 from 37257 records) but the technical status is red and has not updated the master data object.
I have seen note 615389 which talks about number range but the check is successful. The data load was successful in development server. This error has occured only in Quality.
We are on SP 12 in BI 7.0.
We are moving to production soon, so this is an urgent issue. I would appreciate if anyone responds soon. Points will be rewarded.
with regards,
AshishHi,
The log of the dump is given below.
Error analysis
An exception occurred which is explained in detail below.
The exception, which is assigned to class 'CX_RSR_X_MESSAGE', was not caught
and
therefore caused a runtime error.
The reason for the exception is:
No text available for this exception
Information on where terminated
Termination occurred in the ABAP program "SAPLRRMS" - in "RRMS_X_MESSAGE".
The main program was "SAPMSSY1 ".
In the source code you have the termination point in line 78
of the (Include) program "LRRMSU13".
Source Code Extract
Line
SourceCde
48
*... Nachricht an den Message-Handler schicken
49
50
*... S-Meldung wenn kein Handler initialisiert
51
DATA: l_type TYPE smesg-msgty,
52
l_zeile TYPE rrx_mesg-zeile.
53
CALL FUNCTION 'MESSAGES_ACTIVE'
54
IMPORTING
55
zeile = l_zeile
56
EXCEPTIONS
57
not_active = 1.
58
IF sy-subrc NE 0.
59
l_type = 'S'.
60
ELSE.
61
l_type = 'W'.
62
ENDIF.
63
64
CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
65
EXPORTING
66
i_class = 'BRAIN'
67
i_type = l_type
68
i_number = '299'
69
i_msgv1 = i_program
70
i_msgv2 = i_text.
71
ELSE.
72
DATA: l_text TYPE string,
73
l_repid TYPE syrepid.
74
75
l_repid = i_program.
76
l_text = i_text.
77
>>>>>
RAISE EXCEPTION TYPE cx_rsr_x_message
79
EXPORTING text = l_text
80
program = l_repid.
81
ENDIF.
82
83
ENDFUNCTION.
I went to SM21 and went through the system log. There was a log with the following text ORA-20000: Insufficient privileges#ORA-06512: at
"SYS.DBMS_STATS", line 2150#ORA-06512: at "SYS.DBMS_STATS.
I found a note 963760 for this error. After the changes said in this note were done I reloaded the data and it worked fine. Data load for another data source which gave dump now worked.
I am not sure if the note did the trick. So i am keeping this post open in case someone finds another solution or can confirm the solution which worked for me.
Thanks Oliver and Oscar, for replying.
regards,
Ashish -
Read dimension member(master data) to ABAP internal table in BPC 10.0 NW
Hi all,
I manage to read transaction data using this example [replacement for IF_UJ_MODEL~GET_APPL_DATA;
I am now trying to read members(master data) from a dimension to a ABAP internal table but I have no idea how to.
Can anyone advise me on how to read members(master data) from a dimension to a ABAP internal table.
Some sample code would be really appreciated.
Regards
Edited by: HK Kang on Jan 3, 2012 4:26 AMHi Chanaveer,
UJD_ADMIN_RUN_OPTIMIZE can be used only for executing the FULL & LITE OPTIMIZER packages.
Looking at the code of UJD_RUN_OPTIMIZE_PACKAGE it seems this FM can be used to trigger process chain from BW.
Please refer below link on SDN showing how to load Master Data on FLY in SAP BPC 10.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2020b522-cdb9-2e10-a1b1-873309454fce?QuickLink=index&overridelayout=true
Thanks,
Rohit -
Updating Q and P table of master data using ABAP program
Hi All
I have a requirement to update Q and P table(non key and non date fields) of master data using an ABAP program.
Is this something recommended?
Will there be any issues if I do that?
Thanks
DeepakThanks Vikram. Ok. My look up is on some other master data Q table and that is the reason why I asked about ABAP custom program.
Look like I will have to do the following approach.
Load the required supporting master data to BW.
Execute Attribute change run process for those master data objects.
Load the actual master data and look up on supporting master data.
Execute attribute change run process.
This process takes me long time and I am trying to reduce the overall execution time. let me know if you have some good suggestions.
Thanks
Deepak -
Hi All,
I am getting the dump TSV_TNEW_PAGE_ALLOC_FAILED in program SAPLCOM_PARTNER_OB in LCOM_PARTNER_OB in line 165.
Short text
No more storage space available for extending an internal table.
What happened
You attempted to extend an internal table, but the required space was not available.
The error is occuring in line
INSERT GS_CURRENT_PARTNERSET INTO TABLE GT_PARTNERSETS.
CT_PARTNER[] = GS_CURRENT_PARTNERSET-PARTNER[]. "#EC ENHOK
ENDIF.
The amount of storage space (in bytes) filled at termination time was:
Roll area...................... 6221152
Extended memory (EM)........... 3909511400
Assigned memory (HEAP)......... 2000692032
Short area..................... " "
Paging area.................... 417792
Maximum address space.......... 18446697117078316543
The dump is occuring in the standard program. Is there any note for this.
Kindly help.
Thanks,> I am getting the dump TSV_TNEW_PAGE_ALLOC_FAILED in program SAPLCOM_PARTNER_OB in LCOM_PARTNER_OB in line 165.
> Extended memory (EM)........... 3909511400
> Assigned memory (HEAP)......... 2000692032
> The dump is occuring in the standard program. Is there any note for this.
Did you try a notes search?
This program is already using roughly 6 GB of RAM which seems quite a lot.
What transaction/process is triggering this error? It may be that a user just selects too much data.
Markus -
Hi,
My requirements is to load master data infoobject through ABAP. I searched in the forum and found RSDMD_WRITE_ATTRIBUTES_TEXTS function module .
data : itab like /BI0/PMATERIAL occurs 0 with header line.
itab-MATERIAL = 'Mat420'.
itab-OBJVERS = 'A'.
append itab.
CALL FUNCTION 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
EXPORTING
I_IOBJNM = '0MATERIAL'
I_TABCLASS = 'M'
TABLES
I_T_TABLE = ITAB
EXCEPTIONS
ATTRIBUTE_NAME_ERROR = 1
IOBJ_NOT_FOUND = 2
GENERATE_PROGRAM_ERROR = 3
OTHERS = 4.
However , it doesnt add an entry into infoobject...
We are using APO 3.0 version.
Does anyone has any idea on this ?.Thank you all of you for your replys.
I believe there must be a version issue while using function module RSDMD_WRITE_ATTRIBUTES_TEXTS , it works well in BW system but not in APO version
However , my issue gets resolved by using Function Module RSNDI_MD_ATTRIBUTES_UPDATE.
Here is a sample code in APO 3.0 version. ( for other's reference )
Data : i_final Like RSNDI_S_CHAVL occurs 0 with header line,
i_final-RECORD_NO = 1.
i_final-IOBJNM = '0Material'.
i_final-VALUE = 'DTEST'.
Append i_final.
CALL FUNCTION 'RSNDI_MD_ATTRIBUTES_UPDATE'
EXPORTING
I_IOBJNM = '0MATERIAL'
I_UPDATE_ALL_ATTRIBUTES = 'X'
TABLES
I_T_DATA = i_final
E_T_MESSAGES = i_message.
After execution , it did add records into infoobject.
Anyway thank you all for your replies and suggestions.
Regards,
Prashant
Message was edited by:
Prashant -
LOOKUP-Master Data Attribute (ABAP Code)
Hi,
My requirment
ZCOMPANY is an attribute of ZCostcenter
ZCost center is an attribute ZEMPLOYEE
zcomp is an attribute of employee
While Loading attribute data to employee i need to write Lookup/routine in transformations that will
Based on ZCOSTCENTER data of an employee i has to read setup tables in BW and update ZCOMP of an employee(attribute) from ZCOMPANY of ZCostcenter
Please update me with the ABAP Code
Thanks in advanceHi,
This is the routine written in transformations.
My requirment is to modify this a bit to include following conditions
1)source_fields-costcenter
(It needs to be converted to CAPS)(Bcaz ZCOSTCENTER consists all the caps)
2)I want to include 'OBJVERS'='A' in the code
Please update me with the code
select /bic/zcompany from /bic/mzcostcenter
into result
where zcostcenter = source_fields-costcenter.
end select.
Thanks -
APD returns ABAP Error: TSV_TNEW_PAGE_ALLOC_FAILED
Hi
I'm trying to run APD for a virtual cube.
The design of the APD is as follow:
1. Read a Query (FM of a virtual cube query)
2. Filter the value
3. Aggregate the value
4. Output to text file
If I run RSRT to read the query, I'm able to get the query, and it's returning 936,210 rows.
However, when I run it from APD, it threw me the following errors:
Error analysis
The internal table "\CLASS=CL_RSCRMBW_BAPI\METHOD=GET_AXIS_DATA_V2\DATA=LT_MPP"
could not be further extended. To enable
error handling, the table had to be delete before this log was written.
As a result, the table is displayed further down or, if you branch to
the ABAP Debugger, with 0 rows.
At the time of the termination, the following data was determined for
the relevant internal table:
Memory location: "Session memory"
Row width: 652
Number of rows: 5,027,712
Allocated rows: 5,027,712
Newly requested rows: 16 (in 1 blocks)
Any idea what I can do to rectify this?
Your advice is much appreciated.Hi,
This is a problem related to memory of internal table.
Please check the below links
APD dump TSV_TNEW_PAGE_ALLOC_FAILED
ABAP dump TSV_TNEW_PAGE_ALLOC_FAILED
APD Dump: TSV_TNEW_PAGE_ALLOC_FAILED (but processed in database)
Re: TSV_TNEW_PAGE_ALLOC_FAILED and TSV_TNEW_BLOCKS_NO_ROLL_MEMORY
Hope this helps
Thanks. -
ABAP DUMP while loading master data
hi Gurus,
I am trying to load master data but I am getting the following dump , I cannot infer anything from the Dump message, I would be grateful if anyone could throw some light on it..
Runtime Errors SAPSQL_ARRAY_INSERT_DUPREC
Exception CX_SY_OPEN_SQL_DB
Occurred on 11/13/2006 at 13:17:57
The ABAP/4 Open SQL array insert results in duplicate database records.
What happened?
Error in ABAP application program.
The current ABAP program "CL_RSDMD_UPDATE_MASTER_DATA===CP " had to be
terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
is especially useful if you want to keep a particular message.
rror analysis
n exception occurred. This exception is dealt with in more detail below
The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
neither
aught nor passed along using a RAISING clause, in the procedure "_DB_FIRE"
"(METHOD)"
ince the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
he reason for the exception is:
f you use an ABAP/4 Open SQL array insert to insert a record in
he database and that record already exists with the same key,
his results in a termination.
With an ABAP/4 Open SQL single record insert in the same error
ituation, processing does not terminate, but SY-SUBRC is set to 4.)
ow to correct the error
he exception must either be prevented, caught within the procedure "_DB_FIR
(METHOD)", or declared in the procedure's RAISING clause.
o prevent the exception, note the following:
se an ABAP/4 Open SQL array insert only if you are sure that none of
he records passed already exists in the database.
ou may able to find an interim solution to the problem
n the SAP note system. If you have access to the note system yourself,
se the following search criteria:
APSQL_ARRAY_INSERT_DUPREC" CX_SY_OPEN_SQL_DBC
L_RSDMD_UPDATE_MASTER_DATA===CP " or "CL_RSDMD_UPDATE_MASTER_DATA===CM00Y "
DB_FIRE"one of the response says " In the infopackage set processing as 'Only PSA' and tick the checkboxes for 'Update subsequently in data targets' and 'delete duplicate records'.then try to reload."
I do not find the Delete duplicate records check box in the IP...cananyonepls tell me where to find thid check box?
thanks -
SAP BW 3.5 APD for master data
Gurus,
We are having issues with SAP BW 3.5 APD transformation before full upload for Item master data. Due to the high volume encountering short dumps. We cannot extend memory space to fix this short dump. What we are trying to do is initilize the values before the full load to make consistent with SAP so that BW item cost values is in sync with SAP. There was no issue in development and only in test system.
So work was moved to test.
Is there any suggestion for this problem or alternative to something else? Please help.
Thanks,
DiHi Abhishek,
We need to correct values of custom cost related fields of master data in BW that pull data from SAP. If any Item with cost field in SAP is not maintained any longer, we found the solution to initilize every record with APD before doing full upload in BW to be in sync. Version is BW 3.5. We are facing performance issue. So tried different ways like delete all the records that is already zero before reading data from the internal table. We still get short dump when process chains runs with APD program. I am not sure how to pull data in smaller chunks with filters here. Any suggestions please? Design is master data, filter columns, routines and master data. Source and target are the same.
Thanks,
Di -
Short Dump Error while loading master data.
Hello All,
I am trying to load data from PSA to Info Object (0Material_Attr) via DTP, I am getting error and itu2019s giving the short dump.
Runtime Errors UNCAUGHT_EXCEPTION
Exception CX_RSR_X_MESSAGE.
"UNCAUGHT_EXCEPTION" "CX_RSR_X_MESSAGE"
"SAPLRRMS" or "LRRMSU13"
"RRMS_X_MESSAGE".
In Job overview, job is getting cancelled, with error message
"The object name is not allowed to be empty".
ABAP/4 processor: UNCAUGHT_EXCEPTION.
We have done the following steps, even then error persist.
Transaction RSRV > All Elementary Tests > Master Data > Compare Number Range and Maximum SID for the characteristic 0REQUID.
If the system reports an error here, correct the error using the "Correct Error" function.
Kindly suggest.
Thanks in Advance .Error analysis from ST22
An exception occurred which is explained in The exception, which is assigned to class ' and therefore caused a runtime error.
The reason for the exception is: No text available for this exception
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"UNCAUGHT_EXCEPTION" "CX_RSR_X_MESSAGE"
"SAPLRRMS" or "LRRMSU13"
"RRMS_X_MESSAGE"
Maybe you are looking for
-
Can't print from Windows PC to printer on I-Mac USB over wireless network
I am a brand new Mac user after years of Windows frustration. Canon i9100 connected to I-Mac via USB. Prints OK from I-Mac. Print share enabled. Windows share enabled. I-Mac on wireless LAN with static IP addresses for all devices. Dell Windows XP on
-
Since i have switched from Windows XP to Window 7, I am no longer able to check the ink levels in my printer. What can i do to be able to do so again? I still have the installation disk but I'm not sure if I need to use it again because the printer
-
Windows 8 May 31 Release Preview successfully installed in Bootcamp
I installed the May 31 final preview release of Windows 8 yesterday on an early 2011 MacBook Pro with an existing Bootcamp Windows partition. I burned an ISO image of the 64 bit OS to DVD http://windows.microsoft.com/en-US/windows-8/release-preview a
-
Is there a way to get my current 3G iphone upgraded to 3GS without buying another iphone? Thanks
-
I jar up a bunch of gifs and have receive absolutely no compression benefit. What gives? Is there some other scheme I should be using?