on 10-10-2007 3:30 AM
Hi,
Please help me out in generation of below report.
Create a Vendor Performance Report, which lists the vendor name, materials supplied planned and actual delivery times, payment terms and prices.using tables lfa1,lfc1,lfb1,lfbk,s013 and eket.
Please send your views
thanks & regards
asha
Please see the below report and i got from other thread :
REPORT zvendorperformancereport LINE-SIZE 150 MESSAGE-ID 8i.
TABLES: lfa1, lfm1, j_1inewjcode.
*STRUCTURES
DATA: BEGIN OF wa_lfm1,
lifnr LIKE lfm1-lifnr,
ekorg LIKE lfm1-ekorg.
DATA: END OF wa_lfm1.
DATA: BEGIN OF wa_lfa1,
lifnr LIKE lfa1-lifnr,
txjcd LIKE lfa1-txjcd,
adrnr LIKE lfa1-adrnr .
DATA: END OF wa_lfa1.
DATA: BEGIN OF wa_lfb1,
lifnr LIKE lfa1-lifnr,
bukrs LIKE t001-bukrs.
DATA: END OF wa_lfb1.
DATA: it_lfa1 LIKE wa_lfa1 OCCURS 10 WITH HEADER LINE,
it_lfm1 LIKE wa_lfm1 OCCURS 10 WITH HEADER LINE.
DATA jcode LIKE j_1inewjcode-txjcd.
DATA count TYPE i.
DATA: new_lfa1 LIKE wa_lfa1 OCCURS 0 WITH HEADER LINE.
DATA : it_adrc LIKE adrc OCCURS 10 WITH HEADER LINE.
DATA : bukrs LIKE t001-bukrs, porg LIKE t024e-ekorg.
DATA: it_lfb1 LIKE wa_lfb1 OCCURS 10 WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
PARAMETERS:
p_bukrs LIKE t001-bukrs OBLIGATORY,
p_ekorg LIKE t024e-ekorg OBLIGATORY MEMORY ID buk.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-002.
SELECT-OPTIONS: p_lifnr FOR lfm1-lifnr.
SELECTION-SCREEN END OF BLOCK block2.
PARAMETERS: test AS CHECKBOX DEFAULT 'X'.
AT SELECTION-SCREEN ON p_bukrs.
SELECT SINGLE j_1ibukrs FROM j_1iindcus
INTO bukrs
WHERE j_1ibukrs = p_bukrs.
IF sy-subrc <> 0.
MESSAGE e128(8i).
ENDIF.
AT SELECTION-SCREEN ON p_ekorg.
SELECT SINGLE ekorg INTO porg FROM t024e
WHERE ekorg = p_ekorg
AND bukrs = bukrs.
IF sy-subrc NE 0 .
MESSAGE e015(me) WITH p_ekorg space.
ENDIF .
*-------header print.
TOP-OF-PAGE.
NEW-LINE NO-SCROLLING.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE : / ,
05 'Vendor', "#EC NOTEXT
22 'New Jud Code'." 38 'Old Jud code'.
FORMAT COLOR OFF.
NEW-LINE SCROLLING.
START-OF-SELECTION.
Get the dummy Jur Code
SELECT SINGLE txjcd FROM j_1inewjcode
INTO jcode
WHERE aland = 'IN'.
IF sy-subrc <> 0.
MESSAGE e000(8i) WITH 'Jur code not defined in Table J_1INEWJCODE'.
ENDIF.
CHECK for lfB1 if the customer exists for company code
SELECT lifnr bukrs FROM lfb1 INTO TABLE it_lfb1
WHERE
lifnr IN p_lifnr
AND bukrs = p_bukrs.
IF sy-subrc <> 0.
MESSAGE e000(8i) WITH 'No vendors defined for company code'.
ENDIF.
Check if vendor defined for purchasing
SELECT lifnr ekorg FROM lfm1 INTO TABLE it_lfm1
FOR ALL ENTRIES IN it_lfb1[]
WHERE lifnr = it_lfb1-lifnr
AND ekorg = p_ekorg.
Get data from General data of vendor master
IF sy-subrc <> 0.
MESSAGE e000(8i) WITH 'No Vendors defined for purchasing organization '.
ENDIF.
SELECT lifnr txjcd adrnr FROM lfa1 INTO TABLE it_lfa1
FOR ALL ENTRIES IN it_lfm1[]
WHERE lifnr = it_lfm1-lifnr.
SORT it_lfa1 BY txjcd.
DELETE it_lfa1[] WHERE txjcd = space.
SELECT * FROM adrc INTO TABLE it_adrc FOR ALL ENTRIES IN it_lfa1
WHERE addrnumber = it_lfa1-adrnr.
CLEAR count.
LOOP AT it_lfa1.
IF test <> 'X'.
UPDATE lfa1 SET txjcd = jcode
WHERE lifnr = it_lfa1-lifnr.
ENDIF.
count = count + 1.
WRITE : / , 5 it_lfa1-lifnr, 25 jcode.
ENDLOOP.
LOOP AT it_adrc.
IF test <> 'X'.
UPDATE adrc SET taxjurcode = jcode
WHERE addrnumber = it_adrc-addrnumber.
ENDIF.
ENDLOOP.
IF test <> 'X'.
WRITE : / 'The No of Vendor Master updated with new Jur Code is:',
count.
ENDIF.
See the below link :
Thanks
Seshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.