2006 Sep 13 3:54 PM
Hi friends,
Could u please help me how to do this
Read table KNB1 using company code(BUKRS) and G/L Recon Acct(AKONT)
Read table KNA1 using KNB1-KUNNR
If Not found,put out error message,skip processing and read next KNB1 record
KNA1 Record not found for company code(BUKRS), and customer(KUNNR)
Assign fields from KNA1 table to output Record
Customer name = KNA1-NAME1
Customer address = KNA1-STRAS
Customer city = KNA1-ORT01
Tax id = KNA1-STCD1
Postal code = KNA1-PSTLZ
Read table KNVP using company code (BUKRS), customer number (KUNNR), and Partner Type(PARVW) of RG
If found, sold to customer =KNVP-KUNNR & Payer = KNVP-KUNN2
If not found, put out error message, skip processing and read next KNB1 record
KNVP record not found for company code (BUKRS) , customer(KUNNR), and partner type (RG)
Assign non table related fields
Record type = c
Sequence number = sequence number +1
Branch = 1
Delivery Number = ??? (to be determined)
Write output record using format selected
For output File use Logical& physical name parameters
Increment counter for number of output records
Go to read next KNB1 record
At the end of KNB1 records, put out control totals (after error messages)
Number of KNB1 values found
Number of KNA1 values not found
Number of KNVP values not found
Number of output records created
i have a lot of confusion how to do this
urgent help me
Regards
srilavi
2006 Sep 13 4:05 PM
Hi Srilavi,
do u want to write the code ???
thanks
Vikranth Khimavath
2006 Sep 13 4:06 PM
hi thnaks,
dont write the code give me some guide lines
Thanks Regards
srilavi
2006 Sep 13 4:20 PM
U can try it in the following way.
SELECT fields
FROM KNB1
into table itab
WHERE bukrs = pbukrs and AKONT = pakont.
loop at itab.
select single fields
from kna1
where kunnr = itab-kunnr.
if sy-subrc <> 0.
Error KNA1 record not found.
endif.
...similarly follow for the rest.
endloop.
Regards
Anurag
2006 Sep 13 4:37 PM
heloooooo kunche
give ur mail id
i have some sample interface code with me
ill send u
regards,
siri.