2007 Mar 09 4:52 AM
hi,
i need to create an report for of list customer which displays the customer no. customer name, credit limit given to the customer and opening and closing balance of the customer. I need to generate the report based on the cno. give me a select statement; is there any need of any transactions to link kna1,knkk, knc1,knc3.it's very urgent pls.
regards,
loki
hi,
i need to create an report for of list customer which displays the customer no. customer name, credit limit given to the customer and opening and closing balance of the customer. I need to generate the report based on the cno. give me a select statement; is there any need of any transactions to link kna1,knkk, knc1,knc3.it's very urgent pls.
regards,
loki
2007 Mar 09 4:57 AM
HI,
Kindly go throuh this report related to customer outstanding. I will give some idea to you.
&----
*& Report yms_NETBILLS *
*& *
&----
*& *
*& *
&----
REPORT ZHP_NETBILLS.
TABLES : ZNET_BILLS,EKBE.
DATA : BEGIN OF ITAB OCCURS 0 ,
LIFNR LIKE ZNET_BILLS-LIFNR,
XBLNR LIKE ZNET_BILLS-XBLNR,
BLDAT LIKE ZNET_BILLS-BLDAT,
EBELN LIKE ZNET_BILLS-EBELN,
EBELP LIKE ZNET_BILLS-EBELP,
DCNO LIKE ZNET_BILLS-DCNO,
XBLNR1 LIKE EKBE-XBLNR,
END OF ITAB.
PARAMETERS : VENDOR LIKE ZNET_BILLS-LIFNR.
SELECT-OPTIONS : DOCDATE FOR ZNET_BILLS-BLDAT,
REFDOCNO FOR ZNET_BILLS-XBLNR.
START-OF-SELECTION.
SELECT * FROM ZNET_BILLS INTO CORRESPONDING FIELDS OF TABLE ITAB
WHERE LIFNR EQ VENDOR AND
BLDAT IN DOCDATE AND
XBLNR IN REFDOCNO.
LOOP AT ITAB.
SELECT SINGLE * FROM EKBE WHERE EBELN EQ ITAB-EBELN AND
EBELP EQ ITAB-EBELP AND
BWART eq '105' AND
XBLNR EQ ITAB-DCNO.
IF SY-SUBRC EQ 0.
MOVE ITAB-DCNO TO ITAB-XBLNR1.
ELSE.
MOVE 'WRONGDCNO' TO ITAB-XBLNR1.
ENDIF.
WRITE :/1 '|' NO-GAP,
(10) ITAB-LIFNR NO-GAP, '|' NO-GAP,
(15) ITAB-XBLNR NO-GAP, '|' NO-GAP,
(10) ITAB-BLDAT NO-GAP, '|' NO-GAP,
(10) ITAB-EBELN NO-GAP, '|' NO-GAP,
(10) ITAB-EBELP NO-GAP, '|' NO-GAP,
(15) ITAB-DCNO NO-GAP, '|' NO-GAP,
(15) ITAB-XBLNR1 NO-GAP, '|' NO-GAP.
ENDLOOP.
WRITE:/1(93) SY-ULINE.
TOP-OF-PAGE.
SKIP.
WRITE:1(93) SY-ULINE.
FORMAT COLOR 4.
WRITE :/1 '|' NO-GAP,
(10) 'VENDOR' NO-GAP, '|' NO-GAP,
(15) 'REF.DOC.NO' NO-GAP, '|' NO-GAP,
(10) 'DOC.DATE' NO-GAP,'|' NO-GAP,
(10) 'PO.NO' NO-GAP, '|' NO-GAP,
(10) 'ITEM.NO' NO-GAP, '|' NO-GAP,
(15) 'DCNO IN PSEUDO' NO-GAP, '|' NO-GAP,
(15) 'DCNO IN PO' NO-GAP, '|' NO-GAP.
WRITE:1(100) SY-ULINE.
Thanks,
Shankar
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |