Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Account description

Former Member
0 Likes
3,127

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

2 REPLIES 2
Read only

Former Member
0 Likes
1,337

j

Read only

Former Member
0 Likes
1,337

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.