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: 

Reg Dialog Programming..

former_member198892
Participant
0 Kudos

Hi,

any one can tell me, how to create a tabscript control in Dialog Programming, if u have any program plz send.

I want step by step guidence of creating Dialog Program. Please help me.

Expecting ur Valuable Replay.

Regards,

Thanuskodi T.

7 REPLIES 7

Former Member
0 Kudos

Hi,

PLz check the code.

Check this info.

syntax:

CONTROLS .

if you only want to determine the row of the table control. SY´-SUBRC allows you to check if the cursor is placed in a row of a table control.

u need to comment the performs of table control fields and write ur own perform statements. And u have to declare the table control fields as separate internal tables.

Check these link:

http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm

http://www.sap-img.com/abap/question-about-bdc-program.htm

http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/

http://www.planetsap.com/bdc_main_page.htm

Rgds,

0 Kudos

Hi,

There is an option to create it using a WIZARD in the screen painter SE51.

There is a button on the LEFT SIDE toolbar.

Regards,

Sesh

Former Member
0 Kudos

Hi

check this for tabstrip

Dialog is a module pool program.It has to be executed via a transaction only.

Dialog programming is used for customization ofscreens

see these demo programs

demo_dynpro_tabcont_loop

demo_dynpro_tabcont_loop_at

TABLES: ZFIT_BGTYPE.
DATA: W_CSAV(1).
DATA: W_NSAV(1).
DATA: W_BGTYPE LIKE ZFIT_BGTYPE.

DATA: ok_code TYPE sy-ucomm OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF T_BGTYPE OCCURS 0,
BG_TYPE LIKE ZFIT_BGTYPE-BG_TYPE,
END OF T_BGTYPE.



process before output.
module status_9000.
module set_status_9000.
module set_screen_9000.
process after input.
module user_command_9000.
module change.
module save.
process on value-request.
field zfit_bgtype-bg_type module value_help.






*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_9000 INPUT.
IF SY-UCOMM = 'NEW'.

loop at screen.
if screen-group1 = '001'.
screen-ACTIVE = '1'.

modify screen.
endif.
endloop.
W_NSAV = 1.
ENDIF.

CASE OK_CODE.
WHEN 'BACK' .
LEAVE PROGRAM.

ENDCASE.


ENDMODULE. " USER_COMMAND_9000 INPUT
*&---------------------------------------------------------------------*
*& Module STATUS_9000 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE STATUS_9000 OUTPUT.
SET PF-STATUS 'BUTTONS'.
* SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_9000 OUTPUT


*&---------------------------------------------------------------------*
*& Module value_help INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE value_help INPUT.

select BG_TYPE from ZFIT_BGTYPE
into corresponding fields of table T_BGTYPE.


CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = 'ZFIT_BGTYPE'
RETFIELD = 'BG_TYPE'
* PVALKEY = ' '
DYNPPROG = 'SAPMZA_BGTYPE'
DYNPNR = '0100'
DYNPROFIELD = 'ZFIT_BGTYPE-BG_TYPE'
* STEPL = SY-STEPL
* WINDOW_TITLE =
* VALUE = ' '
VALUE_ORG = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
VALUE_TAB = T_BGTYPE
* FIELD_TAB =
* RETURN_TAB =
* DYNPFLD_MAPPING =
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


*T_BGTYPE-BG_TYPE =


ENDMODULE. " value_help INPUT
*&---------------------------------------------------------------------*
*& Module SAVE INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE SAVE INPUT.
IF OK_CODE = 'SAVE'.
IF W_CSAV = 1.
DELETE ZFIT_BGTYPE FROM W_BGTYPE.
MODIFY ZFIT_BGTYPE.
CLEAR W_BGTYPE.
IF SY-SUBRC = 0.

COMMIT WORK.
ENDIF.
ENDIF.
ELSEIF W_NSAV = 1.
INSERT ZFIT_BGTYPE.
ENDIF.

CASE SY-UCOMM.
WHEN 'NEW'.
CLEAR ZFIT_BGTYPE.
WHEN 'REFRESH'.
CLEAR ZFIT_BGTYPE.
ENDCASE.


ENDMODULE. " SAVE INPUT
*&---------------------------------------------------------------------*
*& Module set_screen_9000 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE set_screen_9000 OUTPUT.
IF sy-ucomm = 'CHANGE'.
loop at screen.
screen-active = '1'.
screen-input = '1'.
modify screen.
endloop.
ELSEIF SY-UCOMM EQ 'NEW'.
LOOP AT SCREEN.
check screen-group1 = '001'.
screen-input = '1'.
modify screen.
endloop.
ELSE.
LOOP AT SCREEN.
check screen-group1 = '001'.
screen-input = '0'.
modify screen.
endloop.
ENDIF.

ENDMODULE. " set_screen_9000 OUTPUT
*&---------------------------------------------------------------------*
*& Module change INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE change INPUT.
IF SY-UCOMM = 'CHANGE'.

LOOP AT SCREEN.
check screen-group1 = '001'.
screen-ACTIVE = '1'.
modify screen.
ENDLOOP.
W_CSAV = 1.
SELECT SINGLE * FROM ZFIT_BGTYPE INTO W_BGTYPE.


ENDIF.
ENDMODULE. " change INPUT
*&---------------------------------------------------------------------*
*& Module set_status_9000 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE set_status_9000 OUTPUT.
* clear OK_CODE[].
* IF SY-UCOMM NE 'NEW'.
* APPEND 'SAVE' TO OK_CODE.
* endif.
* set pf-status 'BUTTONS' excluding OK_CODE.
ENDMODULE. " set_status_9000 OUTPUT

Reward all helpfull answers

Regards

Pavan

Former Member
0 Kudos

DATA: OK_CODE TYPE SY-UCOMM.

DATA: SCR TYPE SY-DYNNR VALUE '110'.

CONTROLS: TABSTRIP TYPE TABSTRIP.

PAI ________________________________

CASE OK_CODE.

WHEN 'EXIT'.

LEAVE PROGRAM.

WHEN 'F2'.

TABSTRIP-ACTIVETAB = 'F2'.

SCR = '0120'.

WHEN 'F1'.

TABSTRIP-ACTIVETAB = 'F1'.

SCR = '0110'.

WHEN 'F3'.

TABSTRIP-ACTIVETAB = 'F3'.

SCR = '0130'.

WHEN 'F4'.

TABSTRIP-ACTIVETAB = 'F4'.

SCR = '0140'.

screen 100.____________________________--

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_0100.

CALL SUBSCREEN SSAREA INCLUDING SY-REPID SCR.

PROCESS AFTER INPUT.

CALL SUBSCREEN SSAREA.

MODULE USER_COMMAND_0100.

<b>if useful reward points.</b>

Former Member
0 Kudos

Hi,

1.First create a screen (2000) in module pool program.

2.in layout option select tabstrip and give a name.

3.select the subscreen and paste it in any one tab for dynamic call , name the subscreen.

4.now create two screens(2100 ,2200) , with screen type as subscreen.

5. in 2100 layout and 2200 layout place ur requirements and continue

Example code.

in PBO of 2000 write this code.

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_2000.

CALL SUBSCREEN SUB INCLUDING SY-REPID DNR.

*

PROCESS AFTER INPUT.

CALL SUBSCREEN SUB.

MODULE USER_COMMAND_2000.

main prgram

ROGRAM ZSCREENSAMPLE .

CONTROLS MYTAB TYPE TABSTRIP. "tabstrip name

DATA : EXIT1, EXIT2.

DATA : DNR TYPE SY-DYNNR.

MYTAB-ACTIVETAB = 'TAB1'.

DNR = '2100'.

CALL SCREEN 2000.

MODULE USER_COMMAND_2000 INPUT.

CASE SY-UCOMM.

WHEN 'TAB1'.

MYTAB-ACTIVETAB = 'TAB1'.

DNR = '2100'.

WHEN 'TAB2'.

MYTAB-ACTIVETAB = 'TAB2'.

DNR = '2200'.

ENDCASE.

ENDMODULE.

&----


*& Module USER_COMMAND_2100 INPUT

&----


  • text

----


MODULE USER_COMMAND_2100 INPUT.

CASE SY-UCOMM.

WHEN 'EXIT1'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " USER_COMMAND_2100 INPUT

&----


*& Module USER_COMMAND_2200 INPUT

&----


  • text

----


MODULE USER_COMMAND_2200 INPUT.

CASE SY-UCOMM.

WHEN 'EXIT2'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " USER_COMMAND_2200 INPUT

Reward points if it helps..

Regards,

Omkar.

Former Member
0 Kudos

ssarea is tabstrip name.

and function codes

F1-student name

F2-address

F3-sex

F4-phone no.

and exit for exit.

i think it is good to u.

former_member235056
Active Contributor
0 Kudos

Hi,

Pls refer this link.

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/04/10f2469e0811d1b4700000e8a52bed/content.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/04/10f2469e0811d1b4700000e8a52bed/content.htm</a>

Pls reward points.

Regards,

Ameet