Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2807

Re: save data to ztable by defining workarea in module pool

$
0
0

Dear Sanchita,

 

From your post I understand that you want to save data by combining the input paramaters v_matnr, v_date, v_rate, v_qty and v_amt  to field zmod of table ztable.

Maybe the field length of ZMOD is not equal to the sum of all the fields you are combining.

Try to increase the field length of ZMOD. Just a advice, you may not combine all the fields due to data type mismatch, be careful of using appropriate datatype.


Another approach can be as below.


Pls try to map the input parameters to individual fields of the table and then use modify statement.


DATA: it_ztable       TYPE STANDARD TABLE OF ztable,

       wa_ztable       TYPE ztable.


CLEAR wa_ztable.

wa_ztable-matnr = v_matnr.

wa_ztable-date1 = v_date.

wa_ztable-rate  = v_rate.

wa_ztable-quantity = v_qty.

wa_ztable-amount = v_amt.

MODIFY ztable FROM wa_ztable.

CLEAR wa_ztable.



Thanks,

Sanjay


Viewing all articles
Browse latest Browse all 2807

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>