Application Development 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: 

Project definition greyed out for input-only selection from the pop-up.

Former Member
0 Kudos

Dear Experts,

I have a requirement where we need to gray out Project Definition in tcode CJ01/CJ06/CJ20N. For input only one can choose from pop up. Could anyone please let me know where to write the code for this. Any standard exit/badi is available?

Thanks.

1 ACCEPTED SOLUTION

former_member184569
Active Contributor
0 Kudos

Given below is the step-by-step procedure in implementing the Screen Exit for CJ01 transaction that is provided in SAP Technical site:

First create a project in CMOD  and attach the enhancement CNEX0006 to the project.

  1. Go to se11 and in the PROJ table u will find ci_proj include , in this add the required custom fields.
  2. Go to se51 give SAPLXCN1 in the program name with screen number 0600 , create the subscreen and in the layout choose Dictionary./Program fields and drag and drop in the screen .
  3. If u want to write any logic before the screen is displayed do it in PBO.
  4. Now in the function exit EXIT_SAPLCJWB_002 , go in the INCLUDE ZXCN1U11 and write this logic
    move-corresponding sap_proj_imp to proj.
  5. Now in the function exit EXIT_SAPLCJWB_003 , go in the INCLUDE ZXCN1U12. and write this logic
    move-corresponding proj to cnci_proj_exp.

    Activate the project .

Since you dont have to add new fields, you wont have to do steps 1 and 2.

Implement  your screen logic for greying out the field in the PBO enhancement.

7 REPLIES 7

Former Member
0 Kudos

hello,

The field PSPID has a search help, you could see if you can create a new search help and assign it. Or else you could do a enhancement to the search help exit VS_HP_PSPID_SEARCH    (FM  - VS_HP_PSPID_SEARCH). Restrict the values based on conditions or user etc.

best regards,

swanand

0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Prachi,

I do not understand part of your question related to F4 since these are all create transactions so user can enter any valid ( number or character or combination ) values. Greying out part can be easily achieved via screen/ transaction variant.

How to is here -

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a070bfbb-d34a-2d10-b092-ecbe0b0d4...

BR.

0 Kudos

Hi ankit,

My requirement is in tcode CJ20N.CJ01.CJ06 the field Project Definition number should come as in grey-out mode and secondly user can enter the value only using F4.

Through transaction variant it will not be achieved.

Please let me know what else i can do.

BR,

Prachi.

former_member184569
Active Contributor
0 Kudos

Given below is the step-by-step procedure in implementing the Screen Exit for CJ01 transaction that is provided in SAP Technical site:

First create a project in CMOD  and attach the enhancement CNEX0006 to the project.

  1. Go to se11 and in the PROJ table u will find ci_proj include , in this add the required custom fields.
  2. Go to se51 give SAPLXCN1 in the program name with screen number 0600 , create the subscreen and in the layout choose Dictionary./Program fields and drag and drop in the screen .
  3. If u want to write any logic before the screen is displayed do it in PBO.
  4. Now in the function exit EXIT_SAPLCJWB_002 , go in the INCLUDE ZXCN1U11 and write this logic
    move-corresponding sap_proj_imp to proj.
  5. Now in the function exit EXIT_SAPLCJWB_003 , go in the INCLUDE ZXCN1U12. and write this logic
    move-corresponding proj to cnci_proj_exp.

    Activate the project .

Since you dont have to add new fields, you wont have to do steps 1 and 2.

Implement  your screen logic for greying out the field in the PBO enhancement.

0 Kudos

Hi sushmita,

Thanks for the reply. But my problem is not solved as after greying out the field , when I am pressing F4 to select value for that field it is not coming on screen.

I have written the logic in PBO like this:

LOOP AT SCREEN.

IF SCREEN-NAME = 'PROJ-PSPID'.

SCREEN-INPUT = 0.

SCREEN-ACTIVE = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Do let me know where I need to modify.

Regards,

Prachi

0 Kudos

Yes you are right, when the field is greyed, its very complicated, if not impossible, to move values to the field from search help. Specially as an enhancement.

I would suggest another enhancement. Let the field remain as input enabled.

But perform a validation on the inputted project ID if it is one of the existing projects.

The search help is taking values from table proj , field pspnr (Project definition (internal), PSPID (Project Definition).

So you can add the validation (might have to be in PAI), to see if the inputted value PSPID exists in table proj. And if it does not exist, exit after giving the message.