Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Radio button with text displaying on left side

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

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

8 REPLIES 8

anversha_s
Active Contributor
0 Kudos

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

former_member181962
Active Contributor
0 Kudos

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

0 Kudos

Ravi,

How about the commit work while working with tables?

0 Kudos

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

0 Kudos

Thanks Ravi.

Points are alloted

How to commit it during the user exits?. Breif explaination please.

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos
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.