‎2007 Jun 19 4:16 PM
Hello Friends,
I am using this BAPI to create the document. this bapi is used with in side a loop, so I am trying to create more then one document .....surprisingly things work and it creates me the document, but when comes second time, then document is not created, and give me error msg.. that the characterisctis Copyright Client has to be filled in status created ?
Any idea what I am doing wrong..
Regards,
‎2007 Jun 19 4:38 PM
Hello,
Maybe its connected with commit which does not comes after the first execution. Try adding also BAPI_DOCUMENT_SETCOMMITMODE to your code.
Regards
Marek
‎2007 Jun 19 4:47 PM
Hello Marek,
Thanks for your reply,
Actually what is woundring to me is that it works first time, and then I have different other bussiness logic to implement, and then by second time, it give me that error msg....
Dont know what is going on ?
Any way, where I have to add this BAPI ?
Regards,
Message was edited by:
Shah H
‎2007 Jun 19 4:49 PM
Unfortunatelly, I did not find that BAPI "BAPI_DOCUMENT_SETCOMMITMODE" in system.....
Message was edited by:
Shah H
‎2007 Jun 19 7:03 PM
‎2007 Jun 19 7:05 PM
‎2007 Jun 19 7:08 PM
hi ROB,
I am not sitting in front of SYSTEM, but i guess it was 11 or so...
Any idea, what I am doing wrong...
Regards,
‎2007 Jun 19 7:13 PM
Let us now the error message when you get back to the system.
Not the number of errors - the error number.
Rob
Message was edited by:
Rob Burbank
‎2007 Jun 19 7:16 PM
The error msg is " the value of characteristic copyright client can only be fillied with status created" somthing like that----
Regards,
Yes i guess the error no is 11
Message was edited by:
Shah H
‎2007 Jun 19 7:22 PM
Hi Rob,
Any idea, what could be possibly wrong, because first time things works fine, it create the document, + all characteristics, and 2nd time I just change few characteristcs ( however the objlink and classification remains same ) it give me that error...
Any idea, what I am doing wrong...
Kind regards
‎2007 Jun 20 7:14 AM
Hello Rob,
Here is the error msg, and error no:
MSG ID = ZCV
MSG NR= 011
MSG = Das Merkmal "Copyright Client" muss im Status "Created" gefüllt sein.
means ( the characteristi copyright client has to be fillied in status created )...
Any idea why I am getting this msg....
Regards,
‎2007 Jun 20 2:24 PM
ZCF looks like a custom message class (at least I don't see it in our system), but the language is German.Is there a long text with this message?
Rob
‎2007 Jun 20 2:40 PM
Hi Rob,
Thanks for your reply....
Actually problem solved, ....... it was a tough one....
kind regards,
Shah .
‎2007 Jun 20 2:43 PM
‎2007 Jun 20 2:49 PM
Actually in BAPI_DOCUMENT_CREATE2, there are futher various FM are called, and one of them was CTMS_CHAR_FIRST_ASSIGNED_VALUE and in this FM it check a flag if it set or not ( WI-WSELE ) and if WSELE is initial, it throws exception.
before my loop start ( for creating documents ) I am calling BAPI_DOCUMENT_GET_DETAIL... and this bapi set this flag, and that's why first time it creates the document, but the second time the flag wsele was initial and throws me exception. So now I am calling document_getdetail inside loop... and things looks pretty fine....
But what I do not understand is, if I dont want to read the document at all, cant I create the new document......... dont know the real logic behind, but any how its working.....
Regards,