Skip to Content
Former Member
Jan 05, 2011 at 06:58 PM

READ DATASET populating some blank values in a numc variable


Hi Experts,

I am facing an issue with one of the very complex programs running in Production System of my Client. The Issue goes like this:

The program is reading a file on application server using READ DATASET and then splitting the records and assigning it to particular itab's field. The structure of a record of the file is as below(arranged horizontally)

Record type (NUMC)

ID (CHAR (26)


Sequence Number (NUMC)

Now for some of the files we receive a number in the sequence number field and for some files we dont. Now when the program is reading the record, for the files with sequence number it is updating the particular number with leading zeroes in the variable where we are assigning the value. But for the files where we dont have any sequence number it is updating the variable with some blank. In debug mode if I clear the values of the field, then automatically it becomes 00000000, the default value of any NUMC field. Now this data is updated again in a database table where the field is of type NUMC and the table is also getting populated with spaces. If I try maintaining the database table via SM30 then even if I keep the sequence number field blank it picks up 00000000 on its own which is quite normal for any NUMV field. As far I know in ABAP editor if we try populating a NUMC variable with 8 spaces or any other value it gives us a syntax error.

If anybosy had faced such kind of issues in the past with NUMC variables and read dataset please provide some inputs.

PS: Being a banking client I am not able to post the code in this open forum. i will try to provide you guys a sample code how this problem is occuring in next couple of days. I have checked all the variable and the related field's data type and they are all NUMC. There is abolutely no data type mismatch with any of the fields wherever this Sequence Number field is passed.