2016 Mar 01 9:19 AM
HI gurus
I have an assignment to add a new field on screen 300 of F_02 .I therefore tried to use a badi.
BADI_FDCB_SUBBAS02 and have created a field in structure invfo ZZSUM .
THESE ARE THE TWO METHODS I HAVE IMPLEMENTED IN THE BADI
method IF_EX_BADI_FDCB_SUBBAS02~PUT_DATA_TO_SCREEN_OBJECT.
IF sy-tcode EQ 'F-02'.
me->if_ex_badi_fdcb_subbas02~invfo = im_invfo.
ENDIF.
endmethod.
method IF_EX_BADI_FDCB_SUBBAS02~GET_DATA_FROM_SCREEN_OBJECT.
IF sy-tcode EQ 'F-02'.
ex_invfo = me->if_ex_badi_fdcb_subbas02~invfo.
ENDIF.
endmethod.
On subscreens Tab flow logic FOR SCREEN 100
PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
MODULE receive_data.
*
PROCESS AFTER INPUT.
* get again actual data from main screen
MODULE receive_actual_data.
*
* implement from here on customer coding
* enumerate ALL fields on the screen because of field transportation
* with or within a module
FIELD:
invfo-zzsum.
* send data back to main screen
MODULE USER_COMMAND_0100.
PROGRAM SAPLZBADI_EXAMPLE_FDCB_BAS
******************************************************************
* System-defined Include-files. *
*******************************************************************
INCLUDE LZBADI_EXAMPLE_FDCB_BASTOP. " Global Data
INCLUDE LZBADI_EXAMPLE_FDCB_BASUXX. " Function Modules
*******************************************************************
* User-defined Include-files (if necessary). *
*******************************************************************
* INCLUDE LBADI_EXAMPLE_FDCB_BASF... " Subprograms
* INCLUDE LBADI_EXAMPLE_FDCB_BASO... " PBO-Modules
* INCLUDE LBADI_EXAMPLE_FDCB_BASI... " PAI-Modules
INCLUDE LZBADI_EXAMPLE_FDCB_BASO01.
*INCLUDE LBADI_EXAMPLE_FDCB_BASO01.
INCLUDE LZBADI_EXAMPLE_FDCB_BASI01.
*INCLUDE LBADI_EXAMPLE_FDCB_BASI01.
INCLUDE LZBADI_EXAMPLE_FDCB_BASTOP.
FUNCTION-POOL ZBADI_EXAMPLE_FDCB_BAS. "MESSAGE-ID ..
tables: invfo.
data: o_badi_fdcb_subbas02 type ref to if_ex_badi_fdcb_subbas02.
constants:
exit_name_fdcb_subbas02 type exit_def
value 'BADI_FDCB_SUBBAS02'.
INCLUDE LZBADI_EXAMPLE_FDCB_BASO01.
MODULE receive_data OUTPUT.
IF o_badi_fdcb_subbas02 IS INITIAL.
CALL METHOD cl_exithandler=>get_instance_for_subscreens
CHANGING
instance = o_badi_fdcb_subbas02
EXCEPTIONS
no_reference = 1
no_interface_reference = 2
no_exit_interface = 3
data_incons_in_exit_managem = 4
class_not_implement_interface = 5
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
* object created ?
CHECK NOT o_badi_fdcb_subbas02 IS INITIAL.
* get data from main screen
CALL METHOD o_badi_fdcb_subbas02->get_data_from_screen_object
IMPORTING
ex_invfo = invfo.
ENDMODULE.
INCLUDE LZBADI_EXAMPLE_FDCB_BASI01.
module receive_actual_data input.
* object created ?
CHECK NOT o_badi_fdcb_subbas02 IS INITIAL.
* get data from main screen
CALL METHOD o_badi_fdcb_subbas02->get_data_from_screen_object
IMPORTING
ex_invfo = invfo.
endmodule. " receive_actual_data INPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module USER_COMMAND_0100 input.
CHECK NOT o_badi_fdcb_subbas02 IS INITIAL.
* put data to main screen
CALL METHOD o_badi_fdcb_subbas02->put_data_to_screen_object
EXPORTING
im_invfo = invfo.
endmodule.
................................................................................................................................................................
I DID NOT SEE ANY CHANGE WITH THIS METHOD.Now am trying to go to se51 on screen 300 i can see there is a subscreen area BLOCK but i am failing to modify it.
Please help am stuck ,dont know what else to do.
regards,
2016 Mar 01 10:30 AM
2016 Mar 01 10:45 AM
hi Sujeet,
I have said so many things.Where should i check enhancement spot.Program SAPMF05A ??? or on flow logic of screen 100.
regards
2016 Mar 01 10:47 AM
2016 Mar 01 12:58 PM
Hi Rejoice,
Did you checked the below document for the steps.
Regards,
Shadab.
2016 Mar 01 1:25 PM
Hi Shadab
Thats exactly what i used and i cannot see any change.
regards
2016 Mar 02 6:30 AM
Hi Rejoice,
I am not sure but document says that this applies to only transactions FB60, FB65, FB70, FB75 or for parking FV60, FV65, FV70, FV75.
Regards,
Shadab.
2016 Mar 02 6:50 AM
hi Shadab .
Yah i think that is where the problem is.Had got some references from other links proposing the use of that badi.Ok then.Now my challenge is i am on screen 300 of SAPMf05A and i saw a blank subscreen area named block.If yu try to go into change mode to add the field ,it requires an access key.I have tried to search through the program any screen -exit but could not find one.
on some link someone gave these points below
Hi
WITH THE HELP OF SCREEN EXIT YOU CAN INSERT NEW FIELD IN THE SCREEN HERE ARE STEPS TO FIND SCREEN EXIT
GOT TO THE PROGRAM OF THE TRANSACTION IN WHICH THE SREEN EXITS.
FIND THE PACKAGE,
GO TO CMOD, IN ENHANCEMENT SETTINGS, GIVE THE PACKAGE NAME
U WILL GET ALL THE EXITS FOR THAT TRANSACTION, BY SEEING THE SHORT DESCRIPTION, U NEED TO IDENTIFY.
2ND METHOD
IN THE SCREEN LAYOUT, SEE ANY BLANK SUBSCREEN IS THERE OR NOT. IF IT IS THERE, THEN SCREEN EXIT IS THERE FOR THAT PARTICULAR SCREEN.
3RD METHOD
IN THE SCREEN MODULE POOL CHECK FOR "CALL SUB SCREEN".
IF IT IS THERE THEN, THERE IS SCREEN EXIT FOR THAT SCREEN
IF U ARE NOT CLEAR WITH THIS FEEL FREE TO ASK
I tried to implement method 2 because am seeing a blank subscreen area Block but on tying to modify an access key is required.
2023 Mar 02 5:20 AM
hi, I would like to know with which screen exit we can add a new field in the transaction F-02 /f-44/f-90 could you please detail