2010 Aug 12 6:18 AM
Hi Techies,
I have a requirement that when ever user enters the value in Billing Qty input which is in VF01 tcode and the table is VBRP-FKIMG, and client want billing qty and previous month reading, the fields are not in VBRP. So I have created a custom table name as YSD-EXPORT_QTY with fields of CUSTOMER, MONTH, YEAR, BILL_QTY, PREV_READING, CUMULATIVE... When ever user enter the Billing Qty I want to update database table and initally there is no data in custom table. I tried below code but i am not getting and i am getting the error as
"The type of the database table and work area (or internal table) "WA_EXPORT" are not Unicode convertible. "
So, How can I resolve this issue.. I am trying this since from 3 days... if u have any sample code please give me...
MOVE WA_VBRP-FKIMG TO WA_EXPORT-BILL_QTY.
WA_EXPORT-CUMULATIVE = WA_EXPORT-BILL_QTY + WA_EXPORT-PREV_READING.
WA_EXPORT-PREV_READING = WA_EXPORT-CUMULATIVE.
APPEND WA_EXPORT TO IT_EXPORT.
INSERT INTO YSD_EXPORT_QTY VALUES WA_EXPORT.
2010 Aug 12 7:01 AM
Hi Techies,
I have a requirement that when ever user enters the value in Billing Qty input which is in VF01 tcode and the table is VBRP-FKIMG, and client want billing qty and previous month reading, the fields are not in VBRP. So I have created a custom table name as YSD-EXPORT_QTY with fields of CUSTOMER, MONTH, YEAR, BILL_QTY, PREV_READING, CUMULATIVE... When ever user enter the Billing Qty I want to update database table and initally there is no data in custom table. I tried below code but i am not getting and i am getting the error as
"The type of the database table and work area (or internal table) "WA_EXPORT" are not Unicode convertible. "
So, How can I resolve this issue.. I am trying this since from 3 days... if u have any sample code please give me...
MOVE WA_VBRP-FKIMG TO WA_EXPORT-BILL_QTY.
WA_EXPORT-CUMULATIVE = WA_EXPORT-BILL_QTY + WA_EXPORT-PREV_READING.
WA_EXPORT-PREV_READING = WA_EXPORT-CUMULATIVE.
APPEND WA_EXPORT TO IT_EXPORT.
INSERT INTO YSD_EXPORT_QTY VALUES WA_EXPORT.
2010 Aug 12 6:25 AM
Hi,
Have you tried to modify the z table using MODIFY statement?
MODIFY ysd_export_qty FROM TABLE it_export.Regards
Vinod
2010 Aug 12 6:32 AM
Hi Vinod,
Actually Initially there is no data in my custom table.. I want to insert the data through program by every day...
I tried by using Modify Stmt.. it didnt worked..
Thanks in Advance..
Regards,
Murali
2010 Aug 12 6:49 AM
Hi Techies,
Please Help me regarding above issue cause I stucked there since from 3 days... I have tried all the ways but my table is not modifying...
Thanks n Regards,
Muralikrishna
2010 Aug 12 7:01 AM
2010 Aug 12 7:34 AM
Hi Raymond,
Thanq for solution.. it's updating the Database but it is overriding already existing record.. but i need it to insert into my databse table...
Thanks in Advance,
Regards,
Muralikrishna
2010 Aug 12 7:44 AM
If it overrides existting record, you should add new key fields to your database table, there can be only one record per set of key values.
I suppose keys look like MANDT, KUNNR, GJAHR, MONAT or MANDT VBELN POSNR or a combination of both set of keys (not sure to understand you requirement)
You have to first read from database if some data already exists,
- if yes, add the new quantities and UPDATE the record
- if no, INSERT a new record
Remember keys define a unique record, and cannot be updated once inserted.
If your program should never update records, add a "technical" key field, and fill it using a timestamp or a number range counter (FM NUMBER_GET_NEXT)
Regards,
Raymond
2010 Aug 12 7:59 AM
Hi Raymond,
If your program should never update records, add a "technical" key field, and fill it using a timestamp or a number range counter.
I am not getting this point. If you dont mine can you eloberate it please.
Thanks in Advance
Regards,
Muralikrishna
2010 Aug 12 8:11 AM
2010 Aug 12 9:34 AM
Hi Raymond,
My apology for not being able to understand, I am a fresher and i hope u understand. Please guide me why do we need to maintain the log for the customers order?
I would like to update the records using a program, when ever user enters the value of VBELN(input) then updations can be done in custom table.
Thanks in Advance,
Regards,
Murali