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

Enhancement for standard program

Former Member
0 Likes
441

Hi experts,

I have one req on standard report i.e HRALXSYNC.In this report selection screen we have 4 check boxes..

Central persons

employee

Organizational units

Branch from organizational unit

i need to check authorization when ever user clicks check boxes.(Other than employee check box)

it should error msg like " you are not authorized".

as of now. i did one implecit enhancement in that program...code is

________

-


Actual code

-


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1 ) Include HRALXSYNC, End S

$$-Start: (1 )----


$$

ENHANCEMENT 1 ZQMGL_AUTCHECK. "active version

CASE SY-UCOMM.

WHEN 'PCO'. (F code for central persons check box)

MESSAGE E000(ZMSG) WITH 'You are not authorized person'.

WHEN 'OCO'. (F code for Organization unit check box)

MESSAGE E000(ZMSG) WITH 'You are not authorized person'.

WHEN 'BCO'. (F code for Branch org unit check box)

MESSAGE E000(ZMSG) WITH 'You are not authorized person'.

ENDCASE.

ENDENHANCEMENT.

But while de bugging control is not coming to this enhancement..and error msg is not papulating..

can any body plz help me...

Regards,

Praveena.

Hi experts,

I have one req on standard report i.e HRALXSYNC.In this report selection screen we have 4 check boxes..

Central persons

employee

Organizational units

Branch from organizational unit

i need to check authorization when ever user clicks check boxes.(Other than employee check box)

it should error msg like " you are not authorized".

as of now. i did one implecit enhancement in that program...code is

________

-


Actual code

-


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1 ) Include HRALXSYNC, End S

$$-Start: (1 )----


$$

ENHANCEMENT 1 ZQMGL_AUTCHECK. "active version

CASE SY-UCOMM.

WHEN 'PCO'. (F code for central persons check box)

MESSAGE E000(ZMSG) WITH 'You are not authorized person'.

WHEN 'OCO'. (F code for Organization unit check box)

MESSAGE E000(ZMSG) WITH 'You are not authorized person'.

WHEN 'BCO'. (F code for Branch org unit check box)

MESSAGE E000(ZMSG) WITH 'You are not authorized person'.

ENDCASE.

ENDENHANCEMENT.

But while de bugging control is not coming to this enhancement..and error msg is not papulating..

can any body plz help me...

Regards,

Praveena.

2 REPLIES 2
Read only

former_member196064
Active Participant
0 Likes
396

Might find this useful.

Do [F1] on USER-COMMAND

code example below


SELECTION-SCREEN BEGIN OF BLOCK BLOCK01 WITH FRAME.
  PARAMETERS: P_TNAME TYPE DD03L-TABNAME     MODIF ID GP1.
  PARAMETERS: P_FNAME TYPE DD03L-FIELDNAME   MODIF ID GP2.
  PARAMETERS: P_TEST AS CHECKBOX DEFAULT 'X' USER-COMMAND FLAG.
SELECTION-SCREEN END OF BLOCK BLOCK01.

And then of course


AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'GP1'.
      CASE P_TEST.
        WHEN 'X'. SCREEN-ACTIVE = '1'.
        WHEN ' '. SCREEN-ACTIVE = '0'.
      ENDCASE.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Read only

chandra_sekhar3
Explorer
0 Likes
396

Hi,

list-of-techniques:

Source code enhancement :

It via implementing the implicit enhancement spots

Function Module Enhancement : It for additional import, export and always as optional + add has business logic

via implicit spot.

class enhancement : additional methods + standard method can be enhanced for additional imports exports and business logic

You can understood following below link.

http://wiki.sdn.sap.com/wiki/display/ABAP/EnhancementFramework-ImplicitEnhancement-EnhancingstandardtransactionPA30forinfotype0618-Academic+Qualifications

i think it will helpful for u.