Step by step procedure for creating BOL
Hi All,
I am new to CRM and facing a lot of problems while creating BOL.
Please help me by providing some link which will guide step by step for
creating BOL.
Thanks
Alsalfi
HI Alsalfi,
Simple Object allows only for single table. If you want to create for multiple tables, then u need to create BOL for each table and define a parent -child relationship and also its cardinality in the Simple object configuration in spro.
Hope it helps.
-Satish
Similar Messages
-
Can anyone let me know the step by step procedure for creating userexits?
Hi all,
can anyone let me know the step by step procedure for creating user exits? for any transaction code like mm01 or vd01. If you have any docs send it across to my email id : [email protected]
thanxs in advance
hariHi,
*& Report ZEXITFINDER
*report zexitfinder.
*& Enter the transaction code that you want to search through in order
*& to find which Standard SAP User Exits exists.
*& Tables
tables : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
*& Selection Screen Parameters
selection-screen begin of block a01 with frame title text-001.
selection-screen skip.
parameters : p_tcode like tstc-tcode obligatory.
selection-screen skip.
selection-screen end of block a01.
*& Start of main program
start-of-selection.
Validate Transaction Code
select single * from tstc
where tcode eq p_tcode.
Find Repository Objects for transaction code
if sy-subrc eq 0.
select single * from tadir
where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir
where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir
where pname = tstc-pgmna.
select single * from enlfdir
where funcname = tfdir-funcname.
select single * from tadir
where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name = enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
Find SAP Modifactions
select * from tadir
into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct
where sprsl eq sy-langu
and tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
Take the user to SMOD for the Exit that was selected.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
look in txn CMOD or SMOD, check enhancement 0VRF0001. It uses function module EXIT_SAPL0VRF_001. It is used to manipulate route determination for SD.
Here is the code
DATA: ls_xvbpa LIKE xvbpa,
lf_aland LIKE tvst-aland,
lf_azone LIKE tvst-azone,
lf_lland LIKE trolz-lland,
lf_lzone LIKE trolz-lzone,
ls_vbadr LIKE vbadr,
ls_xvbap LIKE xvbap,
ls_tvst LIKE tvst,
lv_route LIKE trolz-route.
LOOP AT xvbap INTO ls_xvbap.
IF NOT ls_xvbap-vstel IS INITIAL.
SELECT SINGLE * FROM tvst
INTO ls_tvst
WHERE vstel EQ ls_xvbap-vstel.
IF sy-subrc = 0.
lf_aland = ls_tvst-aland.
lf_azone = ls_tvst-azone.
ENDIF.
ENDIF.
READ TABLE xvbpa INTO ls_xvbpa WITH KEY vbeln = ls_xvbap-vbeln
posnr = ls_xvbap-posnr
parvw = 'Q1'.
IF sy-subrc = 0.
CALL FUNCTION 'SD_ADDRESS_GET'
EXPORTING
fif_address_number = ls_xvbpa-adrnr
IMPORTING
fes_address = ls_vbadr
EXCEPTIONS
address_not_found = 1
address_type_not_exists = 2
no_person_number = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
lf_lland = ls_vbadr-land1.
lf_lzone = ls_vbadr-lzone.
ENDIF.
ENDIF.
CALL FUNCTION 'SD_ROUTE_DETERMINATION'
EXPORTING
i_aland = lf_aland
i_azone = lf_azone
i_lland = lf_lland
i_lzone = lf_lzone
IMPORTING
e_route = lv_route
EXCEPTIONS
no_route_found = 1
departure_error = 2
destination_error = 3
invalid_generic_key = 4
customer_exit_error = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
ls_xvbap-route = lv_route.
MODIFY xvbap FROM ls_xvbap TRANSPORTING route.
ENDIF.
ENDLOOP.
For information on Exits, check these links
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
http://www.easymarketplace.de/userexit.php
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sappoint.com/abap/userexit.pdfUser-Exit
http://www.planetsap.com/userexit_main_page.htm
User-Exits
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sap-img.com/ab038.htm
http://www.planetsap.com/userexit_main_page.htm
http://www.sap-basis-abap.com/sapab013.htm
http://sap.ittoolbox.com/documents/popular-q-and-a/user-exits-for-the-transaction-code-migo-3283
<b>Reward points</b>
Regards -
Procedure for creating logical standyby database for oracle 11g?
Hi all,
can anybody provide me docs /procedure for creating logical standby databse for oracle 11g standard edition.
AravindAravind,
1. The Oracle Standard Edition does not have standby mechanism, you should do it manually or go for Enterprise Edition.
2. It's rather a question for General Database Discussions instead of Peoplesoft.
Any further question regarding that point, please post out there.
Nicolas. -
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 -
Procedure for creating Inbox views
HI All,
Could you please let us know the procedure for creating new Inbox view in BPM 11g.
We have an option to create my Views / Sharing Views in 11g but how we can put that under Inbox views.
Thanks,
Aravind.Hi Antonis,
We need view under Inbox. PFA. the attached screenshot.
Thanks,
Aravind. -
Procedure for creating credit memo for sales return
Dear Gurus,
Please let me know the procedure creating a credit memo for sales returns.
I am able to cancel the invoice using vf11. create a return sales order using vao1. create a retrun delivery using vl01n, transfer the stock from returns to blocked to unrestricted use using mb1b and movement types 459 and 343.
Pls let me know the procedure for creating the credit memo for the goods receipt of sales return.Dear,
I am not geeting your question but well i explain in my company scenarion,
1) We create the Sales Order : VA01 ( Order type : ZREW : Return without invoice, ZRES : Return with Invoice)
Here, ZREW is our own created order type and it is maintain in config.
ZRES is use for Return with invoice. In that we enter the bill number in return sales order which sales.
2) In Delivery : VL01N : That is base on Return Sales order.
3) In Billing : VF01 : Create credit memo with resp. to delivery number.
Credit memo type : Same as sales order,
ZREW : Crd Return (W/O Inv)
ZRES : Credit For Returns.
Hope it will help you.
Regards,
Sandip -
How to write procedure for creating a row
Hi
How to write procedure for creating a new row in data table when button clicked.Hi
I am able to create a row.by writing a method in Application module class.
method for creating a row in fin_years view:
public void createRow() {
Row newRow = (Row)getFinYearsView1().createRow();
newRow.setNewRowState(Row.STATUS_INITIALIZED);
//get instance of the above created view object
ViewObjectImpl vo=getFinYearsView1();
// to insert row at the end of the table
vo.insertRowAtRangeIndex(vo.getRangeSize()-1, (Row)newRow);
System.out.println(getFinYearsView1().getCurrentRowIndex());
but it doest not create row at last in the data table.Instead it insert row in middle.. -
VT01N: what is the correct procedure for creating shipment
Hi Gurus ,
Please tellme the correct procedure for creating shipment in VT01N with respect to the Sales order no . there are deliveries and ohter sceens what to do first .
Regards, JaspalHi Jaspal,
Procedure for creating shipment sequence goes as:
<b>Shipping Processing and Analyses</b>
Shipping activities.
Deliveries.
Picking and confirmation.
Packing.
Goods issue.
Collective processing.
Shipment.
Billing.
Sales Information System.
Standard analyses.
Backorder processing.
Sales and distribution documents.
Functional analyses.
Planning.
Pls refer the link:
http://www.sap-img.com/sap-sd.htm for more details.
Regards,
Hemachandra K S -
Procedure for Creating Packaging to deploy Sdk java Files to MDM Server
Hi All,
I have sdk java files which were developed using eclipse ,need to deploye in other mdm server.Can any one tell me the procedure for creating the packaging structure to deploye using cm_packaging which available with sdk software.
Thanks In Advance
SantoshHi All,
I have sdk java files which were developed using eclipse ,need to deploye in other mdm server.Can any one tell me the procedure for creating the packaging structure to deploye using cm_packaging which available with sdk software.
Thanks In Advance
Santosh -
Procedure for creating a user and assigning him a role
Hi folks,
has anyone of you a procedure for creating a user and then assigning him a spezial role?
The procedure has 2 arguments username and password. I think that its an easy one but I
have not found the right packages.
Thankscreate or replace procedure new_user(username_in IN VARCHAR2, password_in IN VARCHAR2) is
C_TEMP_TSP CONSTANT VARCHAR2(30) := 'TEMP';
C_DEFAULT_TSP CONSTANT VARCHAR2(30) := 'USERS';
C_DEFAULT_ROLE CONSTANT VARCHAR2(30) := 'SPECIALROLE';
begin
execute immediate 'create user ' || username_in ||
' identified by ' || password_in ||
' default tablespace ' || C_DEFAULT_TSP ||
' temporary tablespace ' || C_TEMP_TSP;
execute immediate 'grant '|| C_DEFAULT_ROLE ||' to '||username_in;
end new_user; -
What is the Procedure for Creating BC sets In PI
hi
what is the Procedure for Creating BC sets In PI
ThanksHi Venkata,
Read this SAP official document on creating BC Sets:
<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/6f/3c3f91fbef11d2958c00a0c930dcc1/frameset.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/6f/3c3f91fbef11d2958c00a0c930dcc1/frameset.htm</a>
<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/6f/3c3f88fbef11d2958c00a0c930dcc1/frameset.htm">Create Business Configuration Sets</a>
Regards,
Subhasha Ranjan -
Procedure for creating new Org Value
Hi
Can any one tell me the procedure for creating new Org Value
thanks,
SsssssssHi Sun...
Use PFCG_ORGFIELD_CREATE program and refer SAP Note 323817
Check out this thread....
Converting Field to Org level
regards,
Zaheer -
Procedure for creating transparent table, data element and domain
Hi,
Can anybody let me know the procedure for creating transparent table, data element and domain.
Thanks,
MahathiHi
Database table and its components
A database table is the central data structure of the ABAP/4 data dictionary.
The structure of the objects of application development are mapped in tables on the underlying relational database.
The attributes of these objects correspond to fields of the table.
A table consists of columns (fields) and rows (entries). It has a name and different attributes, such as delivery class and maintenance authorization.
A field has a unique name and attributes; for example it can be a key field.
A table has one or more key fields, called the primary key.
The values of these key fields uniquely identify a table entry.
You must specify a reference table for fields containing a currency (data type CURR) or quantity (data type QUAN). It must contain a field (reference field) with the format for currency keys (data type CUKY) or the format for units (data type UNIT). The field is only assigned to the reference field at program runtime.
The basic objects for defining data in the ABAP Dictionary are tables, data elements and domains. The domain is used for the technical definition of a table field (for example field type and length) and the data element is used for the semantic definition (for example short description).
A domain describes the value range of a field. It is defined by its data type and length. The value range can be limited by specifying fixed values.
A data element describes the meaning of a domain in a certain business context. It contains primarily the field help (F1 documentation) and the field labels in the screen.
A field is not an independent object. It is table-dependent and can only be maintained within a table.
You can enter the data type and number of places directly for a field. No data element is required in this case. Instead the data type and number of places is defined by specifying a direct type.
The data type attributes of a data element can also be defined by specifying a built-in type, where the data type and number of places is entered directly.
<b>Two Level Domain Example</b>
A domain defines a field technically and therefore it may
be used at different business levels.
A data element describes the meaning of a domain in a certain business context.
A domain, however, is used for the technical definition of a table field (for example field type and length).
Therefore, although a take-off airport (data element S_FROMAIRP) would have a different business meaning from an airport where a plane lands (data element S_TOAIRP), they could still have the same domain(here S_AIRPID) because technically we could assign the same number of characters whether the airport is a take-off or a landing airport.
<b>Definitions of Table in Database</b>
In SAP R/3 tables are defined as
A) Transparent tables: All of the fields of a dictionary table correspond to a field in the real database table.
B) Pooled tables: Different tables which are not linked to each other with a common key are combined into a TABLE POOL. Several logical tables thus exist as a single real database table.
C) Cluster tables: Several tables linked by a common key may sometimes be combined by the data dictionary and made to exist on the database schema as a single table.
SAP is evolving R/3 tables in transparent tables.
<b>Elaboration on each of the definitions</b>
A transparent table is automatically created on the database when it is activated in the ABAP Dictionary. At this time the database-independent description of the table in the ABAP Dictionary is translated into the language of the database system used.
The database table has the same name as the table in the ABAP Dictionary. The fields also have the same name in both the database and the ABAP Dictionary. The data types in the ABAP Dictionary are converted to the corresponding data types of the database system.
The order of the fields in the ABAP Dictionary can differ from the order of the fields on the database. This permits you to insert new fields without having to convert the table. When a new field is added, the adjustment is made by changing the database catalog (ALTER TABLE). The new field is added to the database table, whatever the position of the new field in the ABAP Dictionary.
Tables can also reside on the database as Pooled tables or cluster tables
Pooled Tables: Different tables which are not linked to each other with a common key can be combined into a Table Pool. The tables contained within this pool are called Pooled Tables. A table pool is stored in the database a simple table. The table's data sets contain, in separate fields, the actual key for the data set to be stored, the name of the pooled table and the contents of the data set to be stored.
Using this schema, several logical tables are combined into a single real database table. Although the data structure of each set is lost during the write to the table pool, it is restored during the read by the ABAP/4 Data Dictionary. The ABAP/4 Data Dictionary utilizes its meta-data to accomplish this.
Since information must be prepared (defined) within the ABAP/4 Data Dictionary when it is read or written to (or accessed), this process itself defines these as not transparent tables
Cluster Tables: Occasionally, several tables may be linked by a common key. The ABAP/4 Data Dictionary can also combine these tables into a single table. Each data set of the real table within the database contains a key and in a single data field, several data sets of the subsequent table for this key.
As mentioned above, these table types require special data handling, therefore they are not transparent tables.
<b>Technical Settings in Dictionary</b>
The data class logically defines the physical area of the database (for ORACLE the table space) in which your table should be created. If you choose the data class correctly, the table will automatically be created in the appropriate area on the database when it is activated in the ABAP Dictionary.
The most important data classes are master data, transaction data, organizational data and system data.
Master data is data that is rarely modified. An example of master data is the data of an address file, for example the name, address and telephone number.
Transaction data is data that is frequently modified. An example is the material stock of a warehouse, which can change after each purchase order.
Organizational data is data that is defined during customizing when the system is installed and that is rarely modified thereafter. The country keys are an example.
System data is data that the R/3 System itself needs. The program sources are an example.
Further data classes, called customer data classes (USER, USER1), are provided for customers. These should be used for customer developments. Special storage areas must be allocated in the database.
The size category describes the expected storage requirements for the table on the database.
An initial extent is reserved when a table is created on the database. The size of the initial extent is identical for all size categories. If the table needs more space for data at a later time, extents are added. These additional extents have a fixed size that is determined by the size category specified in the ABAP Dictionary.
You can choose a size category from 0 to 4. A fixed extent size, which depends on the database system used, is assigned to each category.
Correctly assigning a size category therefore ensures that you do not create a large number of small extents. It also prevents storage space from being wasted when creating extents that are too large.
Modifications to the entries of a table can be recorded and stored using logging.
To activate logging, the corresponding field must be selected in the technical settings. Logging, however, only will take place if the R/3 System was started with a profile containing parameter 'rec/client'. Only selecting the flag in the ABAP Dictionary is not sufficient to trigger logging.
Parameter 'rec/client' can have the following settings:
rec/client = ALL All clients should be logged.
rec/client = 000[...] Only the specified clients should be logged.
rec/client = OFF Logging is not enabled on this system.
The data modifications are logged independently of the update. The logs can be displayed with the Transaction Table History (SCU3).
Logging creates a 'bottleneck' in the system:
Additional write access for each modification to tables being logged.
This can result in lock situations although the users are accessing different application tables!
<b>Create transparent table</b>
Go to transaction SE11. Enter name of table you want to create (beginning with Y or Z) and click on create pushbutton
Enter the delivery class and the table maintenance criteria
The delivery class controls the transport of table data when installing or upgrading, in a client copy and when transporting between customer systems .
The display/maintenance indicator specifies whether it is possible to display/maintain a table/view using the maintenance tools Data Browser (transaction SE16) and table view maintenance (transactions SM30 and SM31).
Enter the name of the table field and the data element. The
System automatically populates the technical details for
existing data elements.
So far as possible it is advisable to use existing data elements which befit the business requirements.
However, we may create data elements if need be. The same is shown in the next slide.
To create a data element simply double click on it.
Alternately create a data element by simply choosing the
data type radio button on SE11 initial screen.
<b>Create data element</b>
The system prompts you to create a new data element.
Choose the Yes pushbutton.
Under the data type tab enter the domain name which
determines the technical characteristics of the field.
Further characteristics tab: Allows you to specify a search help assigned to the data element.
It also allows you to specify a parameter id which helps you populate a field from SAP memory.
Field label: Can be assigned as prefixed text to a screen field referring to the ABAP Dictionary. The text is displayed on the screen in the logon language of the user (if the text was translated into this language).
<b>Create domain</b>
If the domain does not exist in the data dictionary the
system prompts you to create one.
Give the technical characteristics under the definition
tab. Value range allows you value restriction at domain
level.
Value range tab:
As explained in the section Consistency through input checks one can restrict the possible values for a field at domain level itself by either entering fixed values or by specifying a value table under the tab Value range.
<b>Currency/Quantity fields in a table</b>
A currency or a quantity field must be assigned a reference field from a reference table containing applicable qty unit or currency unit.
Field of the reference table, containing the applicable quantity unit or currency
A field containing currency amounts (data type CURR) must be assigned a reference field including the currency key (data type CUKY).
A field containing quantity specifications (data type QUAN) must be assigned a reference field including the associated quantity unit (data type UNIT).
<b>Create transparent table continue</b>
Maintain the technical settings of the table by clicking on the tab -
Procedure for creating an InfoSet
What is The procedure for creating an InfoSet from the DataSource in Genric extraction?
Hi,
check the below links:
SAP Query
SAP Query
hope it helps...
regards,
raju -
Can anyone explain me step by step procedure for creating badi?
hi all,,
Can anyone explain me about badi with step by step procedure with an example like trsn code mm01, xd01 etc.
And what is the significance of badi?
regs
hariHi
Business Add-Ins
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
As with customer exits (SMOD/CMOD [Page 40]), two different views are available:
In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
In contrast to customer exits, Business Add-Ins no longer assume a two-system infrastructure (SAP and customers), but instead allow for multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time.
In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example). All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard.
A single Business Add-In contains all of the interfaces necessary to implement a specific task. In Release 4.6A, program and menu enhancements can be made with Business Add-Ins. The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects
DEFINING THE BADI
1) execute Tcode SE18.
2) Specify a definition Name : ZBADI_SPFLI
3) Press create
4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
multiple use.
5) Choose the interface tab
6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
7) Dbl clk on interface name to start class builder . specify a method name (name,
level, desc).
Method level desc
Linese;ection instance methos some desc
8) place the cursor on the method name desc its parameters to define the interface.
Parameter type refe field desc
I_carrid import spfli-carrid some
I_connid import spefi-connid some
9) save , check and activate adapter class proposed by system is
ZCL_IM_IM_LINESEL is genereated.
IMPLEMENTATION OF BADI DEFINITION
1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
2) Specify aname for implementation ZIM_LINESEL
3) Specify short desc.
4) Choose interface tab. System proposes a name fo the implementation class.
ZCL_IM_IMLINESEL which is already generarted.
5) Specify short desc for method
6) Dbl clk on method to insert code..(check the code in AAA).
7) Save , check and activate the code.
Some useful URL
http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Now write a sample program to use this badi method..
Look for BBB sample program.
AAA
data : wa_flights type sflight,
it_flights type table of sflight.
format color col_heading.
write:/ 'Flight info of:', i_carrid, i_connid.
format color col_normal.
select * from sflight
into corresponding fields of table it_flights
where carrid = i_carrid
and connid = i_connid.
loop at it_flights into wa_flights.
write:/ wa_flights-fldate,
wa_flights-planetype,
wa_flights-price currency wa_flights-currency,
wa_flights-seatsmax,
wa_flights-seatsocc.
endloop.
BBB
*& Report ZBADI_TEST *
REPORT ZBADI_TEST .
tables: spfli.
data: wa_spfli type spfli,
it_spfli type table of spfli with key carrid connid.
*Initialise the object of the interface.
data: exit_ref type ref to ZCL_IM_IM_LINESEL,
exit_ref1 type ref to ZIF_EX_BADISPFLI1.
selection-screen begin of block b1.
select-options: s_carr for spfli-carrid.
selection-screen end of block b1.
start-of-selection.
select * from spfli into corresponding fields of table it_spfli
where carrid in s_carr.
end-of-selection.
loop at it_spfli into wa_spfli.
write:/ wa_spfli-carrid,
wa_spfli-connid,
wa_spfli-cityfrom,
wa_spfli-deptime,
wa_spfli-arrtime.
hide: wa_spfli-carrid, wa_spfli-connid.
endloop.
at line-selection.
check not wa_spfli-carrid is initial.
create object exit_ref.
exit_ref1 = exit_ref.
call method exit_ref1->lineselection
EXPORTING
i_carrid = wa_spfli-carrid
i_connid = wa_spfli-connid.
clear wa_spfli.
u can find BADI's in different ways...
1>First go to any transaction->iN THE menu bar SYSTEM->STATUS->Get the program name ->double click->u will go to the program attached to the tcode.Now search term will be CALL CL_EXITHANDLER.Now u will get list of BADI'S available..
2>Goto SE24->Give class name as CL_EXITHANDLER->Display->double click on get_instance mathod->Now u will go inside the method->Now put break point on the cl_exithandler.Now go to any transaction code and pass dat..U will see that it will be stopped on the break point which u set on the cl_exithandler...In the exit name u can find list of badi's attached to the tcode..
There are multiple ways of searching for BADI.
Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
Finding BADI Using SQL Trace (TCODE-ST05).
Finding BADI Using Repository Information System (TCODE- SE84).
1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for CL_EXITHANDLER=>GET_INSTANCE.
Make sure the radio button In main program is checked. A list of all the programs with call to the BADIs will be listed.
The export parameter EXIT_NAME for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter INSTANCE will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
2. Start transaction ST05 (Performance Analysis).
Set flag field "Buffer trace"
Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)
Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session.
Push the button "Deactivate Trace".
Push the button "Display Trace".
The popup screen "Set Restrictions for Displaying Trace" appears.
Now, filter the trace on Objects:
V_EXT_IMP
V_EXT_ACT
Push button "Multiple selections" button behind field Objects
Fill: V_EXT_IMP and V_EXT_ACT
All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_.
So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA
3. Go to Maintain Transaction (TCODE- SE93).
Enter the Transaction VD02 for which you want to find BADI.
Click on the Display push buttons.
Get the Package Name. (Package VS in this case)
Go to TCode: SE84->Enhancements->Business Add-inns->Definition
Enter the Package Name and Execute.
Here you get a list of all the Enhancement BADIs for the given package MB.
The simplese way for finding BADI is
1. chooes Tcode Program & package for that Tcode.
2. Go to Tcode se18
3. Press F4
4. search by package or by program.
http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
and
http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
Badihttp://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
http://support.sas.com/rnd/papers/sugi30/SAP.ppt
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://members.aol.com/_ht_a/skarkada/sap/
http://www.ct-software.com/reportpool_frame.htm
http://www.saphelp.com/SAP_Technical.htm
http://www.kabai.com/abaps/q.htm
http://www.guidancetech.com/people/holland/sap/abap/
http://www.planetsap.com/download_abap_programs.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm
sample code for Purchase requisition
BAdI Name: ZPUR_RFQ (Implementation name) Purchase Requisitions
Definition Name: ME_REQ_POSTED
Interface Name : IF_EX_ME_REQ_POSTED
Implementing Class: ZCL_IM_PUR_REQ
Method : POSTED
METHOD if_ex_me_req_posted~posted .
DATA : v_mtart TYPE mtart.
DATA l_s_eban TYPE ueban.
LOOP AT im_eban INTO l_s_eban.
IF l_s_eban-estkz NE 'B'.
CLEAR v_mtart.
SELECT SINGLE mtart INTO v_mtart FROM mara WHERE matnr = l_s_eban-matnr.
IF v_mtart EQ 'ZERS' OR v_mtart EQ 'FHMI' OR v_mtart EQ 'UNBW'.
MESSAGE e000(zm_msg) WITH 'You are not allowed' 'to create PR for stock items'.
ENDIF.
ENDIF.
IF l_s_eban-knttp NE 'F' OR l_s_eban-pstyp NE '9'.
IF l_s_eban-knttp NE 'A'.
IF ( l_s_eban-pstyp NE '9' AND l_s_eban-pstyp NE 'D' ) AND l_s_eban-matnr EQ
space.
MESSAGE e000(zm_msg) WITH 'You cannot create' 'a PR without material number'.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDMETHOD.
<b>Reward points for useful Answers</b>
Regards
Anji
Maybe you are looking for
-
I have 100 data files, I want to join them together as one data file
I need to join approx. 100 data files into one data file, and be able to read back each data file from that one big file. I would also like a feature to count how many files are in the main one file. The data files contain graphs, text and numerics.
-
Adobe AIR apps break the media player!!
Hi all, I posted yesterday stating that I was having trouble with the iPad media player. What was happening was that if I opened the WIRED app, I was able to view the video content as normal. If I then closed the app (via the home button) and re-open
-
In_house_roaming (iPhone 4)
Hi to all... I recently found an "In_House_Roaming" option on my iPhone 4 Settings -> General -> Profile -> In_House_Roaming Its under a "Provisioning" label and it's status is "verified" and there's a "Remove" option Any clues???
-
Is there a limit to the number of characters that can be used for the "Name" field? Specifically for a Page. I created a page named "Career_Opportunities" and I get a "document not found" error when opening files added to this page. However, when I c
-
12.1.3 oracle apps dba
*** glibc detected *** FNDLIBR: double free or corruption (out): 0x002ae1a0 *** for Accounting program concurrent request