2013 Apr 16 5:26 PM
Hi Guys,
We have the BAPI_BATCH_CREATE call in a program to create material batches and everything is working fine except sometimes when it updates a blank date in the date fields MCH1-VFDAT / FVDT1 / FVDT2 as non-INITIAL value. When we check such a date field in SE16, it has / / instead of 00/00/0000 (space character in place of 0). As a result, when we open the batch using transaction MSC3N, it throws an error message - "The format of internal date is / / is incorrect !"
I already checked the SAP Notes concerning BAPI_BATCH_CREATE but didn't find any info on date fields. Have you faced such a problem? Appreciate your answer 🙂 Thanks !
2013 Apr 18 7:46 PM
The issue is resolved. The field values in the incoming IDocs were coming as a string of space characters in case of blank date fields. The PI team recently changed the initial values (date type - 000000) for the affected fields to a string of space characters as part of a project and the ABAP team was not aware of it.
Anyway...
Thanks for your inputs Sravan and Kim
2013 Apr 17 6:58 AM
Hi Mukesh,
As per your analysis it seems that the value of MCH1-VFDAT / FVDT1 / FVDT2 is / / this format.
so you can maintain a conditon when the date value is initial.
If sy-subrc eq 0
replace 'oo' with 'space'.
end if.
Regards,
Sravan
2013 Apr 17 1:57 PM
Hello Mukesh,
Is there any common factor on the times that this occurred?
For example, are you populating an import parameter/table when the exception occurs, that is different from the times when the dates do not get corrupted?
Are you moving any value into the dates? Such as a space or a 'null' field that is part of a structure?
Regards,
Kim
2013 Apr 18 5:21 AM
Hey Kim,
It's an inbound IDoc which triggers a custom F/M calling this BAPI. It seems it was working fine earlier and stopped working for past few days. The IDoc has the field MCH1-VFDAT, so we can assume space character might be coming in but we don't have explanation for MCH1-FVDT2 which is not a part of IDoc and calculated within the F/M which was working fine till recently.
There was one more change recently - we moved from Unix to Linux OS but I think that should not have anything to do with this. Thanks !
2013 Apr 18 7:46 PM
The issue is resolved. The field values in the incoming IDocs were coming as a string of space characters in case of blank date fields. The PI team recently changed the initial values (date type - 000000) for the affected fields to a string of space characters as part of a project and the ABAP team was not aware of it.
Anyway...
Thanks for your inputs Sravan and Kim