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

help

Former Member
0 Likes
624

hello friends

i m making a module pool and i had SAVE in standard tool bar

but i want a new tool added with Add and want that wen i click on add then only Save button got activated

How can i do that

Please Help me out

Can i add any other toolbar except standard one.

Hope u got my problem

Please do reply

Waiting

With best Regards

Ruby

5 REPLIES 5
Read only

Former Member
0 Likes
592

Hi ruby,

I think, you can make do this in PBO & PAI of screen. Create GUISTATUS with SAVE button on standard tool bar. Have a button 'ADD' on application tool bar.

when you choose ADD button the follwowing will happen-

PBO

SET PF-STAUTS 'xxx' EXCLUDING '<b>SAVE</b>'.

PAI

case sy-ucomm.

when '<b>ADD</b>'.

SET PF-STAUTS 'GUISTATUS'.

endcase.

hope that helps...

pls. reward if useful...

Read only

0 Likes
592

FRIEND

case sy-ucomm.

WHEN 'AD'.

SET PF-STATUS 'EMP3000'.

message e003.

perform yn_popup using 'AD' 'Do You Want To Add ?'.

if user_answer = '1'.

  • MESSAGE I000.

perform max_emp_no.

endif.

it is displaying the save button after that but it is not performing

AD is application toolbar function name

if i take a button nad name it as such then this function is called

Please help and reply

Read only

Former Member
0 Likes
592

Hi Ruby,

This is code for addition and subraction of two number, here when i click ADDITION the addition of two numbers will display then when i click SUBRACTION then subraction of two numbers will display, then when i click SAVE button all the values will save in database.

GO TO ELEMENT LIST-->then give OK_CODE.

*******MAIN PROGRAM*************************

&----


*

*& Module pool ZADD *

*& *

&----


*& *

*& *

&----


PROGRAM ZADD.

TABLES: ZADD,SCREEN.

DATA: OK_CODE LIKE SY-UCOMM.

DATA: ITAB LIKE ZADD OCCURS 0 WITH HEADER LINE.

DATA : FIELD1(10) TYPE C,

FIELD2(10) TYPE C,

FIELD3(10) TYPE C,

FIELD4(10) TYPE C,

R1(5),

R2(5).

INCLUDE ZADD_PBO.

INCLUDE ZADD_PAI.

*********MAIN PROGRAM OVER************

PROCESS BEFORE OUTPUT.

MODULE STATUS_1000.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_1000.

----


***INCLUDE ZADD_PBO .

----


&----


*& Module STATUS_1000 OUTPUT

&----


  • text

----


MODULE STATUS_1000 OUTPUT.

SET PF-STATUS 'PF01'.

  • SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_1000 OUTPUT

&----


*& Module USER_COMMAND_1000 INPUT

&----


  • text

----


MODULE USER_COMMAND_1000 INPUT.

CASE OK_CODE.

WHEN 'ADDITION'.

ZADD-ADD1 = ZADD-NUMBER1 + ZADD-NUMBER2.

WHEN 'SUBTRACT'.

ZADD-SUB = ZADD-NUMBER1 - ZADD-NUMBER2.

WHEN 'SAVE'.

ITAB-NUMBER1 = ZADD-NUMBER1.

APPEND ITAB.

INSERT ZADD.

WHEN 'RA' .

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'RA'.

IF R2 = 'X'.

IF SCREEN-NAME = 'FIELD3'. " OR SCREEN-NAME = 'FIELD4'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDIF.

ENDLOOP.

ENDCASE.

ENDMODULE. " USER_COMMAND_1000 INPUT

IF USEFULL REWARD

Read only

former_member194669
Active Contributor
0 Likes
592

Hi,

In the TOP include

1. Declare an internal table of type sy-ucomm. i.e.

DATA : i_fcode TYPE TABLE OF sy-ucomm.

declare your own PF status as 0100 (something like that) that contains

ADD and SAVE buttons

2. Append Function Codes of the options

APPEND 'SAVE' TO it_fcode.

3. Set PF_-Status as shown below.

in PBO

SET PF-STATUS '0100' EXCLUDING i_fcode.

in PAI under user-command module

if sy-ucomm eq 'ADD'.

refresh i_fcode.

endif.

aRs

Points always welcome

Read only

Former Member
0 Likes
592

Hi

Use SET PF-STATUS 'XXXX" Statement. If u double click on XXXX u will direct to menu painter(SE41).... There u can define ur own buttons and menu. etc....

Reward me if its helpful.

Regards

Ravi