Application Development and Automation 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: 
Read only

dialog modules

Former Member
0 Likes
646

Hi,

I have created a dialog program, in 1st screen, there is Display button and clicking that, we go to 2nd screen wherein we can edit and add a new record and when clicking save button , it saves to database table....

i have created 1 tranaction for that....

now, i need to create transaction , one for only display and another for change.... how is that possible???

Help, if u can...

Thanks.

5 REPLIES 5
Read only

Former Member
0 Likes
606

Hi,

create two transactions.

and write in ur prog like.

data:edit.

case sy-tcode.

when 'TCODE1'."display tcode

edit = 0.

when 'TCODE2'."change tcode

edit = 1.

endcase.

in the PBO module of second screen write like this.

loop at screen.

screen-input = edit.

modify screen.

endloop.

rgds,

bharat.

Read only

0 Likes
606

Hi,

Where to write foll. code??

case sy-tcode.

when 'TCODE1'.

edit = 0.

when 'TCODE2'.

edit = 1.

endcase.

Reply....

Read only

Former Member
0 Likes
606

hi,

in SE93

When you create a transcation code, set the first screen attribute as the screen number in which you will have the output.

For the other transaction put the first screen attribute as the scrren number of the screen in which u edit.

Hope this helps, Do reward.

Edited by: Runal Singh on Jan 30, 2008 4:20 PM

Read only

Former Member
0 Likes
606

Hi,

Create two transaction codes in se93.

mention screen no of first screen for transaction one and second for the second tcode.

Then call like:

case sy-ucomm.

when 'DISPLAY'.

call transaction 'ZSECOND'.

endcase...

like that..

Regards,

Renjith Michael.

Read only

Former Member
0 Likes
606

Hi,

I believe in the second screen you have two buttons 'Save' and 'Add'.

In the screen layouts, suppose you have a screen 1002 containing these two buttons, you assign function codes 'SAV' and 'ADD' corresponding to the buttons.

Be sure to add an ok_code field in the Element List of the screen.

Now you come to the flow logic of screen 1002 and under the PAI( as it is concerned with what all after you click any of the buttons ).

You click on MODULE USER_COMMAND_1002 INPUT after decommenting it. It will ask for a suitable include, choose the F include for subroutines.

Now write a PERFORM Subroutine_name statement and double click on the subroutine_name. This is enable you to create one subroutine( if you haven't created already ).Again choose the F include as the location.

Now, within this subroutine, proceed as:

DATA: ok_code TYPE sy-ucomm.

CASE ok_code.

WHEN 'SAV'.

<code>.

WHEN 'ADD'.

<code>.

ENDCASE.

Reward If Helpful.