‎2010 Apr 20 9:23 AM
Hi all,
I have to perform a simple update on many objects in Real Estate Flexible (buildings)
I select the buildings that require changes using the standard logical DB, then i perform the updates, using the appropriate (I hope!) BAPI; the structure edifw contains the updated general building data (checked with debugger):
CALL FUNCTION 'BAPI_RE_BU_CHANGE'
EXPORTING
COMPCODE = BUILDING-BUKRS
BUSINESSENTITYNUMBER = BUILDING-SWENR
BUILDINGNUMBER = BUILDING-SGENR
BUILDING = edifw
* BUILDING_X =
* OBJECT_ADDRESS =
* OBJECT_ADDRESS_X =
* COSETTLE_PARAM =
* COSETTLE_PARAM_X =
* TRANS =
TEST_RUN = P_TEST
TABLES
* TERM_ORG_ASSIGNMENT =
* MEASUREMENT =
* PARTNER =
* OPTION_RATE =
* COSETTLE_RULE =
* CHARACT =
* OBJ_ASSIGN =
* RESUBM_RULE =
* RESUBM_DATE =
* ARCH_REL =
* ARCH_RELMS =
* STATUS =
* EXTENSION_IN =
RETURN = bapir
* INFRASTRUCTURE =
.
The parameter P_TEST is set to space.
The BAPI returns a 'S' message (update was performed.
Next I call the COMMIT function:
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = bapiret
.
The commit BAPI is performed correctly, then the program exits.
The building data appears unchanged. Anyone can suggest why?
I have also tried to execute the two transactions using the test sequence function of SE37.
The result is the same.
Thanks,
Massimo
‎2010 Apr 20 9:30 AM
Hi,
You need to pass the chnage indicator of the building in the BAPI parameters. I am suspecting that you need to pass the
Change indicator = U in the BUILDING_X = X in the BAPI parameters. Check and let me know.
‎2010 Apr 20 9:30 AM
Hi,
You need to pass the chnage indicator of the building in the BAPI parameters. I am suspecting that you need to pass the
Change indicator = U in the BUILDING_X = X in the BAPI parameters. Check and let me know.
‎2010 Apr 20 9:49 AM
Wonderful, it was that the problem, I have misunderstood the documentation.
Thanks.
Massimo
‎2010 Apr 20 9:35 AM
Hi,
In the function module 'BAPI_TRANSACTION_COMMIT', pass parameter WAIT = space.
If you refer the F1 help on the ABAP statement COMMIT WORK AND WAIT, you will find that WAIT flag need not be marked in your case.
Regards,
Jayesh
Edited by: Jayesh Gupta on Apr 20, 2010 10:37 AM
‎2010 Apr 20 10:00 PM
Hello Jayesh,
I read your comment on not setting the wait parameter = 'X'. How do I know when I absolutely need to set it?
We are experiencing slowness since I have a BAPI in which calls the BAPI_TRANSACTION_COMMITT 15 times and I have set the wait = 'X' for each one CALL.
I am trying to figure out what will happen if I change all the wait = ' ' .
Thanks in-advance..
I looked at the help file and it didn't really say anything.
Mark Carns
‎2010 Apr 21 9:08 AM
You can check note 192235 for an explanation. The WAIT parameter ensure that the COMMIT returns only after all the updates are performed. I think that if your function updates sequentially many different objects, you can leave the parameter as space.
Bye
Massimo
‎2010 Apr 21 2:17 PM