Application Development 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: 

Hi Expert ;

Former Member
0 Kudos
138

Moderator message: please use a more meaningful subject in future

Hi Expert ;

I have a problem i see seleceted fi document( with all items ) .

i use fb03 transaction for fi document's items.

i have data in alv.

i do control hkont area for vendors or customers .

this code sructure is not available . beceuse

my customer number 1201000000

if my customer number change ,

my prg wrong work .

Now my question . how ı understand which is customer which is vendor ?

LOOP AT gt_cust.

READ TABLE l_bldf WITH KEY saknr = gt_cust-hkont.

MOVE l_bldf-TXT20 to gt_cust-TXT20 .

MODIFY gt_cust.

IF gt_cust-hkont = '1201000000'.

READ TABLE l_cust WITH KEY kunnr = gt_cust-kunnr.

MOVE : gt_cust-kunnr to gt_cust-hkont ,

l_cust-name1 to gt_cust-TXT20 .

MODIFY gt_cust.

ENDIF.

READ TABLE l_bel WITH KEY belnr = gt_cust-belnr.

MOVE l_bel-waers to gt_cust-waers.

MODIFY gt_cust.

ENDLOOP.

Edited by: Matt on Nov 21, 2008 3:00 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos
96

Do as follows to find customer or Vendor.

Based on Posting key u can differentiate whether it is Vendor or Customer. Select Doc type from table TBSL as folllows.

SELECT SINGLE * FROM tbsl INTO l_tbsl WHERE bschl EQ wa_filedata-bschl.

wa_filedata-shkzg = l_tbsl-shkzg.

wa_filedata-koart = l_tbsl-koart.

koart = 'S' (GL account )

koart = 'D' (Customer)

koart = 'K' (Vendor)

5 REPLIES 5

Former Member
0 Kudos
97

Do as follows to find customer or Vendor.

Based on Posting key u can differentiate whether it is Vendor or Customer. Select Doc type from table TBSL as folllows.

SELECT SINGLE * FROM tbsl INTO l_tbsl WHERE bschl EQ wa_filedata-bschl.

wa_filedata-shkzg = l_tbsl-shkzg.

wa_filedata-koart = l_tbsl-koart.

koart = 'S' (GL account )

koart = 'D' (Customer)

koart = 'K' (Vendor)

Former Member
0 Kudos
96

look at field KOART. it says the GL account type

A Assets

D Customers

K Vendors

M Article

S G/L accounts

Former Member
0 Kudos
96

Thanks Answers

Poorna Chandrasekhar and MxG ....

matt
Active Contributor
0 Kudos
96

Please use a more meaningful subject in future

Former Member
0 Kudos
96

I m Sory

Write more meaningful Subject