Quantcast
Viewing all articles
Browse latest Browse all 9052

Re: How to do validation in Dynamic table update program?

Hi,

 

" Getting No of key fields using FM

 

DESCRIBE TABLE it_key LINES lv_cnt.                                                                

 

DO lv_cnt times.

READ TABLE it_key into wa_key index sy-index.

"  Getting Table name

ASSIGN COMPONENT 'TABNAME'  OF STRUCTURE wa_key to <tablename>.     

"  Getting Fieldname

ASSIGN COMPONENT 'FIELDNAME'  OF STRUCTURE wa_key to <val2>.           

IF  <val2> IS ASSIGNED.

" Excel content  Internal Table

LOOP AT <ft_data> ASSIGNING <fs_data>.        

" matching  field name with excel field name                                            

ASSIGN COMPONENT <val2> OF STRUCTURE <fs_data>     to <val1>.      

  " getting excel value for the field name.   

if <val1> IS  ASSIGNED.                                                                           

" Logic to append table name fieldname and  field value.                                                                                 

endif.

ENDLOOP.

 

ENDIF.

 

ENDDO.

 

Hope it helpful.

 

 

Regards,

VenkatRamesh.V


Viewing all articles
Browse latest Browse all 9052

Trending Articles



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