‎2007 Jul 07 6:39 AM
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
‎2007 Jul 07 6:58 AM
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...
‎2007 Jul 07 8:06 AM
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
‎2007 Jul 07 7:07 AM
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
‎2007 Jul 07 7:09 AM
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
‎2007 Jul 07 7:36 AM
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