06-30-2006 12:48 PM
Hi all,
for my diploma thesis I am looking for a way to create ECRs and assign objects to them programatically. My first idea was to use CS_BI_ECR_CREATE_BATCH_INPUT but this did not work. Now my second approach is to write an own BAPI basically calling transaction CC31. I am completely new to ABAP so these are my questions/ideas:
1. Create a BAPI
importing:
change header (RC29A)
table of change object types
table of assigned object
Exporting:
change number (CHAR72)
2. within this bapi create BDCDATA which is used in
3. CALL TRANSACTION 'CC31'
USING BDCDATA
MODE 'N'
UPDATE 'S'.
Questions:
1. is this possible? (my transaction needs to be called remotely)
2. how can I access the autogenerated change number in order to return it?
Thanks in advance, Filip
06-30-2006 1:21 PM
Questions:
<i>1. is this possible? (my transaction needs to be called remotely)</i>
No it is not possible , since it is associated with Screens, you will get Short Dump.
Regards
vijay
06-30-2006 1:53 PM
06-30-2006 1:58 PM
Did you try using BDS_BUSINESSDOCUMENT_CREATEF?
or RFC_CREATE_CHANGE_MASTER?
Regards,
ravi
06-30-2006 2:02 PM
Hi,
you should look for alternatives Like RFC, or BAPI's to create ECR.
Regards
vijay
06-30-2006 2:17 PM
Hi,
unfortunately I can't use RFC_CREATE_CHANGE_MASTER because I want to Create the ECR from Java using JCo.
How would I use BDS_BUSINESSDOCUMENT_CREATEF to create ECRs?
Thanks, Filip
PS: I've been looking for such BAPIs in SE37 but except for CS_BI_ECR_CREATE_BATCH_INPUT and CS_BI_ECR_CHANGE_BATCH_INPUT I wasn't able to find any BAPIs. I can already create ECRS using CS_BI_ECR_CREATE_BATCH_INPUT but I can't assign objects to them
Message was edited by: Filip Polsakiewicz
06-30-2006 2:22 PM
Hi Filip,
What stops you from calling the rfc using JCo.
I think it is quite possible to call any rfc from Java applications using JCo calls .
Regards,
ravi
06-30-2006 2:28 PM
Hi,
the problem is that I am calling my BAPI from another server application. There is no SAPGui installed on that machine so that I can not use RFC BAPIs.
Regards,
Filip
06-30-2006 2:35 PM
See if the baoi BAPI_ECMORD_CREATE is related to your problem.
Check the Function module documentation to know its use.
Regards,
ravi
06-30-2006 2:43 PM
hi,
<b>BAPI_ECMORD_CREATE</b>, is available only in ECC 5.0 versions. not in older versions.if you are on ECC5.0 version then it is well and good. that will create the ECR.
regards
vijay
06-30-2006 2:50 PM
Hi,
first of all thanks for all your answers.
Unfortunately our system does not have BAPI_ECMORD_CREATE installed (it's a 4.6C system).
I already managed to Create an ECR using CS_BI_ECR_CREATE_BATCH_INPUT. The only thing that does not work is assigning objects to that ecr
Regards, Filip
06-30-2006 2:39 PM
Well I think u can definitely use Call transaction to create the document inside a BAPI. I say u give it a shot
-Kiran
06-30-2006 2:42 PM
For retriveing the document number use the below syntax.
CALL TRANSACTION 'IW36'
USING i_bdcdata
OPTIONS FROM opt
MESSAGES INTO i_messtab.
You will find the document number in the I_MESSTAB table.
-Kiran