‎2007 Dec 11 4:57 AM
Hi all
Am using the account number field i,e:BSEG-HKONT in one of my reports now i need to give the acount number descripotion please tell me what is the field in BSEG or BSIS table (or any other table) that gives the account number description
Vijay
‎2007 Dec 12 5:09 AM
‎2007 Dec 12 6:04 AM
The account Description can be found in the following table.
<b>CSKU</b> - Cost Element Texts.
Here the <b>HKONT</b> General Ledger Account which is represented as <b>KSTAR</b> - Cost element.
The Const element description is <b>KTEXT</b> (General Name) and <b>LTEXT</b> (Description).
The following is the code i have used in my program.
**********Selection screen field for General Ledger Account HKONT ***************
SELECT-OPTIONS : HKONT FOR BSEG-HKONT.
***********Internal Table forGeneral Ledger Account for F4 Help *******
DATA: BEGIN OF IT_HKONT OCCURS 0,
KSTAR LIKE CSKU-KSTAR,
KTEXT LIKE CSKU-KTEXT,
END OF IT_HKONT.
******for F4 Help on HKONT*********
AT SELECTION-SCREEN ON VALUE-REQUEST FOR HKONT-LOW.
SELECT KSTAR KTEXT INTO TABLE IT_HKONT FROM CSKU WHERE SPRAS EQ 'EN'.
SORT IT_HKONT BY KSTAR.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'KSTAR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_HKONT
RETURN_TAB = IT_RETURN.
IF SY-SUBRC = 0.
READ TABLE IT_RETURN INDEX 1.
MOVE IT_RETURN-FIELDVAL TO HKONT-LOW.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR HKONT-HIGH.
SELECT KSTAR KTEXT INTO TABLE IT_HKONT FROM CSKU WHERE SPRAS EQ 'EN'.
SORT IT_HKONT BY KSTAR.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'KSTAR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_HKONT
RETURN_TAB = IT_RETURN.
IF SY-SUBRC = 0.
READ TABLE IT_RETURN INDEX 1.
MOVE IT_RETURN-FIELDVAL TO HKONT-HIGH.
ENDIF.
Reward Points if useful.