10-16-2006 3:07 PM
Hello All,
I had requirement for displaying a selection text description of two radiobuttons on left side of the radio buttons instead of right side ( usual way).
Can you please also let me know whether it is compulsory to used BAPI_transcation_commit?
Thanks
SDN FAN
10-16-2006 3:13 PM
BAPI_TRANSACTION_COMMIT is not compulsory in cases where you don't want to write the changes to the database.
BUt it is a good practice to commit the changes after every transaction so that the database selects and updates would not be erroneous in the program after the main bai call.
Regards,
Ravi
10-16-2006 3:08 PM
hi,
here i am aligming the check box.
samne thing u can use for radio button.
chk this.
SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(3) TEXT-003
FOR FIELD P_Chk.
SELECTION-SCREEN POSITION 30.
PARAMETER: P_chk AS CHECKBOX.
SELECTION-SCREEN POSITION 35.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: END OF BLOCK B2.
<b>it is alwys better to use bapi_transaction_commit.</b>
rgsd
anver
if hlped mark points
Message was edited by: Anversha s
10-16-2006 3:13 PM
BAPI_TRANSACTION_COMMIT is not compulsory in cases where you don't want to write the changes to the database.
BUt it is a good practice to commit the changes after every transaction so that the database selects and updates would not be erroneous in the program after the main bai call.
Regards,
Ravi
10-16-2006 3:41 PM
10-16-2006 3:46 PM
HI,
Unless you are working inside a user exit or in a part of a bigger program which does the commits by itslef, you will have to commit the changes to the database explicitly.
The system would do it for your at the end of the program anyway, but if you require the data after the update statment, then you will not have the record stored in the database and your select would fail.
NOte that in user exits and in some other output driver programs, you should not use explicit commit statements.
Because, as i have already mentinoed the calling program would commit all the database changes at once in a bundle.
(Called Bundled update)
Regards,
ravi
10-16-2006 3:49 PM
Thanks Ravi.
Points are alloted
How to commit it during the user exits?. Breif explaination please.
10-16-2006 4:06 PM
Hi To give a small example.
this is how a scenario with user-exits look like.
main program.
Some code
call customer-function '001'.
*Some code
commit work.
What the above code means is that the database changes that the main program does, and the changes that are made in the user-exit(Customer function) are all commited to the database only once at last.
NOw, assume that you write a commit statement in the user exit, then it would mean that whatever changes that were made to the database till that point in time would be commited. And the system tries to commit once again at last which should not have happened.
So, in user exits, you should not do any explicit commits.Some transaction do allow you, but better do not commit when you deal with exits.In such cases you would get an express document mailed to your workplace mailbox(SAP mailbox) and a dump in st22.
Regards,
ravi
10-16-2006 3:15 PM
Hi,
1. <i>selection-screen begin of block b1 with frame title text-001.
selection-screen begin of line.
parameters p_a radiobutton group g1.
selection-screen comment 3(15) text-002.
selection-screen end of line.
selection-screen begin of line.
parameters p_b radiobutton group g1.
selection-screen comment 3(15) text-003.
selection-screen end of line.
selection-screen end of block b1.</i>
<u><i>Text symbols:</i></u>
001 Radiobutton
002 Male
003 Female
2. Its always better to use
Pls mark the helpful answers.
Thanks
\Eswar
10-16-2006 3:16 PM
REPORT YCHATEST .
SELECTION-SCREEN BEGIN OF BLOCK B1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R1 RADIOBUTTON GROUP RAD.
SELECTION-SCREEN COMMENT 15(15) TEXT-001.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R2 RADIOBUTTON GROUP RAD.
SELECTION-SCREEN COMMENT 15(15) TEXT-001.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.