Skip to Content
Former Member
Sep 23, 2014 at 08:30 AM

check if variables are initial or not in abap


I need to fetch records from csv file and process it.Initially i need to check if all the values are there or not(around 15 fields),if the value is initial(i.e blank) i need to throw the error(output has to be written in a file for each record).

Current logic i am following is :

LOOP AT gt_filedata into gs_filedata.

IF gs_filedata-var1 IS INITIAL.

concatenate gv_msg text-001 into gv_msg SEPARATED BY ','.


IF gs_filedata-var2 IS INITIAL.

concatenate gv_msg text-002 into gv_msg SEPARATED BY ','.


And So on...


I need to know if there any function module or any other way to optimize my code and improve its performance.