need someone to write a program in linux probably perl/php/C or even bash to convert a CSV file into SAP R3/AFS IDOC sales/invoice transaction
the input CSV file is simple for a POS application, the right side is the SAP column/fieldname
column 1 cashier & register > BSTZD
column 2 date of sales > DATUM
column 3 time of sales > UZEIT
column 4 transaction # > BELNR
column 5 promo code > E1EDKT1
column 6 note > TDLINE
column 7 unit price > KRATE, KSCHL = "XP01"
column 8 tax > KRATE, KSCHL = "XTAxxxxxx"
column 9 discount > KRATE, KSCHL = "Xdiscount"
column 10 UPC > IDTNR
column 11 quantity > WMENG
other field to map in idoc but not in input source CSV file are
"012" in QUALF idoc qualifier organization
ORGID = "SALE" if quantity >= 0, otherwise "RTRN" in idoc organization
"005" in IDDAT in afs qualifier for idoc date segment
"02" in J_3AQUALF in qualifier
"AG" in PARVW in partner function
"069" in QUALF in idoc qualifier reference document
"003" in QUALF in object identification such as material no, customer