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

Hi Expert ;

Former Member
0 Likes
897

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
Read only

Former Member
0 Likes
855

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
Read only

Former Member
0 Likes
856

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)

Read only

Former Member
0 Likes
855

look at field KOART. it says the GL account type

A Assets

D Customers

K Vendors

M Article

S G/L accounts

Read only

Former Member
0 Likes
855

Thanks Answers

Poorna Chandrasekhar and MxG ....

Read only

matt
Active Contributor
0 Likes
855

Please use a more meaningful subject in future

Read only

Former Member
0 Likes
855

I m Sory

Write more meaningful Subject