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

Re: how can i deal with screen in module pool to insert data to customer table

$
0
0

Hi Shrivas,

 

   The error you are getting of ' wa not too long ' is because your work area contains only 3 fields ,

whereas the table ( kna1 ) in which you are trying to insert the data consists of many more fields.

 

Solution for your error is that when you define your work area define like below.

 

DATA : BEGIN OF WA.

INCLUDE STRUCTURE KNA1.

DATA : END OF WA.


DATA : ITAB LIKE TABLE OF WA.


And when you create your screen add your fields from program using your WA.


in customer no. field property add conv. exit  as ALPHA .


Code on save.


case sy-ucomm.

   when 'SAVE'.

     wa-mandt = sy-mandt.

     insert kna1 from wa.

 

   when others.

endcase.


Note :  Use this program only for testing purpose as it is not advisable to manually add fields to KNA1.



Reward points if useful


Viewing all articles
Browse latest Browse all 9164

Trending Articles



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