If you wish to extract Vendor Master: General data and Vendor Master: Company data then you can use the following function module.
ABAP Function Module to Read vendor Master
VENDOR_READ
The following program show the parameters that need to be passed to the function module. Basically you need to pass the Vendor Number and the Company Code.REPORT ZEX_VENDORREAD .
Parameters: p_lifnr like LFA1-LIFNR,
p_bukrs like LFB1-BUKRS.
Data: st_lfa1 like LFA1,
st_lfb1 like LFB1.
CALL FUNCTION 'VENDOR_READ'
EXPORTING
I_BUKRS = p_bukrs
I_LIFNR = p_lifnr
IMPORTING
E_LFA1 = st_lfa1
E_LFB1 = st_lfb1
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Find below a list of Vendor Master related tables:Parameters: p_lifnr like LFA1-LIFNR,
p_bukrs like LFB1-BUKRS.
Data: st_lfa1 like LFA1,
st_lfb1 like LFB1.
CALL FUNCTION 'VENDOR_READ'
EXPORTING
I_BUKRS = p_bukrs
I_LIFNR = p_lifnr
IMPORTING
E_LFA1 = st_lfa1
E_LFB1 = st_lfb1
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LFA1 - Vendor Master: General data
LFB1 - Vendor Master: Company data
LFM1 - Vendor Master: Purchasing Data (Purchasing organization)
LFM2 - Vendor Master: Purchasing Data (Plant, Vendor sub-range)
LFBK - Vendor Master Bank Details
Note: For more vendor Master tables enter LF* in SE11 ad press F4LFB1 - Vendor Master: Company data
LFM1 - Vendor Master: Purchasing Data (Purchasing organization)
LFM2 - Vendor Master: Purchasing Data (Plant, Vendor sub-range)
LFBK - Vendor Master Bank Details
Vendor Purchasing
Create - MK01
Change - MK02(Current)
Change - MK12 (Planned)
Display - MK03 (Current)
Display - MK19 (Per Key Date)
Changes - MK04 Vendor Account Changes
Changes - MK14 Planned Changes
Block - MK05
Flag for Deletion - MK06
Evaluation in Background - ME6G
Vendor Central Change - MK02(Current)
Change - MK12 (Planned)
Display - MK03 (Current)
Display - MK19 (Per Key Date)
Changes - MK04 Vendor Account Changes
Changes - MK14 Planned Changes
Block - MK05
Flag for Deletion - MK06
Evaluation in Background - ME6G
Create - XK01
Change - XK02
Display - XK03
Changes - Xk04
Block - XK05
Flag for Deletion - XK06
Account Group Change - XK07
Change - XK02
Display - XK03
Changes - Xk04
Block - XK05
Flag for Deletion - XK06
Account Group Change - XK07
No comments:
Post a Comment