2008 Nov 21 1:26 PM
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
2008 Nov 21 1:39 PM
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)
2008 Nov 21 1:39 PM
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)
2008 Nov 21 1:44 PM
look at field KOART. it says the GL account type
A Assets
D Customers
K Vendors
M Article
S G/L accounts
2008 Nov 21 1:48 PM
2008 Nov 21 2:01 PM
2008 Nov 21 2:06 PM