Skip to Content
author's profile photo Former Member
Former Member

recreate cl02 with limited F4 help

i need to recreate CL02 and cL01 transaction so that the F4 help contains limited class types only.

kindly tell me how to proceed and also i need to restrict an object so that not all the users get access

to this zclo1 .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 14, 2014 at 06:42 AM

    Hi Pallavi ,

    You can accomplish it using SHD0 transaction.
    You can refer this document for starter.

    Learning SHD0 with Example

    Regards ,
    Giri

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 14, 2014 at 06:52 AM

    Hi,

    Let try this:

    1. Create one customized program with BDC, declare your search help in the program.

    2. Assign customized tcode to it. E.g. ZCL02

    3. Remove authorization from your users' roles/profile, don't let them access to standard tcode CL01 and CL02

    4. Assign authorization to your users' roles/profile, let them access to your customized tcode ZCL01 and ZCL02.

    Example:

    REPORT ZTEST.

    DATA: BEGIN OF BDCDATA OCCURS 30.

    INCLUDE STRUCTURE BDCDATA.

    DATA: END OF BDCDATA.

    DATA: BDCTAB LIKE BDCDATA OCCURS 100 WITH HEADER LINE.

    DATA: BEGIN OF MESSAGE OCCURS 0,

    MSG TYPE BAPI_MSG,

    END OF MESSAGE.

    DATA: I_BDCMSGCOLL TYPE STANDARD TABLE OF BDCMSGCOLL WITH NON-UNIQUE KEY TCODE INITIAL SIZE 0,

    WA_BDCMSGCOLL TYPE BDCMSGCOLL.

    PARAMETERS: P_CLASS TYPE CHAR18,

    P_KLART TYPE CHAR3.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_CLASS.

    * <--write your search help here-->

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_KLART.

    * <--write your search help here-->

    START-OF-SELECTION.

    PERFORM BDC_PROCESS.

    SORT I_BDCMSGCOLL BY MSGTYP.

    CALL TRANSACTION 'CL02' USING BDCDATA

    MODE 'N' "'N' for nothing 'A' Display all

    UPDATE 'S'

    MESSAGES INTO I_BDCMSGCOLL. " Return error message

    *

    READ TABLE I_BDCMSGCOLL INTO WA_BDCMSGCOLL WITH KEY MSGTYP = 'E' BINARY SEARCH.

    IF SY-SUBRC EQ 0.

    MESSAGE ID WA_BDCMSGCOLL-MSGID TYPE WA_BDCMSGCOLL-MSGTYP NUMBER WA_BDCMSGCOLL-MSGNR

    WITH WA_BDCMSGCOLL-MSGV1 WA_BDCMSGCOLL-MSGV2 WA_BDCMSGCOLL-MSGV3 WA_BDCMSGCOLL-MSGV4.

    ELSE.

    CALL TRANSACTION 'CL02' USING BDCDATA

    MODE 'E' "'N' for nothing 'A' Display all

    UPDATE 'S'

    MESSAGES INTO I_BDCMSGCOLL. " Return error message

    ENDIF.

    REFRESH BDCDATA.

    *----------------------------------------------------------------------*

    * Process *

    *----------------------------------------------------------------------*

    FORM BDC_PROCESS.

    PERFORM BDC_DYNPRO USING 'SAPLCLMO' '0100'.

    PERFORM BDC_FIELD USING 'RMCLM-CLASS' P_CLASS .

    PERFORM BDC_FIELD USING 'RMCLM-KLART' P_KLART.

    PERFORM BDC_DYNPRO USING 'SAPLCLMO' '0100'.

    PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.

    ENDFORM. "BDC_PROCESS

    *----------------------------------------------------------------------*

    * Start new screen *

    *----------------------------------------------------------------------*

    FORM BDC_DYNPRO USING PROGRAM DYNPRO.

    CLEAR BDCDATA.

    BDCDATA-PROGRAM = PROGRAM.

    BDCDATA-DYNPRO = DYNPRO.

    BDCDATA-DYNBEGIN = 'X'.

    APPEND BDCDATA.

    ENDFORM. "BDC_DYNPRO

    *----------------------------------------------------------------------*

    * Insert field *

    *----------------------------------------------------------------------*

    FORM BDC_FIELD USING FNAM FVAL.

    CLEAR BDCDATA.

    BDCDATA-FNAM = FNAM.

    BDCDATA-FVAL = FVAL.

    APPEND BDCDATA.

    ENDFORM. "BDC_FIELD

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.